What Poems and Code Have in Common

…is compactness. We had dinner with some new friends last night, one of whom bailed out at MA in his pursuit of English because the job prospects for Ph.D. seemed grim. Now he writes software. Confronted with a mirror into my own unique combination of interests, I started thinking about what lines of code and lines of poetry have in common, and what might attract me to both.

Both require precision, and poetry usually also involves some degree of linguistic compactness. Also, just as software executes within the context of an operating system, poetry likewise “executes” within the psyche of the reader. A few lines in either form can have a profound impact, sending memory pointers in myriad directions.

While it is the context within which either form executes that largely determines the result, even the slightest adjustments in either form can have a significant effect. Subtlety, clarity, and intimacy with the language are all required traits that get amplified through the power of each discipline.

Similar Articles:

  1. More Thoughts on Poems and Code
  2. The Poets Are Pros Now, Like the Software Coders
  3. Poetry Code in Greatest Uncommon Denominator

Liked this? Receive new ones in your inbox.

(You can unsubscribe any time.)


  • http://outofthewoodsnow.blogspot.com/2006/10/word-made-flesh.html outofthewoodsnow

    Fellow blogger Robert wonders about the similarities between poetry and programming languages:

    Both require precision, and poetry usually also involves some degree of linguistic compactness. Also, just as software executes within the context of an operating system, poetry likewise “executes” within the psyche of the reader. A few lines in either form can have a profound impact, sending memory pointers in myriad directions.

  • Robert

    Just a p.s. to say I have started correlating the relative compaction of certain programming languages with the styles of certain authors, like:

    Emily Dickinson = C
    Walt Whitman = AppleScript

    etc.

    It seems to me most contemporary poetry is written in some variant of Java.

  • http://outofthewoodsnow.blogspot.com amcorrea

    Could you perhaps post on this in the near future? I’d be interested to hear more about this little theory and your reasons for matching the language with the poet…

  • http://carolpeters.blogspot.com Carol Peters

    Ashbery = lisp?

  • Robert

    I love the implications — on so many levels.

  • Robert

    I suppose I should necessarily unpack this a bit more if I want to reach anyone other than those likewise peculiarly disposed to both code and poems. C is a language known for its compactness, efficiency, terseness, and speed. AppleScript is one of the most English-like languages around, where you can literally say “tell such-and-such to do such-and-such.” It reminded me of Whitmans lovely long breathless lines. Java strikes a balance between expression and compression, just as a lot of contemporary poems seem to strike a balance between lyricism and narrative. Therefore many languages model themselves after Java these days (including JavaScript, C#, and even PHP).

    I suppose I could go on with my tabulation of correlations — poets to languages, and the reasons why. But more interesting to me is the metaphor between the human psyche and the computer operating system. Like all art, poetry exists in the consciousness of the observer (here, reader). Yet the universality of influence — like the portability of code between platforms — can be profound, and certainly more regular than irregular when it comes to so-called “great” poems. I like the notion that poems execute within consciousness in an almost procedural way, because I think enduring work really does this. And as much as we claim to “evolve” our understanding of supposedly “difficult” works, I think the essential experience that draws us to want to (pretend to, at least) “understand” the work is far more significant to what makes it great than any kind of scholarly backing done after the fact. The truth is, the program runs, and it works — the same or very similar ways on many different systems/readers. More than “bug free” such works can be said to transcend language, and have an impact as powerful on a human system as any software has ever effected on its runtime environment.

  • http://radishking.blogspot.com Rebecca

    I also sense a correlation between poetry; code, and the music of certain Baroque composers, Sebastian Bach in particular. The mathematics of poetry.

  • charlie

    You bring up some interesting similarities between code and poetry. In particular I’m drawn to the idea of the poem executing in the psyche of the reader. I like the analogy of mind as OS, and what makes the analogy (and poetry) all the more interesting is that where there are only several major operating systems in the computing world, I would argue that the human mind represents a single OS with infinite patches and hacks, making a continuum of unequal operating environments.
    The most interesting _difference_ between code and poetry (besides all the obvious ones!) is *flexibility.* Code is brittle; poetry is liquid. Code runs to predictable completion; poetry can execute differently for each person, each time. Code is sharp and metallic; poetry is flesh. And most importantly, code is flat; poetry is multidimensional.
    And just in case you haven’t run across this before, here’s a link to the old Perl poetry contests. Although not much great poetry here, the fact that the poems can be executed in Perl adds to the pleasure:
    http://www.foo.be/docs/tpj/issues/vol5_1/tpj0501-0012.html

  • Robert

    Rebecca, there’s a whole ‘nother post that would be fun to explore: correlating classical composers with poets! Thanks for rolling my brain down yet another rabbit trail. :)

  • Robert

    Hey Charlie, thanks for stopping by. Sorry it took me awhile to respond. My code responsibilities have been overshadowing my poetic musings this week.

    I think one of the insights I gleaned from pondering this analogy is that we can and should challenge some of the notions you mention above, for example: that poetry is necessarily flexible and code rigid. If we equate as a baseline that words strung together are recognizable as language (i.e. likely to fall into the patterns of grammar) with the requirement of code that it either compile or (if scripted) execute without terminal failures, it levels the playing field considerably. Assume, if you will, that both mediums just “work”. What is left to the poet as a domain of flexibility is not necessarily more vast than what is left to a programmer working on a large-scale project involving complex user interaction. In fact, I would argue that the ultimate scope of possibility for exploration of art in consciousness is theoretically far greater in the interactive medium of software (provided that software does something artistic).

    Also, let’s challenge the notion that poetry is necessarily very different for each person and that code always runs to predictable conclusions. While the conclusions are defined within a set of parameters when it comes to software, that still leaves a tremendous range. A range, in fact, I would argue is in some cases greater than the range of response a great poem can elicit from a similarly acculturated and educated audience. Excluding the unpredictable execution of a software bug, and likewise the unpredictable response of someone whose psychological state makes them more inclined to standard deviation than the norm (such as someone fixated on a particular word in a poem in a way that is inappropriate to the intent or overall context) — we can see how the metaphor of executing poetry within the consciousness of the reader holds pretty tightly to the metaphor of an operating system. Much more tightly than we might think on the surface, when we dismiss machines as inherently inhuman and instinctively cringe at the thought of being “programmed” by a poem.

    Yet I really think great poetry elicits more similarity than dissidence of response from most audiences in a way that is shockingly more similar to a computer runtime environment than it would appear at first glance. While both code and poems appear flat on the page or screen, when executed both forms present myriad opportunities to branch down different paths. But the reality is that poetry gives you no choice — only the infinite illusion of choice through allusion, implication, reference, rhyme, nonsensical meaning, seductive sounds and rhythms, and a multitude of other techniques that simultaneously tell the mind there is one thing going on as well as (in subtext) thousands.

    In the end, though, the poem finishes the same way every time. All the intangible sensibilities it communicates on the back of centuries of cultural relationship to the subtle meanings of words and their composition together as phrases does provide the illusion of innumerable layers from which we could select. But in the end, we do not follow any of them but all of them at once, arriving always at the same final line, and though we may shade and color the reading with new experience or new analysis, in the end the reason the poem attracts us never changes, alters or fades. Likewise, the same elements of attraction work almost identically on those culturally similar enough to ourselves to also enjoy the work. These elements invariably worked the same magic on the author herself, and therefore express something even more profound than the “intent” of the artist’s message — the poem communicates an essentially human experience.

    Yet code does not flirt with our minds in this — believe it or not — repeatable way. It changes electrical representations of information based on input. We can “navigate” software in ways that we only feel to be navigating a poem. We can actually turn the wheel, whereas in a poem our hands are only always on the wheel, feeling it turn as the rudder beneath us bends, while some other force entirely guides our ship and with it, ourselves. We can change what we think about the sea and sky around us, interpret messages in the flapping sails — but ultimately we will arrive at the destination of our author’s choice. Not so in software — consider the social networking applications put to purposes authors never dreamed or intended. Or even the word processing window I am typing this in now. Which is the predictable and which the unexpected? The multidimensional and flat? The rigid and flexible?

    Conflating poems and code challenged my assumptions, and sheds some light on how to articulate more of what I see as the essential nature of poetry. Besides whimsical efforts like making poems within the contest of a programming language (which is tons of fun, and harder than it looks) — I think musing about code and poetry has helped me understand what draws me toward both. More than compaction, it is the promise of communicating a meaningful experience in a reasonably predictable way. Without predicitability, communication is not possible. That is not to say I do not expect to impose the same logical, material effect I can necessarily achieve through software via my poetry. But by drawing on all the faculties of poem-craft, I have the opportunity to communicate sentiments “too deep for words” — the kinds of things Elliot referred to when he said, “genuine poetry can communicate before it is understood.” Having a means of communication that can predictably impart that experience (even if it is not fully rationally “understood” — but still transmitted to the non-rational comprehension that is equally a part of our humanity) — is the promise of poetry, and a promise much greater than any effect I feel I could have on another person through writing even the most useful or elegant code.

  • http://erif.org/ kaolin fire

    any interest in developing this into something more formal and giving GUD a shot at publishing it? :) I can’t guarantee anything, of course, but I think you’ve got a good thing and a good way of saying it. So this is more a, if you’d like to formalize this, GUD would love to see it, than a “please write this for us”.

    You know, in your obvious copious free time. ;)

  • Robert

    I was wondering what all that stuff was flying around my head — free time! That must be it.

    Magazine looks promising. Any deadline set for Issue One?

  • http://erif.org/ kaolin fire

    We’re starting at Issue 0, which should be going to printer this week or next. Issue 1′s deadline is many months out (March?), though we’ve already got it tentatively a little over half full.

    I just added your general feed to livejournal so I’ll be keeping more current, now. ;)