Code, Music, and Productivity

I’ve have no doubt there’s a connection between code, music, and productivity.  Maybe some day, Joel will tell us what it is.  Until then, I share this tale from a software manual for the Spectre 128 (c. 1989).

While writing the original Magic Sac, the time came for me to code the keyboard & mouse driver. This was really hard, and I struggled over the design for a long time. Problem was, on the Mac, the mouse was run directly by the 68000 via interrupts, through the SCC chip. On the ST, the microprocessor, which periodically interrupts the 68000 to tell it where the mouse moved to. Also, on both units, the keyboard was run by a standalone microprocessor, and the codes returned were totally different. It was all totally different.

I dreaded doing it. I saw problems on top of the problems. Interrupt conflicts, mouse resolution, keyboard mapping… Finally, in desperation, I reached far back into my bag of programmer’s tricks for the old axiom: no pain, no gain.

I extended this to: If pain, gain. Well, it’s logical, right?

So I looked through my record collection for something that would be true pain. And I found it: Neil Young, live in concert. Off key, trembly voice, songs whose lyrics would depress a hyena.

I put on the record player on automatic repeat, turned it on, and set to coding. Six hours and 1,500 lines of code later, I was done. I tried assembling it for the first time. No errors.

So I ran it. The keyboard worked; I typed “a”, and the Mac knew I typed “a”. I was really impressed. so I got ready to debug the mouse code (which I was really dreading); I moved the mouse to make room for a legal pad to take notes on… and the mouse pointer onscreen tracked with the mouse as I moved it.

I played with the mouse in utter amazement for a few minutes. It worked.

This is the first piece of programming I have ever written that worked the first time. As any programmer will tell you, this doesn’t ever happen; it did for me, just this once.

I attribute it all to Neil. So, these days, I keep in reserve a cassette of Live Rust (no kidding, that’s the name), and when the programming gets tough, Neil gets going.

- Dave Small

Smash Computer

Artwork left behind by Desktop Support Services…

Refactor Ruthlessly Now

vaguery

First Post

From the field…

Chris, our software is dying. It is like a hound that has been fitted with rabbit ears so it could hear some specific thing. An elephants trunk added for a reason that nobody remembers but we cannot remove because the trunk infra-structure now keeps the head attached. One leg has been chopped off because it was in the way. A small JATO unit has been fitted to support the quadrant with the missing leg. A parachute has been permanently affixed to its back in case it should find itself in need of skydiving. The heart has been loosely attached in case it should no longer be needed. An arm to write with is attached where the leg used to be because it’s the only place to fit it. The arm must be shielded from the fire of the JATO unit. The miracle and testimony to the skill you have in engineering is that the dog still runs, but it is not maintainable (either code wise or time wise).