Sophie Prell

It’s not just games: how learning to code could change the education system

It’s not just games: how learning to code could change the education system

Should basic computer programming become a required course in American education? President Obama thought the idea made sense when it was posed to him during a Google + Hangout on Valentine’s Day. “I want to make sure [young people] know how to actually produce stuff using computers, and not just consume stuff,” he said.

“There are a whole bunch of young people out there who I suspect if in high school are given the opportunity to figure [that] out — ‘Here’s how you can design your own games, but it requires you to know math and requires you to know science,’ or you know, ‘Here’s what a career in graphic design looks like, and we’re going to start setting those programs in our high schools not waiting til community college’ — Not only does it prepare young people who are not going to a four-year college to be job-ready, but it also engages kids because they feel like, ‘I get this,’” Obama said, as reported by Polygon.

The possibilities are more exciting than just games

Les Miller, Professor of Computer Science at Iowa State University, said that, while Obama’s words were encouraging, the solution isn’t to simply introduce a new course that focuses on programming language into the curriculum. Students would forget a course like that as soon as they didn’t need it, he said.

The challenge then, is to shift the perception that computation and programming skills only apply when trying to think like a Computer Science major or perform computer-related tasks. Therefore, schools need to foster not just computational skill, but computational thinking. Get everyone to practice computational thinking, Miller said, and they’ll begin to understand problems and concepts on a deeper, more fundamental level.

This is why using games as an example is so powerful: If you tell students that they’ll learn how to create a video game, they won’t focus on the math, or the skills they have to learn to get there. They’re going to focus on what they need to do to make the games. If the goal is exciting enough, the steps to get there cease to be serious barriers.

This is only part of the opportunity presented by teaching children to code; as programming may be able to teach children to engage in science in a way that’s more direct, and informative, to what’s currently in the books.

Programming half-life (not the game)

Miller showed me examples of ways to use code to make even complex situations easier to understand.

“If you look at half-life, half-life is interesting because most science books don’t necessarily say that it’s very precise, but they imply it,” Miller said. “They’ll show 16 beryllium-11 isotopes, and then they’ll show another picture that has eight, because after one half-life, half of them are gone, and after two half-lifes they’re down to four, but it’s actually probabilistic.”

“What happens is that on each isotope, there’s actually some notion of probability of how long it’s gonna last. So at the end of one half-life, all the isotopes could be gone. Or they could still all be there.” As he explained the concept, Miller pulled up a line of code created in Scratch, an introductory-level programming suite.

Sixteen sprites representing beryllium-11 appeared on screen, but when he clicked the start button and the code began to execute, they started to disappear. The code, Miller pointed out, was using probability in combination with the accepted measures of half-life to create a visual representation of the real-world process. Everything being shown, from the sprites to how long they appeared on-screen, was dictated by a small segment of code to the left.

Speaking as someone who can sometimes still struggle with HTML tags, this blew my mind. And yet, Miller said, this was an exercise and program that could be shown to, and reproduced by, middle school students. You can’t create the code unless you understand the problem, and once you’re finished with the code you have a way of getting an answer that’s closer to reality than what’s taught in books.

A learning computer

Miller showed me several other examples during my time with him, such as a visual representation of the classic “two trains leave their stations” problem, and a social studies presentation that could be 10x more engaging than a simple PowerPoint. One example stuck out, though: a bat sprite that could be made to appear as though it were flapping its wings. It took less than five minutes to get the bat to animate properly, and the process was as simple as dragging and dropping bits of code into a window.

What made the bat special though, was the appeal. It looked like a cartoon. I thought back to when I was a kid, how I wished I could have made my drawings come to life. Miller said that my fantasy was and is a common one, and there are two subjects to which first-time Scratch users are almost always drawn: animation and video games. Kids love video games and cartoons. Instead of ignoring these childhood loves, Scratch - and by extension any program that teaches coding - can turn them into a learning experience.

Imagine a child playing the newest Mario Bros. at home, and then heading to school, where they learn Scratch. Possibilities ignite in their mind of what they can do, and they think of how much fun they had playing. They want to make their own game, so they start experimenting in code and scripting an executable program, de-constructing and reverse-engineering the game’s processes in their mind; press A to jump, jumping on this sprite causes failure, touching this sprite means you win, etc. The end result isn’t just a child’s experiment or first step into programming, it’s a lesson in how to think. And it started with a game.

Miller told me several times during our time together that these examples are much more than superficial, interesting lines of code. He reiterated that, while some impressive scripts could be written by inventive students, the true value of learning to code lies in how scripting forces the mind to view a problem.

“When kids are writing a program, they have to understand what you’re trying to teach. They have to understand it at a fundamental level,” Miller said. “It’s forcing them to think about what they’re trying to provide an answer for. With the two trains problem, if you had a student program that, they’d never get another one of those wrong. That’s really the value of it.”

Citizens with a lack of programming knowledge is just a symptom, and treating a symptom doesn’t cure the disease. It’s easy to look at the lack of tech-savvy people in America and propose a coding course to fix it, but that’s a temporary, short-sighted solution. Scripting languages will always be changing and evolving.

If students could be taught to analyze problems the way they would construct a sequence of code however, that sort of thinking could serve them their entire life, even if their life’s focus isn’t programming. We don’t need a high school course, we need to rewrite the way we think. After doing that, students will be able to come up with their own solutions to problems, whether it be creating a game or figuring out concepts that once seemed out of their reach.