Coding curricula is sweeping into classrooms across the country, thanks to programs such as Code.org. According to the Education Commission of States, about 20 states now require that districts allow students to apply specified computer science courses toward completion of mathematics, science or, as a foreign language. But is coding preoccupying the hearts and minds of students after school hours? This is the question that researchers at the MIT Media Lab are asking.

It was there that one of the most popular learn-to-code tools, developed by the Lifelong Kindergarten group, was born in 2007. And while it has inspired a flurry of copycat offerings from other developers, Scratch has retained a loyal following: Today the platform claims over 100 million users around the world.

So what keeps these users, er, scratching their itch to code?

Upon entering the offices of the Lifelong Kindergarten groups, one immediately notices images of the whimsical orange “Scratch cat” plastered all over the walls. It is clear that the project has become a source of pride and the center’s claim to fame. That’s where we met Natalie Rusk, one of Scratch’s creators, who is now researching how kids find and sustain the motivation to code.

Rusk with the Scratch cat

To conduct this research, she interviewed over a hundred Scratch users who are active on the platform not just during or after school, but even after a student has graduated and moved on to another school. The key, Rusk found, are what she calls “interest-based communities” that play a strong role in keeping students engaged and learning to code long after school is over.

Scratch was originally built as a program to introduce children to basic programming concepts. Yet the online communities that have sprung suggest the tool wields a much larger influence. “Too often people are positioning Scratch as a stepping stone to other things, whereas we see from our interviews that Scratchers keep going deeper and broader and contribute back either online or offline to other people,” says Rusk.

She describes the Scratch community as a youth development program where many users start, some leave, but others stay and become leaders on the platform. The community, similar to those on other platforms like Reddit, is difficult to quantify since it simply consists of active members who engage with each other to the point that they call one another “friends.” Users do find ways to act on those friendships, celebrating “Scratchaversarys” (similar to an online birthday), by offering coding projects and comments as gifts to one another. Reading through the comment streams on projects, one can easily get a sense of the communal atmosphere where users congratulate each other on getting featured, wish each other happy Scratchaversarys, make jokes with one another and even share personal details about their lives.

New coding cards MIT offers to teachers to build interest-based coding activities

“Initially I was the one who questioned the word ‘community.’ I mean, they were posting projects and writing comments. How is that community?” says Rusk. But when she interviewed many of the users to see why they stayed on the platform, she found that many of them referred to each other as “friends.”

“We interviewed one kid from England who said he wanted to give back on the site because he benefited so much,” explained Rusk, “But when we asked him if he also did that in school he said, no, because he moved around [to different schools] so much.” She says several students share a similar sentiment—especially those whose friends and sense of community come from the coding platform. It is those types of students who she sees as lifelong Scratchers, ready and excited to code for life.

Rusk hopes to cultivate these online communities by allowing them to explore programming projects specific to their hobbies in music, arts and games. It is their theory that by allowing students to engage in interest-based groups that they will become engrossed in the community and code beyond the classroom.

Perhaps the only online coding community that could compete with Scratch for kids’ attention is Minecraft, which aims to provide kids with a similar sense interest- and peer-based exploration. Recently its developers released a coding addition to the game that has sold over 121 million copies.

Its developers at Microsoft hope to cultivate a large, open community for teachers and students around coding. “Before we launched the Education edition [of Minecraft] we spent about a year out with the Minecraft community, listening and learning,” said Neal Manegold, a senior manager at Minecraft Education, in an interview with EdSurge.

Educators told Manegold that most of their students spend a lot of time on Minecraft projects outside of the classroom, but they don’t view the projects as educational in nature as many of them are simply playing the game.

There was already a strong community of Minecraft users, but to maximize learning on the platform, he had to build an active community of educators as well. To do this, the Minecraft team offered a mix of in-person training and online sessions, including forums, Twitter chats and live streamed workshops where educators can teach each other, something Manegold says is important to keep them engaged and creative.

Manegold says that teachers have already been using Minecraft to teach subjects such as History and Engineering by having students recreate three-dimensional replicas of ancient ruins, and he sees the addition of coding expanding the opportunities for educators to use the software for interdisciplinary learning.

“Adding coding to the platform has brought people who were coding-focused, but not necessarily Minecraft focused on to the platform,” says Manegold. “They bring a depth of expertise for people who are interested in Minecraft but don’t have expertise in Computer Science. It is exceedingly valuable to all involved.”

How Scratch and Minecraft Developers Hope to Keep Kids Coding For Life