[Edu-sig] re: Python Programming: An Introduction to Computer
tjd at sfu.ca
Sat Dec 13 15:20:23 EST 2003
Dr. Toby Donaldson
School of Interactive Arts and Technology
Simon Fraser University
> -----Original Message-----
> From: edu-sig-bounces at python.org [mailto:edu-sig-bounces at python.org]
> Behalf Of edu-sig-request at python.org
> Sent: December 13, 2003 8:54 AM
> To: edu-sig at python.org
> Subject: Edu-sig Digest, Vol 5, Issue 11
> Send Edu-sig mailing list submissions to
> edu-sig at python.org
> Message: 1
> Date: Fri, 12 Dec 2003 11:00:29 -0800
> From: "Kirby Urner" <urnerk at qwest.net>
> Subject: [Edu-sig] Re: Python Programming: An Introduction to Computer
> To: edu-sig at python.org
> Message-ID: <E1AUsWf-0003Kt-Me at mail.python.org>
> Content-Type: text/plain; charset="US-ASCII"
> I'm reading John Zelle's book, a real CS1 text book with exercises,
> Python as the language.
> This is an exciting book (see my concluding remarks below). I agree
> the blurbs on the back. E.g. Russell May of Morehead State University
> writes "This text does an excellent job of filling a gaping hole in
> Python community -- a textbook for an introductory computer science
> It is as good a text as I have read for CS1."
> Zelle has a lot of experience teaching CS1, back to Pascal days. I
> his sense of what belongs in a CS1 course in your average community or
> 4-year college. It's a fairly gentle slope by design, and Python
> What frustrates me somewhat is that CS1 doesn't really show off the
> power of Python, and by the time we get to CS2 at Zelle's academy (and
> suspecting this will be somewhat typical), we're on to Java. The
> is solid: real CS majors need exposure to a static-typed language, as
> as to more than one language. I have no problem with this reasoning.
> The frustrating part is this means cool CS2-level features of Python
> get much if any airplay. Syntax overloading is not taken up, and many
> concepts get only initial treatment (e.g. no discussion of class vs.
> instance properties/methods, nor of multiple inheritance). No list
> comprehensions, generators, regular expressions. No passing of
> parameters to other functions. No numarray, nor much use of the
> library beyond math, random, string and Tkinter (which last is wrapped
> simpler module, graphics.py). No default or optional parameters.
> Try-except *is* covered, as is eval() and docstrings.
> Again, I'm not questioning Zelle's judgment re what's appropriate to
> He has long experience in this domain. He's fully aware of what
> do, and just had to make these necessary cuts. It's probably somewhat
> painful to him as well, as when James Cameron (movie director) had to
> out reel three of 'Aliens' in order to have it fit the movie-house
> constraints of the day (reel three is restored in the extended play
> So let's assume a future in which Python is wildly successful as a CS1
> language, but with this pattern of moving on for CS2, with the sense
> Python has well-prepared students to tackle something thornier. Given
> bright future, I still have this lingering concern that Python may
> eventually be typecast as a "beginner language" in the sense of being
> sophisticated enough for higher level development.
> As Guido concludes in his short forward: "Reader of this book,
> congratulations! You will be well rewarded for studying Python. I
> you'll have fun along the way, and I hope you won't forget your first
> language once you have become a proficient software developer."
> I think it's this hope that I'm echoing as a concern. How will we
> that Python continues to receive attention even *beyond* its
> virtues as a beginner's language?
> When I try to think about how to get deeper into Python within a CS
> curriculum, I come up with a few ideas:
> (a) push more compsci content into the earlier grades so that CS1
> more quickly from the beginning, and therefore get further. E.g. if a
> of the students coming in already know some Python, this would be
> (b) keep the Python thread alive in CS2 even as Java is introduced,
> potential to bridge the two using Jython. This keeps Python around
> contrast. This may actually be closer to Zelle's own approach, as he
> mentions at his website using Python as "pseudo code" for Java-based
> implementations (but then current Java doesn't do operator overriding,
> some cool features of Python would still be missed using this
> (c) think about returning to Python in CS3, if there is such.
> (d) return to Python in some of the more specialized classes having to
> with graphics, computational geometry, statistics or other specific
> applications (a recommendation similar to (c) I suppose).
> (e) keep jiggering with the CS1 curriculum to squeeze more in, even if
> students do not come in more prepared.
> When considering option (e), my attention goes to the Point class. If
> Point does is hold x and y coords, then a class implementation seems
> overkill in Python. You could get by with built-in tuples. But what
> make a Point slightly more interesting by making it a Vector? Then
> put in __add__ __sub__ __mul__ and __neg__, as well as length(self)
> maybe even dot(self,other) and cross(self,other) -- do one in the
> leave the other for an exercise. Then there's conversion to/from
> polar/spherical coordinates.
> Such a Vector might still be used as a parameter to Rectangle and
> constructors, as in the current version, i.e. it could start out as a
> (x,y) container, and gradually mature as new OO ideas are mentioned.
> Another approach would be to add a chapter called something like
> Ahead' or 'Advanced Python', wherein a lot of these cool features were
> covered rather quickly and briefly, the intent being to give students
> foretaste. Those students most enamored of programming and wanting to
> more quickly, could be directed to this chapter and a
> However, none if this is about detracting from the worth of the text
> stands. I believe Zelle is perfectly positioned to press Python's
> is doing a very credible and creditable job of it.
> He's clear in his intro that his goal is less to teach Python than to
> an overview of important computer science concepts that students will
> re-encounter in just about any language. He's consciously eschewing
> Python idioms (list comprehensions?) in favor of a more generic
> because mastery of Python per se is not the main goal. I understand
> Through his efforts, I'm hoping we quickly get to the point where
> for Python" as a CS1 language becomes a no-brainer, i.e. it's not even
> point of controversy. I think this text moves us a big step in that
> direction. It's clear, it works, and it should easily go into
> future editions.
As much as I like Python, it doesn't walk on water. Arguing about CS1
languages usually degenerates into tedious religious battle where
opposing sides argue the undeniable virtues of their language, and are
generally disinterested in hearing about any other language. Yes, Python
has lots of neat features, but so does every language, and arguing that
Python's neat set of feature is better than language X's is a stalemate
from the start.
Productivity is far more important than language features, and the
reason why Python trumps other languages is ultimately that it is so
much easier to become productive in Python.
I also think that if Python became known as the "beginner's language",
then that would be a *much* bigger success than if it became the
language of choice for CS1. Far more people program than take CS1
More information about the Edu-sig