Programming for Children, Minus Cryptic Syntax
By PETER WAYNER Published: November 9, 2011
When Howard Abrams, a software engineer in Beaverton, Ore., wanted to teach his daughter, now 10, and son, now 8, how to program computers, he thought of the fun he had playing with Logo, the first programming language he learned.
In Alice, a language created by a professor at Washington University, the user can control three-dimensional objects like a merry-go-round or a skater.
The Scratch language, developed at M.I.T., lets users group together tiles in the center window to direct the movement of the cat in the corner.
He quickly discovered that “Logo is pretty old school. Now there are a lot of different options.”
So he chose to teach his children Scratch, a language developed for teaching at M.I.T.’s Media Lab, both for its simplicity and the way it encourages collaboration. He uses it with fourth and fifth graders at his children’s school, at a computer club where they build games and tell stories. The fun, he said, is contagious. “There are days when I think of quitting this job and teaching full time,” he said.
New and more sophisticated tools are changing the way that the next generation learns to program computers. Children can now create elaborate scenes and games without the cryptic commands that were once the only way to tell computers what to do. The most talented children can also use some of the sophisticated tools normally used by professional programmers, because the tools are now often easy enough for someone to pick up with only a few months of study.
Mitchel Resnick, a professor of learning research at M.I.T.’s Media Lab who helps run the Scratch project, said that Scratch is effective with children because it fosters collaboration. “It should not just be about an individual sitting at a computer,” Mr. Resnick said. He estimated that there are about 2,000 new Scratch projects created every day, and many are based on the work of other students. “A third of the projects, more than 600,000, are what we call remixes. The kids are building on someone else’s work.”
Mr. Abrams said he had grown to love the way Scratch encourages children to share. “At first, I was trying to get the kids to not talk,” he said. “But then I took a step back and let them socialize and work together on projects. That’s when things started to really happen. Someone would do something different, all would gather around, see it, and then go back to their own.”
A similar tool from Carnegie Mellon called Alice gives children command over three-dimensional characters like the ones found in video games. Like Scratch, Alice focuses the children’s attention by giving them tiles with instructions that advance the plot of a story. With tiles like “jump” or “turn,” a student can tell a skater what to do.
The system emphasizes logical thinking and sidesteps the coding errors that occur when a misspelling or an errant comma sends the computer into a petulant standoff. Caitlin Kelleher, a professor at Washington University, worked on creating this environment for simplifying storytelling when she was a graduate student at Carnegie Mellon University.
She explained that eliminating what computer scientists call syntax errors made all the difference in teaching children. “Kids can’t just understand that capital Bunny and lower-case bunny are different things. If you forget a comma in your English essay, your teacher doesn’t hand it back and say, ‘I can’t understand any of this.’ ”
There are limits, though, to what the hard work of these university professors can do. My 8-year-old son was disappointed when he found that programming a bunny to smash a cellphone resulted in a slightly flatter cellphone, not an impressive explosion of parts. When I told him that he would need to issue direct instructions for every fragment from the phone, he began to have a newfound appreciation for video game designers.
Tools like Scratch and Alice are what Mr. Abrams calls “gateway programming languages” because they offer simple introductions into how to organize the instructions. Older students in middle school or high school can go further and learn the computer languages used by professionals to build Web sites and databases.
Many of the grown-up languages have simplified versions for beginners. Devotees of the Ruby language, for instance, like KidsRuby or Ruby for Kids. Just Basic is one of the newest versions of the Basic language, itself a project designed long ago to make programming easier.
Even some of the professional tools are within reach for smart high school students. Robert Nay, 14, became the talk of the Web when his iPhone game called Bubble Ball reached the top of the charts. He used Corona, a toolkit from Ansca Mobile that makes it relatively simple to create objects that behave as if they’re in the real world. Many of the rules of physics are already encoded and the programmer only tells the objects where to go, not how to bounce. Corona comes with a built-in “physics engine” that fills in the details.
Blender 3D, a popular program for creating three-dimensional images, is built around Python, a professional computer language that is growing in popularity. Children can create working stories and simple games with its elaborately rendered 3-D worlds, just like the professional game designers and moviemakers who also use the tool.
All of this simplicity, however, doesn’t remove the need for inspiration, vision and dogged perseverance. Games like Bubble Ball take hours of polish, even when there are physics engines to fill in the gaps. Educators are beginning to recognize that simply making it easier isn’t helpful if the children aren’t ready to work.
“As you start to bring it to audiences who don’t have to do it for their job, you have to start to ask the question, ‘Why do they have to do this?’ ” said Ms. Kelleher, the Alice creator. She thinks that many children are more interested in creating stories and defining interesting narratives than just moving arms or legs. Her new project, called Looking Glass, is intended to help them make short animated movies and share them with friends who can remix them.
Mr. Resnick of M.I.T. said that children often find clever solutions when they explore what moves them. “We shouldn’t think of programming narrowly as a tool for a professional activity but as a means of expression,” he said.
“Our goal is not just for kids to grow up and get jobs as programmers. We feel that everyone should be able to express themselves with online media.”