Tales from the blog

Should Kids Still Learn to Code in the Age of AI? Why Real Code Still Matters

Should Kids Still Learn to Code in the Age of AI

Short answer: yes. But that's not the whole answer.

If you've searched "should kids still learn to code?" recently, you've probably found some version of the same argument. AI can write code, but it can't reliably judge whether that code is right, so children still need the thinking underneath it - problem-solving, debugging, judgment. That's true. GitHub's CEO Thomas Dohmke argues that coding belongs in schools alongside core subjects like maths and physics, and Google DeepMind's Stefania Druga makes a similar case, but adds an important caveat. Coding and AI literacy will stay relevant - if how they're taught changes.

That word - how - is where this article actually starts. Because there's a problem AI didn't create, and it's the part of this debate almost nobody is addressing.

The part everyone agrees on

AI can write code. It can generate HTML, CSS, JavaScript and more almost instantly, explain what it's produced, and even catch some of its own bugs. What it can't do is decide what's worth building, understand every nuance of a real problem, or guarantee the code it hands back is actually correct. That means a child still need to understand what code is doing, spot when something isn't working, debug mistakes, test whether a solution really works, break large problems into smaller ones, and question an answer (rather than automatically accepting it). We agree with all of that. We just don't think it settles anything practical - knowing which skills matter doesn't tell you how kids actually develop them. That's the part we've spent ten years figuring out, mostly the hard way.


The coding gap AI didn't create

Most children's first experience of programming is block-based coding - Scratch and its relatives. That's a genuinely good starting point: it removes the intimidation of syntax and lets kids concentrate on logic, sequencing and creativity. A child can make something move, respond to an event or build a simple game without learning a whole programming language first.

But block-based coding is a starting point, not a destination. The harder step comes afterwards, when a child who has learned to think in programming concepts has to learn how those concepts are actually expressed in real code - reading unfamiliar syntax, finding errors, working out why something isn't behaving as expected. For a lot of kids, that doesn't feel like progressing. It feels like starting again.

Call it the block-to-text gap - the space between "I understand what a loop does" and "I can recognise a loop in real code, understand what it's doing, change it, and fix it when it breaks." This isn't just our observation: a growing body of computer-science education research has documented the same pattern, finding that students who are fluent in block-based tools like Scratch consistently struggle when they move to text-based languages. That gap matters more, not less, now that AI can generate the syntax for a child - because if a child can't read real code, they can't meaningfully evaluate the code AI hands them.


Two kids, one AI tool

Imagine two children using an AI coding assistant.

The first asks it to "make me a game." AI generates a few hundred lines of code. The child presses run. Something doesn't work, so they ask the AI to fix it, get another version, and try again. They've used AI - but they haven't really learned much about the code itself.

The second child has spent time reading and debugging real code before. Looking at that same generated program, they can ask sharper questions: What is this section actually doing? Why does this variable change here? What happens if I remove this line? Is this really the right solution, or just a working one? What should happen if the user does something unexpected?

The second child isn't necessarily faster at typing code. They're better at thinking with code - and that's the skill we believe matters most in an AI-saturated world.


The confidence gap between blocks and real code

Ten years ago, this is what we placed the most emphasis on - above syntax, above language choice, above any specific curriculum decision. It works in two directions.

Confidence protects children from opting out. Long before AI entered this conversation, we saw how easily a child can decide coding isn't for them - a wall of unfamiliar code, a screen full of errors, something that worked five minutes ago suddenly breaking. The conclusion arrives fast and sticks hard: I'm not good at this. That belief can form before a child ever discovers whether they'd actually enjoy programming. And those who have already decided it's "not for people like me" won't be persuaded by an argument about why humans need to supervise AI.

Confidence is earned through mastery, not reassurance. A child hits broken code, doesn't know what's wrong, investigates, fixes it - and it works. That's evidence: not "someone told me I'm good at this" but "I know I can solve this because I just did." They form a hypothesis, test it, get it wrong, try again and work out why. The next challenge is slightly harder, then harder again, and gradually the child learns to think like an engineer - to break problems down, test ideas and stay calm when something goes wrong. Debugging teaches something more transferable than any individual command: I can find my way around a problem I don't immediately understand.

And that confidence doesn't stay behind the screen. The belief that I can do hard things transfers - into how a child approaches a difficult maths problem, whether they put their hand up when they're unsure, whether they keep going when the first attempt doesn't work. We've seen children who once froze at a wall of red error text learn to shrug and say, "Okay, let's find out what's wrong" - and then bring exactly that mindset to problems that have nothing to do with code. We're not just building confident coders. We're building more confident learners.

That matters even more in an AI world. A child who's built genuine confidence through learning to code is more likely to think, I don't understand this yet, but I can work it out - and, just as importantly, this answer might be wrong. That's a very different kind of digital literacy from simply knowing which buttons to press. It's the confidence to stay in the driver's seat.

For a confident child, broken code isn't a disaster. It's practice for something much bigger: learning that difficult things can be worked through.


What kids should actually learn about coding now

If AI can generate the code, where should children's time go?

  1. Reading code, not just writing it - the ability to look at existing code and roughly understand what it's doing.
  2. Debugging - treating something going wrong as part of the exercise, not the end of it.
  3. Testing ideas - experimenting, changing things, seeing what happens.
  4. Judging solutions - recognising that code working isn't the same as code being right.
  5. Building real things - a website, a game, an interactive story: something they can show someone else, not an abstract exercise.
  6. Using AI without depending on it - the difference between "AI, give me the answer" and "AI, here's what I think is wrong - help me investigate," which preserves the child's own agency.
  7. The confidence to solve problems independently - arguably the most important of all, in a world where the tools keep changing.


What about Scratch?

We wouldn't tell any child to skip it. Block-based coding is an excellent way to discover that instructions can control things, that logic produces behaviour, and that you can build something yourself. The problem was never Scratch. The problem is stopping there.

What's missing for most kids is a bridge from the accessibility of blocks to the depth of real programming. A path from blocks, to real code, to broken code, to debugging, to independent creation, rather than one enormous jump from a friendly visual environment straight into a blank text editor.


Why we built Erase All Kittens

We didn't design Erase All Kittens around a prediction about AI - we started building it long before today's AI coding tools existed. We built it around an older observation: kids learn best by building and breaking something they actually care about, not by staring at a blank editor or working through disconnected exercises.

Every level hands a child real HTML, CSS and JavaScript - sometimes broken and needing a fix, sometimes blank and needing to be built - all in service of rescuing kittens in a fantasy Internet Universe. Stuck? A hint system lets kids trade blipcoins for help, without ever simply handing over the answer.

Looking back, that mechanic - build, break, fix, understand, try again - turns out to suit the age of AI perfectly. We didn't set out to future-proof a coding game against a technology that didn't exist yet. We built the thing we believed children needed anyway: a bridge between programming concepts and real code, a place where mistakes are expected rather than embarrassing, and a place where kids can gradually discover I can actually do this.

More than 5000 schools have used it, and 95% of kids who play say they want to keep learning afterwards. That's the result we care about most - not that a child remembers a specific line of JavaScript, but that they want to keep going.


So, should kids still learn to code?

Yes - but not if “learning to code” means memorising syntax for its own sake. AI has made that part genuinely less important. What hasn't become less important is understanding how technology works, building with it, recognising when something is wrong, and working through problems when the answer isn't obvious.

The future isn't one where children write every line of code themselves. It's one where they work alongside machines that generate code for them. The valuable question isn't “can you write this code?” It's: do you understand what it's doing, can you tell whether it's right, and can you fix it when it isn't?

That's why the bridge from blocks to real code still matters. That's why debugging matters. And that's why confidence matters.

That's the gap we built Erase All Kittens to close: giving children a way to move from programming concepts to real code, from broken code to debugging, and from “I can't do this” to “I can work this out.” AI doesn't make that foundation less important. If anything, it makes it more important.


Questions people ask us about coding and AI

Do kids still need to learn to code if AI can write code for them?

Yes. But the goal of learning to code is changing. Children don't need to memorise every piece of syntax if AI can generate it for them. They do need to understand how software works, read and evaluate code, spot mistakes, solve problems and make decisions about what they want to build. Those skills help them use AI effectively rather than simply accept whatever it produces.

Will AI replace code education for kids?

AI is likely to automate more of the process of writing code, but that doesn't make coding education unnecessary. It makes understanding code more important. A child who can read, question, test and debug code is in a much stronger position to use AI creatively and responsibly than a child who simply asks it for an answer.

Should kids learn Scratch or a real programming language?

Both. Scratch is an excellent introduction because children can learn programming concepts (like sequences, loops, events and variables) without first having to deal with unfamiliar syntax. But blocks aren't the end of the journey. Children who want to develop further need opportunities to read, change and build with real code too. The important thing is the bridge between the two.

What age should a child start learning to code?

There isn't one right age. Younger children can begin with visual programming and simple logic, while some over the age of 7 may be ready to start working with text-based code. What matters more than age is whether the child is curious about how things work and has a learning environment that makes experimentation feel achievable rather than intimidating.

Why is debugging important when kids learn to code?

Because debugging teaches a way of thinking, not just a technical skill. A child who learns to look at something that isn't working, form a hypothesis, test it and try again is practising problem solving and persistence. These skills become particularly valuable when working with AI, because AI-generated code can look convincing while still being wrong.

Can children use AI to learn to code?

Yes, provided AI supports their thinking rather than doing the thinking for them. It can explain an unfamiliar concept, suggest ways to investigate a bug or help a child understand an error. But children still need to make predictions, test solutions and decide whether the AI's answer actually makes sense. The aim isn't to keep AI away from kids, it's to help them stay in control when they use it.

Is learning to code still useful if a child doesn't want to become a programmer?

Yes. Coding can teach children how to break down a large problem into smaller ones, test ideas, understand systems and keep working when the first attempt fails. These skills are useful well beyond programming. As AI becomes part of everyday life, the ability to understand and question technology is increasingly valuable, even for those who aren't interested in becoming developers.


Further reading: MIT Media Lab on rethinking coding education for the AI era · Raspberry Pi Foundation's position paper on kids and AI

Erase All Kittens is a multi-award-winning coding adventure game for children. Kids learn HTML, CSS and JavaScript to build, break and fix code while rescuing kittens in a magical Internet Universe. The game has been used in over 5000 schools and 95% of players say they want to learn more about coding after playing. Try Erase All Kittens today.


Join the newsletter!

For infrequent updates on new releases