[Edu-sig] Introducing Python at our community college

Richard Enbody enbody at cse.msu.edu
Tue May 6 03:51:21 CEST 2008


David & Massimo,

Our local community college will begin offering Python courses this 
Fall.  As is common with community colleges there is a lot of 'training' 
for particular tools and languages to meet immediate needs of local 
employers.  As a representative of the big, research university in town 
on the community college's advisory board I was pleased to see interest 
both at the college and with employers.  I can put you in contact with 
them, if you are interested (contact me directly at enbody at cse.msu.edu).

In our department we began using Python in our CS1 course (first 
programming course for majors) last Fall with the CS2 course still 
taught in C++.  I've surveyed and collected data on whether there is a 
difference in the CS2 experience -- this spring was the first CS2 
offering with students who began with Python. The course just finished 
so I expect to take a while to sort through the data.  I can share it 
with anyone who is interested.  It offers interesting possibilities 
since some students had Python first while others had something else 
(C++ and Java mostly). At this point, the instructor of the CS2 course 
is confident that at the very least the Python students are no worse.

-rich
enbody at cse.msu.edu

Massimo Di Pierro wrote:
> 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 
>> <http://ece.arizona.edu/%7Eedatools/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 <mailto:Edu-sig at python.org>
>> http://mail.python.org/mailman/listinfo/edu-sig
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Edu-sig mailing list
> Edu-sig at python.org
> http://mail.python.org/mailman/listinfo/edu-sig
>   


More information about the Edu-sig mailing list