Putting the magic in the machine since 1980.

Thursday, March 10, 2011

On Teaching Programming in the Age of the Web

In the last few years a lot of people have been pushing the idea of 'flipping' the classroom experience: have the students view online videos as the homework then use class time for one-on-one help, see, for example, Kahn's video below. I agree it's a great idea, and there is data to support it, but can we do that when teaching programming to University students?

In the last couple of years I have tried to do this for two of my classes. My CSCE 145 is our introduction to programming class. It is taken by both computer majors and non-majors, about 50% for each group. My section alone had about 60 students. I created some Java programming videos which the students could watch at their leisure. With about 60 students, personalized in-class help was not possible, also because the classroom had no computers and the vast majority of students do not lug around a laptop all day with them. So, instead I decided to make the lectures more of an interactive demonstration: I would solve some programming problems in front of them and stop often ask them "how do you solve this?". The class also had a couple of weekly labs where the 60 students were broken up into more manageable groups and the TA's gave them individual help on the programming problems. I learned a couple of things.

  1. The videos were watched by about 2/3 of the class. From the surveys I gather that the students that did not watch them where those who already had programming experience; they didn't need them. Thus, the videos were a success, mostly. Looking at the logs I see that the first video was watched the most, then the second one, and so on. So, some students stopped watching. I think I made the mistake of making them about 40mins long each (I wanted to cover 1 chapter in each video). Next time, I will follow Kahn's lead and keep them under 10 minutes and limit each one to more specific topics.
  2. The lectures, in which I do a sample programming problem, seemed to be well received, but attendance was still just around 50% (students did not get penalized for not attending lecture). I think it would be more effective to get rid of lectures completely and have more labs, but this would mean I would have to spend 24 hours/week just in lab (12 hours/group with 2 groups of 30 students), so it becomes a significant time commitment. Add to that the time I spend making videos, tests, and homeworks and it quickly becomes 40 hours/week for just that one class. I think a more realistic solution is to pay some of our A-level Seniors to do some of that coaching, but we don't appear to have that kind of money right now.
  3. IM works really well. If you to the class blog you will see the "Chat with Jose M Vidal" button. This, along with a pastebin were very useful. For whatever reason, students will not email me their questions, but they will hit me up on the IM. This was a great way to offer when-needed help. At this level students often get stuck with a simple problem, like a missing semicolon or a variable defined in the wrong scope. A student could spend hours trying to figure this out while I can just look at it and in two seconds solve this tiny bug so they can move on rather than giving up out of frustation, which is what many times happens (and then they drop out). With IM they could just send me their pastebin link and I could solve their problem, any time during the day. The only problem was that our schedules are rather off-sync: I sleep from 10-6am while they appear to sleep from 2--10am. Luckily, my TA was able to pick up the night shift.

In my CSCE 242 class I am teaching web applications which is a topic for which there are a lot of online instructional videos. The problem there is choosing which of these videos are good, and deciding on which ones to show at which time. Since this is a software development class, I structured as very heavy on the programming. The class consists of about 13 programming homeworks that, more or less, have the student build a modern complex web application. The class is not yet over, but already I see that:

  1. IM has been even more useful in this class. I get at least a couple of question every day.
  2. The best help is context-sensitive. Complex programming ideas are easier learned in context. When I grade one of the homeworks and I tell the student "I see how you did this, and it works fine, but look at this other way of doing it. Isn't it soo much simpler?" the lesson is readily learned. At least, that's how it seems to me. I wish I could get some data on this.

Going forward I hope more people like Kahn step up and produce more of these videos. In fact, I want to see better videos with animations, professional voice-overs, professional writers, etc. These videos will be our new Public Library. They will allow me to focus on proving the context-sensitive help that students need. I also see that teaching will continue to move away from 9-5 and become more of a 24/7 on-call type of job. Hopefully, we will have shifts!