Bookmark and Share

As they train to become a doctor, new interns are taught about many different diseases that produce various sets of otherwise similar symptoms. In conjunction with this new and complex knowledge, they are also taught this truism: “When you hear hoofprints, you must not initially assume a zebra is in the vicinity.” This pithy remark is meant to impart that, for instance, if a patient comes in bleeding from an orifice, one must not immediately assume that Ebola is in the building; more likely something much more common is in play, such as hemorrhoids or perhaps an unfortunate excess of enthusiasm coupled with a new, ahem, toy.

One of the clearer signs that I was becoming a competent programmer was that the problems in my code began, more and more often, to in fact, be zebras. Instead of a misplaced character or a missing clause or some kind of blatant conceptual error, the abject weirdnesses that were most often populating the realm of my final, demonstrably accurate diagnoses came to be things like operating system bugs, broken libraries, incomplete emulations and exotic compiler bugs. Zebras.

As a case in point, a recent serious tail-chasing incident was a failure to get the Mac to print UTF8 text (in my case a combination of English and Chinese) via OSX, the python language, and the console. I was working with a Mac Mini; I felt that I had crossed every T, dotted every i, complied rigorously with everything I’d been told to do. At my wits end, I brought the code home to my 8-core desktop and commenced to try to debug it in the environment where I had the most tools — and the most comfort. But… the code worked. Worked just fine. Beautiful UTF-8 printing. Under the level of the same operating system. Same revision of python. The same python code. No matter how I came at it, it just… worked. I contacted Apple, and was (eventually) told by the author of the CUPs printing subsystem that the problem I was experiencing on the Mac Mini was the result of a code generation problem in the compiler Apple had used; you see, the CPU in the Mini was different from the one in my desktop. Oh. And by the way, no, they weren’t going to fix it. Not the very latest version of the OS. So suck it. Sigh.

As my attention was consumed by challenging technical problems and fascinating new realms of information, all powering into my mind on waves of pizza and spaghetti, the horses I knew (and didn’t exactly love, I’m afraid) faded into obscurity and zebras repopulated my world. Now they’re everywhere. Every time something really weird pops up, I smell the warm air of Africa’s grassy plains wafting about my office.

I’m trying to stop worrying about lions now. I really am.