Reading and Writing Electronic Text

NYU ITP, Spring 2017. Instructor: Allison Parrish. Send me e-mail.

Important links: Course notes | More notes | Github | Links, resources, inspiration | Skip to schedule

Turn in your homework here.

Description

This course introduces the Python programming language as a tool for reading and 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. Poetics/text analysis topics covered include: character encodings (and other technical issues); cut-up and appropriated text; the algorithmic nature of poetic form (proposing poetic forms, generating text that conforms to poetic forms); transcoding/transcription (from/to text); n-gram analysis and Markov chain generation; performing digital writing. Programming topics covered include: data structures (lists, sets, dictionaries); strategies for making code reusable (functions and modules); functional programming (list comprehensions, recursion); getting data from the web; simple web applications; and parsing data formats (e.g., markup languages). Prerequisites: Introduction to Computational Media or equivalent programming experience.

Ethos and practice

This is a creative writing course. After a fashion. It might be more accurately termed a creative reading course: specifically, how can we write computer programs that give digital texts interesting readings? What interesting artifacts might we thereby create?

This course is about the Python programming language. Why Python? Because it’s easy to learn, it’s elegant, and it makes text processing easy. It is also awesome.

This course incorporates performance. A text has many affordances, and one of those is to be read aloud. Don’t expect the output of your programs to stay on the screen. The final project will take the form of a public reading: you must read or otherwise perform 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 aloud.

Grading Policy

Component Percentage
Attendance and participation 35%
Weekly assignments 8 x 5% (40%)
Final project 25%

Here’s the breakdown of how grades correspond with percentages.

Grade Percentage
A 90 to 100
B 80 to 89
C 70 to 79
D 60 to 69
F Below 60

For students taking the class as pass/fail (i.e., all ITP students), anything below a B (79% and below) will be graded as a fail. More information on ITP’s grading policy here.

Reading

This course’s official textbook is Virtual Muse: Experiments in Computer Poetry by Charles Hartman. There are a number of copies in the university bookstore, or it can be ordered online.

Reading material will be assigned on alternate weeks. Readings that aren’t in the official textbook will be made available either as links to documents on the web or as handouts. Generally, the first twenty to thirty minutes of each class will be devoted to a discussion of the reading.

Poetry books of interest (not exhaustive by any means):

Blog

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.

Assignment and project expectations

This class has nine deliverables: eight weekly assignments and a final project.

Assignments

There are a total of eight homework assignments, which in aggregate are worth 40% 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.

Turn in your homework with this Google form.

Final project

The final project has three different components: presentation, documentation, and performance. Here are the details:

  • The final project presentation should consist of (a) a performance of your piece (3-5 minutes) and (b) a presentation of your methodology (inspiration, goals, technical challenges, etc.). This presentation should last no longer than 10-12 minutes (leaving plenty of time for critique and Q&A).
  • The final project documentation should consist of (a) the text of the piece the student plans to read (or equivalent documentation in the form of video, still images, audio recording, etc. depending on the shape the piece takes) along with (b) a discussion of methodology and (c) the Python source code for the project. (Basically, I’m expecting a nice, meaty blog post.) This documentation should be completed and on-line on TK.
  • Students will perform the piece from their final projects (date and location TBD).

Programming exercises

In addition to the homework assignments described above, students will be assigned a number of programming exercises (in the form of digital worksheets) designed to challenge and confirm their understanding of the technical concepts under discussion in the class. Completion of these exercises is optional, but recommended, especially for students who judge themselves to be better learners when they’re “on the hook” to complete directed work. (I’m one of these students, for what it’s worth.) We won’t review these exercises in class, though I’m happy to answer questions about them by e-mail.

Attendance, lateness and in-class behavior policies

Attendance

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 incapacitating illness, please let me know (by e-mail) before class begins.

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

Timeliness

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. (Keeping all of this in mind.)

Procedures should punch up

Read Leonard Richardson’s Bots should punch up. “You can poke fun at yourself (Stephen Colbert famously said ‘There’s no status I would not surrender for a joke’), you can make a joke at the expense of someone with higher social status than you, but if you mock someone with lower status, it’s not cool.” Be sensitive to what your classmates might find offensive, triggering, or violent; be graceful (not defensive) and listen carefully when your work gets called out.

Academic integrity

Please review the Tisch School of the Arts Academic Integrity policy. For the purposes of this class, “plagiarism” that violates the academic integrity policy is defined as representing someone else’s code (or other procedure) as your own. (We will, of course, liberally be using text that other people have written as source material for our code and procedures—this does not violate the academic integrity policy. You are, however, expected to cite the sources of these materials where possible.)

Disability accomodations

I am asked to include the following verbiage on my syllabus:

If you are a student with a disability and feel you
need accommodations, you must register with the Moses
Center for Students with Disabilities. They are located
at 726 Broadway, 2nd fl. and can be reached at
212-998-4980 or mosescsd@nyu.edu.

You can find more information about NYU’s disability policies here. I am dedicated to making my classroom accessible for all individuals, but ask that requests for accommodations be made through official channels. (This makes things easier for both of us, in the long run.) I’m happy to (confidentially) discuss any accessibility-related issues that arise in the class. You are not required to disclose your disability.

Schedule

Session 01: 2017-01-26

  • Goals, syllabus
  • UNIX and fundamentals of digital text

Notes

Homework

Assignment #1, Due 2017-02-02. Use the UNIX command line tools discussed in class to creatively transform a text. Experiment with source texts that we didn’t use in class. Try out a command-line text processing tool that we didn’t look at in class.

Optional: Programming exercise A

Reading

To be discussed 2017-02-02.

Questions to guide your reading: Padgett’s techniques for “creative reading” are distinctly analogue. Which of his techniques could be adopted for digital text? What ideas about how text work are “built in” to the grep command? What do you think about Glazier’s “grep works”? What’s more important to the outcome, the procedure or the source text? How to UNIX utilities rely on or reinforce the substance of digital text (ASCII, lines, etc.)? Why is the “line” an important unit in poetry and text in general? What effect does lineated text have that text typeset as prose does not (and vice-versa)?

Session 02: 2017-02-02

  • Reading discussion
  • Homework presentations
  • Python: Making decisions about lines

Notes

(Note: in the notes below, ignore references to a “sandbox server”—you’ll be doing your programming locally, on your own machine. We’ll discuss what this means in class.)

Homework

Assignment #2, Due 2017-02-09. Create a Python program that behaves like a UNIX text processing program (such as cat, grep, tr, etc.). Your program should take text as input (any text, or a particular text of your choosing) and output a version of the text that has been filtered and/or munged. Be creative, insightful, or intentionally banal.

Choose one text that you created with your program to read in class.

Bonus: Use the program that you created in tandem with another UNIX command line utility.

Session 03: 2017-02-09

  • Homework presentations
  • Python: Lists and loops (simple models of text)

Notes

Homework

Assignment #3, due 2017-02-16. The digital cut-up, part 1. Create a Python program that reads in a text and stores portions of it in a list. The program should create textual output that creatively rearranges the contents of the text. Use functions from the random module as appropriate. Choose one text that you created with your program to present in class.

Optional: Programming exercise B

Reading

To be discussed 2017-02-16.

Questions to guide your reading: Do you agree that “all writing is in fact cut-ups”? Consider Hartman’s concept of “juxtaposition”—what does it mean for texts to be juxtaposed procedurally? How does that affect the quality and interpretation of the work? Is there a fundamental difference between the analogue/pre-digital techniques of Gysin, Acconci, and Goldsmith and digital “data-driven” techniques? Who is entitled to use a text? Is avant-garde poetry “post-identity”?

Session 04: 2017-02-16

  • Reading discussion
  • Homework presentations
  • Python: Sets, dictionaries and tuples

Notes

Homework

Assignment #4, due 2017-02-23. The digital cut-up, part 2. Write a program that reads in and creatively re-arranges the content of several source texts. What is the unit of your cut-up technique? (the word, the line, the character? something else?) How does your procedure relate (if at all) to your choice of source text? Feel free to build on your assignment from last week.

Your program must make use of at least one set or dictionary.

Choose one text that you created with your program to read in class.

Optional: Programming exercise C

Session 05: 2017-02-23

  • Installing Python Libraries
  • Appropriating text from the network

Notes

Homework

Assignment #5, due 2017-03-02. Appropriating text from the network. Devise and implement (in Python) a procedure to cut up and creatively re-arrange text. At least one of your texts should come from a network-based source (e.g., Wordnik, the New York Times API, etc.). To consider: How does the presence of data appropriated from the network change the nature of your process and your output?</p>

Optional: Programming exercise D

Reading

To be discussed 2017-03-02.

Session 06: 2017-03-02

  • Reading discussion
  • Homework presentations
  • Pronouncing (Python library for working with word pronuciations)
  • Tracery (simple language for generative text)

Notes

Homework

Assignment #6, due 2017-03-09. Devise a new poetic form and write a computer program that generates texts that conform to the poetic form you devised. Your poetic form could be something as simple as “Each line must begin with the letter ‘A’” or something as sophisticated as Mac Low’s diastics. Your documentation for this project should include the name of your poetic form, and a thorough description of how it works, along with a number of “poems” that your program generated (at least three).

Consider the following when evaluating your work:

  • How well does the output of your computer program conform to your invented poetic form? Could a human do it better?
  • How does your choice of source text (your “raw material”) affect the character and quality of the poems that your program generates?

Session 07: 2017-03-09

  • Homework presentations
  • Python: Modularity and reusability

Notes

Homework

Assignment #7, due 2017-03-23.

Rewrite some portion of an earlier assignment to make use of functions. For example, you could do one or more of the following:

  • Identify some pattern in your program that is repeated multiple times. Create a function that performs this task, then replace each instance of the pattern with a function call.
  • Identify a group of patterns in your programs and move them into functions that live inside of a module. Rewrite an existing program using this module.
  • Rewrite a previous assignment so that all of the code is located inside of a module. Attempt to do this so the main Python file of your program can be rewritten like so: import your_midterm_module; your_midterm_module.generate("input_file.txt")

Reading

To be discussed 2017-03-23.

Session 08: 2017-03-23

  • Reading discussion
  • Homework presentations
  • N-gram analysis and Markov chain generation
  • Simple exercises with neural networks

Notes

Homework

Assignment #8, due 2017-03-30. TK.

Reading

To be discussed 2017-03-30. TK.

Session 09: 2017-03-30

  • Reading discussion
  • Homework presentations
  • Natural language with spacy.io

Notes

TK

Homework

Develop an idea for your final project. Come prepared with a 2-3 minute presentation on what you plan to do. (You can show slides, a work in progress, etc.)

Session 10: 2017-04-06

  • Final project pitches
  • Interfaces: web apps, bots, etc.

Notes

Session 11: 2017-04-13

  • Selected topics
  • Workshop time
  • Early final project presentations?

Session 12: 2017-04-20

  • Final project presentations