[Edu-sig] sa: 8144: Day Two

kirby urner kirby.urner at gmail.com
Thu Jul 19 06:27:35 CEST 2007

On 7/18/07, kirby urner <kirby.urner at gmail.com> wrote:
> [
> Pursuant to:
> http://mybizmo.blogspot.com/2007/07/sa-8144-day-one.html
> ]
> I thought I'd do this one in a more premeditated style, outlining my
> lesson plan for the day, then following up later with a brief report
> on how I'd deviated from the script, how it all went.

I obtained the remote for the projector from the desk clerk this time,
so no standing on Omar's chair.  That victory was more than offset by
the $30 parking ticket (shades of my last gig, back to haunt me).

Immersion (recog) mixed with recall (blank canvas exercises) seems
to be working well enough.

Some students are anxious to show me they're able to write gobs of
code quickly, some of it a little broken, such as one guy using parens
for indexing into a tuple.

Easily fixed.

I think some people's expectation of a "programming class" is they're
going to be staring at long swatches of code.

Any shell intensive approach is discomfiting at first, as it engenders a
"where's the beef?" sort of tension.

Downloading stickworks.py etc. relieves this tension, as in "ah, *there's*
the beef."

Others have no problem just going along at the suggested pace, a guided
downloading of stickworks.py, polyhedra.py and viztoyz.py from the
Internet via a web browser, immediately launching the tests (at the
bottom of each module).

This was immersion phase, with imports coming from all over the map:
visual (= VPython), math, random, plus my own 3rd party modules, e.g.
looking at viztoyz.py:

from visual import sphere, color, display, cylinder  # native VPython
from random import randint               # standard library
from stickworks import Vector, Edge # 3rd party (4dsolutions.net)
from polyhedra import Tetrahedron, Icosahedron # 3rd party (4dsolutions.net)
from math import sqrt                      # standard library

My Vector class wraps visual.cylinder, always pointing from the origin.

Many vectors = sea urchin looking prickly thing.

So if you want Polyhedra, that'll take Edge objects, which connect any
two vector tips as in e0 = Edge(v0, v1).

I often cite a specific Linear Algebra book for laying groundwork for this
approach (Wayne Bishop of Mathematically Correct a co-author of this
text book that used to have BASIC in the back, but not in the later editions).

Some of this stickworks stuff gets spelled out some at showmedo.com
-- we actually watched the projected version (only a few minutes long).

Should any of you wish to take advantage of my scaffolding, you're
more than welcome:


Since we're focusing on Polyhedra as Model, real time and rendering Views,
with Python as Controller (MVC), I inserted my little "remedial geometry"
lecture sometime between two play sessions (2.5 hours leaves plenty
of time for both).  Gotta anchor those Polyhedra (not always clear their
regular schools are really doing that).

This is the little talk about the rhombic dodecahedron (not the pentagonal)
having an octahedron and cube (qyoob) embedded as long and short
rhomb-face diagonals respectively, with relative volumes 6:4:3.

I had my plastic box of beans along, stocked with paperboard shapes.
I poured beans from one to the other, highlighting these volume relationships.

A lot of them worked with color tuples during the play/exploration time.

Without having full mastery of the Vpython API (doc address shared), you can
start looking for color-tuples and messing with them.  There's lots to discover
e.g. about a (1,1,1) convention versus a (255, 255, 255) convention.  Ratios
matter in VPython.

One students thought of wiring color tuples to randints (my code hints
at such possibilities), even dividing by 100 to keep the R,G,B values <= 1.

We watched Warriors of the Net (I provide my own more powerful speakers).

Class over.  More tomorrow.

I used the Windows laptop today (vs. Ubuntu yesterday).

Makes no essential difference as far is this particular curriculum is
concerned.  IDLE is much the same either way, thanks to CP4E, as is
VPython, thanks to Bruce Sherwood et al @ Carnegie Mellon.


PS from Omar, who wanted to share:

http://uncyclopedia.org/wiki/Monty_Python  (cracks him up)

John Cleese and Eric Idle created the programming language Python in 91 AD.
The Snakes of America (SoA) strongly approve the language because it makes
snakes more [awesome]. "Python" is a direct rip off of Monty Python and
there are many references to the British humour group in everything about it.

More information about the Edu-sig mailing list