Teaching Kids Programming

For the last two years I’ve taught a computer club at the local primary school. I’d get six or eight kids aged 8-10 for two hours at a time, once a week for three or four weeks. They varied in previous experience from “have computer at home and play games on it all the time” to “Mum doesn’t believe in computers”. Last year I wrote up my experiences from 2006, and what follows is my summary of the 2007 club.

I repeated some of the same exercises as the first year (building stop-motion animations) but the big change this year was that I introduced Scratch instead of Lego Mindstorms. Executive summary: it was a great success.

The Lego Mindstorm kit hadn’t been a straightforward win for me. On the positive side, the graphical programming environment worked well. Kids are not good at typing. They were able to grasp loops and conditions and so on, without ever having to struggle with parentheses or indents.

Against that, though, we discovered into several significant problems. The hardware isn’t of high enough quality—tracking a line across a sheet of paper sounds like a great project but the light sensor wasn’t able to reliably do the job. Kids need strong positive feedback when they get it right, otherwise they rapidly lose interest. The compile-install process was a downer for them (added complexity with no benefit). The range of projects possible with the hardware in the box wasn’t exciting enough to maintain their attention over the long-term. They like the idea of a robot, they’re not so excited by the reality of it.

I had much more success with Scratch. The kids got quick successes from moving drawings and bouncing them off the sides. They learned the same concepts as were in NXT, but got to do more things they could relate to. They made sprites have conversations with one another (using the kids’ recorded voices), built games, and were constantly calling each other over to say “look at what I did!”. A girl, whose parents firmly don’t want a computer at home, built an animated summary of the first chapter of her favourite book. Boys wanted to make guns that shot bullets.

I think there’s a lesson here: doing something in hardware isn’t automatically cool, particularly for kids. It’s harder to make things happen, so we veteran geeks get a thrill from it. We think that because it’s physical, real, and a Robot, kids will automatically be excited. But for kids who are learning, and who don’t appreciate the significance of the challenge, it’s just hard and unrewarding.

This might change with age, but I think that even 15 year olds should have had some exposure to programming in software before they start on the hardware. The only way around that would be for the teacher has a huge toolbox of peripherals to bring in and make some more impressive demos than LEDs blinking and Legos rolling back and forward across the floor.

I’ve posted a longer report, including the non-programming bits of computer education that I did with the kids, on my personal blog. (updated to fix URL)