|
|
|
| Non-WTF Job: IT Applications Manager at Questex Media Group (Auburndale, Ma) |
| « The Speed-up Loop | Do not run this script, ever! » |
At some point, you've probably thought to yourself "I'd love to write some code, but the keywords in my language of choice are just so pedestrian." Your vocabulary is more embiggoned than that of your colleagues. While they're content with DROPping a database object, you'd prefer to efface it. A contractor that Charles I.'s worked with was one of these elite.
His first order of business? Get rid of those (ugh) "while" loops that his mouth-breathing coworkers used. With the belief that elegant code should embody every aspect of the word "elegant," he wrote all of his "while" loops as "whilst" loops.
The day before his contract expired, he checked in all of his changes. And needless to say, it wouldn't compile anymore.
"The problem has to be on your end," he insisted. "It works on my system." For good measure, he compiled it and demonstrated that it worked.
Charles did the sensible thing — a find/replace to change all "whilst"s to "while"s, rebuilt, and everything was fine. Still, it was odd that it worked on the contractor's computer. A few months later, they figured out why:
#define whilst while
The compiler they used had a common header file that it'd include in each compilation. The file is in the local installation directory, and just specifies directives and things to configure the compiler. The only person who knew about the file was the clever contractor.
Don't be so hard on him. He was clearly an English major with a CS minor. He probably should have been writing technical documentation rather than code. |
|
The contractor ought to check into the reasoning behind his decision to use 'whilst' over 'while'. Both are derived from ancient words, 'while' is the older and 'whilst' has mainly dropped out of usage in the US. 'whilst' is usually considered more formal and literary, which is certainly not the point of code. Plus it's an extra letter to type and introduces no benefit other than to a single individual - but of course the contractor needs to maintain his belovéd creations :)
|
Re: Elegant Syntax Error
2008-01-25 08:27
•
by
jim
(unregistered)
|
|
I used the word "unbeknownst" in a bug report today. But it was tongue in cheek. (And before you rag me, YOU try saying "unbeknownst" with tongue in cheek.)
|
|
To be honest being British, these americanisms in programming languages are very annoying. I hate having to spell colour for example, the american way without the u.
C# is full of them in the System namespace such as changing all the S's to Z's (like in Globalisation) |
Okay, I was willing. It came out audibly as, "unbenoans(farting noise)". |
|
This story makes much more sense when you realize that Charles I.'s coworker wears a top hat, monocle and handlebar mustache!
|
| « The Speed-up Loop | Do not run this script, ever! » |