Saturday, October 8, 2011

Inside Macintosh


The web is currently flooded with eloquent tributes to Steve Jobs. I’ll chime in with a personal footnote.

In 1985, when I was a graduate student at Stanford, I bought my first Macintosh computer. Like so many others, I was stunned by its elegant graphics-based interface. Like fewer others (though quite a few at Stanford), I had to learn to program it.

The programmer’s manual, Inside Macintosh, was still a work in progress and hadn’t been officially published. But in response to the tremendous demand, Apple put out a “promotional edition” printed on cheap paper in a typewriter font, bound in a thick volume resembling a phone book. For a short time you could get a copy for only $25, and my check was in the mail as soon as I learned about the offer.

My original Mac is now long gone, but I still have that promotional edition of Inside Macintosh. Paging through it brings back a flood of memories.

Most of the manual, of course, is nuts-and-bolts technical details—what programmers would now call “API reference” material. But as you study it, a bigger picture comes into view: the exquisite care that went into the design of the Mac operating system, built from the inside out with the user in mind. The enthusiasm of the Mac development team occasionally bursts out in a word like “remarkable” or “amazing” amidst the manual’s otherwise dry prose. Even though this edition of the manual was hastily assembled and printed, someone made sure it had a full-color cover with that classic minimalist line drawing of a Mac.

The most important chapter of the manual, up at the front, is titled User Interface Guidelines. Rather than describing the operating system from a programmer’s point of view, this chapter instructs the reader on the underlying principles of Mac software, and firmly invites the reader to conform to these principles:
“The Macintosh is designed to appeal to an audience of nonprogrammers, including people who have previously feared and distrusted computers. To achieve this goal, Macintosh applications should be easy to learn and to use. To help people feel more comfortable with the applications, the applications should build on skills that people already have, not force them to learn new ones. The user should feel in control of the computer, not the other way around. This is achieved in applications that embody three qualities: responsiveness, permissiveness, and consistency.”
These words were revolutionary in 1985, and they made a lasting impression on me. Even today, most programmers need to pay more attention to them.

More generally, Apple has set an example for creative people everywhere: Don’t settle for mediocrity and mere functionality. Always strive for excellence, and be sure to incorporate the joy of the creative process into your work. Patiently refine every detail of your creation, while staying focused on its ultimate purpose.

That was the ethos that Steve Jobs brought to Apple, and to so much of the world.

Tuesday, October 4, 2011

The Probability of Zero


Good news: Ogden has had zero homicides so far in 2011 (probably).

Bad news: Journalists don’t understand statistics (still).

“Killings down in Ogden,” proclaimed the headline across the top of Sunday’s front page, with a great big zero on one side. Pending a final ruling on whether a fatal July shooting was accidental, Ogden has probably gone for nine months without a murder or automobile homicide. This isn’t just great news; it’s historic.

The article falls short, though, in discussing the possible causes of this unprecedented drop in killings. Relying entirely on statements from the police chief and the county attorney, the article mentions three possible contributing factors: a new police “Crime Reduction Unit” created four years ago; a year-old injunction against the city’s oldest street gang; and a shift over the last several years toward handling gun-related crimes in federal court.

Of course, all of these factors could very well be contributing to a long-term reduction in crime, and the lack of recent homicides could very well be part of that long-term trend. But statistically, you just can’t tell.

You see, Ogden’s homicide rate was already pretty low. According to a data table printed on page 5, Ogden hasn’t had more than four homicides in a calendar year since 2001. During the last nine years, the average number in any nine-month period was only two and a half.

With this data and a simple formula from elementary statistics, we can answer the obvious question: Given this average rate of homicides, what’s the probability of getting zero homicides in any given nine-month period? The answer is one in e2.5, where e is the famous mathematical constant 2.718 (approximately). Do the math and you find that the probability is about one in 12. (Note that e2.5 means e times e times the square root of e, or about 2.7 times 2.7 times 1.6.)

I’m assuming, though, that each homicide is an independent event. In fact, some homicides occur in related groups. If the average number of independent homicide groups during any nine-month period is only 2.0, then the probability of getting zero in such a period is one in e2, or about one in 7.

If these probabilities still seem rather low, remember that the zero didn’t have to occur this year. Now that the average homicide rate has been at this level for about a decade, we’ve had ten one-in-seven chances so far to get zero homicides during the first nine months of a year. In other words, we were over-due.

It’s understandable that the police chief and county attorney would attribute the lack of homicides to their own efforts. It’s also human nature to look for simple cause-effect relationships. But at this point, the most natural explanation for Ogden’s zero homicides in 2011 (so far) is a mere statistical fluctuation. The article doesn’t even mention this possibility, and it should.

What can’t be explained by mere statistics is the long-term trend. Homicide rates across the U.S. have steadily declined for the last two decades, and Ogden appears to be following this trend. Social scientists have proposed a host of possible reasons for the decline, including better policing and increased incarceration rates, but also including our aging population, changes in immigration, shifts in the illegal drug trade, and availability of abortions (resulting in fewer unwanted children). The even more striking decline over the very long term is probably a result of improving economic conditions, gradually changing attitudes toward killing, and/or increased acceptance of government as the enforcer of laws.

Let’s hope these long-term trends continue, but let’s not jump to conclusions based on local short-term fluctuations.