How to Teach Programming?
Tuesday, March 25th, 2008I might be wrong about this, but I’m partial to the gauntlet method of teaching introductory programming courses. You make the class as challenging and difficult on purpose and make the students sweat. Hit them hard and as early as possible so that the slackers get the idea and withdraw from the course. Every lecture should raise the bar, and anyone who can’t keep up or is struggling should be encouraged to drop the course and change their major. It is harsh, but I do believe that a large percentage of people in every programming class will just never get it. No matter what you do, they will always struggle and will demand your help and attention which would be better spent supporting the students who actually get this stuff and are progressing at a fast pace.
I can probably tell you which people will do well, and which will struggle and just waste your time. You can see when you assign a really difficult problem they haven’t encountered before. The students that get energized, and excited by the challenge - who ask meaningful questions, furiously jot down notes, or start coding before you even finish explaining it - they are your star players. They should get all your attention and you should make sure they are sufficiently challenged, and that they have adequate support to meet the challenge head on.
Then there are those other students who raise their hand and say “I don’t understand this” or “I don’t know how do I do this” - they are most likely a dead weight. And yet, you will end up spending inordinate amounts of time basically holding their hand, and pretty much debugging their code for them. You end up purposefully dumbing down the course, and choosing idiot-friendly tools for their sake and in the end your star pupils get bored, and frustrated with the glacial progress of the course. In the end everyone loses.
The talented students make little progress, and end up ill prepared for the next programming course in the curriculum. The non-programmers barely pass with a C or a D (or if you made enough concession for their sake even a B) and leave your class without actually learning one damn thing. Or rather, the only thing they learned in your class was that they can slip through the cracks and pass a programming class without actually learning how to code or solve problems.
I think that the use of tools like BlueJ in the classroom is an outgrowth of this “cuddle the hopeless students while ignoring the talented ones” approach. Personally I think we do not need tools like that - not at the college level. But this seems to be a minority opinion, and many people disagree with it. Same could be said for the gauntlet approach.
The thing about the gauntlet thing is that it is actually very difficult to implement. It requires tons of experience, and absolute confidence in your teaching ability and methodology. When I notice that large number of my students is lost, I usually blame myself and try to review and re-iterate the difficult parts over and over again. More than once however I found that the people who were most vocal about the difficult material, and who got the most help from me actually got it wrong on the test, while the silent majority actually understood it. So I essentially wasted my time, spinning my wheels in place instead of going forward or covering other areas in more depth. It’s easy to spot these pitfalls in retrospect but not when you are lecturing. When I have 4 or 5 students who seem to be completely baffled by something that I just said, and loudly voice their confusion it is sometimes hard to realize they are actually not speaking for the whole class. The remaining 30 students who are quietly taking notes might not be confused at all.
Experience helps here - and so do a time tested lesson plans and delivery methods. Identifying and subsequently ignoring the dead weight also helps. But it is very hard to do because it means you are essentially giving up on some students and allow them to fall behind. And that is a horrible thing to do. Most teachers won’t willingly do something like that. Personally I refuse to do it and I really try to help people out when I see they are struggling. But often that means I’m essentially the one doing all the work - I’m literally pushing, and dragging them that’s passing grade. Would they make it if I didn’t actually force them to do work? Would they pass if I didn’t extend their deadlines ad infinitum? Probably not, and by helping them so much I actually allow them to slip through the cracks without actually working for the grade or even trying very hard. This is why gauntlet is a good idea, but I’m the wrong person to run it. I couldn’t do it. But there are people who can and do run their classes this way.
It takes the right instructor - someone who is approachable, supportive, but at the same time tough and demanding. And most importantly someone who knows what he/she is doing.
But IMHO there should be no cuddling, and no tolerance for ignorance or technological incompetence. But above all, there should be a zero tolerance policy for students who say one of the following lines:
- I hate computers
- I hate programming
- I hate [language you are teaching]
The only response to any of these statements should be: You should not be here! You will not do well! Drop this class! Drop this class! Drop this class immediately!
If you are confused by technology, programming bores you, and you dread every single coding assignment why are you subjecting yourself to this whole ordeal? I do not understand why people do this, but they do. When I was in college, I stayed the hell away from the Business School building because economics and finance classes bored me to death. I did not enjoy them so I didn’t take them. The Computer Science program at my school offered us a choice when picking required auxiliary courses - you could either do the science route (2 science classes - chem or physics) or the business route (3 business classes - micro/macro economics and some other stuff). I immediately signed up for science because it sounded much more interesting, and much more challenging. Most of my friends picked economics because it was easier.
Computer Science should never be the easy or fun course. It should be the class that evokes the sentiment in the majority of student body: “You are taking Computer Science? Are you insane?”. Only the students who are crazy enough, motivated enough or just love the subject should be taking the class.
Unfortunately, if you don’t get 20-30 warm bodies to register for your course at my university, the Dean will shut it down. And this is a problem at a school where we only offer 2-3 introductory programming sections per semester due to low student frequency.






