Programming with Alice
Creating animated movies provides a fun way to learn how to program a computer.
Shriveled, slithery, and wily, Gollum is one of the more memorable characters in the Lord of the Rings movies. But it took computers to bring Gollum to life, creating animated images of the character that smoothly blend with the actors on the screen.
And wherever there are computers, there have to be computer programmers who write the instructions that tell the computers what to do, step by painstaking step.
Want to learn how to program a computer and have fun at the same time? Give Alice a try!
|Stage3 Research Group, Carnegie Mellon University|
The skills of programmers, computer scientists, and software engineers are essential not only for generating special effects in movies but also for creating video games, operating cell phones, searching the Internet, downloading and playing music, and much more.
Nowadays, there are computers in airplanes, cars, television sets, vending machines, and kitchen appliances. All these computers need people who understand how computers work and can provide the necessary instructions. A set of instructions for a computer is called a program.
Unfortunately, the popularity of computer science as a career has been fading in the United States. There are 50 percent fewer computer science majors at U.S. universities now than there were 5 years ago, says Randy Pausch. He’s a computer scientist at Carnegie Mellon University (CMU) in Pittsburgh.
Equally troubling is that fewer than 20 percent of these students are women, he adds.
“Computer science has tremendous power to make a big difference in people’s lives,” says Caitlin Kelleher, a graduate student in computer science at CMU.
Kelleher wants middle schoolers, especially girls, to get excited about working with computers. Using an interactive computer program called Alice, Kelleher has made it her mission to show kids all the exciting opportunities that open up when you can talk to these machines in a language that they can understand.
Using Alice, a student can quickly create an animated movie in which characters move about and interact in an imagined 3D world. Along the way, the student learns how to write a simple computer program.
The results don’t look like Lord of the Rings, but if you give Alice a try, you can experience the immense satisfaction of getting a computer to do what you want it to do—and of showing off your waddling penguins or attacking bugs to friends.
In a computer program, each instruction specifies an action. Writing a program to animate 3D objects is all about deciding what actions you want these objects to perform.
With Alice, students begin by crafting stories. Then, they work out lists of actions that must go into the programs to tell the story. The students learn how to break a large problem into smaller pieces. It’s a bit like doing a word problem in math.
Users select characters, such as ice skaters or monsters, and environments, such as a forest or a city. They then create scenes in which the characters talk and move around in these environments. The results are satisfying little animations that can be funny, sad, or even weird.
Working with Alice, students aren’t faced with the hardest part of writing a computer program—specifying in excruciating detail, and in exactly the right language, every little thing that has to happen.
For example, suppose you had to tell someone who had never been in a kitchen how to make a peanut butter-and-jelly sandwich. You couldn’t just say, “Make a peanut butter- and-jelly sandwich.” You’d have to specify where to find the ingredients and the knife, how to use the knife, how much jelly and peanut butter to measure out, how to assemble the sandwich, and so on. You’d also have to tell the person what to do if something went wrong—for example, if the jelly jar were empty or there were only one slice of bread.
“If you write a paragraph in English and you put a semicolon or comma in the wrong place, people will still understand what you’re talking about,” Kelleher says. “With computer languages, if you get one thing wrong, it doesn’t work anymore.”
With traditional programming, beginners often get frustrated. They’re unable to figure out what they’ve done wrong.
With Alice, students use a mouse to select commands. Then, they can watch what happens on the screen. If a monster happens to end up in the wrong place, for instance, they can simply change the command.
So far, Alice seems to be doing its job. It’s getting students more interested in computers.
One study looked at college freshmen who were interested in computer science but were at risk of failing because of low grades. Without Alice, Pausch says, the students averaged a C in their first computer science class. Only 47 percent went on to take another computer class.
The average grade of students who used Alice, however, jumped to a B. Eighty-eight percent of these students took a second class. Alice conveyed the basic ideas and purposes of programming. After that, students were better able to learn the specifics of computer languages, such as Java and C++.
Teachers at 50 colleges and 40 high schools are now using Alice to teach introductory computer science classes, Kelleher says. She has been using a modified version with Girl Scout troops.
In Colorado, graduate student Agata Dean and her coworkers have used Alice at the middle school level in an after-school technology club and in a weeklong technology summer camp at the Colorado School of Mines. In both cases, students learned the software and were able to begin using it quickly, Dean says.
The beauty of Alice, Pausch says, is that it shows students how exciting and creative computer science can be. Working with computers doesn’t make you a geek, he insists. Computer work is an art form, only better.
“Painters are limited by paint, and sculptors are limited by clay,” he says. “Computer programming is limited only by the limits of the imagination . . . . There’s nothing you can’t do.”
Scientist’s Notebook: Why is Alice called Alice?