[Edu-sig] Age groups

Tim Peters tim_one@email.msn.com
Sat, 5 Feb 2000 03:01:43 -0500


[Gerrit Holl, on teaching Python to ages 11-13]
> ...
> I learned Python at this age. I found it difficult and reread things
> a lot. Finally, I understood it. You can teach those kids much about
> classes, but multiple inheritance is more difficult. I don't think
> they'll understand map, reduce, filter, lambda and multiple inheritance.
> I don't understand reduce either. Why and when to use it?

Never, Gerrit!  reduce is essentially worse than useless in Python (an
expert may use it for "go fast" reasons, although in *most* cases it's not
only more obscure, but also slower than the obvious Python loop!).  At the
advanced age of 14, it's time to face an ugly truth:  grownups sometimes
make really bad decisions too <wink>.

I think this raises a larger issue, one of the few wholly valid points in
the recent infamous criticism of CP4E:  you need to define the goals of a
curriculum.

If the goal is primarily to teach programming as a means toward the
improvement of the mind (developing reasoning skills, & so forth), forcing
people to learn things like map and reduce may be a good thing:  they're
non-trivial but make perfectly good sense, so mastering them is a worthy
accomplishment.

If the goal is primarily to teach "computer science", then teaching map &
reduce etc are essential -- but almost certainly better done in the context
of Scheme (or some other language where higher-order functions are
"natural", instead of (as in Python) "minor conveniences for people who miss
Scheme" <0.1 wink>).

If the goal is primarily to teach practical programming skills, best to
forget them entirely!  They add no power to Python, and the testimony of
"almost all" posters to c.l.py over the years who have addressed this issue
is that a straight Python loop is easier to write, and to understand later,
and *much* easier to modify later (Python's "expression syntax" is (by
design!) weak, and so expression-oriented programming suffers badly under
modification in Python).

I don't claim that those goals can actually be separated, but any specific
curriculum will-- consciously or not --emphasize some particular one over
the others.  Make that decision in advance and it should be a powerful aid
in guiding later decisions.

one-size-fits-nobody-ly y'rs  - tim