Good-bye
'hello world'
Rethinking Teaching with Python
Vern Ceder
Canterbury School, Fort Wayne, Indiana
Having just signed to write Head First Programming with Python for O'Reilly, I am very much interested in making programming accessible to everyone
#include <iostream>
int main()
{
cout << "hello, world";
}
This is the C++ code a student would have written for her first program in 1997
class hello{
public static void main(String args[])
{
System.out.println("hello, world");
}
}
This is the Java code that I feared a student would have to write for her first program in 2003
name = raw_input("What is your name? ")
print "Hello,", name
This is the Python code that a student would write for her first program after the adoption of Python in 2001
Only two lines and interactive...
>>> 22/7 3 >>> 22.0/7 3.1428571428571428 >>> "spam " * 5 'spam spam spam spam spam ' >>>
This is a typical session in the Python shell, evaluating expressions...
After the required exposure in 9th grade, only hard core geeks continued in programming.
I gave a survey as a control for comparison with one given to our 8th graders in connection with my PyCon 2006 talk....
The one who liked it is not the one to worry about...
The approach needed to re-examined
The swimming pool of course is the program where you calculate the volume of swimming pool based on user input. A classic boring, only-for-the-sake-of-practice program.
LiveWires is the graphics package used - developed for that age group.
Responses
Recommendations
Innovate
Python is not C - let's not continue to teach programming as though it were...
Keep it interesting
Motivation is key - make programming problems interesting to your audience.
Evaluate
It is vital to get feedback on how well your students are doing and what they think of the course.
Recruit
I've used the same materials as used for the students to offer tutorials on Python at teacher conventions with enthusiastic response. If we can reach them and give them the knowledge, there are teachers who want to teach programming.