The Best Code I Ever Wrote

Originally posted 2010-04-09 16:37:48

On Christmas 1981, our parents gave my brother and me our first computer: an Atari 400. I was in 7th grade and my brother was in 8th. My parents really couldn’t afford to buy this gift, but they consistently made sacrifices to make sure our active minds stayed engaged. They also gave us the Atari BASIC language interpreter, which came on a cartridge, and the Atari 410 cassette player so we could both store and load programs. The 400 was later replaced by an 800, the 410 by the 1010 cassette player (which moved the power supply to a wart) and later a disc drive (1050?). We wore all that computing power out. These were the days of Softside and Compute! magazines, which offered entire code listings that we painstakingly typed in, ran, debugged, and ran again. We read those magazines like we’d read comic books a few years before, typing in program listings, learning to program, and writing our own programs. We fired at spaceships, redefined character sets, drew mazes, and programmed sounds. It’s like the Bill Gates story, but without all that pesky fortune and fame.

Our church youth group leaders, always on the lookout for activity ideas, asked us if we could help them do a \”computer date night\” activity: we’d use our computer to match boys and girls up for a night of dinner, dance, punch, and cookies. We accepted the assignment, and crafted a questionnaire for all the youth to fill out to use as input to the matching program we’d write. The questionnaires were distributed, filled out, and returned, and then my brother and I sat down to write a pre-harmony program to correlate the soul mates. We looked at each other . . . and realized we hadn’t a clue what to do. We knew how to make a pixel-ball bounce around the screen, award 50 points for a downed alien, fire a laser with that cheap-movie laser sound, or make a spaceman jump over a meteor-induced crater. We knew nothing about love or romance, let alone how to help others find it.

Luckily, my brother had had the foresight to include a final question on the questionnaire we’d distributed that went something like this:

In this fully-computed dating experience that relies only on algorithms, not passions or preferences, do you have a preferred someone with whom to be matched?

I swear, he really does write that way — even back then.

The complexity of our task immediately plummeted. We turned away from the computer, ignored the answers to all the questions but the last, and found that people’s preferences aligned closely enough that matching couples for a night was child’s play. My brother matched himself with someone he was sweet on, and I conveniently had some other engagement that would keep me away from the activity. Spending an evening with a girl, at that time in my life, would have been enjoyable for neither me nor her.

So there — that’s the best code I ever wrote. Before you cry foul or think that’s a copout, my point is that we write too much code, and try to find digital solutions for all our problems when often analog problems will suffice. I was reminded of this when our CEO challenged our management team to solve a particular problem without dumping the problem on our development shop. We could have written one-off code to solve the problem, but creating and debugging software is expensive, and this problem didn’t warrant that level of cost. Code not written can’t have bugs, has no maintenance costs, does not require deployment scripts, and needs no documentation. Every line of code you write is both an asset and a liability. Think before you add to both sides of your technical ledger.

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.