Originally published on Wired, March 2009.

SAN JOSE, CALIF. — A new language from MIT’s Media Lab makes it easy for kids to develop programs that interact with things in the real world: Pencils, paper, water, and even vegetables.

Called Scratch, it’s not so much a procedural language as an environment for creating interactive animations, annotated stories, slideshows, prototypes and games. It’s designed to be as simple to use as possible, so kids as young as 8 can get started building their own animations with minimal preparation.

“Our design philosophy is, don’t design something for kids that you don’t also find engaging and interesting,” says Jay Silver, one of the researchers who created Scratch. Silver works in the Media Lab’s “Lifelong Kindergarten” group. So it’s not surprising that the environment is fun for adults, too. At the Emerging Technology conference here Monday, a roomful of grownups were playing with the program, creating bouncing kitties and a simple golf game.

To create programs in Scratch, you simply drop “sprites” onto a canvas. You can then attach actions to the sprites in sequence, making them move, change color, bounce off other objects on the canvas, and make sounds. The software has been available since mid-2007, although the MIT crew released a new version, 1.3.1, in February 2009.

Scratch now comes preloaded on all XO laptops sold by the One Laptop per Child project.

Scratch comes ready to interoperate with an external sensor kit called a PicoBoard. This $50 circuit board includes a microcontroller, a button, a slider, a light sensor, a microphone, and four ports for measuring the resistance of circuits. It connects to a computer using a serial-to-USB cable, and immediately starts delivering data that can be used by Scratch programs.

For instance, a sprite can be made to grow or shrink based on the electrical resistance of a circuit connected to one of the PicoBoard’s ports. Silver demonstrated the kit by attaching one lead to a pushpin stuck into a #2 pencil, and the other lead to a line he scribbled on a piece of hotel note paper. Because graphite is somewhat conductive, touching the tip of the pencil to the line completed a circuit. The Scratch software was able to read the resistance of that circuit and make a cartoon cat grow or shrink in proportion, depending on where on the line Silver placed the pencil.

Total programming time: About 20 seconds.

Other attendees at the Scratch session used the PicoBoard to control the behavior of a golf game, adjusting the power of the stroke based on what vegetable was used to complete the circuit between two alligator clips. A scallion was approximately equivalent to a 9-wood, one of the project members quipped.

Silver is also the instigator of Drawdio, a $20 kit that makes different musical tones based on the resistance of a circuit, enabling kids (or adults) to make music by touching conductive objects, water or each other.

The idea is to get kids to explore with the real world by translating one property (such as resistance) into another (sound) in a way that encourages fun and experimentation, says Silver.

“My projects are about exploring the urban environment and trusting yourself as a scientist,” says Silver.

In addition to programming, Scratch also lets kids upload and share their projects through an online community at the Scratch website. The hope is that children will use the language to learn and interact with one another, forming clubs and learning the techniques of programming, mathematics and logic.

Scratch is available for Mac OS X and Windows, and can be downloaded for free at scratch.mit.edu.

Photo: Scratch team member and MIT grad student Jay Silver holds a Scratch-compatible PicoBoard. Photo by Dylan Tweney / Wired.com