Software is Literature

A computer's understanding of literature

5 minute read.

Originally an aerospace engineer, I've been a software engineer now for about half my career, but it doesn't quite feel like engineering to me. I don't want to start an argument on the definitions of terms, but hear me out, I think there are some interesting differences. 

I remember first thinking it was odd that at my university, the Computer Science department was not in the College of Engineering, but in the College of Arts & Sciences. Sure, "science" is right there in the name, but the practitioners are generally known as software engineers, and certainly they ran in the same circles as the rest of us engineers. However, while the civil, mechanical, aerospace, electrical, and chemical engineers were required to fill our time with math, physics, and mechanics, the software engineers had to take humanities and social science electives just like the comparative literature majors. 

I also remember when my career first turned from aerospace - I joined Microsoft's 3D printing group officially as a mechanical engineer (my job was closer to subject matter expert / PM) - I was excited to join a huge company of engineers where everyone would know math. How wrong I was! Certainly there are some, but I had to dig pretty deep to find people who were more familiar with matrix algebra than "I think I took that class in college, but haven't used it since." 

It took me awhile, but I'm finally understanding: software engineering is not at all like the rest of engineering. Engineering from the perspective of my old College of Engineering is fundamentally about pushing on the laws of physics. Everything we do, from aerospace to electrical to chemical is limited by the first and second laws of thermodynamics, and it's all about eking out small gains in efficiency as we asymptotically approach those limits. The job is about mechanical stresses, keeping parts from wearing out in strenuous physical conditions.

Software is not like this at all - there's no clear limit we're approaching in computational power or algorithmic efficiency. Chip fabrication is certainly engineering, but they do their job so well that software is allowed to live in a blissfully idealized world, rising above the mundane difficulties of physics. And of course the foundations of computer science are pure math proofs from the likes of Alan Turing, hence the science, but now the vast majority of software is built so many layers up that there is very little need for most developers to understand the mathematical underpinnings. 

So what is software about? Fundamentally it's about communication - to instruct a computer, yes, but more importantly other developers. There are lots of programming languages, but really only a few are actually for the computer: assembly, byte-code, machine-code. These are rarely seen by a human and no more commonly understood than hieroglyphics. Nearly all coding languages are designed for human consumption; a compiler has been created to translate that down into the languages the computer understands. 

What makes good software is not so much a clever algorithm, but clear logic. Excellent software engineers are known for their organization of code, their naming, their documentation. Good code is a joy to read because it flows like a story, allowing you to follow the entire thought process of the developer who conceived it. This is not so different than a novel, hence my thesis: software is literature.

I am strongly of the opinion that in the not-too-distant future the concept of a software engineer will vanish entirely as understanding of programming languages becomes a matter of basic literacy. Only a few hundred years ago reading and writing our native spoken languages was a luxury - now it's hard to imagine someone not being literate. Likewise, the ability to communicate what you want clearly enough that a computer can do your task for you automatically is too powerful a skill to be reserved for a subset of the population. 

However, to be literate is not necessarily to be a novelist or a poet or a journalist. We all need enough knowledge to handle common reading and writing tasks, but there is still plenty of space for specialization and splendid craftsmanship. Software, like literature, communicates knowledge, stories, and experiences, but in such a way as to leverage these incredible electrical tools we've invented to multiply what we humans can do on our own. It's such a vast field, it's hard to believe we categorize it into a single bucket.

What makes software unique among written works is that like engineering, and unlike the arts, it is nearly all the work of multiple authors. A novelist doesn't need to detail the reasoning behind their character arcs and themes and symbolism - they can allude to them subtly, bringing their readers along for the ride. If some other author were to try to write a sequel, those inner details would be important, but authors rarely allow that. Likewise, the machine code we hand to the computer is digested to remove any trace of our underlying reasoning. The purpose of clear, organized, human-readable code is to allow the next author to step into your shoes and continue where you left off. 

This multiple-author workflow, along with the computer's need for completely precise, unambiguous meaning, forms the distinction of programming languages from spoken languages. However, I would argue that the different programming languages are not distinct from each other in the same way as spoken languages are. Spoken languages are all solving the same problem, which is to say all the problems of communication between humans, and their differences are fundamentally arbitrary: it's impossible to say one nation's language is "better" than another in any objective way. Programming languages, on the other hand, are specialized to different tasks and different ways of thinking. 

I consider different programming languages to be more like the different styles of writing we find within each single spoken language: fiction, journalism, poetry, scholarly articles, technical manuals, etc. Each of these tend to use different vocabulary, sentence constructions, and tone, and some are so distinct they are difficult to read even by native speakers. Likewise, different kinds of creations like operating systems, data analyses, games, websites, and algorithms lend themselves to different ways of thinking and programming languages support them by codifying stylistic rules. 

Why do we make so many separate, incompatible programming languages? Precisely to divide developers into tribes. People have many different styles of thought, but in order to work together on the same code base it is necessary to share a thought process. The relatively narrow, opinionated workflows of each language mean their adherents mostly abhor other languages precisely because this language fits the way they think. And this process of developers self-sorting naturally results in like-minded individuals working together, for the benefit of all.

My advice to junior developers is the same as Kurt Vonnegut's to young authors: pity the reader. You are not just instructing a computer, but communicating with many people you may never meet who need to understand your thoughts so well they can complete them and correct them for you. Take your humanities classes, study the craft of the great communicators of history. You are writers - take pride in that!

Comments

  1. The humanities courses I took prepared me to do a better job of both natural language and programming language communication. Thank you for articulating this!

    (Only because this is about the craft of writing... Trivial near-homophone: "elude" s/b "allude" ☺)

    ReplyDelete

Post a Comment

Popular posts from this blog

Perseverance - a history of Manifold

3D Interaction

Manifold Performance