Minus Two Thousand Lines: How Bill Atkinson Carved QuickDraw and MacPaint

An editorial illustration featuring a translucent glass paintbrush hovering over a geometric grid of pixels and a color palette against an indigo background.

In 1982, when Apple managers asked engineers to report their weekly productivity in written lines of code, Bill Atkinson submitted a single negative number: minus 2,000. He had spent that week refactoring software routines for the Apple Lisa project, making region calculations six times faster while dramatically reducing the codebase size. To Atkinson, software engineering was an art form where clarity and efficiency mattered far more than raw volume.

Photograph: Andy Hertzfeld
Photograph: Andy Hertzfeld. Photo: Tony Wills. Wikimedia Commons · CC BY-SA 3.0. Resized and converted to WebP; no retouching.

The Negative Code Count

Atkinson believed that the best way to prevent software bugs was to write cleanly organized code that could be understood at a glance. According to the Computer History Museum, he routinely rewrote whole sections of code from scratch up to five times to make them completely readable. When project managers instituted mandatory weekly productivity tracking forms during the Lisa development push, Atkinson used his negative line count to illustrate that cutting redundant code yielded superior software performance. After receiving his negative tallies for a few weeks, management stopped asking him to submit the forms.

From LisaGraf to QuickDraw

Before Atkinson began work on the Macintosh, he developed LisaGraf for the Apple Lisa computer to manage bit-mapped graphics. When adapted for the Macintosh development effort, LisaGraf evolved into QuickDraw, the fundamental graphics library responsible for rendering screen visuals. QuickDraw comprised 17,101 lines of Motorola 68000 assembly code distributed across 36 files. To eliminate the distracting screen flicker common in early graphics software—where shapes were erased before being redrawn—Atkinson created an off-screen memory buffer. By composing graphics in hidden memory before rendering the result onto the display, QuickDraw achieved seamless visual performance.

Designing the Canvas

In early 1983, Atkinson began developing the Macintosh drawing program MacPaint, adapting concepts from his LisaSketch prototype, also known as SketchPad. Instead of relying on pull-down menus for drawing patterns as SketchPad had done, he created permanent visual palettes on the screen. The application's source code comprised 5,822 lines of Apple Pascal for high-level logic and 3,583 lines of assembly code for speed-critical routines. In April 1983, Atkinson added signature tools such as FatBits for pixel-by-pixel editing, the Paint Bucket for filling enclosed areas, and the Lasso for non-rectangular selections. He also wrote an optical character recognition routine to convert drawings into text, but removed it to prevent MacPaint from becoming an inadequate word processor instead of a dedicated drawing application.

Squeezing Art into 128 Kilobytes

Atkinson completed MacPaint in October 1983, fitting the software within extraordinary hardware limits. The original Macintosh operated on an 8 MHz Motorola 68000 processor with just 128 kilobytes of total memory and no dedicated floating-point hardware. MacPaint, QuickDraw, and essential operating system routines all had to coexist within this tiny memory footprint.

Despite these tight constraints, Atkinson's refined codebase delivered smooth, responsive visual interaction when the computer released. By proving that high-speed bit-mapped graphics could run inside 128 kilobytes of memory without floating-point hardware, MacPaint and QuickDraw established a new benchmark for personal computer software. Atkinson showed that meticulous refactoring and clean architecture could unlock interactive computing on constrained hardware.

Cover: AI-generated editorial illustration; not a documentary photograph.

Source: MacPaint and QuickDraw Source Code

Share this article
FacebookThreadsLinkedInX

Leave a Reply

Your email address will not be published. Required fields are marked *