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”