The Poetics of Programming
David 2021-05-24
Programming is a task that has, for the entirety of its existence, been a task that desperately needs to be explained with metaphor, and for just as long it has been described by clear, strong metaphors that hopelessly mangle the ability to understand it. Programming has been, at various points during its existence: mathematics, secretarial work, a garden, and myriad other things that obscure its fundamental nature as an artistic work. Arthur Whitney was the only person to ever hit upon the correct metaphor for programming: poetry.
Ada Lovelace was the first programmer, but she never saw an electrical lamp, never mind a digital computer. She was able to be the first programmer because programming requires a computer exactly as much as poetry requires ink, which is to say not at all. A poet's ink simply allows them to persist their poetry in a form which is easy to hold or distribute. A programmer's computer simply enables the programmer to inflict the torturous monotony of running their program on a machine rather than a human, as was the case for an entire era in which "computer" meant "person, often a woman, who performs computations."
Programming is an act of communication wherein the programmer attempts to explain, to another human, what the programmer believes must be done in order to solve a problem. If a computer program were solely, or even primarily, meant to be read by a machine, it would not be written in a language that approximates human language. Program code, in pseudo-English, is always translated into electrical signals, ones and zeroes, because the code that a programmer writes is written for other programmers who have to understand it, not for the machine which just has to run it. The error message, or worse, the crash, are neon signs that advertise that programs being run on real hardware are, at best, solving the problem which they set out to solve only some of the time. They are works of literature and, like all literature, they contain mistakes that their author could not see. Mistakes in programs just happen to get more attention because they can (and have) lead to, for example, the loss of $440 million in about 45 minutes.
Poetry, like programming, uses metaphors in order to convey information that is difficult or impossible to convey in a meaningful way with more literal writing. Shakespeare compared his lover to a summer's day because she was more beautiful and more radiant. He could have said "my girlfriend is pretty" but he didn't because Shakespeare was not trying to describe her to his reader because he wanted his reader to know what she looked like; he was trying to make his reader feel what he felt when he looked at her. The metaphors of programming are less often as immediately beautiful than the ones used in poetry, but they serve the same purpose.
The "file" is the most ubiquitous term in computing, and it doesn't make any sense at all except as a metaphor. Your computer contains no physical directories (or folders) and would probably react rather poorly if you attempted to insert a physical file into it. Despite this, we all quite capably manage to talk about that spreadsheet of our household income and expenses as a file in our "Tax Documents" directory. We also know what that entails: we can copy it, we can move it, we can destroy (delete) it, we can send it to our accountant right now because we did not realize that it was already 28 April, and so on. If we were required to talk about our household expenses spreadsheet in terms of what it actually is—a series of high and low voltages in a semiconducting or magnetic material—we'd not be able to even finish accurately describing it before we would be at risk of accidentally committing tax evasion. Metaphor, poetry, is the only thing keeping our increasingly paperless, digital society from falling apart.