[A picture of private offices at Fog Creek Software] Alert! This ancient trifle retrieved from the Joel on Software archive is well-past its expiration date. Proceed with care.

Joel on Software

22

by Joel Spolsky
Friday, August 22, 2003

Raymond Chen has been running a series of interesting articles about the history of Windows and its API. Ever wonder why the time zone map no longer highlights the zone you're in? Or what the BEAR35, BUNNY73, and PIGLET12 functions are named after? Or why you turn off your computer by clicking "start"? I've bookmarked his site.

In particular, “The secret life of GetWindowText” should be required reading for anyone trying to understand API lockin. Describing one aspect of this simple and fundamental part of the Windows API takes a couple of pages. And then notice the kicker:

The documentation simplifies this as "GetWindowText() cannot retrieve text from a window from another application."

As Raymond says, “the documentation tries to explain its complexity with small words, which is great if you don't understand long words, but it also means that you're not getting the full story.” (Actually, Raymond, the documentation does tell the whole story, look closer.)

Anyway, the complexity behind such a simple function is a classic example of an abstraction leaking. And more importantly, it's one of the reasons it's so dang hard to write API emulation layers, like, say, WINE... because getting 100% compatibility means emulating all these bizarre internal complexities perfectly, even when they're not completely documented or the documentation doesn't really describe what happens in every scenario.

Printing

Does anyone have any suggestions for inexpensive ways to print two color, high quality letterhead, stationary, and business cards? A number of people have recommended Vistaprint; I've decided to avoid them because they seem to be pretty major and unreformed spammers.


Have you been wondering about Distributed Version Control? It has been a huge productivity boon for us, so I wrote Hg Init, a Mercurial tutorial—check it out!

Want to know more?

You’re reading Joel on Software, stuffed with years and years of completely raving mad articles about software development, managing software teams, designing user interfaces, running successful software companies, and rubber duckies.



About the author.

I’m Joel Spolsky, co-founder of Trello and Fog Creek Software, and CEO of Stack Exchange. More about me.

© 2000-2014 Joel Spolsky