Computer-Generated Poetry with Scratch
Publication date: July 11, 2023
The second EU Code Week webinar counted with the expertise of instructor David Hellam, who led us to the fascinating world of computer-generated poetry using Scratch. In this article, David shares his point of view and the results of the webinar.
Author: webinar instructor David Hellam
We often overuse the saying:
“If I have seen further, it is because I am a dwarf, perched on the shoulders of giants.”
However, one of the reasons why I chose to look at composing computer-generated poetry is because it is a topic, which far greater intellects have already pioneered a trail for us to pick up and follow.
Seymour Papert Mindstorms
When I was a student teacher in the late 1980s, my computing methods tutor recommended that I read Seymour Papert’s Mindstorms. The text was generously made available to future generations of student teachers. And is as relevant today as it was when it was first published over 40 years ago.
In it, Seymour Papert introduced us to Jenny, a junior high school student who didn’t regard herself as one of the ‘brains’. But whose ability to learn was transformed when she was introduced to the computer as a tool which could unleash her creativity. During my career, I’ve come across many ‘Jennys’ – this is one of the reasons why I continue to teach.
It is humbling to think that an approach that we might today consider to be a ground-breaking and innovative to integrating the arts into computing, was already being done in some classrooms so long ago. It is something that any teacher, with a bit of practice, could add to their curriculum and provide a variety of contexts to suit the individual needs of their students.
In our webinar, I covered three forms of poetry: haiku, limerick and acrostic poems. Giving reasons why you might prefer to write your own software to do so, rather than relying on a Large Language Model like ChatGPT to do your work for you (badly).
We also looked at a few different ways to output the poems, including using Scratch’s text-to-speech tools and stamping or cloning a sprite containing a character set as individual costumes.
I like this type of activity, as it is a good way to review important programming concepts like variables, lists and loops with junior high school students. Therefore, the approach I outline isn’t the only way of achieving this. You could do the same by designing a simple, specialised Chatbot or even a graphics project. What would you do differently? I’d love to know.
Studio in Scratch
I’ve created a studio in Scratch, where I’ve shared my poems from the webinar. If you’ve created a poetry-generating program you’d like to share, you are welcome to add it.
Also, this webinar doesn’t cover how you might write software to perform or possibly record an interactive animated reading of your computer-generated poetry. My students, having seen how you could stamp or clone your poem’s characters onto the stage, are now talking about creating animated concrete poetry. Anyone else up for an interesting challenge?
If you want to learn more and didn’t have the chance to join the webinar, you can rewatch here.