Why Johnny can't program -- and how that can change

Today's schools are actually turning kids away from computer science, and it will take innovative programs to reverse the trend

When I was a kid, the first stop on the road to becoming a computer programmer was the local arcade. In the 1980s, as now, video games were a booming business. As a preteen enthralled by these glowing, interactive marvels, to be told that I could actually learn how to make video games was like being handed a scholarship to Hogwarts. The arrival of the home computer made it possible.

Today, video arcades have more or less vanished from the American landscape, but kids' interest in video games is stronger than ever. Game consoles and PCs have become staples of family life. But this new generation of gaming platforms doesn't seem to be encouraging kids to take up computer programming.

[ Get software development news and insights from InfoWorld's Developer World newsletter. ]

"There are more and more [computer science] jobs," says Alexander Repenning, a computer science professor at the University of Colorado Boulder, "but the interest is actually going down, and the interest of women in these kinds of jobs is going down even faster."

Although video games have changed a lot since the 1980s, Repenning and other instructors at Colorado are betting that what worked to inspire kids then can work now. Currently in its third year, the university's Scalable Game Design curriculum aims to reinvent computer science education beginning at the middle school level, using games as the spark to ignite students' interest in computing.

How computing classes turn kids off

"The middle school years are critical for students in reaching conclusions regarding their own skills and aptitudes," writes Repenning in a paper published in 2010. "This is the age at which children prematurely and often falsely conclude that math and science is not for them, or that computer science is all about programming, or is a field that is hard as well as boring."

For those of us who taught ourselves programming, it's easy to see how young students could be turned off. Traditional computer science classes at the high school level and earlier teach programming as if it was an end unto itself. Students labor for an entire semester or longer, and by the end of it, they've done little more than write programs that sort sets of numbers, plot simple graphs, or ask the user questions. It's hard for young students to see the purpose of these kinds of exercises, particularly when there is already plenty of software available to accomplish the same tasks, with no programming required.

By the time students reach the college level, they're taught to see programming as a rigorous discipline. They're introduced to the concepts of object orientation, data structures, design patterns, functional programming, code optimization, and compiler design. To graduate with a computer science degree, they'll probably need to slog through a full course of calculus, differential equations, linear algebra, and discrete mathematics. And while this may be all well and good to a goal-oriented undergrad who anticipates a lucrative career maintaining enterprise JavaBeans for Wall Street firms, to a wide-eyed middle school student who is new to programming, the road ahead must look pretty bleak. What is the point of it all?

Unique tools to engage students

According to Repenning, the typical middle schooler's response to a programming lesson is predictable: "I know what is going to happen: The teacher writes a program onto the blackboard, we type it into the computer, and it never works."

Repenning's program avoids this disheartening cycle in three important ways. First, it deemphasizes programming while still encouraging students to develop the logical thinking skills they'll need for more advanced studies. Second, it engages students by encouraging them to be creative and solve their own problems, rather than just repeating exercises dictated by their instructor. Third, and perhaps most important, students are rewarded for their efforts with an actual, concrete result they can relate to: a game.

The key to the program is AgentSheets, a unique software authoring environment developed at Colorado. AgentSheets combines a graphical, drag-and-drop user interface with a rule-based programming language to allow students to develop games and interactive applications of surprising sophistication. Projects built with AgentSheets incorporate not just code but images, sounds, and other multimedia.

The Scalable Game Design curriculum isn't just about enticing kids with entertaining exercises, either. Students start the program by building a look-alike of the classic arcade game Frogger, in which a player guides a cartoon frog across a street of busy traffic. By the end of the program, however, they've seen how the same tools can be used to build simulations that model forest fires or the spread of contagions. The idea is to show how computer tools can be built to address a variety of real-world needs, with results that are both functional and engaging.

Is there hope for tomorrow's programmers?

A key part of the program, the Scalable Game Design Summer Institute, invites middle school teachers from around the country to come to the university to gain firsthand experience with AgentSheets and the associated lesson plans. The hope is that they will then be able to return to their respective school districts and start the process with their own students. In the three years it's been in operation, the Summer Institute has attracted teachers from as far away as Georgia, Mississippi, Ohio, and Alaska.

There's just one problem. The Scalable Game Design curriculum was developed as part of the university's iDreams program -- a broader effort to teach computing to Colorado students -- which was funded by a $1.4 million grant from the National Science Foundation. That grant has now been expended, and this third year of the iDreams program will be its last. The AgentSheets tools will continue on, supplied by a for-profit company (of which Repenning is CTO), but for now there will be no more public funding to help schools take up the offer.

Meanwhile, as education budgets tighten around the country, schools and universities are being forced to reexamine their programs. Everywhere the specter of program cuts looms large, and mathematics and sciences are no exceptions. Recently, Western Washington University came under fire for suggesting that it may scupper its computer science program.

Confronted with such pressures, it's hard to imagine how innovative programs such as Dr. Repenning's can continue to flourish. But they should. Because if we don't encourage them to learn computing skills now, the next generation of graduates may find themselves left doing exactly what they're doing today: just playing video games.

This article, "Why Johnny can't program -- and how that can change," originally appeared at InfoWorld.com. Read more of Neil McAllister's Fatal Exception blog and follow the latest news in programming at InfoWorld.com. For the latest business technology news, follow InfoWorld.com on Twitter.

Copyright © 2011 IDG Communications, Inc.