Poetry through a Computational Thinking Lens

Poetry is structured. Poetry is chaos. Poetry is formulaic. Poetry is rule-breaking. Poetry can be any and all of these things!

Ribbons of light, starkly colored against a dark background. The lights are all different colors, painted in squiggles and lines.
Photo by Soheb Zaidi on Unsplash

When thinking of poetry, you might be tempted to see it solely as existing within the realm of the English language arts, or ELA. It’s something to be studied for its rhymes or its structure, or even as an artifact of some authorial canon. But if the digital humanities have taught us anything, it’s that the “A” in “STEAM” isn’t just for show. The humanities — and, indeed, poetry — are well suited to computational study.

Poetry as Pattern

Poetry can take many forms, and one popular type of poetry is rhyming poetry. Rhyme is more than just matching words that end in the same sound, as with perfect rhyme. Some rhymes might not sound “rhyming” at all. For example, so-called imperfect (or slant) rhyme matches similar, as opposed to exact, vowels. It works well in music, where vowels are glossed as sung, and is a staple of clever hip-hop lyricism.

Computational thinking incorporates pattern recognition to find places where ideas are repeated. These repetitions can then become variables, or placeholders. For poetry, words can be variables. The poem that begins “Roses are red, violets are blue” has many permutations, in each of which the final line matches the “blue” variable. Sometimes the rhyming rule is even broken, usually for a laugh.

Wall of coiled red roses arranged in a pattern.
Photo by Paolo Bendandi on Unsplash

Rhyme isn’t the only poetic pattern. There’s imagery, especially in a historical context. There’s word choice itself, with sound symbolism or particular words being in vogue. There’s meter, or rhythm. What sorts of patterns can you pick up from a collection of poetry? How might patterns differ in cultural context?

Poetry as Algorithmic Thinking

Just as poetry has patterns, those patterns can be a part of an algorithm, or recipe, of how to write a poem itself. There are hundreds of poetic forms, each with their own quirks. Some forms, such as free verse, deliberately lack structure. Others, like haiku, are structured to the syllable.

A random haiku pulled from the text of “Alice and Wonderland,” using a code function. The poem reads: I the in and you / that said this And to Alice / somehow violent”.
This is code using Wolfram Language to pull a random haiku from “Alice in Wonderland.”

In computational thinking, algorithms — and the algorithmic thinking they derive from — help to write the code that creates a full program. While a pattern might indicate a variable, those variables can then be added to an algorithmic ruleset. Algorithmic thinking is considering how those rules function as a way of reaching an end goal.

Poetic form not only helps with analyzing structure, but also provides a blueprint for writing poetry as well. Sometimes a form dictates rhyme scheme. Sometimes it dictates the content of the poem. Sonnets, a well-known poetic form, influence both! Having a poetic form — or algorithm — removes a barrier for writers stuck on the blank page, in addition to inspiring creativity through limitation.

Poetry as Abstraction

Many literary devices involve abstraction in some form or another. For example, personification, or giving an inanimate object human qualities, is an abstraction of humanity itself. It might seem like a stretch, but abstraction often involves expansive creativity!

Small bus toy on a bright yellow background. The bus is blue, with wide eyes and a big, black smile.
Photo by Mourizal Zativa on Unsplash

For computational thinking, abstraction allows for complex ideas to be simplified. Abstraction gives coders a way to take something grand or even ephemeral and give it enough tangibility to be worked into code. Without abstraction, code would be bogged down by unnecessary detail.

Considered like that, perhaps poetry itself is abstraction: a look at something complex, rendered abstract through language. Or maybe it’s just the opposite, with abstract ideas like “love” and “life” being decomposed into itty-bitty pieces. Poems certainly do something to the human experience, making limericks of big ideas and epics of the everyday.

Coders can be poets, both through beautiful code as well as through actual poetry. There are bots that write poems, and widgets that turn poetry into play. Analysis, too, can be enhanced through code, as with this Wolfram Language function looking at poetic meter.

Poetry is wonderful in its own right — viewing it through a computational lens only intensifies how wondrous it can be.

Headshot of author, a pale brown-haired woman with glasses. The photo is surrounded by a blue circle.

Jesika Brooks

Jesika Brooks is an editor and bookworm with a Master of Library and Information Science degree. She works in the field of higher education as an educational technology librarian, assisting with everything from setting up Learning Management Systems to teaching students how to use edtech tools. A lifelong learner herself, she has always been fascinated by the intersection of education and technology. She edits the Tech-Based Teaching blog (and always wants to hear from new voices!).

--

--

Tech-Based Teaching Editor
Tech-Based Teaching: Computational Thinking in the Classroom

Tech-Based Teaching is all about computational thinking, edtech, and the ways that tech enriches learning. Want to contribute? Reach out to edutech@wolfram.com.