Home
Tom's Journal - Dilbert is reality
August 16th, 2005
12:32 pm
[User Picture]

[Link]

Previous Entry Add to Memories Tell a Friend Next Entry
Dilbert is reality
(Not that we didn’t all know that Dilbert is reality already, but this strip made me laugh because it describes a real situation I experienced.

Where I work we have a coder that is very demanding that when we have a list of countries (or languages, or whatever) that we use the official ISO list and the ISO abbreviations. I’m ok with that, really. However whenever we have such a list we include the entire list... the entire list. So every drop-down list to choose language doesn’t just contain the languages that our customers use, but every language defined by the ISO. That includes Friulian.



Thus I bring you today’s Dilbert...



http://www.dilbert.com/comics/dilbert/archive/images/dilbert2045783050816.gif

But wait, there’s more.



The list of languages includes dead languages. Since we use the official ISO descriptions, that means the pull-down list includes “Turkish, Ottoman (1500-1928)” and “Persian, Old (ca. 600-400 B.C.)” I imagine that any professionalism points we get from using the official ISO languages is reduced by how silly we must look by including languages that aren’t in use.

I also bet we lose professionalism points due to the fact that we let people list their preferred and second-choice language, but the text in the system is always English. Anything related to “language preference” is data we store in someone’s profile but never actually used. If we were to offer the ability to select what language the UI used it would be such a huge amount of work that adding a “language preference” to the user profile pages would seem small by comparison. But never fear, we’re collecting the data now so that we’re ready for something that will never happen.

Ironically the conformance to The God of ISO Completeness is violated... by him. The completeness is trumped by his politics. Somehow he got inserted into the requirements that the list would be augmented to include the Native American languages which were excluded from the ISO language list due to U.S. politics. I suppose he’s right about the politics of exclusion, but we’re in the mobile phone industry, and this system is mostly used by European mobile phone companies; I doubt any of them care or hold influence over whether or not the U.N. includes Cherokee in the next revision of the ISO language list.

There are other problems and unexpected side-effects.

Since the list is in a database, there is an extra database query for every page that lists one of these drop down selectors. I’m sure this contributes to our database load in unexpected ways. My proposal to generate that menu once a day was rejected because I’m not in development and I shouldn’t be telling them how to write code. Dare I point out that the UI is a bit unwieldy due to the size of the list?

Here’s the best part: The code he wrote breaks when you take advantage of his meticulously crafted list! A few months ago a system upgrade died and the root cause was that everything went to hell if someone’s profile listed their “preferred language” to be ZuXi. (The “X” is some Unicode character that I don’t know how to enter properly, so I won’t even try.) It turns out that having Unicode characters in that field broke other bits of code, all of which is stuff that he wrote. Someone had to hand-edit that profile to remove the Unicode chars before the upgrade would complete successfully.

Who set that in their profile? Me, of course. And don’t you dare insult me and my ZuXi brothers and sisters by telling me I can’t set it in my profile. It’s in the list, I should be able to use it.

[Extra credit for database people: Extra points if you see the other technical error being made. Double extra points if you properly use the term “third normal form”.]

Current Mood: laughing
Current Music: Till I Get to You-Nikka Costa-Till I Get to You

(Leave a comment)

Comments
 
[User Picture]
From:[info]ckd
Date:August 16th, 2005 05:08 pm (UTC)
(Link)
Zuñi? Easily entered with option-n n, on a Mac. (ñ should show it as well: ñ)
[User Picture]
From:[info]yesthattom
Date:August 16th, 2005 06:58 pm (UTC)
(Link)
Thanks! Thañks! Thañks!
[User Picture]
From:[info]jss1113
Date:August 17th, 2005 07:54 pm (UTC)
(Link)
Or did you mean "Thåñks"? Or maybe "Tháñks" or even "Thàñks"?
[User Picture]
From:[info]lilbjorn
Date:August 16th, 2005 05:26 pm (UTC)
(Link)
The strip reminded me of being in engineering school. No matter what amazing tale you would tell, the next two words you would hear from someone in the room were, "That's nothing!"

Yes, I hated engineering school.
[User Picture]
From:[info]awfief
Date:August 16th, 2005 05:46 pm (UTC)
(Link)
Um, well, since I don't have the schema in front of me, I can't tell you if it's in third normal form.

I like and support your idea of generating the menu once a day.

Nothing screams out at me, but the extra database query shouldn't take that long (assuming the whole table fits into RAM) -- I'm assuming the table simply lists the name of the preferred language and an ID flag, which the profile cross-references. That'd be the 3NF way to do it.

A better way to do it would be to just have a text field, and have the CODE generate what gets put in the text field, so that invalid entries aren't added.

Another better way, assuming MySQL, is to use an 'enum' field, and just have the values embedded in that. I can't imagine that field changes that much. (not all DBs have enum, sadly).

Do I get any points? Any more and I think I'd need to know more about the table structure as it stands.
[User Picture]
From:[info]yesthattom
Date:August 16th, 2005 07:01 pm (UTC)
(Link)
(We're not using a database that can cache smaller tables in RAM, and an OS that doesn't do a good job of caching files.)

You got the right idea, however. They're storing the description in every profile instead of using an enum (or storing the language code). This means that if a language ever has to be spelled differently, we'll have to search through all the tables and fix each one instead of fixing the master list.
[User Picture]
From:[info]awfief
Date:August 16th, 2005 07:03 pm (UTC)
(Link)
Does your company even HAVE DBA's? The DBA is supposed to work with developers so this kind of thing doesn't happen.
[User Picture]
From:[info]yesthattom
Date:August 16th, 2005 09:18 pm (UTC)
(Link)
DBA? What's that?

We wrote the database code ourself. Why would we need a dba? That would distract us from re-implementing features that SQL has had for ages.

....Bitter....
[User Picture]
From:[info]misteropinion
Date:August 16th, 2005 10:31 pm (UTC)
(Link)
Criminey....

Back in the Day, when I worked from something that is now part of a consonant-rich three-letter ILEC, we made the code monkeys from a Big Four consultancy explain their queries to the DBAs who would then write everything as stored proceedures. No interpretted SQL anywhere because they b0rked it up so badly. And DBAs so uptight about performance that they tried to get me to give them 200 file systems, one spindle big, so they could outguess the hardware, mirroring, filesystem, and database readahead code. Hee, those were the days. I had vision insurance and paid sick days then.
[User Picture]
From:[info]yesthattom
Date:August 17th, 2005 01:28 am (UTC)
(Link)
:)
[User Picture]
From:[info]awfief
Date:August 17th, 2005 05:40 pm (UTC)
(Link)
A DBA would be able to make your queries more powerful, faster. A way to improve the product without blaming fat code. :)
[User Picture]
From:[info]kathdem
Date:August 16th, 2005 06:19 pm (UTC)
(Link)
That *is* crazy...in the evil hive, of course, we also had the multi-lang problem, but take the opposite tack. Basically, we would only list a language if, in fact, you could actually get UI in that language. However, since it is a company wide mandate that everything be available in 27 languages, most lists like that are 27 items long.

[User Picture]
From:[info]aguynamedwill
Date:August 17th, 2005 06:33 pm (UTC)
(Link)
This made me laugh even as a non-tech person :)
[User Picture]
From:[info]madbodger
Date:August 18th, 2005 02:38 am (UTC)
(Link)
Of course, there are at least TWO different ISO country code lists (2-letter and 3-letter). And,
as you pointed out, countries are somewhat orthogonal to languages.
Tom's Homepage Powered by LiveJournal.com