How Coding Teaches Virtuous Skills Like Patience

Coding

How Coding Teaches Virtuous Skills Like Patience

By Marina Umaschi Bers     Mar 4, 2022

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 help to think of a painter’s palette. But in this metaphor, instead of thick daubs of oil paint, imagine a collection of virtues and values.

Just like the painter, who chooses different colors to make her palette, so does the educator or the parent who intentionally chooses virtues for children to explore while they are creating 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 palette of virtues, I chose to place ten universal values, based on decades of observing the kinds of interactions, behaviors and attitudes happening in coding environments: curiosity, perseverance, patience, open-mindedness, optimism, honesty, fairness, generosity, gratitude and forgiveness. The metaphor of the palette of virtues reminds us that coding is not only a science but also an art produced by creativity and imagination, situated within the diversity of the human experience.

When they learn in what I call the “coding playground,” children can experiment with technical problem-solving while also exploring values, virtues and character strengths. Playgrounds evoke the feeling of having fun in a social space. Children not only run around but also learn to negotiate and communicate. Conflicts are solved and ethical dilemmas arise.

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

How does it work? I’ll show you, using the virtue of patience as an example. Here we enter Ms. Shah’s kindergarten class, which is using a robotics kit to teach coding (and some virtues along the way.)

Learning to Be Patient

First, a quick definition. Patience is defined as the capacity to accept or tolerate delay, trouble, or suffering without getting angry or upset.

Today marks the second day that Shreya and Falyn will use the KIBO robot in their kindergarten class. Their teacher, Ms. Shah, noticed yesterday that Falyn was taking a long time to scan, whereas Shreya picked it up fairly quickly. She hoped that by partnering them up, Shreya might help Falyn. Once the girls sit down with their KIBO, they begin programming right away. They are only experimenting with motion blocks, but before they know it, they have put together a short sequence of movements for KIBO to follow.

“Can I scan first?” Shreya asks eagerly. “Okay,” Falyn agrees, “but I get to scan next!” Ms. Shah had told them that they should take turns scanning so that everyone is treated fairly and has a chance. Shreya begins scanning each block one by one, quickly moving on as soon as KIBO beeps. “Do you want to press the button?” she offers her friend. Falyn nods excitedly and presses the triangle- shaped start button to launch KIBO into the moving sequence they programmed together.

“Yay!” The girls shout. They begin making another program for Falyn to scan. This one is a little longer; there are about ten wooden blocks for Falyn to get through. She starts by holding KIBO above the begin block, making the red light from the scanner touch the block. Shreya notices that the scanner is touching the center of the block and the red line is not running across the barcode. It does not work. “Try putting it on the black and white lines,” Shreya suggests immediately. With difficulty, Falyn moves the red scanning line to the barcodes. It does not work either, but after what feels like an eternity to Shreya, KIBO beeps in affirmation.

Falyn moves to the next block. Shreya notices that the scanner is very diagonal and only cuts through the middle of the barcode rather than running straight through it. Seconds go by, and Falyn moves KIBO’s scanner within a centimeter of the block; Shreya knows that this is too close to work. At this point, Shreya notices that their classmates have begun to make more intricate programs. She rests her chin in her hands, remembering how quickly she had scanned through the first program.

“Can I help you?” she asks warily. “No, I want to do it,” Falyn says. Shreya groans as Falyn continues to move the scanner up and down without much success. Shreya cannot take it anymore.

She snatches the KIBO out of Falyn’s hands and begins to scan the program herself. “Hey!” Falyn cries, reaching to get it back. “You’re taking ten million years! It’ll be faster this way!” Shreya retorts. “But it is my turn!” Falyn shouts back.

Ms. Shah hears the girls shouting and rushes over. “What’s going on?” she asks them, looking concerned.

“Shreya stole KIBO right out of my hands!” Falyn exclaims.

Ms. Shah raises her eyebrows and asks, “Shreya, is this true? Remember, we need to take care of KIBO so it doesn’t break.”

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

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

“Yes,” Shreya nods, “I like to play tennis.”

Ms. Shah smiles. “Good! Do you remember the first time you ever played?” Shreya takes a moment to think and 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 felt that most children were able to return the coach’s balls except her. “Sometimes it takes time and practice to get good at something,” says Ms. Shah. “Falyn will get better at scanning, just like you did at tennis. She needs time to practice. You need to be patient.”

Shreya thinks about this for a moment and then nods 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 until Falyn learns to scan. “Okay, Ms. Shah.” As Shreya makes her way back over to Falyn, she notices that her friend already stopped holding KIBO too close to the blocks and has made it through a few more of them. “Sorry, Falyn,” Shreya says.

“It’s okay,” her friend smiles.

“If you try holding it so that the red goes straight through the barcode, it might beep faster,” Shreya offers. Falyn tries it, but it still takes her a little while to get KIBO oriented correctly. Shreya does not say anything; she waits and lets her friend figure it out for herself. Eventually, KIBO beeps and Falyn goes through the last few blocks much more quickly. “You did it!” Shreya smiles. The girls high five and begin to watch KIBO perform its sequence.

In the coding playground, patience is an important skill that is developed over time. In this case, patience involved a girl respecting her friend’s own learning time. In other cases, it is about patience with one’s own self, allowing time to learn. Regardless, patience does not come easily to young children. In an environment in which competition rules, patience will be easily forgotten in the palette of virtues. However, that is not the case in the coding playground in which 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 the MIT Press, © 2022 Massachusetts Institute of Technology.

Learn more about EdSurge operations, ethics and policies here. Learn more about EdSurge supporters here.

More from EdSurge

Get our email newsletterSign me up
Keep up to date with our email newsletterSign me up