[Edu-sig] Python as a first language for computer sciencist

Kirby Urner urnerk at qwest.net
Thu Oct 20 18:17:56 CEST 2005


Hey Mark, good stuff.

I'll respond to abbreviated versions to your points.

> A few responses:
> 
> 1.  I'm not saying that Python is infeasible as an introductory
> language.

And in point of fact, it's used in this way by an increasing number of
schools.  For many of us, the judgment has already been returned.

Of course this doesn't mean Python is the *only* good candidate for a first
language.  

In my own virtual reality, the competition isn't other languages so much, as
competing hardware:  calculators (TI, Sharp, HP...).  But that's cuz I'm
focusing on using programming in math class, i.e. I'm using Python to teach
math.

I'm somewhat ambivalent about "teaching environments" and "teaching
languages" in general.  But that's a whole other discussion.  I acknowledge
the importance of simulators for airplane pilots.  Perhaps my position is
internally inconsistent.

> 2.  My teaching experience is limited, but I did teach one programming
> class to a group of middle-schoolers.  The most common mistake was, by
> far, simple misspellings of variable names (usually capitalization
> confusion).

I agree with another poster:  maybe pychecker should be brought in:
http://pychecker.sourceforge.net/

> 
> 3.  I stated an opinion that I would be reluctant to use Python for a
> large-scale project.  A number of people objected.

I wouldn't put it this way.  

You're entitled to your reluctance and shouldn't be pushed into any
large-scale project with a language you consider unsuitable.  I don't object
to your reluctance.

However, others have chosen Python for large-scale projects and found it
suitable, often as a glue language.

Python needn't be used in isolation and very often isn't.

A good CS sequence might be:  Python first, followed by some system language
that may be used to extend Python (e.g. C, C++, Java, C#), followed by a
course in which we actually extend Python (e.g. using SWIG).

A very common use of Python is to work with system language components
though an easy, interactive shell, and/or to write scripts using these
components.

The important point is:  Python, an agile language, is implemented in a
system language under the hood.  If you plan to be a hard core programmer,
you should study Python's own implementation.

[saving room for remarks about Pypy].

> 4.  Arthur felt I was suggesting that "we need to teach the
> programmers early on that they are not responsible for mistakes".

I agree with you that language designers have a role to play.

> 5.  We all carry a certain amount of baggage and bias to this
> discussion.  

Very true.

I started in FORTRAN (had one paying gig using it), though my first love was
APL (which explains my later foray into J).  I still do a lot of coding in
FoxPro (in the xBase lineage), which is object oriented by now, and is
integral with its own IDE (but not part of Visual Studio).  

I've played with other languages:  e.g. SmallTalk, LISP, Scheme (including
Dr. Scheme), C/C++ and Java (SNOBOL, PL/1, Assembler, Logo...).

I used to be a high school math teacher.  Plus I worked on computer literacy
text books for McGraw-Hill.

> 6.  I want to wrap this up with one more point that I'd love to see
> discussed here.  It seems to me that ideally, an educational
> programming language should emphasize one of the dominant programming
> paradigms in a very "pure" fashion.  

I guess it depends on the track or course students are on.  If it's purist
CS, then maybe so.

My focus tends to be people who will use programming in their lives, but
maybe don't intend to make it their chief or major focus (i.e. I focus
primarily on non-CS majors, while perhaps recruiting some new CS majors in
the process).

I do think it's useful to discuss the various paradigms and to expose even
non-CS types to the great wonder and variety that's already out there, with
more to come.

Re Squeak, I'd like to sit in on a few classes by someone experienced at
teaching it, and see what I think afterwards.  Until then, I don't attach
much value to my opinions about Squeak.
 
Kirby

PS:  have you looked at Dr. Python?  It somewhat emulates the Dr. Scheme
learning environment.




More information about the Edu-sig mailing list