A novelist programmer

It’s not hard to see analogy between a writer and a computer programmer. Both have a concept which they materialize in their work. Design and architecture are plot. Phrases are statements. Chapters are modules. Syntax is the rules which make the text readable (both by humans and machines). It’s not hard to observe analogies between a reader and a computer programmer, too. Although it’s not common to just read the program code for pleasure, it’s rather common to read it for knowledge.

Let’s imagine a book with a complex plot. It has a lot of intricacies, it’s long and twisted. The same could be said about a complex program. Writers of both need to understand the concepts behind them deeply. A thorough investigation is needed to gain deep understanding of their views and intentions. This requires time, experience and good memory. One has to “dive” into the book or program and stay for a long time there.

While it’s not very practical to modify the existing book, modifying a program is often desired and/or needed. This is where the processes differ, but the distinction is not harmful for our discussion. The distinction is natural — a book is a finished product or art object which expresses someone’s thoughts and opinions, while the program is basically a tool which is expected to be improved after its creation. This difference should be reflected in the works themselves. A book can be of any structure, while the program should be readable and understandable – that is, easy to maintain.

By now, we were talking about what we called “complex” narrations. But there can be a collection of short novels, possibly united by means of some literature techniques. A reader is generally not expected to read through all the book from the first page to the last, but rather she could open it at any page and start reading. The novels could be treated as parts of some bigger entity, but nevertheless they are somewhat independent of each other. Returning to the programming, it should be easy to understand isolated modules, and after that a programmer is ready to change whatever she wants. Such modifications could be called “short-term tasks”, which do not require the understanding of the whole system.

It’s different with “long-term tasks”. In case of complicated work one has to follow all the turns of the author’s thought and create a detailed “map” in their head. This often makes the reading interesting, but absolutely does not suit when the goal is practical — that is, not an entertainment. Digging into such work will be time-consuming and sometimes just boring. But it is required. Contrast this with learning a system step-by-step, by gathering knowledge of different parts and then integrating them in the head and thus seeeing how they are interconnected and interact with each other. The progress can be seen immediately. Of course, to make a big change (like altering the concept of a whole book) one still has to learn everything, but that is just an increase in scale. Small changes can be done instantly.

That is, we can say that a good program is similar to a collection of short novels or to a good-structured educational material.

This entry was posted in comp.misc. Bookmark the permalink.

Leave a Reply

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