Archive for January 6, 2009

Tuesday, January 6, 2009

17-inch MacBook Pro

The non-replaceable battery in the new 17-inch MacBook Pro doesn’t bother me a bit. However, as Jason Snell says:

Apple’s been pretty skimpy on licensing the MagSafe power connector to allow people to build external backup batteries. It would be nice if Apple would loosen the restrictions on MagSafe while it’s preventing people from swapping batteries.

I have two concerns about the new MacBook Pro. First, there are reports that the Mini DisplayPort to Dual-Link DVI Adapter doesn’t work very well. Second, it appears that the hard drive is not easily replaceable. This was my favorite new feature with the 15-inch unibody MacBook Pros. Removable hard drives provide more control over my data (especially if a repair is needed) and more storage options. Apple offers a 320 GB hard drive or a 256 GB SSD drive for $900 extra. I’d rather put in a 500 GB drive or a 256 GB SSD drive for $465, plus have the flexibility to upgrade as storage technology improves.

Update (2009-01-07): According to Macworld, the hard drive is user-replaceable, although not as easily as with the 15-inch. You just have to remove eight screws on the bottom panel, and this does not void the warranty.

Abstracting Away From Exceptions

Michael Feathers:

Exceptions seem to encourage “controlled abort” as an error handling policy. You throw an exception, it travels up the stack, and you catch it someplace else. All of your work is unwound (you hope) and then you are left with the task of logging the error or trying something else.

The comments are interesting, too.

I think exceptions are especially bad in Cocoa as a way of handling expected errors. Catching them is verbose, so the natural tendency is to do so as little as possible. Secondly, methods don’t declare whether they raise exceptions, so there’s no easy way to make sure you’re catching all the ones you should. NSError, ugly though it is, actually seems to be a pretty good system for managing and propagating errors generated by different layers of code and even different languages.

Update (2009-01-16): An interesting post from Mark Wooding about Lisp conditions vs. exceptions.

EXIF/IPTC Data on Resized Images

Erik Barzeski notes that Flickr only includes EXIF/IPTC information on your original images, not on the thumbnails and smaller versions. Amazingly, the Flickr staff seems to see this as a feature. I prefer to keep photos on my own servers, but none of the PHP-based gallery software that I’ve seen supports metadata on resized images, either. I wonder how easy it would be to add this using getimagesize and iptcembed. The ATPM galleries do include this metadata because the images were resized on my Mac using sips.