Code Poetry, or musings on poetic form
This started with a podcast I was listening to that mentioned Ruby, a relatively new programming language that emphasizes clean layout of its code as well as syntax that encourages simplicity and human comprehension. That plus code’s emphasis on line breaks, punctuation, white space, etc. struck me as a variation of my friend KA’s “poetry space” idea (”the idea that a poem can exist as a space for symbol that could not be understood in any other context…a closed system analysis”).
What do programming code and poetry have in common? Elliot Swan draws some parallels in his essay, “Making Code Poetry.” For example, when narrowly defined, poetry is “literature written in meter,” or more generically, “literature constrained by particular grammatical rules (e.g. meter, syllable or line count).” That sets up a possible argument that code can be poetic, even though some poems would not be (such as free verse). Another attempt at definition would be Dylan Thomas’ description which eschews poetry as a simple literary subgenre, but instead as a fundamental creative act using language. And programming code is creative, on various levels (it both requires creativity and creates output), as well as being language-bound.
Wikipedia further offers, “Poetry often uses condensed forms and conventions to reinforce or expand the meaning of the underlying words or to invoke emotional or sensual experiences in the reader, as well as using devices such as assonance, alliteration and rhythm to achieve musical or incantatory effects. Poetry’s use of ambiguity, symbolism, irony and other stylistic elements of poetic diction often leaves a poem open to multiple interpretations.” The first element, condensing, is another overlap with code - programming languages are often characterized by how compact they are syntactically (or how overweighted, such as C++), and great code often reveals a brilliant simplification of a complex problem.
Visual layout of code has certain aesthetics specific to it, particularly highlighted in teaching languages like Scheme and modern inventions like Ruby. This also appears as “syntactic sugar” in languages, where the programmer is provided with additional syntax options that make it “sweeter” in practice without affecting the formal output - the “sugar” provides a more familiar, more easily understood, or more “beautiful” way to express the code. (Conversely, “syntactic vinegar” or “salt” discourages bad code form. “Make that which is common, that which is preferred, into a beautiful structure. Sprinkle syntactic sugar to encourage. Then, make that which is uncommon, that which is suspicious, into an ugly structure.”)
As for ambiguity and other stylings, many elements of programming inherently provide great flexibility of meaning - variables, functions, recursion, abstraction. Code also has multiple modalities of meaning, from its raw “source code” form pre-translation into compiled/interpreted bytecode which can be consumed by the compiler/interpreter, or interpreted by another programmer, or even the same designer later in time; to the actual program output, which can self-contained, generative, interactive, reactive, etc. Code also represents one possible interpretation of a given problem, in that programmers will often write different code (based on their education, familiarity, style) for the same given requirements, within the same language.
So, code has poetic characteristics. It even has a rich collection of distinct languages, some derivative and others completely foreign in approach, that resist simple translation. And just as I’m curious about the poetic expression in artificial languages (how does one write a proper poem in Klingon, Tengwar-Elvish, Esperanto, American Sign Language?), surely I thought there must be some corpus of programming poetry. Not just “poems about programming”, but poetic forms derived from or entirely existing within a formal programming language. Most of the examples I found are the expected puns, such as the recursive acronym GNU that names a major Unix source branch (GNU meaning “GNU’s Not Unix”); and software art, like self-replicating automata and “Quines,” even William Gibson’s virus-infected “Agrippa” floppy (which contained a poem that could be read only once before it was destroyed by the reader software, rendering the ‘art’ worthless…but otherwise it was like having a painting under a cloth you could never remove without it bursting into flames). But I only ran across one short article about code itself used as poetry:
“In its 1962 manifesto, the French Oulipo group around the poet Raymond Queneau and the mathematician Francois le Lionnais proposed to use computers for poetic games, process text with Markov chains (just as a number of more contemporary digital arts works like Charles O. Hartman’s and Hugh Kenner’s “Virtual Muse” poems, Ray Kurzweil’s “Cybernetic Poetic” and Cornelia Sollfrank’s “Net.art generators”) and write poetry in the Algol programming language. In the early 1970s, Le Lionnais and Noël Arnaud published poetry written in Algol code which, just as the early Perl Poetry of Larry Wall and Sharon Hopkins from 1990.”
The further examples given are again “net art” which uses code as the means to produce some kind of algorithmic artifact as an art piece, but not code itself as a poetic form.
So, by what constraints could “code poetry” be produced - must it be syntactically accurate, or simply borrow from the style and grammar of a language? Must it compile, or does the code itself convey something - even if it no longer communicates to the machine for which the language was originally conceived? And to tie back to the original “closed system” idea, can poetic code be understood without reference to its literal instructions - purely appreciated for its form and language play rather than its mundane machine implementation?