How coding teaches virtuous skills like patience

Editor’s note: In an excerpt from her upcoming book, professor and inventor Marina Umaschi Bers shows how coding can help students learn human virtues.

When it comes to teaching students to code, and the skills and ideas they will learn, it can be helpful to think about a painter’s palette. But in this metaphor, instead of thick smears of oil paint, imagine a set of virtues and values.

Just like the painter, who chooses different colors to make their palette, so is the educator or parent who intentionally chooses virtues for children to explore as they create their own coding projects. In this way, programming becomes an opportunity for moral and ethical development as well as social and emotional growth.

In my virtue palette, I chose to place ten universal values, based on decades of observing the kinds of interactions, behaviors, and attitudes that occur in coding environments: curiosity, perseverance, patience, open-mindedness, optimism, honesty, fairness, generosity, gratitude and forgiveness. The virtue palette metaphor reminds us that coding is not just a science but also an art produced by creativity and imagination, situated in the diversity of human experience.

When learning in what I call the “coding playground,” children can experience solving technical problems while exploring values, virtues, and character strengths. Playgrounds evoke the feeling of having fun in a social space. Not only do children run, but they also learn to negotiate and communicate. Conflicts are resolved and ethical dilemmas arise.

In the coding playground, social-emotional development does not take a back seat; good teachers plan their lessons, but great teachers know how to slow down if the opportunity arises, for example, to explore one of the virtues of the palette.

How it works? I’m going to show you, using the virtue of patience as an example. Here we enter Mrs. Shah’s kindergarten classroom, which uses a robotics kit to teach coding (and a few virtues along the way.)

Learn to be patient

First, a quick definition. Patience is defined as the ability to accept or tolerate delays, troubles, or suffering without becoming angry or upset.

Today marks the second day that Shreya and Falyn will be using the KIBO robot in their kindergarten class. Their teacher, Ms Shah, noticed yesterday that Falyn was taking a long time to scan, while Shreya picked it up pretty quickly. She hoped that by bringing them together, Shreya could help Falyn. Once the girls are seated with their KIBO, they start programming right away. They’re just experimenting with movement blocks, but before they know it, they’ve put together a short sequence of moves for KIBO to follow.

“Can I scan first?” Shreya asks impatiently. “Okay,” Falyn nods, “but I have to scan next!” Ms. Shah had told them that they had to take turns scanning so that everyone was treated fairly and had a chance. Shreya starts scanning each block one by one, moving quickly as soon as KIBO beeps. “Do you want to push the button?” she offers to her friend. Falyn nods enthusiastically and presses the triangle-shaped start button to launch KIBO into the move sequence they programmed together.

“Yay!” The girls scream. They begin to create another program to be scanned by Falyn. This one is a bit longer; there are about ten blocks of wood for Falyn to cross. She begins by holding KIBO above the starting block, causing the scanner’s red light to hit the block. Shreya notices that the scanner is touching the center of the block and the red line is not crossing the barcode. It does not work. “Try to put it on the black and white lines,” Shreya immediately suggests. With difficulty, Falyn moves the red scanning line to the barcodes. That doesn’t work either, but after what seems like an eternity to Shreya, KIBO beeps in affirmation.

Falyn moves on to the next block. Shreya notices that the scanner is very diagonal and only cuts through the middle of the barcode rather than going straight through it. Seconds pass and Falyn moves KIBO’s scanner less than a centimeter from the block; Shreya knows it’s too close to work. At this point, Shreya notices that their classmates have started creating more complex programs. She rests her chin in her hands, remembering how fast she had gone through the first program.

“Can I help you?” she asks suspiciously. “No, I want to do it,” Falyn said. Shreya moans as Falyn continues to move the scanner up and down with little success. Shreya can’t take it anymore.

She snatches the KIBO from Falyn’s hands and begins scanning the program herself. “Hey!” Falyn cries, reaching out to retrieve it. “You take ten million years! It will be faster that way! Shreya retorts. “But it’s my turn!” Falyn yells back.

Mrs. Shah hears the girls screaming and rushes over. “What’s going on?” she asks them, looking worried.

“Shreya stole KIBO from my hands! exclaims Falyn.

Mrs. Shah raises her eyebrows and asks, “Shreya, is that true? Remember that we must take care of KIBO so that it does not break.

Shreya sighs and replies, “Yes, but she was taking all the time trying to scan the blocks!”

Mrs. Shah asks Shreya to come to her side. The two go to a table where the other students cannot hear their conversation and they sit down together. “Shreya, do you play sports? Ms. Shah asks.

“Yes,” Shreya nods, “I like playing tennis.”

Mrs. Shah smiled. “Good! Do you remember the first time you played? Shreya takes a moment to think, then nods. She started taking lessons last summer. Ms. Shah asks, “Was it easy for you to get the ball over the net?” Shreya shakes her head. She remembers how embarrassed she was that most of the kids were able to return the coach’s balls except her. “Sometimes he takes time and practice to get good at something,” says Ms. Shah. “Falyn will improve in scanning, just like you did in tennis. She needs time to train. You have to be patient.”

Shreya thought about it for a moment then nodded in agreement. She remembers how long it took her to hit a ball over the net. Disappointed, she realizes that it will be a long time before Falyn learns to scan. “Okay, Ms. Shah.” As Shreya returns to Falyn, she notices that her friend has already stopped holding KIBO too close to the blocks and has gone through a few more. “Sorry, Falyn,” Shreya said.

“I’m fine,” smiled her friend.

“If you try to hold it so that the red goes straight through the barcode, it might beep faster,” Shreya suggests. Falyn tries, but it still takes him a while to properly orient KIBO. Shreya says nothing; she waits and lets her friend find out for herself. Eventually, KIBO beeps and Falyn runs through the last blocks much faster. “You did it!” Shreya smiles. The girls high five and start watching KIBO perform his sequence.

In coding, patience is an important skill that develops over time. In this case, patience involved a girl respecting her friend’s learning time. In other cases, it’s about being patient with yourself, allowing time to learn. However, patience does not come easily to young children. In an environment where competition reigns, patience will easily be forgotten in the palette of virtues. However, this is not the case in the coding playground where the outcome is meaningful expression, not speed or efficiency.

Excerpt adapted from “Beyond Coding: How Children Learn Human Values ​​through Programming” by Marina Umaschi Bers, published by MIT Press, © 2022 Massachusetts Institute of Technology.

Comments are closed.