That's the aim of entrepreneurs behind new coding toys for kids as young as 6. They're spurred by a desire to get children interested in computer science well before their opinions about what's cool and what's not start to gel, in effect hoping to turn young boys and girls - especially girls - into tomorrow's geeks.
"You really want kids to learn these building blocks as young as possible and then build on them," Apple CEO Tim Cook said in an interview at a recent coding workshop for third-graders in New York. "I don't think you can start this too young."
Not everyone is excited about pushing first-graders to learn the nuts and bolts of how computers work. Some critics believe that too much technology too early can interfere with a child's natural development; others warn that pushing advanced concepts on younger kids could frustrate them and turn them off computer science completely.
But there's a nationwide push to improve computer literacy in elementary school - and entrepreneurs are jumping aboard. Growing up in India, Vikas Gupta learned to program at a young age and was amazed at what he could do with a basic computer and some software. Now, the father of two wants today's kids to get the same feeling from the coding robots his startup produces.
His company, Wonder Workshop, started shipping Dash and Dot, a pair of small, programmable blue-and-orange robots, late last year. Kids can interact with the devices in a variety of ways. In the most basic, kids draw a path for Dash, which resembles a small, wheeled pyramid made of spheres, on a tablet screen. They can then drag and drop actions onto its path that, for instance, might cause Dash to beep or flash its lights in different colors.
More advanced kids can use Google's kid-oriented Blockly language, or Wonder, the company's own programming language, to create and play games with both robots. The idea is to make building sets of increasingly complex instructions so intuitive and fun that it sparks children's natural curiosity about the way things work.
"It's going to be relevant for whichever profession kids choose in 20 years," Gupta says. "Doctors, architects, anyone; they will need to be able to understand how machines work in order to be really, really good at their jobs."
Middle school may be too late to start robotics and coding classes, proponents say. By that point, most children have formed reasonably firm likes and dislikes, making them less likely to try new things. That's particularly true when it comes to girls; while robotics and coding activities tend to be popular with both genders early on, the percentage of girls involved drops dramatically as kids get older.
Toy robots can be very helpful in teaching coding basics, says Chase Cunningham, a father of 4- and 7-year-old girls who writes "The Cynja," a comic book about warriors who fight computer "bad guys" such as zombies, worms and botnets.
"Immediately, they get to see the return, because the robots move," says Cunningham, who by day handles threat intelligence for the cybersecurity firm Armor. "Kids need that immediate reward."
But these kinds of toys are so new that there's no way to know if they actually stimulate long-term interest in coding or whether they affect healthy brain development.
"Kids need to directly experience things, to invent purely out of their imagination without any preprocessed experience," says Karen Sobel Lojeski, a Stony Brook University child-development researcher with a computer-science background. The introduction of electronic toys at a young age could hinder that, she says.
Nader Hamda, founder of a handful of tech and toy startups, loved seeing his two young daughters embrace technology, but like Lojeski worried when they spent hours alone with their tablets. So, he created Ozobot, a tiny programmable robot that kids can play with together.
"I wanted to recreate the experience of the family game night, where the whole family is huddled around the game," he says.
The SPRK, from Colorado startup Sphero, has also found a niche in elementary and middle schools, which use the clear plastic robot ball to illustrate concepts such as algebra and geometry. Among other things, says Sphero CEO Paul Berberian, the robots teach kids that making mistakes is part of learning.
"It introduces the methodical process, how to go back and fix things," Berberian says. "There's no computer programmer in the world that gets it right the first time."
Puzzlets, created by Justin Sabo and some of his fellow Carnegie Mellon University graduates, also teaches trial-and-error thinking. There's no robot here, just a tray in which kids can place tiles representing commands that move a character around an associated tablet-based video game called "Cork the Volcano."
If kids don't get it right the first time, they can switch out the tiles and run the program again. It's like a mash-up of chess and a classic video game, Sabo says. "Kids learn through play, learn by doing," he says. "It's meant to be social. It's meant to be hands on."
Jey Veerasamy, director of the Center for Computer Science Education & Outreach at the University of Texas at Dallas, recommends against introducing coding until at least second grade. Most kids will get the greatest benefits from third to fifth grades, when kids are most willing to explore - especially girls, he says.
"There's no need to rush. Younger kids may benefit, but you have to remember that it's not for everybody," Veerasamy says.