[Tutor] Programming tutors WAS: if-else statements
Alan Gauld
alan.gauld at freenet.co.uk
Sat Oct 15 13:03:54 CEST 2005
> [Warning: I get totally off-topic, opinionated, and cranky in the
> following rant. My apologies in advance!]
Well since you've gone off topic so will I ;-)
> But I get worried, though, that much teaching uses fragile techniques that
> don't really scale well. I've disliked the order in which some Python
> tutorials approach language features --- in particular, functions seem to
> be given short shrift at times.
There are lots of ways to teach a language and there are ways to teach
programming. And the two things are different. That is the reaon that
I deliberately don;t teach Python specific idioms in my tutor prefering
to show a more general approach.
I treat functions as one of the 4 basic building blocks and introduce
them in my third topic 'What is Programing' but...
> I really wish that someone would take a similar approach in writing a
> beginner Python tutorial that focuses on functions almost immediately,
> even before control flow. Something like:
>
> http://www.htdp.org/2003-09-26/Book/
>
The problem with this approach for Python is that it requires a language
with tail end recursion which allows you to use recursive function calls
as the control structure. Python blows up too easily to do that so a more
conventional approach is necessary - trying to explain a recursion limit
error in the early stages of learning to program would just be too hard
IMHO anyway!
But I do agree that teaching the basic structures and princuiples is far
more important than documenting all of the various options and Python
specific idioms in the language - that simply teaches Python not
programming. One of my pet peeves with new graduates joining
our company is that they expect to get sent on a training course just
because a project uses a new (to them) programming language.
In most cases a day(*) with a book will be enough to become
productive if you understand the basics.
(*) If the language introduces a new paradigm then a course is
appropriate - but to teach the paradigm(OOP, Functional
programming, Predicate logic etc). Moving from Pascal to
C to VB to Python or Perl or Ruby etc doesn't count!
Alan G
Author of the learn to program web tutor
http://www.freenetpages.co.uk/hp/alan.gauld
More information about the Tutor
mailing list