[Edu-sig] PyWhip ???
kirby.urner at gmail.com
Sun Mar 8 04:28:39 CET 2009
I'm glad your factorial example doesn't force a recursive solution!
Factorial is often used as a gratuitous recursion exercise, whereas
it's neither necessary nor more efficient to write it that way.
Just checked the other examples too.
In class, you probably teach about writing the tests as a part of the module.
In XP, it's "write the tests firsts" -- probably you cover that too.
As I was posting to Chipy recently:
>From an HR point of view (human resources) we're interested in ending
the "private castle" approach to coding, where one indispensable
individual builds a "fortress of solitude" around code no one else can
decipher. That's a recipe for disaster and Python, in the hands of
professionals, doesn't easily "black hole" in that way (just stay away
from gratuitous use of metaclasses and you'll be fine (smile)).
A language like J (an APL spin off) or even Perl, might out of the box
tempt a newbie into a solo coding style, but within strong IT cultures
that promote XP and/or related practices, such "implosion" is
generally avoided, using the very tools developed for FOSS in the
first place e.g. Launchpad etc.
Indeed, the best FOSS projects, such as Python itself, Django, Pocoo,
wxPython... Numpy are so successful precisely because the code is
amenable to "handing on" i.e. doesn't bottleneck in the mind of some
"genius" (so thank you Tim Peters, for encoding the Zen of Python when
it mattered -- helped keep us on track).
The idea that professional coding is an entirely solo activity is to
be discouraged in the contemporary curriculum.
I think your examples are in the right direction, in that the code is
partly in place.
Green field development is not always what's up.
More information about the Edu-sig