strInSpace or locInSpace?
April 10th, 2007So Charles Simonyi is in space. Old news, I know. It took me till today to realize that the person in orbit right now isn’t Charles Petzold. Somehow I managed to mix up the two based on the fact that they’re both connected with Microsoft and named Charles. Silly.
This is a pity because I was about to write fondly of the two editions of “Programming Windows” which are Petzold’s enduring legacy to programming and still occupy shelf space on my programming bookcase. Authoritative, dense and probably not for the faint of heart. None of the MFC junk in the earlier editions, it was all C. I haven’t programmed seriously for Windows since … oh, before Windows 2000 was released but they’re still useful for the occasional API reference. Long since superseded by other books on the shelf though.
But no, this isn’t Petzold in orbit. Wrong Charles. Instead, Simonyi the space tourist invented Hungarian notation. Charles Petzold (the other Charles) made it popular by using the notation extensively in his books.
I can’t remember how many times I’ve muttered that the guy who invented this piece of crap (meaning, Hungarian notation) had his head in the clouds. Now it seems that I was being prophetic. I was also wrong.
According to Joel Spolsky, Simonyi invented Apps Hungarian - a concept with which I agree and still use in other languages. Apps Hungarian notation uses mnemonics to indicate the semantics of a variable. That is to say, the intent. Systems Hungarian on the other hand, uses mnemonics to indicate the type. I hate Systems Hungarian with a passion. Guess which form of Hungarian notation is more prevalent in industry? Yeah. Not the good sort.