Teach kids the art of internet self-defense

Never too young to start coding.
Never too young to start coding.
Image: AP Photo/Jaime Henry-White
We may earn a commission from links on this page.

These days, smartphones are as common a schoolyard accessory as book bags and brightly-colored sneakers. But while the average 10-year-old spends a lot of time immersed in online games and social-networking sites like Instagram and YouTube, many of these places aren’t very kid-friendly.

I believe there’s a simple way to make the internet a less racist, sexist and offensive place. In order to diminish hate speech and increase digital diversity, we have to teach kids how to code.

The costs of cyberbullying

Cyberbullying can pose a real health risk for adolescents, according to recent research from the American Academy of Pediatrics. Several recent studies support this claim. Despite teens’ savvy use of the internet, they also experienced shame, embarrassment and humiliation even when going online to forge social connections and participate in public life, according to a comprehensive seven-year study by Microsoft Research’s Danah Boyd. And a number of high-profile news stories about the victims of cyberbullying offer dark reminders of how damaging online slurs and threats can be for young people.

Offensive comments also flourish on social media. A depressing sampling of racist and sexist comments are collected at the Twitter accounts @YesYourRacist and @YesYoureSexist. Facebook pages such as “It’s Not Racist If It’s Funny” or “I Love Being White,” with more than 12,000 fans, clearly create hostile environments for young users.

Teaching kids to code might be an effective way to change the landscape. If kids feel confident that they have the tools to change their online environments, they will be empowered to take action. Children who are the targets of harassment on social-networking sites could create alternative networks for themselves and their friends that reflect their values.

Empowering kids with coding might also result in small victories, from deleting an offensive comment on Yik Yak to adding a hashtag that puts a rude tweet in its place. These options are already available, but kids will be more likely to use them if they’re accustomed to taking an active role in shaping their digital spaces.

Changing gaming culture from the inside out

Stereotypical representations of race and gender also continue to proliferate in gaming culture. (Witness the racist and misogynous trappings of Grand Theft Auto, an enduringly popular series.)

Many games also continue to imagine default players as white and male. For instance, the popular game Minecraft automatically generates a white male avatar named “Steve” for all players starting the game. My ten-year-old daughter, with limited digital knowledge, had to navigate out of the game to a related website to turn her avatar into a girl—but she couldn’t find an avatar that wasn’t white. Had she been a coder, however, she could have easily imported an avatar with a different skin color into the game using of the choices made by older coders, or even designed her own.

In fact, many of these problems could be addressed if children learn to make digital games and apps while they are still very young. When we teach kids coding skills, we equip them to make inclusive games that feature diverse characters and points of view.

An assignment as simple as asking children to create an app or a game that reflects the diversity of their city or school would prepare them to change the games and apps they use when they are older. This may be able to give rise to a gaming culture where hate speech is not an accepted norm.

There are other benefits to coding as well. Coding can actually improve school-aged children’s learning skills and attitudes and create positive behavior changes, as Debra Leiberman, director of the Center of Games Research at University of California, Santa Barbara, explained in a recent keynote address.

Numerous coding lessons aimed at children between kindergarten and fifth grade already exist and are easy to use, including ones offered by The Kahn Academy,, and Last week, unveiled Building a Galaxy with Code, a Stars Wars-themed coding game with a section specifically aimed at 6-10 year-olds that allows kids to code on multiple platforms, including smartphones, and in multiple languages. There’s also a free “Code with Anna and Elsa” project for fans of Disney’s Frozen.

With these tools readily available, schools should make coding and game creation a regular part of the general education curriculum for third-to-fifth graders. Let’s empower students to be creators of online culture as well as consumers.