
Beyonc茅鈥檚 tweets as sacred text, error messages that tell a tragic tale and the looping program of a failing relationship: we parse a new literary phenomenon
ON STAGE at Stanford University in California last February, the words of Beyonc茅 were being intoned as a religious text. Next came Richard Branson. Then Elon Musk.
This was the second Stanford Code Poetry Slam: a celebration of code poetry, a reimagining of computer programming languages as a form of literary expression. The winner, Hunter Bacot, had written a short, elegant program called 21st Century Prophecies that pulled in the latest tweets from a selection of famous names to be read out as if they were sacred commandments. The crowd went wild.
Advertisement
鈥淚t鈥檚 really interesting to see language in a new way,鈥 says , who organises the Stanford slams. 鈥淧eople have been writing in English for so many years. This is a whole new medium and a whole new set of possible metaphors.鈥 The results are always unusual, often complex and occasionally moving.
The definition of code poetry is rather broad. In its purest sense a code poem is a piece of code that runs as a program but also works, on some level, as poetry. These create some of the most effective and dramatic poems.
But the slam also accepts entries that use what Kagen calls 鈥渃oding idiom鈥 to create a distinct poetic effect. For example, one of this year鈥檚 finalists, Apache Code Errors, used a list of error messages from Apache server software 鈥 which runs much of the web 鈥 to tell the story of how Native Americans in the US lost their land. Another, Capsized by Zachary Kain, was written in CSS, a language used to style web pages, to describe a boating accident. 鈥淚t was lovely and so short. Ambiguous and quiet,鈥 says Kagen.
The Stanford slams add a new element 鈥 poetry as performance. Often a code poet will climb on stage and recite the poem as they type it out on a laptop, with the live coding projected on the wall. 鈥淧oetry is beautiful on the page, but you also get something out of it out loud that you don鈥檛 just from reading it,鈥 says Kagen. 鈥淲e wanted to explore the mouthfeel of a code poem.鈥
The concept of code as verse won鈥檛 be new to many programmers: good poetry and well-written code have much in common. Both contain densely packed information that is nested within something that has been elegantly written. No lines are wasted.
Although it helps if the reader has a certain familiarity with the coding language being used, non-coders can still enjoy trying to grasp hidden meanings. Nevertheless, in-jokes for coders abound, like the use of a looping program to depict the repetitive arguments of a failing relationship in Sandra Trinh鈥檚 If Nothing Else.
It has even caught the eye of a few mainstream poets. 鈥淚 love the way punctuation becomes more than a guide for making sense of the language,鈥 says UK poet Amy Key. 鈥淚t is almost ornamental.鈥
For Ben Allen, also at Stanford and a co-organiser of the most recent slam in November, code poetry is interesting not just for any literary merit it might have, but also for what it tells us about coding languages themselves. 鈥淚t鈥檚 a way of exploring the boundaries of this distinct mode of expression that鈥檚 become so important to our lives,鈥 he says, 鈥渢o continue the debates from early computing about how language-like code could be, or should be.鈥
What do mainstream poets think of code poetry?
, whose first poetry collection Luxe was published in 2013, thinks code poems are fascinating.
I鈥檓 interested in a disintegration of the boundaries of genre, and in this context I find code poetry very intriguing. I love the way punctuation becomes more than a guide for making sense of the language. It is almost ornamental 鈥 the snazzy accessories on a plain black dress, drawing the eye, creating variation.
was less convinced. Riviere, whose 81 Austerities won the Forward Prize for Best First Collection in 2011, says that although the code poems appear innovative, they are actually fairly conventional in content 鈥 and that鈥檚 a big problem.
We have unremarkable, paraphrasable content presented in the form of a self-announced 鈥渄ifferent鈥 language. I would be more interested in the inverse, I guess 鈥 whereby the techniques and processes of coding languages are somehow brought to bear on the composition of poetry.
It鈥檚 as if with code poetry the transposition is happening the less interesting way around. 鈥淯sing鈥 code to make poetry with quite conventional intentions, rather than imagining the sort of poetry that might be more revealing about the uses and consequences of programming languages.
, whose first collection The Claims Office came out in 2013, describes himself as a mainstream 鈥減age poet鈥 鈥 his poems are meant to be read, not performed. What he liked about code poetry was that it existed outside the cliquey, factional nature of contemporary poetry that he normally comes across.
What these guys are doing is so far removed from the poetry I would generally read and enjoy that all those battle lines recede, and it becomes possible to have an innocent encounter with something genuinely weird and unusual.
I鈥檝e enjoyed that encounter more or less, but it鈥檚 a lukewarm, cerebral sort of enjoyment, with no sense of excitement or danger that a poem could come in and upend my entire emotional world, as all of my favourite poems have done at some point.
Here are a handful of our favourite code poems. Check out Stanford University鈥檚 for more.
Capsized
by Zachary Kain
.ocean {
color: cornflowerblue;
pitch: high;
overflow: visible;
}
.boat {
color: firebrick;
transform: rotate(94deg);
float: none;
}
.rescue-team {
visibility: visible;
}
.crew {
widows: none;
}
Dai George says: Capsized by Zachary Kain is clever, and I see the narrative running through the found language of CSS. I don鈥檛 know enough about CSS to comment on how the poetic intelligence behind the poem is interacting with this other type of language; presumably there are rules and conventions that are being honoured and/or transgressed. My two major stumbling blocks are, a) how to read the curly braces, which are so far removed from ordinary language that I understand they pretty much only occur in computer coding, and b) well, if Kain wanted to write about an accident at sea, why didn鈥檛 he just do so, without CSS? What does the constraint bring to the table?
The answer to that is probably that code poetry only exists within a constraint, so if that isn鈥檛 your bag, then nor is code poetry. The frisson and the pleasure comes from rescuing meaning from meaninglessness, or at least radically different fields of meaning. But I鈥檝e been asked to comment on it from the point of view of a mainstream poet, who has no such circumscribed field of meaning, so it can鈥檛 help but feel like a fairly severe and limiting handicap. A fun game, but fun for anyone else?
Me and You
by Matthew Lee
import random
traits = [鈥渙nly speak when spoken to鈥, 鈥渘ever know how to introduce myself鈥, 鈥渉ide in the middle of a group鈥, 鈥渓ead in the front鈥, 鈥渕ake my opinions known鈥, 鈥渄o all of my homework鈥, 鈥渉ave a plan鈥, 鈥渒now what will work and won鈥檛鈥, 鈥渂elieve in true love鈥, 鈥済et caught in the past鈥, 鈥渒now the future will be better鈥, 鈥渨ant to please鈥, 鈥渟et goals鈥, 鈥渟mile at strangers鈥, 鈥渨atch my feet when walking鈥, 鈥渓ook for things to do鈥, 鈥渓et things unfold鈥, 鈥渃limb trees鈥, 鈥渒eep my feet on the ground鈥, 鈥渨alk fast鈥, 鈥渄rive slow鈥, 鈥渞ead the newspaper鈥, 鈥渨atch cartoons鈥, 鈥渆at breakfast鈥, 鈥渂elieve in the midnight snack鈥, 鈥渟nore鈥, 鈥測awn loudly鈥, 鈥渓ove vegetables鈥, 鈥渆at gluten-free鈥, 鈥済et cold easily鈥, 鈥渘eed a hug鈥, 鈥済et lost in eyes鈥, 鈥渉ate my reflection鈥, 鈥渟ing in the shower鈥, 鈥済ive others the benefit of the doubt鈥, 鈥渄ouble-check the lock on the door鈥, 鈥渨atch the sunrise鈥, 鈥渇loss鈥, 鈥渉ide my scars鈥, 鈥渓isten to Chopin鈥, 鈥渒eep a diary鈥, 鈥渟crapbook鈥, 鈥渒nit鈥, 鈥渟weat a lot鈥, 鈥渨ash your hands before eating鈥, 鈥減ray鈥漖
def Me():
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽my_trait = traits[random.randint(0, len(traits)-1)]
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽print 鈥淚 鈥 + my_trait + 鈥.鈥
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽return my_trait
def You():
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽your_trait = traits[random.randint(0, len(traits)-1)]
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽your_trait = your_trait.replace(鈥渕y鈥, 鈥測our鈥)
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽your_trait = your_trait.replace(鈥渁m鈥, 鈥渁re鈥)
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽print 鈥淵ou 鈥 + your_trait + 鈥.鈥
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽return your_trait
def WillItWork(me, you):
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽print 鈥淲ill it work?鈥
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽willitwork = random.choice([鈥淵es鈥, 鈥淣o鈥漖)
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽print willitwork + 鈥.鈥
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽if willitwork == 鈥淣o鈥:
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽print 鈥淲ill it be okay?鈥
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽print random.choice([鈥淵es鈥, 鈥淣o鈥漖) + 鈥.鈥
me = Me()
you = You()
WillItWork(me, you)
I look for things to do.
You hate your reflection.
Will it work?
No.
Will it be ok?
Yes.
Dai George says: I actually enjoy Matthew Lee鈥檚 poem, or should I say 鈥減oem generator鈥, quite a lot. It has a quizzical, dissociative train of thought that wouldn鈥檛 appear out of place in certain fashionable literary journals right now.
I dare say that the random, generative aspect plays well with a view of literature influenced by literary theorist Roland Barthes, his essay The Death of the Author, and the 鈥 a literary school whose texts often have random, reader-generated aspects, and which antedates personal computers by a good couple of decades. That isn鈥檛 my bag, but it鈥檚 much more of a recognisable bag than the CSS poem, and at heart it鈥檚 not a uniquely technological approach to literature.
When I look more closely at the range of Lee鈥檚 input data, though, I can鈥檛 help but remark on a failure of poetic imagination: if he wanted it to have more legs as a model for generating great, or even mediocre, poetry, he might have used his human brain to come up with more inspiring options than 鈥渨ant to please鈥 and 鈥渞ead the newspaper鈥. The arbitrariness surely can鈥檛 be an end in itself 鈥 you have to load the tombola with decent material in the first place.
A slim volume of code poems
Here are a few more code poems to puzzle over and 鈥 hopefully 鈥 enjoy. All were performed at Stanford code poetry slams.
21st Century Prophecies by Hunter Bacot 鈥 the winner of the second Code Poetry Slam at Stanford University 鈥 pulls in the latest tweets by a variety of famous names. When performed, the tweets are intoned as if they were a religious text.
21st Century Prophecies
by Hunter Bacot聽聽聽聽聽聽聽
the_medium = 鈥渢witter鈥
require the_medium
medium = Twitter::REST::Client.new do |medium|
聽聽聽聽聽medium.consumer_key = 鈥 鈥
聽聽聽聽聽medium.consumer_secret = 鈥 鈥
聽聽聽聽聽medium.access_token = 鈥 鈥
聽聽聽聽聽medium.access_token_secret = 鈥 鈥
end
virtues = []
virtues << medium.user("elonmusk").tweet.text
virtues << medium.user("KingJames").tweet.text
virtues << medium.user("Pontifex").tweet.text
virtues << medium.user("KimJongNumberUn").tweet.text
virtues << medium.user("Beyonce").tweet.text
virtues << medium.user("richardbranson").tweet.text
virtues << medium.user("god").tweet.text
# a moment of clarity
virtues <<"\n#{Faraday.get("https://api.github.com/zen").body}"
File.open(鈥減rophets_manifesto.txt鈥, 鈥渨鈥) do |out|
聽聽聽聽聽virtues.each { |truth| out.puts truth }
end
system 鈥渙pen prophets_manifesto.txt鈥
Sandra Trinh鈥檚 If Nothing Else is like an in-joke for programmers. The looping program replays the repetitious arguments of a relationship.
If Nothing Else
by Sandra Trinh
Private Conversation
聽聽聽聽聽聽聽聽聽聽Declare I As 鈥渕elodramatic heroine鈥
聽聽聽聽聽聽聽聽聽聽Declare You As 鈥渁lmost villain鈥
聽聽聽聽聽聽聽聽聽聽Declare Setting As 鈥渙ur shared bed鈥
聽聽聽聽聽聽聽聽聽聽If I = a few glasses of whiskey in
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽You = disgruntled person
聽聽聽聽聽聽聽聽聽聽 聽聽聽聽聽You.Argument(myDrinking)
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽Grievances = 3
聽聽聽聽聽聽聽聽聽聽 聽聽聽聽聽Loop If Grievances >= 0
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽You.Output(鈥淚 love you, but鈥)
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽I.Output(鈥淛ust say it鈥)
听听听听听听听听听听听听听听听听听听听听驰辞耻.翱耻迟辫耻迟(骋谤颈别惫补苍肠别)
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽I.Output(鈥淭hat鈥檚 bullshit 鈥 + why do I keep
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽trying + 鈥渨e鈥檝e talked about this already 鈥 +
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽I keep doing this over and over again + 鈥淚
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽thought we were over this 鈥 + I can鈥檛 do this
听听听听听听听听听听听听听听听听听听听听补苍测尘辞谤别)
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽Grievances = Grievances 鈥 1
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽End Loop
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽If I = still have energy to fight
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽Us.Argument(anything, everything)
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽You = unwilling to be with me
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽I.beginPacking(books, clothes, whiskey)
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽You = say you still love me
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽I = drink some more
听听听听听听听听听听听听听听听贰濒蝉别
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽I = sleep on the floor
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽where Carpet = soft + comfortable +
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽more hospitable than CurrentSetting
听听听听听听听听听听贰濒蝉别
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽You = sleep in a few minutes
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽I = curl up against a hard corner
听听听听听听听听听听听听听听听滨.贰虫丑补耻蝉迟别诲(辫谤别迟别苍诲颈苍驳)
听听听听听听听听听听听听听听听滨.顿谤颈苍办(肠丑别补辫奥丑颈蝉办别测)
End
Apache Code Errors by Aimee Norton uses a list of error messages from Apache server software 鈥 which runs much of the web 鈥 to tell the story of how Native Americans in the US lost their land.
Apache Code Errors
by Aimee Norton
201 created
200 OK
100 continue
200 OK
303 see other
302 found
303 see other
409 conflict
403 forbidden
520 origin error
402 payment required
413 too large
303 see other
405 not allowed
417 expectation failed
423 locked down
502 bad gateway
307 redirect
204 no content
205 reset
305 use proxy
422 unprocessable entity
426 upgrade required
409 conflict
415 unsupported
429 too many requests
416 not satisfiable
417 failed
306 switched proxy
444 no response
449 retry
511 authenticate
301 moved permanently
401 unauthorized
506 variant negotiates
523 declined
406 not acceptable
451 illegal
599 timeout (unknown)
424 failed dependency
496 no certificate
423 locked away
598 timeout
598 timeout
This article appeared in print under the headline 鈥淩hyme and reason鈥