April 10, 2017

Should All Children Learn to Code?

Paul Goldenberg believes computer programming belongs in K–5 classrooms—and it’s not about turning every child into a computer scientist.

It was during a 1989 visit to Bulgaria that Paul Goldenberg watched elementary school students use programming as a tool for refining and communicating mathematical ideas. What he observed at that school helped crystallize his thinking that programming belongs in the elementary classroom.

“As children’s mathematical ideas matured from one grade to another, they could use computer programming to express, test, and explore those ideas,” he recalls. “It was about having expressive language, not about turning them into future computer scientists at all.”

Today, Goldenberg still believes programming is an ideal tool to learn mathematics for children in grades K–5. Here, he offers his take on why all children should learn to code—even if they have no intention of ever becoming a programmer or a computer scientist.

Q: How has our thinking about teaching programming in schools changed?

Goldenberg: During the 1980s, a lot of people thought that if students learned a programming language, such as Logo, then they would be guaranteed a great job. It simply wasn’t true. Programming jobs grew in number as personal computers became more popular, but not anywhere near the rate of the people who learned to program to get them. And not all of them were great jobs, either.

We’re at a different point now. Computers are much more central to how we live and work. Learning to program still isn’t just about learning a skill for a job. It’s about using technology to make something—whether it’s a new app or a virtual model or a piece of software that nobody else has invented yet. It’s fun to program because you can make things you like.

Q: What do children learn when they learn to program computers?

Goldenberg: Programming teaches students how to edit, refine, and keep persisting to create something new and of interest to them. It’s a lesson that is applicable well beyond computers. Just as writing an essay on paper helps refine one’s thinking, programming does that, but in a different domain. In fact, when I was working with Seymour Papert in the early days of Logo, we were not thinking of programming as a job but as a creative tool for the mind.

Kids also learn to find structure in tasks, subdivide big tasks into smaller ones, test and debug, generalize, and develop logic—all parts of what is broadly called computational thinking. Take building a checkerboard. I don’t want to have to draw each individual square, so I build a block of code that makes a single square, and then use that block of code with a new color to build a second square. Together, these make a new block I can use four times to make a row. The next row is a bit different, but I can use code I’ve already written—and then reuse that code to make the checkerboard. Understanding that one can use little stuff to make big stuff without having to re-examine or rebuild the little stuff is a powerful idea.

Q: Why should elementary math curricula include programming?

Goldenberg: Programming, used well, could help make mathematics education better. At the simplest level, programming is fun, stretches children’s curiosity and creativity, and gives them a tool to apply mathematical thinking.

But it is also particularly well suited to helping students describe an algorithm—the steps by which something gets accomplished. When children “show their work” by writing on paper, it just sits there, correct or incorrect, clear or garbled. When they express an idea as a program, they can run it and see for themselves whether it’s clear enough for the computer to understand and whether it works or not. Instant, personalized feedback is very valuable. The computer never scolds or gets disappointed in you, and you’re right there to perfect your work before you declare it done.

Q: So should all students learn computer programming?

Goldenberg: Yes, but not for the sake of becoming future computer programmers. We really don’t know what the language of the future will be. Coding used to be text-based; now many programming languages are more visual. Things change rapidly.

What we do know with a reasonable amount of certainty is that the computational thinking that children can gain through learning how to program a computer—ideas like abstraction, task-analysis, and structure—will remain relevant and in demand. So too will the need and desire to build things. Children who learn to code are building skills that will be useful for the rest of their lives.