[Edu-sig] Introducing Python at our community college
Massimo Di Pierro
mdipierro at cs.depaul.edu
Tue May 6 03:24:46 CEST 2008
Hi David,
I teach at DePaul university where we now use Python in multiple
classes. The way we got it in was not by proposing Python in
substitution to Java or C++. I tried it and that failed for the same
reasons you mention. I got it in by starting to use Python in
algorithms classes instead of pseudo code (and I did not permission
to do it). Python also works great in web development courses (we
have a course on web frameworks and we use web2py) and networking
courses.
Personally I believe that typical intro programming courses are
obsolete because the target population has changed. When our students
come in, although they cannot program, they already understand the
concept of network, data transfer, input/output, files. I think it is
easier to teach programming by teaching how to manipulate these high
level structures and then work your way down to loops and
conditionals that to do it the opposite way, the way we used to do it.
Massimo
On May 5, 2008, at 7:24 PM, David MacQuigg wrote:
> I talked with the CIS department chairman and one of the faculty
> about the possibility of teaching Python at our community college,
> and they weren't interested. (Oh No, not another language ... )
> Also, the lack of declarations was a show-stopper.
>
> I encountered this same objection from one of the faculty at U of
> A, where I just gave a lecture. It doesn't seem to help when I
> say: In four years of using Python, I can remember only one time
> when I had a subtle error from mistyping a variable name that took
> an hour to track down. I'll gladly trade that hour for the dozens
> I've saved not having to read and write all these declarations.
>
> I've added this to my QnA page at http://ece.arizona.edu/~edatools/
> ece175/Lecture/QnA.txt
>
> '''
> Q2: Without variables declarations, isn't there a problem with
> mistyped
> variable names leading to subtle errors?
>
> A2: It can happen, but the subtle errors are rather rare. Usually
> you will
> get an immediate and clear message like:
>
> Traceback (most recent call last):
> - - -
> NameError: name 'z' is not defined
>
> where 'z' is the name you intended to type. The subtle error can
> occur if z
> is already defined, and you intended to re-define it.
>
> If you worry about errors like this, you can scan your program with a
> utility like pychecker, and it will detect any variables that are
> defined
> but never used.
> '''
>
> Still, I wonder if there isn't a better way to handle this
> objection to Python. I'm thinking of a configuration option in
> IDLE, something that will either:
>
> 1) Run a subset of pychecker tests every time you hit the Run
> button, or
> 2) Insist on declarations in a comment at the start of every
> function (just the names, not data types). Any name that isn't
> already declared gets immediately painted red.
>
> I would use #1 if it was no time penalty. #2 seems like "training
> wheels" to me, but I would expect some folks who are religious
> about declarations might at least find it re-assuring.
>
> -- Dave
>
>
> _______________________________________________
> Edu-sig mailing list
> Edu-sig at python.org
> http://mail.python.org/mailman/listinfo/edu-sig
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/edu-sig/attachments/20080505/40116865/attachment-0001.htm>
More information about the Edu-sig
mailing list