[Chicago] How did you learn Python?
kirby urner
kirby.urner at gmail.com
Fri Mar 6 19:32:03 CET 2009
If you're somewhat new to programming, you have an advantage, compared
to those who grew up through Spaghetti Code Wild West, then Structured
Programming, then OOP.
The SCWW part was Assembler and so many JMPs, which of course you need
when all you have is a wall of bricks (memory locations) and a way to
CMP (compare) registers. When FORTRAN came along, the whole idea of a
"Compiler" the brainchild of Grace Hopper in some ways (very smart
geek), coders continued to use GOTO with wild abandon.
Structured Programming was highly controversial in its days because of
professional pride / jealously, like who was this Djikestra guy daring
to tell *me* (*me!*) "how to think like a computer scientists" -- many
felt he was being condescending.
There was also this early tension between making oneself indispensable
by making the code understandable only to its author / maintainer (the
path of obfuscation, the mark of a bad programmer or one pinned
against some organizational wall, a boxer in the ring).
OOP was really the first time we could take our minds off the chip
itself (the "wall of bricks" and start looking out into the world with
a coherent paradigm, more akin to what Bertrand Russell and those guys
were doing, to advance the Leibniz dream of machine logic for thinking
about "the world").
So in my math classes in Portland, we treat Python as a highly evolved
agile in the philosophical tradition, i.e. one of those Logic things
you read about, important in New Math, then submerged by
traditionalists anxious to get back to calculator-based
arithmetic-based lesson plans (but we have those too).
In Gnu Math, we go with Guido's recasting of Euclid's Algorithm,
important in Knuth, and build a Rational Number class, even though
we've had a Fraction class since 2.6 or so. The point is to learn how
fractions work, not how Python works, as these kids have been getting
about __rib__ syntax since the beginning. Our very first class is
likely something like this (drawing from both 'Sims' and 'Spore' for
inspiration -- toyz from their youth):
class Biotum:
def __init__(self):
self.stomach = []
def eat(self, food):
self.stomach.append(food)
def poop(self):
if len(stomach) > 0:
return self.stomach.pop(0)
return None
def __repr__(self):
return "Hello world, from Biotum @ ", id(self)
Yes, seriously, this is where we *start*, with projected code on the
big screen, lots of yakking about *biology* (not programming) and
*scatology* (because these are young kids, just learning to type
QWERTY).
My point: learning Python *in the process* of learning basic
mathematics, through RSA in high school, by way of SQL in basic
algebra (among other skills) is going to make this stuff really
effective in the long run. We're starting to preview this curriculum
in Portland, with more becoming clear by the day (see math-thinking-l
archive for some recent thinking).
I also have a lot for Python for Math Teachers at Showmedo, including
talk #6, which is Part 1 of my Chicago Pycon presentation. Part 2 is
what I'm offering in conjunction with Steve Holden (holdenweb.com) and
Ian Benson (tizard.stanford.edu) this year, an intimate planning
meaning where we strategize where to go next, in the Lower 48
especially (mostly working though London, Matsu District AK, and
Stillaguamish Country north of Seattle (I'm at Seattle Center right
now, good meeting yesterday at Japanese restaurant on Queen Ann).
One of the core features of Pythonic Math as we call it, is this new
kind of geometry that's really easier for teaching the spatial stuff,
especially to students aiming for careers in computer graphics and
animation. Here's a write-up of how I teach this in Portland via our
flagship geek academy: http://www.4dsolutions.net/ocn/pymath.html
Kirby
usa.or.pdx.4dsolutions.net
'Python for Teachers' (pycon2009):
http://mentor.sociality.tv/groups/evidence/search/index.rss?tag=hot
http://tizard.stanford.edu/groups/sociality/weblog/9a001/The_Sophisticated_Promise_of_Open_Source_Part_1.html
http://mail.python.org/pipermail/edu-sig/2009-February/009072.html
More information about the Chicago
mailing list