The Dichotomous Similarities of Code and Prose

 Writing code and writing prose are two entirely different pursuits. Yet, despite their inherent differences, they have some similarities which I find interesting to observe.

I have had over a decade of exposure to writing code in some form or another. A day doesn’t go by without me checking the source code of a website or reviewing some PHP scripting to check for logic errors. It’s what I do. I am by no means as hands-on as I used to be but my current role within a digital marketing agency means that unruly snippets of code rarely stop nipping at my ankles.

In the last year or so, I have felt a latent appreciation for literature making itself manifest. I think it has been there since my late teens when I started a lacklustre foray into reading the likes of Kafka, Dostoyevsky, Camus, et al. I liked their styles of expression and the freedom with which they wrote. I don’t like writing to be sugar-coated and glossed. I like it somewhat bitter and rough. I don’t know why that is. Perhaps it is an outward projection of how I view my inner self. Ah yes, I read a bit of Freud too.

I have little desire to harmonise the dichotomy between literature and web development. For me, they are intrinsically separate. It is this very separation which appeals to me. I have spent the best part of a decade as a business-minded scientist kind of guy, but I think I’m actually more of an artist kind of guy. (Or perhaps I’m just having a mid-life crisis.) With literature, I can escape from my world of emails, clients, and project briefs into a world of characters, narrative, and literary thought. After all, writing code is a science but writing prose is  an art. They are worlds apart. Right?

If I force myself to look a little closer, though, similarities begin to crystallise. Let us consider the concept of style.

No two humans write prose in the exact same style. Nor would they ever write two identical stories. Even if I was to hand two writers the same outline and ask them to develop it as their own, we would invariably end up with two completely original works. This is the beauty of personal expression in art. But this also applies to writing code.

With programming, it is usually possible to verify whether a program does what it is meant to do. We can test the code based on a set of requirements and we can state, without any doubt, whether or not the code does what it is meant to do. We can draw an objective conclusion based on scientific method. But can we verify whether the program was written in the best way possible? Define “best”! Here is where we start to drift into the world of subjectivity.

If I had to define “good” code, I would say that it needs to be neatly formatted, well documented, sensibly structured, easy to maintain, etc. But all programmers have a certain style. They will format their code in a particular fashion, they will add code comments in their own style, they will use different coding techniques, etc. In the same way that two authors would never produce the same work, nor would two programmers produce the same code. Herein lies the artistic nature of programming. We could still classify both of the programmers’ code as “good” (based on objective standards), but the differences between their work would be manifestations of their personal preferences, their personality, their art.

Let us assume, then, that programming is both a science and an art. If this is the case, why has programming not satisfied my appetite for artistic expression? Well, as is often the case, context plays a part. The way the trajectory of my working life has played out so far, I don’t ever see myself reverting to a full-time programming role. I have walked too far down the “business” and “management” path which diverges sharply from the path of a “pure” coder. Such is life.

I doff my hat to the true artisans of code as I fondly admire their work from a distance. I will always appreciate the art of programming, but the artist in me has found a new canvas. I now paint with words.

About J M Jackson

Dad first, etc second. Prefers writing about life instead of facing it. Occupied by unruly Nabokovian irritation & irrepressible Kafkaesque positivity. Working on his first novel.

Dad first, etc second. Prefers writing about life instead of facing it. Occupied by unruly Nabokovian irritation & irrepressible Kafkaesque positivity. Working on his first novel.

Leave a Comment