by Esther Schindler

Teaching Kids to Program, or Don’t Try to Teach 8-Year-Olds Java Subclassing

Jul 31, 20084 mins

When Nathan Torkington moved back to New Zealand, he got involved in his kids’ school. Initially he provided hardware, which somehow turned him into the school’s de-facto system administrator. Before long, he found himself teaching the grade-school students programming skills… and his experiences might inspire you to help out, too.

I have a folder stuffed full of “cool things I saw at OSCON” (the O’Reilly Open Source Convention, held last week; I wrote about its key themes here). And not enough time to write about all of them at once. So, to get myself to focus on one topic at a time, I’ll begin with a topic near-and-dear to my heart: training the next generation of IT workers. It’s what Nathan Torkington, who’s board member of The Perl Foundation among other achievements, called “Spawning the Next Generation of Hackers” in his keynote session. Declaring—rightly, I think—that “Programming is now a basic life skill,” Torkington shared his experiences in teaching programming to grade-school children. Here’s a few of the points he made in his presentation.

(I’ve long wanted to write a feature story on this subject, but have always put it off in favor of higher-priority issues. E-mail encouragement might get me off my butt, so don’t hold back.)

One lesson he learned is that robots aren’t cool. Torkington started teaching the children using a LEGO MindStorms kit; it let them build a robot by programming the central controller. It sounded cool to him but he came to this conclusion: “Robots are lame.” The killer app for the MindStorms robot was to make it follow a line on a page, he said, and it didn’t even do that consistently. So children could work really hard on a project and have it still fail to work right, through no fault of their own.

Instead, he found, a better tool for teaching kids to program is the sprite-based Scratch from MIT, which despite some limitations is a fully-featured language. It subtlely introduces important programming concepts without banging the kid over the head. “You don’t want to explain Java subclassing to an 8 year old boy,” Torkington opined.

Other lessons-learned:

  • Lectures don’t work. “You have two minutes, tops, when you have a class full of kids,” he said. Instead, you have to focus on discovery-based learning.

  • They don’t have math skills. Even simple math tasks, such as dealing with 90-degree angles to create a square, are too advanced for children. You have to pick the programming projects with that in mind. Or, he said, it’s a good place for pair programming; the kid thinks in terms of creating a cannon for his game; the adult can do the programming that involves math and bounds-checking.

  • Typing is also a challenge. They haven’t had keyboarding classes yet.

  • The gender gap is not what you think. “Everything is better with the girls,” Torkington said. They’re smarter, more focused, and they have better math skills. They’re also more literate at that age, and they follow instructions, in Torkington’s experience. “The boys just want to make a game like what they play on the X-box, and they’re too ambitious,” he said.

  • Follow their interests. Help them do what they want to do, or they won’t pay attention. He showed them the basics and said, “Now you experiment. Decide what you want to do.” Students used their new skills to tell jokes and stories, to create books (such as one girl’s presentation about her favorite book) and to program simple games.

Torkington cajoled the audience to get involved, and to volunteer in schools. (“Unless you’re a pervert,” he added, which made everyone laugh.) Go in and ask, “What do you need?” Help the school acquire hardware; his initial involvement began when the New Zealand Foo Camp (a.k.a. Baa Camp—you know those New Zealand sheep fans) had money left over, which he made available to the school. Help your school make stuff work; the teachers need training, too. Run a computer club for the summer. And—since this was, after all, the open-source community— tell them, “I can get rid of your license problems.” When you create useful courseware, he suggested, share it and post it online.

“There is no downside to volunteering in a school and helping kids,” Torkington said.