Lines of Code

When writing about Tim Mackinnon I was reminded of the Bill Atkinson -2000 lines of code story in Apple from the early 1980s. The story goes that managers decided to track productivity by asking engineers to fill in a form at the end of each week. In the first week of this change Atkinson was working on QuickDraw, a 2D graphics library that he had written.

Bill Atkinson, the author of Quickdraw and the main user interface designer, who was by far the most important Lisa implementer, thought that lines of code was a silly measure of software productivity. He thought his goal was to write as small and fast a program as possible, and that the lines of code metric only encouraged writing sloppy, bloated, broken code.

He recently was working on optimizing Quickdraw's region calculation machinery, and had completely rewritten the region engine using a simpler, more general algorithm which, after some tweaking, made region operations almost six times faster. As a by-product, the rewrite also saved around 2,000 lines of code.

He was just putting the finishing touches on the optimization when it was time to fill out the management form for the first time. When he got to the lines of code part, he thought about it for a second, and then wrote in the number: -2000.
-2000 Lines Of Code -

The idea of using lines of code written as a metric makes sense in a blunt force trauma sort of way. You can use a hammer to open a door when you forget your keys or you could call a locksmith or pick the lock yourself. The first option may be the quickest to route in and may be necessary in some cases. However, you're going to need a new door afterwards.

Incentives can work in a similar manner. Reward people bugs fixed and there is an incentive to write bugs to fix them later. Track lines of code written and the incentive is to write more code, not better code.

Subscribe to Tom Conneely

Don’t miss out on the latest issues. Sign up now to get access to the library of members-only issues.