Good Code is like Good Literature

The basis of many innovations is software. “Software is eating the world”, said Marc Andreessen already in August 2011. Software is also the basis of all machine learning. And what does software consist of? It is code. Now, I think it’s important to understand what good code is.

A great colleague recommended the book “A Philosophy of Software Design” by John Ousterhout. The author’s name looked familiar to me. But I didn’t immediately know why. Only in a later chapter, in which John wrote about the Tcl scripting language, did it become clear to me. I had used the same author’s book “Tcl and the Tk Toolkit” a lot in the 1990s. I then developed Linux device drivers (loadable modules for the Slackware Linux 0.99 kernel) for a measurement system in my physics studies, and I used Tcl/Tk for the application interface.

“A Philosophy of Software Design” is cool. It reminded me very much of another book I had read this summer: “On Writing Well” by William Zinsser from the early 1970s. The book explains how to write texts of all kinds. Be clear and use short sentences. Write for yourself, as you would like to read it. Good code is like good literature – it’s timeless. The software design tips are like tips for writing any kind of literature – keep it simple and avoid complexity. Define good interfaces with the right level of abstraction. Think of other developers who will work with the code after you.

These rules haven’t changed for decades. And even the seemingly agile and fast innovations end up abiding by these rules because they are based on code. And ideally on good code.

Leave a Reply

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