Archive for February 17, 2010

Wednesday, February 17, 2010

Google Buzz


Unsure of its ability to successfully roll it out as an independent product, Google must have then decided to force feed Buzz through its Gmail user base of 175 million. Google executives likely reckoned that in a single day Buzz would garner more users than Twitter has been able to in two years after all that celebrity publicity. That really is why Gmail users woke up one day to find their private account details exposed to the public, unannounced and unprepared, because without such default exposure Google executives likely didn’t believe they could deliver a critical user base for Buzz. That’s not “improper testing,” it’s a platform strategy.

Dividing by Multiplying

Peter Ammon:

Every divisor has a magic number, and most have more than one! A magic number for d is nothing more than a precomputed quotient: a power of 2 divided by d and then rounded up. At runtime, we do the same thing, except backwards: multiply by this magic number and then divide by the power of 2, rounding down. The tricky part is finding a power big enough that the “rounding up” part doesn’t hurt anything. If we are lucky, a multiple of d will happen to be only slightly larger than a power of 2, so rounding up doesn’t change much and our magic number will fit in 32 bits. If we are unlucky, well, we can always fall back to a 33 bit number, which is almost as efficient.

Aperture 3 Faces and Storage

On the whole, I’m very happy with the new features and interface improvements in Aperture 3. Many of the changes have been discussed elsewhere, however I wanted to mention a few points that I haven’t seen covered:

Face Detection

I’ve been putting off keywording people in my photos because I assumed that face detection was on the way. Now that it’s here, I’m not sure how much I’m going to use it.

In one of my projects, the faces were totally messed up. Aperture detected “faces” in solid-color areas near the corners of the photos, completely ignoring the prominent people in the middle of the frame. I manually added some faces, drawing rectangles and naming them, but Aperture forgot this as soon as I clicked on another photo in the browser. The only way I could get faces to work with this project was to delete the versions and re-import the masters. Luckily, these versions did not yet have any keywords or adjustments because they would have been discarded.

In my other projects, at least the dozen or so that I’ve gone through since upgrading, the face detection seems to be working properly, pretty much like in iPhoto.

Face Naming

There was some confusion when multiple people had the same first name, or the same first and last name with different middle initials. Also, the Address Book integration didn’t quite work the way I expected. Now that I see how it works, I think it’s adequate, but I would rather that Aperture not get cute and try to abbreviate to ambiguous first names.

The “Unnamed Faces” strip doesn’t seem to offer a way to zoom out or jump to the original photo. As a result, there are some faces that I can’t identify because I can’t see enough context. I don’t want to click Skip, because then how do I get back that list of untagged faces? But if I don’t click Skip, it seems the strip will be forever filled with those same unnameable faces.

Face Storage

Aperture uses a sensible storage model (which I first saw in Mail and copied for EagleFiler) where an “index” database is used for speed but the data and metadata are stored in flat files and XML. If the database is deleted or damaged (or not backed up), the data and metadata remain intact, and the database can be reconstructed from the other files.

Unfortunately, this does not seem to be true for faces. It looks as though Aperture stores the face information in the Faces.db SQLite database but that it does not save it in the XML files along with the other metadata. (It does export faces as keywords in the JPEG files, but that’s not particularly helpful when reconstructing a library.) This makes me wary of spending lots of time tagging faces and possibly losing that work if there’s ever a problem with my Faces.db.

I’m considering using the face detection to aid in assigning keywords. However, there doesn’t seem to be an easy way to generate and assign keywords from faces (other than exporting) or to assign faces from keywords (if I were reconstructing a library where the face information had been backed up in that way). It’s a shame because, although Aperture has good support for keywords, the faces feature is better suited for tagging people (though, alas, faces don’t show up in the various metadata displays).

Core Data

Aperture 1 and 2 used Core Data, but Aperture 3 seems to have dropped it in favor of using SQLite directly. As a user, this doesn’t particularly matter to me, but as a developer making heavy use of Core Data I wonder about the reasons for the change. It’s curious that Mail, iTunes, iPhoto, and Aperture are highly visible “database” applications, none of which use Core Data. Does Apple think that Core Data is the wrong kind of technology for these applications? Or are there limitations/flaws that make the dog food unpalatable? My hunch is that for what Mail needs to do it’s more efficient to use SQLite directly. However, Aperture seems like exactly the kind of application that Core Data was intended for.


The folder structure inside the library package has been improved so that Time Machine backups should be much more efficient, especially if you rearrange your projects and folders. The thumbnails are now excluded from Time Machine backups, as is the BigBlobs.apdb. Other large database files are included, however: Faces.db, History.apdb, ImageProxies.apdb, Library.apdb, and Properties.apdb. My guess is that, except for Faces.db, these could all be reconstructed, so I’m excluding them from my CrashPlan backups.


Even after face detection completed (and I rebooted), Aperture 3 seems slower and more RAM-hungry than ever. I’m using a 2009 MacBook Pro, maxed out with 4 GB of RAM, and my library has about 34,000 versions. Aperture 2 was sluggish at times but bearable. Aperture 3 often locks up itself—and the rest of my Mac—for seconds or minutes. I’m going to see whether DiskWarrior helps.