Is it still worth it for kids to learn coding now that AI can write code?
Short answer
Yes. AI now writes code in seconds, and a lot of it is almost right.
In Stack Overflow's 2025 survey, the frustration developers cited most, at 66%, was "AI solutions that are almost right, but not quite".1
Spotting the "almost" takes someone who can read code, and kids become that person by learning to write it.
Why are people saying kids don't need to learn to code anymore?
Because the tools got good fast, and the shortcut sounds like common sense. You're reading about a coding class for your 10-year-old when your kid looks over your shoulder and says, "Why would I learn that? ChatGPT can just make the game." After years of headlines about AI that builds an app from a single sentence, part of you wonders whether there's any point in learning to code now that AI can write it.
The doubt is older than ChatGPT. Andrew Ng, a co-founder of Google Brain and Coursera, points out that today's arguments echo a prediction the Nobel laureate Herb Simon made in the 1960s: "computers will program themselves."2 In March 2025 Ng wrote that steering people away from programming because AI can do it "will be seen as some of the worst career advice ever given."2 Programming has gotten easier at every step, from punch cards to keyboards to AI assistants, and in his view each step made it a better time to start. "As coding becomes easier," he wrote, "more people should code, not fewer!"2
What happens if my kid lets AI write the code while learning?
In a randomized trial, learners with an AI assistant finished about as fast as the ones coding by hand and learned less. Anthropic, the AI company that makes Claude, published the study in January 2026: 52 mostly junior software engineers learned a new coding library, either by hand or with an AI assistant that could write the correct code whenever asked.3 On the quiz afterward, the AI group averaged 50% and the hand-coding group 67%, and the widest gap was on debugging questions.3 Those ask what's wrong in a piece of code and why it fails.
Put that beside what working developers say. Their top complaint about AI is code that's almost right,1 and in the trial the AI group fell furthest behind on exactly the skill that finds what's wrong. That skill grows from writing code yourself. Schools still teach times tables in the age of calculators for the same reason: a kid who knows them can tell when the answer on the screen can't be right.
What does my kid miss if they skip coding and lean on AI?
The power to check, fix and change what the machine hands them. A kid who can only prompt can get a game that runs, but when the score won't reset or the character falls through the floor, all they can do is ask again and hope. Professionals hit the same wall: in Stack Overflow's survey, 45% of developers said debugging AI-generated code is more time-consuming.1 A kid who can read the code finds the broken line and fixes it, and over the years that becomes the difference between using technology and deciding how it works. The Raspberry Pi Foundation adds two reasons that reach past one family: even with AI writing code, the world needs skilled programmers who can make ethical decisions about what code should do, and the power to create technology sits with too small a group of people.4 A kid who learns to code can grow up to be one of the people making those calls.
This is very fixable, and the fix is small and regular. Understanding grows from hands-on practice in short sessions: write a few lines, guess what they'll do, run them, break something and fix it. That's how programmers learn, one small program at a time, and a kid of 8 to 12 can start this month.
Why don't AI shortcuts, prompting classes or video courses solve it?
Each one hands the kid something to copy instead of a problem to think through. Letting AI write the program gives your kid a game that runs and leaves the understanding with the machine, and the trial above shows what that costs. An "AI for kids" class that teaches prompting covers the asking and skips the checking. To a kid who can't read code, the first almost-right answer looks exactly like a right one. A weekly video course does better until it stalls: your kid types what the screen shows, it works, and nothing in it needs them to come back next week.
What works has two halves. The first is the work itself. The Raspberry Pi Foundation, making its 2025 case for why kids still need to learn to code, says the hard work of reading, modifying, writing, explaining and testing code is how young people build a deep understanding of programming.4 The second is a reason to keep going. Kids stick with things that have a story, someone counting on them and something of their own to show at the end. So look for typed code your kid reads and fixes, inside something they want to finish.
How do I teach my kid to check code, starting this week?
Five habits work with or without any course, and you don't need to know how to code for any of them. For a place to type and run code tonight, open the p5.js Web Editor in your laptop's browser. It's free and built for beginners, and you can create or remix small programs there, called sketches, without downloading anything.5
- Ask "what will it do?" before every run. Start with a program that has an almost-right bug planted in it. In the editor, type these two lines in place of what's there:
function setup() { createCanvas(400, 400); }andfunction draw() { background(0); circle(mouseX, mouseX, 40); }. It's meant to be a moon that follows the mouse across a night sky. Before your kid presses play, ask what it will do, then run it and compare. The moon slides along a diagonal instead, because the secondmouseXshould bemouseY. Finding that is spotting the almost, and it's worth asking the same question before every run after it, whether the code came from a book, a video or your chatbot. - Make one house rule for AI: under 13, your kid doesn't use ChatGPT. OpenAI's terms require ChatGPT users to be 13 or older, and Common Sense Media says kids under 13 should not use it at all.6 If a chatbot comes into it, you're the one using it, on your own account. The two of you read its answer together, and your kid types the fix by hand. In Anthropic's trial, the largest group of high scorers only asked the AI about concepts and did the coding themselves, while the people who handed it the writing or debugging scored lowest.3
- Break things on purpose. Once the moon follows the mouse, change
40to400, swapmouseXandmouseY, or deletebackground(0);, and guess what will happen before running it. Fixing what they broke is debugging practice, and it's usually funny. - Type real code early. Once your kid reads short sentences comfortably, let them type real code, the same kind an AI hands back. The p5.js editor runs it in the browser on any laptop.
- Ask them to teach you. "Show me what you made and how it works" beats any lecture about the future, and explaining it is how they find the parts they don't understand yet.
What does it look like when a kid can read the code?
It looks like a kid fixing the machine's almost-right answer herself. Say an 11-year-old wants a space shooter. Her dad asks his chatbot for one on his own account, with her beside him. They paste the page of code it gives them into the editor, and it almost works: the ship moves and the asteroids fall, but the score never goes up. If she has never written code, all they can do is ask again, and the next page has a different bug. If she has spent a few weeks typing her own programs, she reads down to the line where the score should change, sees it adds zero, types the fix herself and then adds a level of her own. The chatbot was the same both times, and only the version of her who could read code ended up in charge of her own game.
How Star Catcher builds the habit of reading and fixing code

Codestronauts turns that kind of practice into a story for kids 8 to 12. In Star Catcher, its first mission, your kid types real JavaScript by hand while Cody, a nervous robot co-pilot, explains each new word just after your kid has watched it work. A wrong line shows its mistake right there in the game, often a funny one, and Cody follows up with why it happened. She gives hints instead of answers and circles the line that needs work. As your kid gets stronger, she helps less. As with the house rule in step 2, the fix is always your kid's to type.
The story keeps them typing. Every line moves the adventure forward, from waking Cody to rebuilding the Star Catcher, and all five episodes leave off on a cliffhanger. In about two hours, self-paced in the browser, your kid ends up with an arcade game they made themselves. It steers with the arrow keys, keeps score, has levels and sound, and its boss is one your kid dreams up. The Parent Corner sits behind your PIN, keeps you in charge and shows you each step your kid takes, and Cody only ever talks about coding. Kids go by first names, and there are no ads and no strangers to chat with. It's $29.99 for the whole mission, paid once, and siblings share.
See the mission your kid would play and the ship they'd rebuild along the way.
See how Star Catcher worksQuestions parents also ask
Should my kid learn to prompt AI instead of learning to code?
Coding now, prompting later, once they're 13 and the tools allow it. Until then, you do the asking, as in step 2, while your kid reads the answer with you and types the fix. Prompting tools keep changing, and the habits coding builds, like breaking a problem into steps and testing each one, carry over to whatever comes next. At 13, a kid who can read code asks sharper questions, because they can name the exact line that's wrong.
Is it OK for my kid to use ChatGPT while learning to code?
Not under 13, and that's the house rule from step 2. Common Sense Media points out that ChatGPT's own terms set 13 as the minimum age and says younger kids shouldn't use it at all.6 Most chatbots set the same floor or a higher one. If a chatbot helps at all, it runs on your account with you doing the asking. Read its answer together, then let your kid type the fix.
Will there still be programming jobs when my kid grows up?
Nobody can say what work will look like in fifteen years. That's a good reason to teach understanding rather than train for one job. The Raspberry Pi Foundation says it already sees demand, from healthcare to agriculture, for people who can combine programming with knowledge of another field.4 Whatever your kid ends up doing, knowing how to check a machine's work goes with them.
Which programming language should a kid learn first?
A typed one, Python or JavaScript, once your kid reads comfortably. Both are real languages professionals use every day. JavaScript has an extra advantage for kids: it runs in any web browser. A game made on the family laptop can be shown to a grandparent with nothing to install. The first language matters less than the habit of reading what each line does.
Was this answer helpful?
What was missing?
Sources
- 2025 Stack Overflow Developer Survey: AI, Stack Overflow ↩
- Andrew Ng's letter in The Batch, issue 292 (March 12, 2025), DeepLearning.AI ↩
- How AI assistance impacts the formation of coding skills, Anthropic ↩
- Why kids still need to learn to code in the age of AI, Raspberry Pi Foundation ↩
- p5.js Web Editor (README), Processing Foundation ↩
- Guide to ChatGPT for Parents and Caregivers, Common Sense Media ↩