Code IS Poetry. Here’s why.

“Code is poetry.”

Ah, the famous tagline of WordPress. What does this mean? Does it refer to the fact that now bloggers, who write poetry, can easily “code” using WordPress? Or does it suggest that coding is an art form … just like poetry?

It is true that this tagline was coined by WordPress. And it is true that most bloggers use WordPress for their blogging needs. It is also true that many bloggers are poets. And so this tagline that WordPress has come up with is, on the surface, appropriate.

However, I would suggest that this unpacking of the metaphor is a superficial one. You have to dig deeper.

So I am inclined to the second interpretation. The fact that poets can write poems in WordPress is just a happy coincidence. And it reminds me of a weird strange loop. If code is poetry, and this poetry enables poets to create their poems …. that’s a brain bender!

Let’s delve deeper and talk about the ways in which code IS poetry.

If you look up poetry in Wikipedia, you will find this definition: “Poetry (the term derives from a variant of the Greek term, poiesis, “making”) is a form of literature that uses aesthetic and rhythmic qualities of language—such as phonaesthetics, sound symbolism, and metre—to evoke meanings in addition to, or in place of, the prosaic ostensible meaning.”

This takes a while to parse! If you boil this statement down to its base essentials, poetry is basically a form of writing that uses the beauty of language to stir up feelings. You are fully engaged when reading a poem because it has several layers of meaning.

What about computer coding or programming? For the answer, I will refer to you Ian Armstrong’s answer on Quora regarding this topic. He writes that computer code is “a rhythmical composition that creates pleasurable and expressive results through imaginative/elevated logic.”

In other words, the art of writing code and the art of good poetry are, in a sense, the same thing.

But if this is all the case, then this post would conclude quite abruptly. So I suggest that we dig even deeper. All the way down to the structural level.

Let's get down to the structural level.
Let’s get down to the structural level.


Matt Ward, in his excellent article, The Poetics of Coding, writes that indentation plays an important role in both poetry and coding.

The roles may be different at times. In poetry, indentation makes the poem easy on the eye, while also conveying meaning. For examples of how indentation is used in poetry, I invite you to take a look at this article. (Or this!).

As for coding, well, I don’t need to tell you guys why indentation is important! Not only does it make your code readable; in languages like Python, indentation conveys “meaning.”

Matt goes much further than this. He talks about how in a well-written poem, every word has a definite meaning and purpose. Even down to the punctuation. And we all know what happens if you miss out a single semi-colon when programming in a language like Java.

Matt then concludes by saying that the importance of structure in coding and poetry cannot be over-emphasized.

You can find many more articles like these around the internet.

However, the similarities seem to run very deep. So deep in fact, that I couldn’t help thinking: what if “code is poetry” is not a metaphor at all? That is, code really is a form of poetry, and programmers are the new poets? If you think about this for a while, you realize that this is absurd. In that sense, everything is poetry! It’s just as silly as saying music is math or math is poetry or whatever.

But what if we could blur the lines between metaphor and reality? What if one writes code in the form of a poem? Literally code poetry? Is that possible?

In fact, it is. Stanford, in 2013, kicked off their annual code poetry slam. This is a contest that invites programmers and others to explore what code poetry really means. Participants wrote poems talking about coding, and still others wrote compilable code poems. Literal code poetry! I invite you to take a look at some of these submissions.

Feeling inspired to write your own code poem? Push the boundaries of what’s possible with human language and code. Don’t limit yourself to poetry; explore your poetic and literary side at Code/Word/Play. Coming this Saturday, January 7th, at Church Street Social,  in partnership with Gathr, we at Venturesity invite you to explore the intersection between code and the literary form. For more details about the event, check out this link.

Leave a Reply