This programming assignment requires students to study, understand, and augment a Python program that (re)writes or “breaks” poems in various “deformed” manners, including printing the lines of a poem in reverse (last line to first line) and with randomized lines. Emily Dickinson wrote in the margins of a book: 'Did you ever read one of her Poems backward, because the plunge from the front overturned you?’ Learning goals include problem decomposition (functions), extending existing code, problem solving with multiple solutions, and building an app to handle a wide range of input texts.
The author of this material was awarded a 2016 NCWIT Engagement Excellence Award for this assignment. Learn more on NCWIT's awards page.
Students have been practicing with Python for at least two weeks at the time of this assignment. This assignment provides students with a "starter kit". My experience shows that asking students to augment an existing code set best mirrors their future interactions with scripting and can prevent an early discouragement of not knowing how/where to start. Students often need help with directory (folder) and file structure. In addition, Python's write statement, along with formatting output, like many languages, is terse, at best. I recommend that the instructor provide sufficient time for practice on file IO.
For more information on how to implement this assignment, see Mark's Teaching Paper, "Computing and the Digital Humanities-Computing for Poets."
This programming assignment leverages students’ love of literature and leads them to a space where literature and computation are merging in collaborative and interdisciplinary groups. The assignment shows by example some of the faculty-student interactions that occur in our interdisciplinary research group of literary scholars and programmers. Student choice is immediately encouraged as students use their app to break the poems written by their own favorite writers.