I've taught programming to school students for years. We traditionally covered computer science fundamentals, Python syntax, algorithms, and small projects, with students learning through experimentation, research, collaboration, and guided problem-solving. The most rewarding part was watching them work through challenges and reach their own solutions.
Now many students can generate working code instantly with language models. A lot of them seem more interested in getting a finished result than understanding how it was built, and some submit projects they cannot explain or modify themselves. That makes it harder to preserve the value of practicing syntax, debugging, and gradual development.
For educators facing the same situation, what changes—if any—would you make to programming lessons? How can we use AI responsibly while still developing genuine understanding, persistence, and critical thinking?
5 Answers
AI could work as a limited tutor rather than a code vending machine. Students can ask it to explain an error, compare two approaches, or break down a concept, while being instructed not to request complete solutions. They should first attempt the problem themselves and then explain any suggested change in their own words. That approach still needs supervision, since a fluent explanation can be wrong and relying on the tool too early can weaken learning.
This may also be an engagement problem rather than only an AI problem. Many students have always wanted to skip the difficult part. Use projects that require personal decisions, live demonstrations, oral explanations, and incremental check-ins so copying a final result is less useful. A student who can describe the design, defend trade-offs, and extend the program has learned something—even if AI helped with a small part of the implementation.
The calculator comparison is useful. We didn't stop teaching arithmetic because calculators became common; we taught the basics first and later taught students when and how to use the tool. You could restrict AI during foundational exercises and assessments, then introduce it deliberately for tasks where it adds value. The important distinction is between using AI to clarify a concept or review code and using it to produce work the student never learned to do.
Keep teaching the fundamentals and assess what students can actually explain and build themselves. Shortcuts have always existed, just like calculators, answer books, and copied solutions. Students can use those tools outside class, but lessons and tests should require them to reason through problems, write code, debug it, and modify it without automated help. If someone submits a project they cannot understand, that should be reflected in the grade.
Don't remove all the productive struggle. Programming is learned through iteration, mistakes, and figuring out why something failed. If every obstacle disappears behind a generated answer, students lose the very process that builds skill. Keep some lessons and tests completely AI-free, perhaps with school-managed devices or networks, and make students show their reasoning. Outside those situations, AI can be introduced as a tool—but not as a substitute for thinking.

That makes sense. Students could be asked to explain their decisions, write smaller sections by hand, and then demonstrate that they can change or debug the finished project.