The fourth graders in Julie Boatner’s library start their Hour of Code with much anticipation: One student even claps his hands as he logs on to his Chromebook.

“How many of you are coders?” asks Boatner, a librarian at Claymont Elementary in Ballwin, Missouri. Two or three hands pop up, so Boatner gives those kids the task of teaching a few others how to program a robot called “Sphero.” The little sphere is soon zipping about in the library as students brainstorm how to “tell” the robot (through their coding app) to zoom around a circular desk.

The rest of the students visit the Hour of Code website and choose a game to try: Minecraft, Flappy Bird, a new Star Wars game, Frozen. With Boatner’s help, students drag blocks of code that snap together like Legos onto their screens. This is only Boatner’s second year trying Hour of Code, an effort led by the nonprofit Code.org to bring computer science into classrooms through easy-to-teach, easy-to-learn games. But her students have made great strides already, she says. Much like the code on their screens, each exposure to coding builds on previous work.

As of last December, 250,000 classrooms had participated in Hour of Code—and with good reason. Teaching coding develops crucial computer literacy skills. Beyond that, though, many teachers are using it to enhance fundamental math, science, and literacy instruction. Why? Coding teaches kids to think in sequence and break down problems.

Ready to give it a go in your classroom? Don’t wait for next year’s Hour of Code. Take an hour now and try it out. Even if you don’t consider yourself tech savvy, you’ll see how easy it is to teach, and love, coding!

Start From Scratch

Scratch, a simple coding language and online community created by MIT, is ideal for newbies because it introduces concepts without the complex syntax, or “grammar” (parentheses, brackets, slashes), used in text-based coding.

Students might start by dragging icons onto a “workspace” and, in time, move on to create animations, games, or simulations. (Scratch has more than 9 million registered users worldwide, the majority of whom are between the ages of 8 and 15.)

Natalie Rusk, a child development expert at MIT Media Lab, says that kids who use Scratch develop enthusiasm and confidence with coding, and that will help them as they build the skills required for more complex coding tasks.

Sequence Your Steps

Teaching someone how to dance is a type of coding in real life, says Alana Aaron, a fifth-grade teacher at PS 48 in New York City (see Cool Teachers, Spring 2015). For example, you might use the box step as a primer for introducing coding concepts. The dance physicalizes the idea of a set of actions that repeats in loops.

Start by teaching students the repeating sequence of steps for the box step—step forward, side, together, backwards, side, together. Tell them that these steps are the “code” for the dance. Have them repeat the steps several times.

Next, it is time to take the dance code digital. In the Code.org activity Getting Loopy, “you give students an algorithm with the steps of the dance and ask them to identify the loops that the actions repeat,” says Aaron. For instance, if the dance instruction says “Clap, clap, clap,” kids will learn to shorten that to read “Clap 3x” when writing the instructions, explains Aaron.

Code for Math and Science

At Anita Scott Elementary in Royse City, Texas, Morgan Knauth’s struggling fourth graders needed more help with math lessons. So she asked them how they would approach the problems if they were in Kodable, an app that allows students to code games using arrow buttons.

“That’s what a lot of coding is, it’s just patterning,” says Knauth. “It helped them to better understand the steps, and then be able to turn around and apply it to our math time.” They were able to explain, for example, why they chose a certain series of steps to solve a math problem.

Enzo Ciardelli, a sixth-grade teacher at Gordon Price Elementary School in Hamilton, Ontario, incorporates coding lessons into his math instruction. (He has created websites to share his lessons with others: My Experiments in Teaching and Learning and Edgorithm).

His students first learn to code a shape in Scratch, using blocks of code, and then move to syntax. Later, they copy the code to graph paper to display on the classroom wall where other students can guess what shape it’s coding for. So, say a student posts the instructions “Move 100 steps, turn 90 degrees” four times, others would have to guess what shape that makes (a square.)

By year’s end, students can take on more complicated tasks, such as creating a program that solves for area or for mean, median, and mode, says Ciardelli. (Some even learn to program robots.) Students have to learn the math concepts inside out to tell a computer how to solve those problems.

Science is another area of the curriculum that is well suited to coding applications. MIT’s Rusk tells of one student who made a simulation of how mold grows for a science class using Scratch. It runs as a loop: Mold takes over an apple, the apple decomposes, a new tree is formed, and the process repeats. By increasing the temperature, the game speeds up. (“Prepare to be disgusted!” wrote the student on the opening screen.) Another child, a 12-year-old from Bangalore, India, created a narrated animation in Scratch about Earth’s layers.

Coding and Literacy

When children are learning how to construct a sentence or story, they are using sequencing skills. “Telling a story, you need a beginning, middle, and end,” says Melissa Jones, a former teacher and now a community development manager for Code.org.

Alana Aaron uses Play Lab—a simple interface that allows even the youngest coders to create their own stories—to connect coding to literacy instruction. Before her students go online, she has them write a story. “They follow a pretty typical writing process, brainstorming and generating ideas,” says Aaron.

After they finish the writing, revising, and editing process, Aaron’s students compose a script for the characters they plan to create in Play Lab. Once the script is set, they go online to code their stories.

Other students turn to coding for assignments as a matter of course. Rusk tells of one student who was assigned a book report on a historical figure. He chose Benjamin Franklin, and after reading about him made a series of interactive games in Scratch: He directed users to click on different games, including one that took players through a lightning maze while giving biographical information on Franklin.

“You’re using code to express your ideas,” says Rusk. “It’s really a blank slate when you start.”

Code for All Learners

Coding can be rewarding for all learners and has some unexpected benefits.

Jaime Binning, a second-grade teacher at Stone Creek Elementary in Roscoe, Illinois, has seen a big difference in how coding helps with math instruction. In both math and coding, Binning can nudge students to find their own path in which multiple routes might lead to the same answer. But what she found most surprising was that the kids who have struggled academically sometimes adapt best to the challenges of coding—they take the trial-and-error in stride, whereas it can throw off students who are used to getting the correct answer right away.

“You really are kind of surprised at who becomes the coding star,” says Binning, who is in her third year of teaching code.

Another benefit to coding instruction? You don’t need to goad students to do the work. “It’s a natural motivator,” says Ciardelli. “I’ve never met a kid who didn’t like a robot.” His students will even shoo him away while they concentrate on their work. “They’re very focused. In the room, they’re all quiet. Then, all of a sudden, you hear someone go, ‘Yes!’ because their code worked.”

Click Here to Subscribe to Scholastic Teacher Magazine

Image: Donald Traill/AP