Saturday, April 21, 2007

Class Notes (session one)

:: computer lab ::
Today marked the start of a new Pythonic Math course for middle and high schoolers, offered through Saturday Academy and using the facilities of Portland State University. Pythonic Math is a subclass of Gnu Math, meaning we use free and open source software as our core math notation (MN).

We started in IDLE, using it as a calculator but immediately showing off some of the advantages (e.g. 2**10000). Later we imported the math module to show where to get the complement of scientific functions, plus previewed VPython to assure ourselves of Python's graphical (including graphing) capabilities.

POV-Ray is also on deck, our ray tracer for stills vs. VPython's real time OpenGL type environment.

A core teaching: cartoons like Shrek or Over the Hedge involve slowly ray tracing each frame using a render farm, whereas interactive games, perhaps even multi-user over the Internet, have to compute all those actions and textures on the fly, while sustaining a reasonably high frame rate: two very different challenges.

We practiced downloading modules over the Internet into site-packages, importing, editing, reloading.

dir(anymodule) helps us explore contents by dumping a list, as does dir(anyobject) where said object might be a wanderers.Dog, a visual.sphere, or some natively supplied type such as a list, integer, string or dictionary. Like dir(1) tells the integer 1 to "spill its guts" about it can do; "oooo, lots of __ribs__."

Students enjoyed feeding their wanderers.Dog instances various foods via the eat method. Before long we had dogs eating other dogs, as well as pairing to create new dogs (the __add__ method begets a new dog with a hyphenated name).

(click for larger view)
After such an intense lexical (left brained) workout, I decided to give 'em a break and projected one of my favorite cartoons: Warriors of the Net, about tcp/ip, routers, firewalls, corporate intranets versus the Internet and so on.

Towards the end of our 2.5 hours, and looking forward to our experiences with VPython and POV-Ray, I went over the basics with polyhedra, per the RBF concentric hierarchy.

I explained how I considered this more 2nd or 3rd grade level material, apologized for getting remedial on 'em, but that's just how it is. The pre-computer, calculator-vested K-12 math-teaching ethnicity still clings to its tired/pre-wired ways, leaving students somewhat ill-prepared for 21st century careers in the design sciences.

:: whiteboard ::