Friday, August 19, 2011

Python for Artists

Considering the number of things that I have taught that I haven't known much about, this is not as stupid a plan as you might think. It's not like I'm going to be teaching sheaf cohomology for combinatorists; Python for artists sets a much lower bar.

Advice is welcome.

Here's the basic outline that I was thinking:
Session 1:
In time before class starts help people get Python installed on their computers. Overall introduction. Here are some examples of things that you might do with Python, ranging from things that you are likely to do to things that you are unlikely to do, including:

  1. Automating things like doing a find-and-replace over lots of files, renaming a lot of files in one fell swoop, etc.
  2. Pulling a lot of information from the Twitter public timeline, scraping stuff off web pages.
  3. Doing stuff with your own web page (I don't know what, though).
  4. Nifty things with graphics.
  5. Hooking in to Google's cool tools (I don't know which ones) and writing things for Android (is this even true?)

I would also talk -- in English -- about the typical grammar constructs of computer programs, like if-then and looping, as well as alluding to the "nouns" of Python (mostly the idea of variables, objects; not bringing up dictionaries at this point). We'd then read some Python code and translate it into English. We'd end with them running some scripts that I provide and making small (directed) changes in them. Finish making sure that everyone has Python on their computers.

Session 2:
More information about the interpreter, the fundamentals of the language, details of Python syntax. More examples of existing code to modify and examples of very small things to write from scratch (possibly copy-and-pasting from the other examples). Examples should be tied to practical things as much as possible. This is vague because I don't yet know enough about what should be here.

Session 3:
Similar to session 2, but more in-depth and more complicated examples. Attendees will be working more independently.

Session 4:
Lab project. I've found some "learn Python" lab assignments that are pretty cool -- and released under Creative Commons licenses. I'd pick (and possibly modify) one of these and introduce the assignment and distribute the skeleton code. The attendees would fill in the missing parts.

Session 5:
Finish the lab