How to Teach Programming?

I 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:

  1. I hate computers
  2. I hate programming
  3. 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.

[tags]teaching, school, programming, teaching programing[/tags]

This entry was posted in school and teaching. Bookmark the permalink.

9 Responses to How to Teach Programming?

  1. Adam Kahtava CANADA Mozilla Firefox Windows says:

    [quote post=”2354″]there should be a zero tolerance policy for students who say one of the following lines:

    1. I hate computers
    2. I hate programming
    3. I hate [language you are teaching][/quote]

    In the work place, should there be tolerance for developers who regularly state any of the following:

    1. I never do anything IT / programming related, outside of work
    2. I hate frameworks / abstractions
    3. I hate computers
    4. Keep it simple, I don’t want to learn anything new
    5. I hate programming


    Reply  |  Quote
  2. Nathan UNITED STATES Mozilla Firefox Windows says:

    I agree with most of that, but I will say that I said “I hate computers” at least once per semester, and I like to think that I was one of the ones who “got it”. When you’ve been up all night hacking on a project that’s due the next morning and code that used to work perfectly “mysteriously” starts segfaulting, sometimes you say things you don’t really mean :)

    Reply  |  Quote
  3. Luke Maciak UNITED STATES Mozilla Firefox Ubuntu Linux Terminalist says:

    Well, it depends.

    [quote post=”2354″]1. I never do anything IT / programming related, outside of work[/quote]

    Is excusable if you would like to do it, but simply don’t have time for it. For example if you are a busy parent, you volunteer somewhere, or perhaps you pursue artistic or literary career on the side, or if WoW is your ‘other’ job I guess I wouldn’t hold it against you.

    [quote post=”2354″]2. I hate frameworks / abstractions[/quote]

    Some frameworks can be hated and some abstractions are silly. It’s excusable in some circumstances.

    [quote post=”2354″]3. I hate computers[/quote]

    Why are you working here then? I will talk to HR and see if we can transfer you to a much less technical janitorial position where you won’t have to deal with these hateful machines.

    [quote post=”2354″]4. Keep it simple, I don’t want to learn anything new[/quote]

    Oh my. I think you accidentally applied for the wrong job. Here’s an application to Burger King. I guarantee that after you figure out how to flip burgers you won’t have to learn anything new ever again.

    [quote post=”2354″]5. I hate programming[/quote]

    Well, if your job title has the word programmer or developer in it then you are clearly in the wrong line of work. I think you should think about transferring to the marketing department. :P

    Reply  |  Quote
  4. Luke Maciak UNITED STATES Mozilla Firefox Ubuntu Linux Terminalist says:

    @Nathan – true. I think that I have many times said that I hate windows or this or that piece of software. I also said “I hate this project” and also “I hate this language” when coding something in VB.

    I don’t think I ever said “I hate computers” though – because, truthfully computers never really did anything wrong to me. Every time a computer fails, it is because of a human error – either on my part, or on part of the software/hardware maker. To me it’s kinda like saying “I hate electricity” when your power goes down, or “I hate cell phones” when your call gets dropped. They are just tools.

    Also, when I’m experiencing major issues I usually pet my computer and talk gently to it trying to calm down the mysterious machine spirits that dwell within. ;) Saying that I hate it, or hitting it would only enrage these ephemeral beings even further. ;)

    Reply  |  Quote
  5. Adam Kahtava CANADA Safari Windows says:

    LOL.. I like the Burger King response.

    [quote post=”2354″]I don’t think I ever said “I hate computers” though[/quote]

    I’m in the same boat, I’d likely be struck by lightning if I uttered those words. Sacrilege!

    Reply  |  Quote
  6. astine UNITED STATES Konqueror Linux says:

    I don’t think I’d have a problem teaching a class like that. Once you fail a few students it gets easy, like killing people.

    Also, I believe that if you make CS a challenging major, you may actually attract more people to it, at least, more decent students who wouldn’t be interested in a cost class.

    Reply  |  Quote
  7. vacri AUSTRALIA Mozilla Firefox Ubuntu Linux says:

    Had a few ‘how do you know all this stuff?’ comments in my life. The response is simply ‘if you’re interested in something, you will learn it. you can’t help but become better at it’. If you’re not interested, find something else to do.

    Reply  |  Quote
  8. Miloš UNITED STATES Mozilla Firefox Windows says:

    You started your post kind of hard and I was shaking my head in disagreement as I was reading it, but by the end you ended up clarifying that the gauntlet is not your way of teaching which is good to know. :)

    For one, we* need to focus on more attractive development…stuff that is out there now and is attractive to people (users and developers)…the web 2.0 stuff. Yes it’s flashy and often faulty, but it will attract more students.

    Also, many institutions of higher ed need better faculty…not everyone knows how to teach or attract students towards their particular field of expertise. Just because you are good at it it doesn’t automatically mean that you know how to teach others.

    Lastly, we* need to find a way to publicize students’ achievements…have some kind of research lab, “help a student” lab where CS majors can show off in a sense and help others understand different parts of technology including development…we need to demystify the notion that all CS people are dorks sitting in dungeons coding their eyes out.

    * Term “we” does not pertain to any particular university ;) , but rather us as CS folks in general.

    Reply  |  Quote
  9. Luke Maciak UNITED STATES Mozilla Firefox Ubuntu Linux Terminalist says:

    @Miloš – yeah, it’s not my style. Besides, I don’t believe it would actually work for the class I’m teaching. You can’t use a gauntlet approach in Gen-Ed classes.

    As for Web 2.0 stuff.. Well, that’s an elective – maybe two. You teach them the basics behind javascript asynchronous calls, arm them with a javascript framework (like JQuery or Prototype) and they are good to go. I’m not sure if web development class will attract the right kind of people though – will these people stick around to learn about data structures, algorithms?

    But you are right – better faculty is the key.

    Reply  |  Quote

Leave a Reply

Your email address will not be published. Required fields are marked *