How Should I Teach a Basic Programming Course?
riverman writes "I have been 'provisioned' at the school where I work to teach a new Computer Science/Programming course. I'm supposed to be teaching everything from the very-very basics (i.e. where that myspace thing is in your computer monitor, and how it knows who your friends are) to the easy-advanced (i.e. PHP classes and Python/Google App Engine). I'm an experienced programmer, but I'm not sure where to start — I could easily assume that my students know something basic they don't. Are there any resources on the internet that could help me find a solid curriculum? What are your suggestions?"
I'm sure many of us have gone through intro-level programming courses of some sort; what are some things your teacher or professor did that worked well, and what didn't work at all?
Computer basics, ie how to use the web, and computer programming do not belong in the same course. People in the audience for either will not be happy with the other.
Don't teach things in 'the abstract'. Give them a task to accomplish that needs particular 'features'.
Then the next 'task' adds more 'features', but doesn't drop the earlier ones learned.
And don't make the tasks abstract either. "do a bubble sort" would qualify as too abstract. While "collect 5 client names from the user and sort them" wouldn't.
---- Booth was a patriot ----
1) Teach them to understand that a computer does what a computer is told. So as a class building exercise get them to "program" a robot in pseudo code. You give them a fairly complex assignment that involves decisions. The test in this is that you the teacher are the robot. And the students who thought of this as a joke or simple assignment will quickly realize that garbage in garbage out means something.
2) Do the assignment again, but this time add "testing" routines. Make them write little assignments, that are assembled into bigger tasks. Show how this could be a "test driven" environment. You teach the robot little things, and then those things are assembled into bigger things. This teaches them components, modules and test driven.
3) Take all of that knowledge and apply it to a programming language. I personally would choose something along the lines of python and ruby. They have enough problems and they need a quick turn around.
4) Teach them about OO by introducing them to a programming language like C# or Java.
5) Finally teach them functional
Though I would stress team exercises thus giving them the benefit of XP (Extreme Programming) type training.
"You can't make a race horse of a pig"
"No," said Samuel, "but you can make very fast pig"
The majority of people - even those with college degrees - have a difficult time with logic. Something as simple as an if-else construct can be very confusing to the average person at first.
And there's another twist. About 40% of learners can understand and manipulate abstract concepts, and learn them without any practical experience whatsoever. The other 60% require experiential learning - they have to do before they understand. Fortunately, computers can very easily demonstrate concepts such as if-else...
And how computers work is a mystery to most people. Before you start the course, you should come up with a simple mental model that you can use to explain how a computer works to someone with absolutely no understanding of electronics, logic, etc... For a basic programming course, you should first assess class understanding:
For most programming courses, you should not even assume your students understand how to use the compiler. Furthermore, you should probably come up with a series of simple examples which demonstrate your point without any extraneous code. Because most people learn by doing, one of the first exercises should be to build a simple "hello world" type of application to familiarize themselves with the build tools.
And have fun! Come up with interesting problems. Your students will most likely spend most of their corporate careers doing boring stuff, so they'll appreciate the chance to do fun things like games.
The society for a thought-free internet welcomes you.