Python and Schools

Alex Martelli aleax at aleax.it
Sat Apr 12 19:16:06 CEST 2003


Harald Massa wrote:

>> [cut]
>> I think python is a very good language for education. You could get in
>> contact with local schools.
> 
> Thomas, I am not so sure about this.
> 
> Yes, I love Python, and it is the most elegant programming language I
> ever met.
> 
> Python gives you objectoriented, functionorientet and imperative
> programming paradigm in one fitting package.
> 
> Python does not bother beginners with a million typecasts. Very great.
> 
> For education there are small drawbacks:
> 
> - 50% of all exercises "to teach programming" are already solved in the
> standard-library or are a method of a buildin object / are allready build
> in the core language
> 
> - 45% of these exercises are solved within "the python cookbook",
> available also online

Why are these "drawbacks"?  I see them as opportunities to:

-- have users develop/learn simple solutions to see how some things
   could be done then compare them with "professionally developed"
   approaches

-- then use the professional stuff as building-blocks for higher level
   problems (closer to applications of interest to the student)

When I taught programming I did show, for example, how to build an
integer multiplication function with a loop on top of addition and
shift-left -- even though the programming language in use DID have a
built-in multiplication operator, I thought that was instructive
(for my target audience -- engineering students in their 3rd year
of university).  Then, of course, we moved on to using multiplication
as a "built-in".  Similarly, later in the course, I showed how to
implement saxpy in bare Fortran -- then matrix multiplication on
top of saxpy -- etc, etc -- and as the course progressed we then
used excellent library implementations of those BLAS tools, not the
one we had put together "naively" (the subtext: I thought, and still
think, that engineers should have a feel for how things work inside,
BUT also resist the temptation to reinvent the wheel when good tools
are available in libraries).

Isn't the situation here quite similar?


> - if you learn programming with Python and later have to use Java or
> Visual Basic, it will be the most frustrating experience for the young
> fellows.

If you learn arithmetic with arabic notation and later have to use
roman numerals (try long division with them one of these days... but
even multiplication is cumbersome enough!-), it will be at least as
frustrating.  So, should we teach arithmetic using roman numerals
rather than arabic ones?-)

Any time you learn a good tool and later are forced to use inferior
tools it can be frustrating.  If the prospect of such forced use of
inferior tools is realistic, then the course that teaches the better
tool might choose to spend some time explaining how one can manage
to get things done anyway even with the inferior ones; it's not a
sound motivation to avoid teaching the better tool, anyway!


> Anyway, I regret not having met Python earlier in my programming career.

Sure -- me too.  Though "from pain we learn" (Pindarus), and maybe I
wouldn't have learned quite as much without the pain of dealing with
lower-level languages throughout my career, still I'd probably have
gotten more done in my life;-).


Alex





More information about the Python-list mailing list