Broadcom MASTERS finalists learn a little computer programming
WASHINGTON — After a tough three days of competing in science challenges, it’s nice to kick back and relax. You know, learn a new computer language. Maybe do a bit of programming.
On their last day in Washington, the 30 finalists in the 2013 Broadcom MASTERS competition spent a couple of hours learning about Raspberry Pi. It’s a simple computer built on a circuit board barely larger than a playing card. Besides the electrical components where the communications and power cords are attached, the circuit board sports only a handful of computer chips. A small memory card — similar to those used in many digital cameras — stores the computer’s programs and data.
Raspberry Pi’s bits and pieces together cost about $25, says Eben Upton. He’s a chip designer at Broadcom Corp. in Cambridge, England, the company that developed this bare-bones computer and sponsors the Broadcom MASTERS. (MASTERS, the premier U.S. science competition for sixth, seventh and eighth grade students, stands for Math, Applied Science, Technology and Engineering for Rising Stars.)
Conceptually, Raspberry Pi is similar to those common, build-it-yourself computers of the late 1970s and early 1980s, says Upton. That’s long before companies were producing personal computers in large numbers. With Raspberry Pi, “The idea is to give today’s youth a device they can tinker with,” he notes. Many of today’s electronic devices, such as iPods, iPads and iPhones, are sealed up. So their innards aren’t accessible and typically can’t be modified.
The simple computers that the finalists used in their Tuesday morning workshop had been loaded with a game. Written in a programming language called Python, it uses commands written in English. “It’s easy to use,” says Upton. “If the programming looks right, it probably is.”
In the pre-loaded game, a string of blocks representing a worm crawls across a computer screen. Players control the worm’s travel using the keyboard’s arrow keys. Players get points if their worm “eats” an apple (by passing over it). Immediately, another apple randomly pops up somewhere on the screen and the chase continues. The game ends when the worm runs into the edge of the screen, or a cutoff time is reached.
The teens and tweens spent more than an hour learning how to modify this game. They experimented, changing bits of the program’s language or adding new sets of instructions. Some changes were simple, such as changing the color of the worm or its speed. More-complicated revisions included adding a second worm, building in obstacles or allowing the worms to wander off the right side of the screen only to reappear on the left.
Dhruv Iyer, 15, of Chandler, Ariz., has previously done some computer programming with the Python language. “But the Raspberry Pi is awesome,” he says. “When I saw how easy it was to program, it blew me away!”
Megan Swintosky, 14, of Hatfield, Pa., is relatively new to programming in any language. “But after seeing [the Raspberry Pi], I’m definitely interested in learning more,” she says.
She and her fellow Broadcom finalists will get their chance to do plenty of that. Broadcom sent a Raspberry Pi home with each and every one of them.