Digital Writing with Python: ITP Summer 2009

Mondays and Wednesdays, 3:15pm to 6:10pm (Summer Session II)

Adam Parrish, Adjunct Assistant Professor
Office hours: 2pm-6pm, Fridays sign up here

Course notes and assignments

721 Broadway, New York, NY
4th Floor, Room 447
August 5th, 2009, 7pm


From the official course description:

This course introduces the Python programming language as a tool for writing digital text. This course is specifically geared to serve as a general-purpose introduction to programming in Python, but will be of special interest to students interested in poetics, language, creative writing and text analysis. Weekly programming exercises work toward a midterm project and culminate in a final project. Python topics covered include: functions; object-oriented programming; functional programming (list comprehensions, recursion); getting data from the web; displaying data on the web; parsing data formats (e.g., markup languages); visualization and interactivity with Python. Poetics topics covered include: character encodings (and other technical issues); cut-up and re-mixed texts; the algorithmic nature of poetic form (proposing poetic forms, generating text that conforms to poetic forms); transcoding/transcription (from/to text); generative algorithms: n-gram analysis, context-free grammars; performing digital writing. Prerequisites: Introduction to Computational Media or equivalent programming experience.

That's both an ambitious and ambiguous description! Here's what it boils down to:

This is a creative writing course.
Instead of writing texts ourselves,
we'll be writing programs
to write texts.

We'll learn how to use the Python programming language
to make programs
that make text.

(Why Python? Because it's easy to learn,
it's elegant,
and it makes text processing easy.)

The goal of the course is to have fun messing with language and literature while exploring the aesthetic, technical and expressive possibilities of computer-generated (and -mangled) text. You'll become literate in a fantastic programming language as part of the bargain.

Warning: this course is oriented toward performance. Text, after all, affords both visual and vocal readings—so don't expect the output of your programs to stay on your computer screen. The final project will take the form of a public reading (you must read a text/poem/piece generated by a program that you wrote). You may be asked, when presenting your completed homework assignments, to read the output of your program out loud.

Grading Policy

Attendance and participation 20%
Midterm project 15%
Final project 25%
Homework assignments 30% (10% x 3)
Writing analysis and presentation 10%


Reading material will be assigned most weeks, and will be made available either as links to documents on the web or as handouts. (There is no official textbook or reader.) Generally, the first twenty to thirty minutes of each class will be devoted to a discussion of the reading.

The assigned reading material may include the following:


You are expected to maintain a blog for this class. You'll use this blog for posting documentation of your homework assignments and projects. If you use an existing blog, please make sure that entries relating to this class are specifically marked as such (by, e.g., tags, categories, etc.). As soon as you have this blog up and running, please send me a link.

Homework Expectations

There are a total of three homework assignments, which in aggregate are worth nearly one third (30%) of your grade. In addition to complying with the parameters of the assignment as outlined in class, you are expected to post (to your blog) documentation of your assignment. This documentation should include:

  1. a description of what the program does;
  2. what kind of input the program expects; and
  3. what the output of the program looks like.

Students may be called upon (and are encouraged to volunteer) to present their homework assignments in class.

Homework assignments will not be accepted after their respective due dates.

Project Expectations

There are two projects in this class. (Further details will be made available)

  • The midterm project must be an object-oriented program that generates poems that conform to a new poetic form of your own design;
  • The final project will take the form of a public reading: you must read aloud one (or more) of the texts generated by a Python program.

You will be asked to present your projects in-class. You must also document your projects on your blog, and send links to your documentation to the instructor.

Writing Analysis and Presentation

You will choose a piece of writing or other work that somehow incorporates text, writing, or language, and then present this work to your classmates. Your presentation should answer the following questions: what's interesting about the work, and how does it do whatever it is that makes it interesting? Relate your subject to either the technical or conceptual content of the course.

We'll have one student presentation per class session, starting after the third or fourth session. A sign-up sheet will be made available in class.

Attendance Policy and In-Class Behavior Expectations


Because of the condensed nature of summer courses, consistent attendance is vital. You are expected to attend all class sessions. Absences due to non-emergency situations will only be cleared if you let me know a week (or more) in advance, and even then only for compelling personal or professional reasons (e.g., attending an important conference, going to a wedding). If you're unable to attend class due to contagious or incapacitation illness, please let me know (by phone or e-mail) before class begins.

Each unexcused absence will deduct 5% from your final grade. If you have five or more unexcused absences, you risk failing the course.


Be on time to class. If you're more than fifteen minutes late, or if you leave early (without my clearance), it will count as an unexcused absence.

In-class behavior

Laptops must be closed while your fellow students are presenting work. You're otherwise welcome to use laptops in class, but only to follow along with the in-class tutorials and to take notes. policies

An Ubuntu Linux server is available at for the duration of the course. (Details on how to log in will be given in class; talk to the instructor for more details.)

Unless you've obtained prior permission, please do not use this server for hosting (uploading or downloading!) large files. (The instructor is paying for disk space and bandwidth.)

Note: After the final day of class, the server will be taken offline (forever!). Please make sure to have your files off of the server by then. Always keep local copies of your work!