Repository for ITP Fall 2014 Course
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
week1
week2_regex
week3_analysis
week4_generate
week5_visualization
week6_apis
.gitignore
README.md

README.md

Programming from A to Z, Spring 2014

This course focuses on programming strategies and techniques behind procedural analysis and generation of text-based data. We'll explore topics ranging from evaluating text according to its statistical properties to the automated production of text with probabilistic methods to text visualization. Students will learn server-side and client-side JavaScript programming and develop projects that can be shared and interacted with online. There will be weekly homework assignments as well as a final project.

Info

  • Daniel Shiffman, Fridays, 12:10pm-2:40pm
  • Course Notes
  • All example code in this repo.

Mailing List

Week 1 - Sep 5

Course intro / expectations

  • Where to find course materials
  • Overview / syllabus
  • Homework / final project

Week 1 Notes

Examples

Assignment

  • Sign up for the class google group
  • Watch or read The Secret Life of Pronouns.
  • Develop a program that "writes" or "reads" (or both) text, i.e. generate your own text from a source text (or via some other generative method) or create your own method for analyzing the statistical properties (or, dare I say, meaning) of an input text. You can use node to process a text file or you can get user input in a browser. Feel free to play around with visual ideas for displaying text with p5.js.
  • Wiki page for submitting homework

Week 2 - Regular Expressions - Sep 12

Week 2 Notes

Examples

Resources

Reading

Assignment

  • Practice Regular Expressions! If you are stuck for an idea, here are some suggestions:
    • Take your code from week 1, expand and rework it using Regular Expressions.
    • Taking inspiration from the Pirate Translator, re-imagine a text using regex search and replace.
    • Create a program that performs Mac Low's Diastic reading of a text. Diastic Explanation, eDiastic demo
    • Write a regular expression that matches any e-mail address.
    • Take that regular expression and do a search and replace so that any e-mail address is made into a “mailto:” link.
    • Create an example that reads an HTML page and removes any markup and leaves only the raw content.
    • Write a regular expression that matches any e-mail address.
    • Take that regular expression and do a search and replace so that any e-mail address is made into a “mailto:” link.
    • Create an example that reads an HTML page and removes any markup and leaves only the raw content.
    • Adapt the regex tester to bea search/replace tester.
    • Create a regex that matches only code comments in code.
  • Don't forgot to document your work online, upload to dropbox, and post to the homework wiki.

Week 3 - Text Analysis - Sep 19

Week 3 Notes

Examples

Resources

Assignment

  • Experiment with text analysis. Here are some ideas if you are feeling stuck.
  • Visualize the results of a concordance using canvas (or some other means).
  • Expand the information the concordance holds so that it keeps track of word positions (i.e. not only how many times do the words appear in the source text, but where do they appear each time.)
  • Implement some of the ideas specific to spam filtering to the bayesian classification exmple.
  • In James W. Pennebaker's book The Secret Life of Pronouns, Pennebaker describes his research into how the frequency of words that have little to no meaning on their own (I, you, they, a, an, the, etc.) are a window into the emotional state or personality of an author or speaker. For example, heavy use of the pronoun “I” is an indicator of “depression, stress or insecurity”. Create a page sketch that analyzes the use of pronouns. For more, visit analyzewords.com.
  • Use the ideas to find similarities between people. For example, if you look at all the e-mails on the ITP student list, can you determine who is similar? Consider using properties in addition to word count, such as time of e-mails, length of e-mails, etc.

No class meeting Friday, Sept 26

Week 4 - Text Generation - Oct 3

Week 4 Notes

Examples

Resources

Assignment

  • Generate text procedurally.
  • Post a link about your work to: week 4 homework wiki
  • Some ideas:
    • Create page that generates its content by feeding an existing text into the Markov chain algorithm. What effect does the value of n (the “order” of the n-gram) have on the result? Allison Parish's ITP Course generator is an excellent example.
    • Visualize N-gram frequencies. See WebTrigrams by Chris Harrison for an example.
    • What happens if you mash-up two texts? For example, feed Shakespeare plays and ITP physical computing blog post content into the generator. Can you modify the MarkovGenerator object to weight the input text (i.e. make shakespeare N-grams have higher probabilities?) The Gnoetry Project is a useful reference.
    • Rework any of the example programs to use something other than text (or, at least, text that represents language) as its basic unit. For example: musical notes, songs in playlists, pixels in an image, etc.
    • Invent your own grammar. Consider using one that generates something other English sentences: music, images, code, etc.
    • Build a grammar that pulls its terminal words from Wordnik.
    • Build a grammar based on a source text as demonstrated here.

Week 5 - Text Visualization - Oct 10

Week 5 Notes

Examples

Resources

Assignment

Week 6 - APIs - Oct 17

Assignment

  • Prepare final project and documentation as described here. Plan on 5 minutes (with 1-2 minutes of questions) for presenting.

Week 7 - Present Final Projects - Oct 30 -- 12:30 - 3:00 pm

  • NOTE THE NEW DATE FOR THIS FINAL CLASS Oct 30 -- 12:30 - 3:00 pm Room TBA

Resources

Learning / Intro

Reference

Tools

References

Requirements

  • You are required to attend all class meetings and submit all weekly assignments and a final project.
  • Grading (pass/fail) will be based on a combination of factors:
    • Attendance, participation in class discussion, and engagement in other students' projects (25%)
    • Quality of weekly assignments (50%)
    • Final Project (25%)