Friday, July 16, 2010

Finish Line

We concluded our Programming in Python today, with students connecting over the web to fill out their evaluations. Each had a student ID number, specific to Saturday Academy (I also have my instructor number and filled out my own evaluation for later mailing, along with the attendance sheet).

Student achievements were considerable. In just five 2.5 hour meetings, they were able to produce some serious computer graphics while wrapping their minds around an industrial strength, state of the art programming language.

Student Work in VPython

At one point, I was in the odd situation of having sound through the speakers, until I'd engage video as well, in which case sound would cut out. I rebooted and ventured to get some staff support. Within a few minutes, we had it working and I was able to show Warriors of the Net, per usual, which, contrary to reader impressions, is not about cyber-warfare, though you could say it's about cyber-crime to some extent.

Toward the end of the class, I also screened Macro Spitoni's Codeguardian (something I've done in this class previously, as well as at OSCON as a cartoon feature before my talk). What did that have to do with Python?

My usual spiel is to use Python as a means to an end, with the goal being a better understanding of computer animation in two senses: (a) real time game engine renderings and (b) render farm renderings. VPython models the former, POV-Ray the latter.

However, we didn't have POV-Ray going this time, so my reliance on "ray tracing" as an excuse for showing this movie may have seemed a little thin. They seemed to enjoy it in any case.

Spitoni's craft is exquisite in that his camera angles and motions pay homage to the best of that war time genre. The attention to detail is likewise impeccable. I enjoy sharing good work.

A large chunk of the class was spent on the notion of a "generator" in Python, often written as an infinite loop, as these are benign once there's a pause-with-result feature (the purpose of the new yield key word -- not all that new actually, as we've had generators for awhile now, along with "generator expressions" (similar to "list comprehensions" but just-in-time iterables, not pre-computed lists)).

I've shared some of my doings, including source code, on ye old edu-sig at the Python official site. Tim Peters himself reminded me of Pythonic virtues. We'd been doing import this as an easter egg, so having him nudge me back from some stupid blunderings was most apropos.

1, 12, 42, 92, 162...

I talked about Linus Pauling a lot, as the context for our generator was the number series 1, 12, 42, 92, 162..., looking it up in the On-Line Encyclopedia of Integer Sequences. We also did Fibonacci numbers.

Python Generators

I had a chunk of Flextegrity in my bag again, a 12-around-1, plus another model of the same concept (from my considerable collection). We watching the animated GIF on my crystallography page, plus followed the link for the OEIS entry back to my page on the morphology of the virus (icosahedral numbers == cuboctahedral numbers).

Pauling fits in by bringing a strong sense of spatial geometry to his chemistry, discovering many concepts familiar from Euclidean geometry yet made directly from the atoms of Democritus. I mentioned about his boyhood home on Hawthorne (some of these students were about that same age). I also talked about Ava Helen, OSU having her papers as well as his.

It was through the Pauling House that I became involved with Saturday Academy in the first place, I explained, as that's how I came to meet up with Joyce Cresswell, the SA: director who took this school forward from some house at OGI, through basement status at PSU, to its own agency, currently across from the venerable Multnomah County Library downtown (great location).

Gordon Hoffman was also my contemporary. I was happy to see him at David Feinstein's recent talk (at the Pauling House).

I also spent a goodly portion of the time giving my perspective on the development of the Internet, with special attention to http or hypertext transfer protocol. I suggested Computer Lib / Dream Machines by Ted Nelson was by this time a collectible (watch for 'em at Powell's). The birth of the World Wide Web at CERN was a dream come true for many of us, even though smtp, nntp and ftp were already pretty cool.