[Edu-sig] education as Python killer app
kirby.urner at gmail.com
Tue May 29 18:25:41 CEST 2007
On 5/29/07, Michael Tobis <mtobis at gmail.com> wrote:
> I expect you may hear from others on this list ( :-) ) who are using
> Python to teach math.
Yeah that'd be me, except I'm gravitating to the Shuttleworth Foundation
approach of referring to "analytical thinking" (http://www.kususa.org)
and/or not calling it math. Sometimes I call it "math... not!" or ~M!
for short (kinda quirky -- using it to help storyboard a TV show).
It's just that when I look at the current K-12 and try to see how we
get from there to here, I notice lots of content in the math curriculum
that's a natural fit. Algorithms like Euclid's for the gcd, a classic
in Python (by Guido) *could* be reached through a history class,
but math is where we'd traditionally encounter and use it pre-college,
given computer science tends to start up with it later (see Knuth
TAOCP, vol 3).
Another example: Python's primitive types, available out of the box,
go naturally with a discussion of the mathematical sets N, Z (int), Q,
R (float), C (complex). Then we say "math is an extensible type
system" i.e. you inherit a set of tools (types), with which to roll your
own (types, classes). Q (rational numbers) would be a user type, as
they're not primitive in Python (ergo 'import rat' or 'from rats import Rat'
or whatever). Vectors likewise (historically a user type, making use
of earlier types and ops).
The thing about types is we define them in terms of what they can
*do* (meaning as use -- Wittgenstein), which often means in terms
of Python's special names or __ribs__ as I call them.
When students see __add__ and __mul__ overloaded again and
again, but in different ways depending on the type, it seems
natural to clue them in about some of the abstractions, i.e. the
concept of "inverse" and "identity".
In Z, every int has an additive inverse such that m + (-m) = 0
In Q, every p/q has both an additive *and* a multiplicative inverse
(except 0 in the latter case): Rat(1,2).__add__(Rat(-1,2)) == 0 and
Rat(1,2).__mul__(Rat(2,1)) == 1. Meaning: 1/2 + (1/2) gives 0
and (1/2) * (2/1) gives 1.
This leads to a discussion of such concepts as group, ring and field
(Z is a ring, Q a field) which are considered "advanced" by current
standards, but which I think the practive of operator overloading
brings within range of a pre-college student (ala Kusasa). A practical
use of this knowledge is explaining RSA (public key cryptography,
built in to web browsers, used everywhere daily).
Math has this advantage of being a "required subject" which everyone
recognizes is part of the "core curriculum" whereas "computer
programming" is out in the cold as a peripheral elective. Oregon
state schools don't even use AP compsci, so boning up on Java
in high school isn't going to earn you credits at Oregon State.
K-12 computer teachers are the first to get repurposed in a budget
crunch, asked to teach math (required), or maybe gym (also required).
Plus so much of "computer class" tends to *not* involve in programming,
is focused on bizapps like spreadsheets. Similar in other states I'm
Changing all this to make programming more integral would seem
quasi-hopeless on the one hand, but on the other hand we have a lot
of motivated kids and a lot of distance education tools for reaching
them at home via the Internet. It's possible to start building our new
curriculum today, complementing what we know the schools are
teaching, but not confining ourselves to that content.
Kids engaging in these prototype learning experiences actually
find themselves clued in to a lot more critical info plus find themselves
develping job-relevant skills, so there's payback, reward, for study.
But of course only the most self-motivated are going to develop
these study habits. The Internet is *so* distracting -- by default
many don't find a way to stick with it. Formalizing the reward
system would be a next step, and that includes various forms of
credentialling and certification.
Finally, Arthur and I used to fight over whether my investments in
the Buckminster Fuller literature we're helping or hurting my efforts
I think the Bucky stuff is helping because I'm able to establish that
my geometry modules contain some basic curricular innovations
that math teachers have just been too lazy to accommodate, given
the high inertia and traditional-bound nature of their subject. I teach
about the whole number ratios between important polyhedra, about
the space-filling MITEs and Couplers, they don't. Plus I get the
geodesic domes and spheres out of my investment (HP4E meme).
So even as I distance myself from traditional K-12 mathematics
via my storyboarding for ~M!, I'm able to show that I've got some
of the best treasures in active use, vs. languishing from disuse
and neglect. My positive futurism is backed up with a respectible
track record. Kids, still with most of their lives ahead of them,
tend to gravitate to positive futurism, provided it's not just empty
More information about the Edu-sig