Home

Feature creep and world flags

February 23, 2013

At this point I’m well overdue releasing the next version of Grasshopper. I’m replacing the code editors in the VB & C# components which is proving to be a much bigger job than expected. In the meantime —to stay sane— I’m doing small tangential projects. One of which is adding some basic level of cultural awareness to formatting.

Recently someone ran into the problem that Grasshopper displays all numbers using points as decimal symbols. In Holland commas are used to indicate the transition from the integer part of a number to the decimal part and points are used as thousand group separators, giving you numbers like 1.000,5, or one-thousand-and-one-half. In English locales of course it’s the other way around, resulting in 1,000.5

Dates are also formatted differently in different cultures, the Americans stupidly putting the month in front of the day rather than the correct way around. The upshot is that when you get 3/5/2013 you have no idea whether it’s supposed to be the third of May or the fifth of March.

Finally, since different languages use different alphabets, the sorting of text is also locale dependant.  Does A come before or after Ä, Ã and Å? Languages which use these exotic flavours of A probably have strong opinions on which one comes first, but a language which doesn’t might not care. A is considered lower than Æ in English, but higher than Æ in Danish.

So the obvious solution was to add an extra input to the String Format and String Sort components in Grasshopper that allows the user to specify a culture. The lazy approach would be to just use an integer input and require users enter the correct LCID, but that would be a very geeky and unfriendly thing to do. A somewhat better option would be to ask for a string which describes the culture people wish to use (i.e. “Dutch”, “Holland”, “Netherlands” or “Nederlands”). But I dislike using one type of data to represent another. There’s only a limited amount of predefined cultures in the .NET framework and there are many strings and integers which would not identify a valid culture.

So I decided to add a Culture data type to Grasshopper and then of course a Culture parameter. Two more hours of typing and icon Param_Culture_24x24 design. Then we had to consolidate the culture codes and any words people might reasonably use to describe them into a database. Luckily I was able to shift that work to K, but it adds up to another couple of hours. Next we’ll have to aggregate all the cultures into categories so that people can quickly find them in a menu-structure. So far we’re thinking of grouping them by language family (Germanic, Latin, Slavic etc.) and additionally by continent. That’ll take another 3 hours at least. Then of course when you display a couple of dozen languages in a menu dropdown it would help if they had a flag in front of them so it’s easier to find what you’re looking for. That’s another 5 hours of drawing 20×20 pixel abstractions of the flags of the world (note that some countries have been omitted as they do not have their own predefined formatting and sorting rules).

allflags

 

How many do you know?

I was shocked how many flags have patently offensive colour palettes. The sheer number of nations that thought it prudent to have adjacent areas of red and green is staggering. Also a sense of style seems to be utterly disassociated geographically and culturally. The best flags are clearly Switzerland Switzerland_20x20, Trinidad Trinidad_20x20, Albania Albanian_20x20 and Japan Japan_20x20 while the worst ones are Sami Sami_20x20 (which looks like the amateurish logo for a day-care centre) and Bosnia Bosnia_20x20 (which looks like it should be the business card for the European Bank).

It seems like a lot of work for adding an input to two components, but I’d like to think Grasshopper is partly what it is today precisely because I’m the sort of person who doesn’t want his users to enter LCID codes.

One Response to “Feature creep and world flags”


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: