The Difficulty of Keeping Focus

A few weekends ago, through a combination of stupidity and bad luck, I managed to leave my eyeglasses on a train. Without them I can see about three feet in front of me pretty clearly, and beyond that, everything is pretty much a blurry haze.

To make the situation worse, I was traveling for work at the time, 2,812 miles from home and my extra pair of specs. Luckily, I was in the second-least-horrible place in the world this could have happened: Washington DC. I grew up just outside the city, worked in it for six years, and spent most of my free time between June 1998, when I left school in Pittsburgh, and April 2005, when I moved to San Francisco, in the neighborhood where my hotel happened to be. I still know the city well enough that I was able to stumble my way around and find food for two more days without being able to read any of the street signs or storefronts until I was just about right on top of them. But it was not fun, especially when it came time to try to navigate the airports on my way home.

Continue reading “The Difficulty of Keeping Focus”

Of Names

I’ve always liked my name. Tim Moore: it’s short, easy to spell and not often mispronounced. Even when expanded to its formal entirety — Timothy Marcus Moore — it’s hard to get it wrong.

What my name has going for it in simplicity, however, it lacks in uniqueness. Although my Googleability has risen quickly in the last year and a half or so, if you search for “Tim Moore” you’ll tend to come across Amos ’n’ Andy actor Tim Moore, ’70s AM radio soft pop singer Tim Moore, Michigan Republican Representative Tim Moore, or British travel writer Tim Moore before you find any mention of yours truly. The Wikipedia disambiguation page for my name doesn’t even mention me among the nine “people called Tim Moore.”

Continue reading “Of Names”

Infallible APIs

Fellow Atlassian Charles Miller recently wrote an amusing post about methods and constructors in Java that declare a checked exception, but can be called in a way that is required by the specification not to fail. A common example involves string encodings:

try {
    s = new String(byteArray, "UTF-8");
} catch (UnsupportedEncodingException e) {
    throw new Error("UTF-8 is missing??");
}

This code is the result of two conflicting factors. On one hand, since the constructor in question takes an arbitrary character encoding, the case of the encoding being unavailable must be taken into account. On the other hand, 90% of code that calls this constructor will be explicitly invoking a character set that is required to be provided with the Java Runtime Environment, and its absence would be an error serious enough to justify terminating the VM entirely.

The unnecessary exception-handling code is ugly, and obscures the actual intent of the method in which it appears. Charles jokingly proposes adding a “yoda” statement to Java to tell the JVM, “do, or do not; there is no try.”

Continue reading “Infallible APIs”

Macworld 2008 Predictions

This year, even more than ever before it seems, everyone has a pet theory on what Steve Jobs will be announcing at tomorrow’s Macworld Expo keynote session. Since I’ve got my own ideas and have been trying to get myself to write on this site more often, I’ll throw in my two cents on the matter. I don’t have much that hasn’t already been said by many others, so I’ll try to keep this interesting.

Continue reading “Macworld 2008 Predictions”