Teaching python (programming) to children

Cliff Wells logiplexsoftware at earthlink.net
Wed Nov 7 02:39:07 CET 2001

On Tuesday 06 November 2001 15:07, David Andreas Alderud wrote:

> Having a non-declarative language as a first choice is bad, teaches them to
> write sloppy code.

Yes and no.  Like many others, my first language was BASIC (on an Apple //e). 
Later, I took some CS classes where we learned Pascal.  I had indeed 
developed some bad habits due to language deficiencies in BASIC (everything 
global, no argument passing, jumping in and out of routines, etc).  However, 
it was a good, simple introduction to programming and I like to think I 
wasn't permanently crippled by the experience.  Later, I took up C, and what 
do you know?  Pascal gave me "bad" habits (mostly in the area of counting 
upon the compiler to warn me about bad things I was about to do).  However, I 
would never have moved back to Pascal from C because C's flexibility allowed 
me to code things that would have been extremely difficult in Pascal.  Yes, I 
could shoot myself in the foot, but at least I had a gun.

> Having dynamically typed language such as Python does even more damage to
> the understanding of how to write good code, thankfully python types are
> strong which helps to avoid part of the problem.

That depends upon your perspective on what "good code" is.  Code that is easy 
to read?  Easy to modify?  One of Python's strengths is that almost every 
line of code is related to solving the programmer's goal rather than telling 
the compiler how to compile the code.  Not having a lot of extra statements 
that have nothing to do with solving the problem results in cleaner, easier 
to understand code.  The skills you are referring to are difficult to teach 
in any language (although, I can't comment on Ada - perhaps it makes 
designers out of neophytes in no time ;-) .  These come with time and 

> Ada is used quite a lot, especially in the military and general embeded
> markets, and it's a gigant in realtime system programming.

Not really areas of interest for beginners.

> Ada is fantastic, with it I write inline Assembly(can even do inline
> Fortran, C, C++, etc, etc), combine it with Python, Java, etc, etc.

It may be.  Many excellent languages languish in specialized niches.  However 
I would hesitate making one of those excellent languages a teaching tool 
since people learning it would undoubtedly have to later move to another 
language anyway (possibly due to lack of availability on a specific 
platform), so most of the features they've come to depend upon would no 
longer be available and their reliance upon them would show up as "bad 
programming practices" in their new language.

> Ada is very strict, so sloppy code is very rare, sloppy written code is bad
> code, because it's hard to maintain, debug and extend.

Not knowing Ada makes me reluctant to disagree, but I wonder how a language 
so strict that writing sloppy code is difficult can be a very flexible 
language.  Usually those things are mutually exclusive.  Training-wheels on a 
bicycle are a common comparison... safety over flexibility.  Maybe this is 
why you need inline Fortran/C/Assembly in your Ada code - to get around the 
restrictions of the language.

> Ada a high level OO language that still remains close to hardware, while
> code is still portable across platforms, what more can you ask for?

Widespread use?  A promising future?  Guido himself suggested (in Linux 
Journal) that perhaps Dylan was slightly better than Python in some respects, 
but I don't see anyone jumping ship just yet (maybe when Visual Dylan hits 
the market).

> People underestimate Ada95 because they either don't know jack about Ada or
> just know Ada83, use the right tool for the right job, you can after all
> use Ada with Python. :-)

True, I don't know jack about Ada.  I don't know jack because I've never 
known anyone (other than yourself) who claims to use it.  This doesn't make 
it a bad language, just an impractical one.  The unfortunate fact is that the 
best design doesn't always win (otherwise where would Microsoft be today?).  
I think Ada had its chance and failed to claim enough interest to make it 
relevant today.  

And please, I'm not trying to offend you, just disagree with you (a little), 
so let's not make this another flame war - this list has had too many the 
last couple of days.  


Cliff Wells
Software Engineer
Logiplex Corporation (www.logiplex.net)
(503) 978-6726 x308
(800) 735-0555 x308

More information about the Python-list mailing list