January 4th, 2009 Crockford on Feature-Driven Design

Some well-chosen, practical words from Douglas Crockford on the dangers of overly feature-driven design:

We see a lot of feature-driven product design in which the cost of features is not properly accounted. Features can have a negative value to consumers because they make the products more difficult to understand and use…It turns out that designs that just work are much harder to produce than designs that assemble long lists of features.

Features have a specification cost, a design cost, and a development cost. There is a testing cost and a reliability cost. The more features there are, the more likely one will develop problems or will interact badly with another. In software systems, there is a storage cost, which was becoming negligible, but in mobile applications is becoming significant again. There are ascending performance costs because Moore’s Law doesn’t apply to batteries.

Features have a documentation cost…Features that offer value to a minority of users impose a cost on all users. So, in designing products and programming languages, we want to get the core features – the good parts – right because that is where we create most of the value.

Crockford, Douglas. JavaScript: The Good Parts, pp. 99-100

August 31st, 2008 Clarifying Mac App Installation

Installing applications on a Mac can be confusing. Anecdotally, I’ve observed friends and family struggle with it, and it makes sense that they would. Luckily, it doesn’t have to be that way: app developers can make it easier, though few have.

Background

Traditionally, software applications are installed via an installer: a script that copies files to your computer and performs any configuration necessary to get the app up and running. Typically (and especially on Windows), files are dumped all over your hard drive. The program itself, yes, but also various supporting files: help files, images, libraries, etc. Deleting one of these files may cripple the application. To remove the app, you need to know exactly what was installed or you need an uninstaller.

With Mac OS X, Apple introduced application bundles to improve this situation. (Actually they were introduced with NeXTSTEP several years earlier and OS X inherited them.) An application bundle is a specially structured folder that looks to the user like single file. If you’re a Mac user, you can see what I mean: open your Applications folder and Ctrl-click (right-click) on an app there such as iCal or Mail. Select Show Package Contents and you’ll see what the app is made of.

Why is this important? Because now a double-clickable app can contain all its supporting files. Installing an is as simple as dragging it to your hard drive. To uninstall, drag it to the Trash. And applications are less fragile: because they’re self-contained they’ll run from anywhere (not just Applications), and the chances of destabilizing an app by deleting a depenency are low.

Current Practice

Since apps don’t require an installer, the simplest way to distribute one is simply in a zip archive. Unzip it and you’re done. If you drag to /Applications, great; if not, it’ll still work. Many apps are indeed distributed this way.

However, the de facto standard is to put the app on a disk image, compress the disk image, and distribute that. It’s also  standard to include either an image or an alias of /Applications to indicate the need to drag the app there.

Disk image window with drag-and-drop cue

Disk image window with drag-and-drop cue

There are several advantages to this approach:

  • You can distribute auxiliary files (plug-ins, extras, manuals) without dumping them all on the desktop or obscuring the app in a folder.
  • When the disk image is mounted its window can open automatically, providing helpful feedback to the user.
  • It enforces the idea of dragging the app to /Applications.
  • It allows you to present a license agreement to the user when the DMG is mounted.
  • You can include branding in the DMG’s window.

The Problem

The trouble is, this approach works too well. Because apps can run from anywhere, a user can launch the app from the mounted DMG, resulting in the following scenario:

  1. A user downloads your app.
  2. He double-clicks until the app appears in a window (that of the mounted disk image).
  3. Accustomed to installers or just to double-clicking on things to make them go, he double-clicks. Or, he drags the app to the Dock and clicks on it there.
  4. The app launches. Everything is great.
  5. Later, the user restarts his computer. The Dock icon turns into a question mark and the app’s window disappears. The user is confused and sad.

In other words, if a user misses or misunderstands the drag-and-drop cue, everything works so well that he fails to install the app, causing confusion later on. And it’s not a far-fetched scenario: many apps do still use installers and double-clicking on things tends to work. People’s visual focus can be very narrow, so some users will certainly miss the drag-and-drop cue. Aliases are arguably somewhat of an advanced concept, so the idea of dragging the app from one place in the window to another may not make much sense; and users who interact with apps exclusively via the Dock may not know the location or role of /Applications.

Luckily, this problem isn’t hard to solve.

The Apple Solution

The ideal solution would probably come from Apple. With Leopard (Mac OS 10.5), apps launched from DMGs already produce a warning:

OS warning when launching from a DMG

OS warning when launching from a DMG

Apple could simply replace “Open” with “Install” and copy  to /Applications before launching:

A revised launch-from-DMG dialog

A revised launch-from-DMG dialog

A context menu item or modifier-click would allow advanced users to run directly from the DMG. References in the Dock would be updated as well.

The Developer Solution

Of course we can’t rely on Apple to implement this. Nor do we have to. In the absence of an OS-level answer, individual vendors can provide the same functionality themselves.

How aggressive should vendors be? Delicious Library - which is not distributed by DMG - prompts users when the app is anywhere outside /Applications:

Delicious Library's launch dialog

Delicious Library's launch dialog

The disadvantage of this broader approach is that it must be presented as a warning or choice rather than a natural part of the install process. By only prompting for DMG-launched apps, we can make it a simple (and expected) “Proceed with installation?” confirmation rather than a more complex “Should I put this someplace else?” choice. And while Delicious Library’s prompt keeps a user’s desktop clean, it’s an extra and entirely optional step: downloaded apps scattered all over the desktop may be irritating to some, but it doesn’t prevent the user from launching them.

June 10th, 2008 3G iPhone Isn’t Cheaper After All

The excitement over the $199 iPhone has so far masked an important fact: apparently, the data plan for the 3G iPhone will be $30 USD per month (plus $5 for text messages), rather than the $20 that current iPhone users are paying. Doing the math:

  • A first-generation 8GB iPhone costs $399. Two years of data service at $20 costs $480, for a total of $879 (not including voice service).
  • An 8GB 3G iPhone costs $199. Two years of data service at $30 $35 costs $720 $840, for a total of $919 $1039.

In other words, a 3G iPhone will cost you $40 $160 more than a first-generation iPhone over two years. (Over one year, it’s $20 cheaper.) Of course, as a colleague of mine pointed out, when our existing iPhone contracts expire AT&T may jack up the rates on us anyway, so this argument may be moot. On the other hand, if the prices had remained constant the resale value of first-generation iPhones would be much higher and upgrading users would save money that way. In the end, it all comes down to how much faster Internet is worth.

Update: It appears to be even worse. The new $30 data plan doesn’t include SMS text messages. To get the 200 included in the older $20 plan, you pay an additional $5. I’ve revised the numbers above.

April 13th, 2008 Your Lego Mom

After dinner a few Thanksgivings ago we got bored. So we did what anyone would do: create a short spoof Civil War documentary with Legos. I should’ve posted this ages ago.