[Edu-sig] More CP4E News

kirby urner kirby.urner at gmail.com
Thu Jun 14 19:12:15 CEST 2007

I'd misread some signs and thought I was off the list for OSCON
for this year, but I'm on, talking CP4E, provided I make a certain
June 25 deadline with some filings, which I think I can do.

Yesterday I converted from DVD and uploaded as a low rez
Google Video some pro Saturday Academy PR to my blog:


This institution figures prominently in my version of the CP4E
initiative, complementary (and complimentary) to Guido's.
Speaking of whom, great slides from Guido from Beijing, including
of Olympics 2008 facilities still under construction.  A Google trip.

On the pedagogical front, Dr. Sonnenfeld at New Mexico tech,
a proud python owner (as in the literal snake) with his son Cody
and Company, wonders aloud at the paucity of Python (the
computer language literature) in the form of childrens books,
especially given all the buzz the adults're talkin' (me included).

His kids are ready to learn, but with what?  Where's the kid-friendly
fantasy angle?

Given the popularity of Piratology and Dragonology books, you'd
think O'Reilly'd already have something similar (actually that'd be
a departure -- it's kid book authors and illustrators with track
records we need, mixing OLPC & CP4E (a "head first" for kids
-- like not too dumbed down, even with all those twisted aqua
teen type graphics)).

You'd think with a gorgeous snake already in the picture, there'd
be such a literature.  Plus we like Perl's camels.  Plus CP4E ain't
just about Python.  It's about using open source to make the world
more intelligible in terms of the cave painting programs it'd need.
Like we don't have time to do a full version of anything.  We're on
a quick tour.  But look:  here's a supermarket (revealed in code,
lots of SQLAlchemy), and here's a bank (TurboGears?).

But before we get to "boring" (to young kids) banks and super-
markets (bazaars), I think kids love to think about animals.

Animals never lose their freshness.  I've gone on and on about
my Dog and Monkey classes in this archive, put that's just a
pointer, a prototype.

There's a huge animated cartoons industry I'm not planning to
reinvent (why would I?).  If the goal is to embrace CP4E, then
I think it's obvious we're awash in relevant tools for propagating
it, as multiple curricula (multiple namespaces).

Is Linux a horse?  Geeks [heart] Apache.

So in my next sa: class, I plan to give much more credence to
the cyberspace as ecosystem model, visualizing accordingly.
As my readers know, I'm already committed to MVC as a long
term key meme, so tie the ecosystem model and vizualizations
to M and V respectively, with the mediating language a "controller"
(could be Python, could be something else entirely).

One way this translates, is I'll introduce the four principal collections:
string, list, tuple and dict, and then I'll hand out source code and
ask them to color pen highlight these structures when and where
they're able to eyeball 'em in working code.  This takes practice,
especially given how syntax varies, allows multiple idioms, a lot of
embeddedness and so on.  I'm not encouraging writing obfuscated
code (they'll see enough of that anyway), but I do recognize that
production Python isn't just Dick and Jane seeing Spot run.

Listing 1:  exercise:  circle a dict object being initialized.  What
alternative syntax might the writer have used?  Give a short
example in the space provided: ___________________________

    def _edges(self, someobj):
        # cylinders
        thevertices = someobj.vertices
        for edge in someobj.edges:
            v1 = edge.v0
            v2 = edge.v1
            vrmldata = self._orient((v1,v2))
            length,roty,rotx = (vrmldata[1],vrmldata[2],vrmldata[3])

            edict = dict(
                radius    = edge.radius,
                color     = colordict[someobj.ecolor],
                length    = length,
                translate = "%r %r %r" % vrmldata[0],
                roty      = "0 1 0 %s" % roty,
                rotx      = "1 0 0 %s" % rotx)

            someobj.text = someobj.text + gl_theedge.substitute(edict)

[ http://www.4dsolutions.net/ocn/pyx3d.html x3dtoyz.py ]


More information about the Edu-sig mailing list