Eyes glued to his laptop, 7-year-old Chaitanya Ghatty stands at the end of a long table, trying to coax a computer program to do what he wants.
It doesn't seem to want to listen.
"It's supposed to be a colorful ball of cat fur, which always changes colors and bounces off walls leaving a colorful trail behind it like a spider web," he explains to his father. Instead of bouncing off the walls, however, the fur ball floats off the screen.
The computer doesn't know anything until you tell it, his father reminds him. Within a minute, the younger Ghatty, who started programming at age five, solves it. His colorful fur ball starts to bounce.
For Ghatty and two dozen other students in the classroom, it's still a game. Minnesota officials, though, see these kinds of classes as crucial to the state's future. Science, technology, engineering and math disciplines will generate tens of thousands of jobs in Minnesota in the next decade. Many of those careers require knowledge of the code language that runs computers.
In Rochester, officials are looking for ways to grow computer programmers locally. Chaitanya's father, Surya Ghatty, is one of a group of IBM and Mayo Clinic programmers and software developers mentoring local students, teaching young kids how to code even before their hands are big enough to stretch completely across a keyboard.
"We would like to see more jobs related to computer programming in town," said Jim Rogers, chairman of Mayo Clinic Ventures, which manages the clinic's intellectual properties and patents.
Reaching out to kids in math and science is also about making Rochester, the state's fastest-growing city, an attractive place for some of these kids to return to, he added. "We need younger folks to want to come back once they go away to college, to stay here in Rochester," Rogers said. "For them to stay here in Rochester, they have to have meaningful jobs."
It's also about teaching kids how to see the world in a whole new way, said Karen Brennan, assistant professor at the Harvard School of Education who developed Scratch, the kid-friendly program the Rochester group uses to get students excited about coding.
Scratch lets them snap blocks together to bring animated characters to life. Each block represents a programming instruction so kids don't have to worry about typos. It's sort of like building a structure with LEGO blocks in the physical world.
Kids learn how to apply logic and problem solving to larger concepts by learning how to code with the Scratch program, Brennan said.
"Nothing ever works the first time you build something in code," she added. "So developing those practices around testing what you built against the model of what you had in your head. You know, what's wrong with it? How do you fix it? That's another big category of activity."
Brennan says after mastering the Scratch program, students go on to learn more complex programming languages. And she's convinced teaching kids to code is as important to their future as learning to read or write.
It doesn't necessarily come easy, especially to young kids who still spend more time following instructions than giving them.
The elder Ghatty says it's taken his son a few years to really understand he's the one telling the computer what to do.