Saturday, July 02, 2005

woo-hah! i got you all in czech*

Sometimes here at my desk, I get to feel like a superhero. Because you never know when a Stata Emergency is going to strike in some part of the world, and there are Stata Emergencies that I am the Only One Who Can Solve.

What heinous things can cause a Stata Emergency? Well, in Stata, if you want to create a new macro named -this- that is equal to an existing macro named -that-, the obvious syntax is:
    local this = "`that'"
instead, however, you really want to use:
    local this "`that'"
Amazing, isn't it, these mad Stata skillz I have? Even more remarkable is that the problem caused by using the first expression instead of the second only arises when -that- is longer than 244 characters, and even then it doesn't generate a explicit error in itself but instead just causes often-mysterious problems many lines later in your program.

Remembering to omit an equals sign where intuitively there should be one is kind of like the programming equivalent of one of those ambient party-drinking games where you are supposed to remember to make some particular gesture whenever you say another person's name. It's easy to forget.

Often, the error exists in a problem but only makes a difference when someone wants to use a particular program with an exceptionally long list of variables, a rare enough circumstance that the problem can lurk for months in a program that has circulated widely before somebody encounters the problem and sends the e-mail that causes me to spring into action.**

For some reason I don't quite understand, there seems to be a particular proclivity for long variable lists in the countries of Eastern Europe, places like Poland and Hungary and the Czech Republic. These users are very polite, friendly, and good at providing documenting a programming problem precisely enough so as to make it much easier to figure out and solve. When you are already envisioning yourself a Stata Superhero, it's all the more glamorous to be fighting statistical crimes in Eastern Europe, especially since I can often fix a bug and send a new version of the program in less time than it would take Superman even to fly his faster-than-a-locomotive ass there.

Even so, it's not so easy to work with a file where all the comments are all in Czech. And, since certain languages arrange their consonants and vowels in ways that sometimes seem random from an English-speaking standpoint, I am constantly making errors where I switch around the letters in the variable names and have to look back at each one three times before I get it right. But, of course, the work of a superhero should have its complications.

* Speaking of which, whatever did happen to Busta Rhymes? Your life remains incomplete if you've never heard Dorotha do her Busta impersonation on this song.

** Another issue is that there are a subset of users so trusting and naive as to always believe that a program is correct even when it gives bizarro output; these users cause me occasionally to lie awake at night and wonder what possibly insane ends programs I've written could be being put to at that very moment.

2 comments:

Anonymous said...

I believe superman is in fact "faster-than-a-speeding-bullet" (locomotives are relatively slower).

onemill said...

Man, you are awesome!

This is crazy. omitting the = sign?! crazy.