Conifer Productions

From ideas to apps. From mobile to global.

Find the API and Use It

It all started with an idea, something to scratch a personal itch. I was learning elementary French, and realized that there is an algorithmic approach to generating the numbers. Not a very elegant algorithm, but one that could easily be turned into a computer program.

The idea turned into a function, and soon enough it turned into an iPhone app, now called Les Nombres and available from the App Store (and also for Windows Phone). My function takes a nonnegative integer and turns it into a French language string, which is displayed on the screen. It could be fed into a speech synthesizer, but in Les Nombres the numbers are recordings of a native French speaker, which I think is nice. (And I couldn’t use recordings of Apple’s “Virginie” voice from OS X anyway due to its license.)

To keep things simple, Les Nombres only deals with the numbers 0 to 100, even though my function could do up to 1,000 out of the box. It involves some 90 lines of Objective-C code, including two recursive calls. It was fun to write, and I learned something in the process, but ultimately I didn’t have to write it at all.

Read more →

Unicode is in Your Now

If this blog entry was written 10–15 years ago, the title would have been “Unicode is in Your Future“. Luckily, the Unicode standard has been widely adopted during the last decade, so much so that it has almost become a part of the process and not something that you need to expend very much extra effort on. It is here Now, and has been for some time now.

However, Unicode still isn’t quite as widely understood as it needs to be, and it is often adopted as a black box that nobody can really fix when something goes wrong. Therefore it is not at all bad to try and bring it into perspective.

You need to understand at least why Unicode should be used, and how not to make it more complicated than it is (even though it can still be quite complicated). So keep reading.

Read more →

The Magic of Replaceable Parameters

Apart from hard-coding “Hello, world!”, another bad habit you may have picked up when you learned programming is constructing user-visible messages from parts: strings, numbers and other data, concatenated together.

For example, say that you had to show the user how many unread messages there are in a given mailbox. Let’s assume that mailboxName contains the name of the mailbox, and messageCount holds the number of unread messages. In Java, you might be tempted to whip up a user-visible message like this:

String message = "There are " + messageCount + " unread messages in mailbox '" + mailboxName + "'";

This is not the way to do it in an international application. Let’s find out why, and have a look at a better and much more future-proof way of doing it.

Read more →

What was that date again?

For many of us, dates and times are absolutely essential in our daily lives. We make appointments, set deadlines, celebrate birthdays and anniversaries, and generally mark time using clocks and calendars.

What makes dates and times interesting from a programmer’s perspective is that while there is a standard time (the Coordinated Universal Time or UTC), there are multiple local time zones in use all over the world. A single instance in UTC has many local equivalents, and offsets between time zones and universal time are wild and wonderful.

Not only are time zones a little tricky, but there are also multiple local representations for an instance in local time. A representation in this context means the way it is printed in a daily newspaper, in the calendar, and indeed, on the screen of a computer or a mobile device. In the realm of internationalization (I18N) they are known as date and time formats.

The conventions for showing local time are well established, and the differences between them are significant enough to cause a lot of confusion if care is not taken. While it would be the most logical thing to do (thank you Mr. Spock), it is hardly practical to expect all the world’s population to adopt a single standard date and time format such as the ISO 8601 international standard notation in their daily lives. The national and linguistic conventions are very well established locally.

Just recently, Nokia launched new Windows Phone devices in their Lumia series. The company wanted to build anticipation before the announcement with short teaser videos which all marked the date of the launch: 05.09.2012. If you saw this date advertised early in the year, you might think it could mean either September 5th or May 9th this year. But which is it? 

Read more →

Internationalization Lessons from UEFA

The UEFA EURO 2012, or the European football championship, is close to the end of group stage as I write this. (That would be “soccer” to U.S. readers.) As usual, I have been delighted to notice that UEFA has done a great job in getting the names of the various international players presented as accurately as possible, both on the UEFA.com website and in the mobile apps they’ve published.

UEFA’s good track record with names has been going on for a long time; I first noticed this when I started to follow the UEFA Champions League in 2000, when I was already working with software internationalization, and knew enough to pay attention to these things.

In this post I’ll examine what it takes to pull off a task like this – which you may also need to do.

Read more →