Critical Code Studies

Taroko Gorge, Chapter 7

Taroko Gorge, a poetry generator by Nick Montfort

Taroko Gorge Taroko Gorge & Variants Live Taroko Gorge updated python code
Argot Orgre, Ok! Argot Ogre, Ok! (live) ABR article on Taroko Gorge


Author: Nick Montfort
Year: 2009

Languages: Python, HTML

II. Notes:

1. # precedes comments in Python.

3-4. Montfort gives the poem’s name, constraint, and genre of the “unbounded poem.”

6-7. Although putting his name in the code is unusual, putting the location where he wrote the code is highly unusual, suggesting not only that he expected a wider readership of this code beyond those merely looking to implement it, but also that he wanted people to consider its location of composition when evaluating the code.

9-13. Montfort decodes all of his variables and functions here, using one-letter variable names that give his code a minimalist feel.

16-17. One of the features that gives Montfort’s code its minimalist feel is that he reassigns the functions of split and random to single character method names (x and s, respectively). That also makes this code a bit harder to read.

18-19. These lists each only contain 8 words each, and two of the words appear on both lists, a simple set of inputs to create unbounded outputs.

34. Though some of his code draws from a longer list, this choice merely chooses between two adjectives.

46. Finding an f at the start of the “above” word (as in the case of “forest”) triggers a sequence that includes the word "monkey."

47. This “monkey” feature will become a staple of Taroko Gorge variations.

48-50. The program cleverly either adds the s to the subject or the verb.

58-65. START HERE. This section presents the main function for producing the stanzas. I recommend beginning to read the code here and then traversing the waterfall upwards to find the definitions of the methods and variables.