Steve Krause

Coding for an Audience

In Peter Seibel’s Coders at Work, I particularly enjoyed a story from Bernie Cosell, who was on the team that wrote the original routing software for the Internet. He was talking about a theme that occurs throughout the book: a good program is written not just for the computer but also for the humans who need to understand the program or change it later—including the program’s original author.

At some college they had a two-semester course from September right through May and they had you work on some fairly hard program at the beginning. What they didn’t warn you was in April they were going to make you work on the program again, having now really run you through the hoops on other things. The idea was for you to be stunned at how hard it was to remember whatever it was you thought you understood perfectly clearly just six months ago.

This lesson is inevitable in any programmer’s career. Except for truly throw-away code, you are writing for an audience—at minimum for the future you. It’s a well-known concept in software development and is said often in various classes. But I suspect it’s rarely learned until the student is baffled by their own code that was written only months before. That’s the value of the “lesson” Cosell described.

So, to whichever school did it, I thank you on behalf of the students and their future employers.

Comments (1)

Public commenting is closed. I welcome any private comments or questions.

Get new posts in your inbox