Teaching Python

We're two middle school teachers learning and teaching Python

AI for Mass Production or Enhanced Learning?

“AI is a weapon for mass production.”
— Sir Stephen Fry, Bett Global 2025

Like any educational tool, AI in the classroom can present a dilemma: it can supercharge learning—or turn an assignment into useless busywork. In this article, I’ll share some strategies I’ve developed to keep students engaged and building real skills, rather than just mass-producing code.

As we consider the role of AI in education, it's essential to think about the skills students need to succeed after their K-12 education. This is particularly true in computer science (CS) classrooms, where students are learning to design, develop, and apply computational solutions. To succeed, they need to be able to analyze code snippets, identify useful patterns or solutions, and adapt them to solve problems more efficiently. This ability to read and apply code is crucial for critical thinking, problem-solving, and effective collaboration with AI tools.

However, the increasing presence of AI in coding editors—and easy access to tools like Claude or ChatGPT—raises important questions about how we teach coding. On one hand, AI can make learning to code more approachable for beginners, but it also raises the risk of turning coding into a mass production of “slop.”

It is no secret that AI tools have redefined my productivity, both for the podcast and for school. I also mentor teachers on using AI and implement it in most of my computer science lessons. I have seen students use AI to help them prepare for tests and learn about a new topic, but I have also seen students rush through assignments by letting AI do all the work. In their hurry for a grade, they miss out on those ‘aha’ moments that make learning so worthwhile. And my concerns are not isolated. In nearly every conversation, the same discussions arise: AI can save time and deliver quick answers, but it seems to be short-cutting deep, real learning. Or, in the school setting, it can be seen simply as “students cheating with AI.”

I realized I had to shift my approach to ensure genuine engagement in my classroom. I’ve tried various strategies: from banning AI use to having students generate code or flowcharts on paper first. I’ve encouraged students to see AI as a collaborator, not a shortcut, and I’ve lectured on how real learning can be just as valuable as getting the right answer. I repeat the phrase, “AI is only as smart as the user.” In moments of frustration, I’ve even tried a bit of tough love by reminding them they can’t pass school purely on AI-generated solutions.

While AI tools can help students complete assignments quickly, true understanding requires a more collaborative journey between student, teacher, and technology. The African proverb "If you want to go fast, go alone. If you want to go far, go together" sums up AI and learning. If we want to get things done quickly, we can use AI and mass-produce ‘stuff’. The quality is decent enough and often gets the job done with code. However, if you want to make things that are awesome, unique, and powerful, we have to combine human creativity and problem-solving with AI’s efficiency.

Yet, students often rely on AI for instant solutions, especially when coding or writing. This is because real problem-solving takes time and critical thinking. As Charles Kettering once said, “A problem well stated is a problem half-solved.” The hardest part is understanding the problem. By making learning visible, we can ensure that students are not just recipients of AI-driven solutions, but active participants in the learning process. When students rely too heavily on AI, they skip the crucial step of problem understanding and develop only superficial knowledge. Visible learning strategies can help keep students engaged, making their thinking and problem-solving processes transparent, and fostering a deeper understanding and critical thinking skills.

My solution has been to adopt a balanced approach that leverages AI while promoting ‘hands-on learning’. I don’t want to ban AI—it’s a valuable resource when used properly. But I also want students to experience the entire coding journey: breaking down problems, troubleshooting bugs, and experimenting with solutions. I want them to feel the endorphins when they solve a tough problem. That’s where genuine growth and ingenuity happen.

As a key part of this approach, I require students to engage in reflective planning before diving into coding. To ensure students develop essential problem-solving skills, I require them to outline their logic before consulting AI. This might involve mapping out how to handle specific inputs, identifying key data structures, or simply writing out complete prompts explaining their intention, their needs, data structures, and specific libraries for their coding project. By doing so, students are more in control of their code, rather than relying solely on AI.

For example, I've applied this approach in a project that leverages Flintk12, a customizable AI tool. By using Flintk12, I can create assignments that guide students in building unique coding projects while still allowing them to exercise their critical thinking and problem-solving skills. In this assignment, students use Flintk12 to guide them in building a Python project that showcases their critical thinking and problem-solving skills. Their task is to utilize dictionaries and file operations in innovative ways, engaging in a genuine dialogue with Flint to create a functional product. Using Flintk12, I set up dialogue-based coding assignments. Students didn’t just copy and paste code; they had to answer why each step mattered. I graded them on how thoroughly they explained their reasoning. This encouraged them to both collaborate with AI and remain accountable for their own learning.

During presentations, I asked questions that encouraged reflection:

  • Does the project work as intended?
  • How can user interaction be improved?
  • What was difficult, and what surprised you?

These questions shifted the focus from "Does my code work?" to "Why does my code work, and how did I get here?"

Another strategy I use is providing GPT-generated code, with real life use cases for them to dissect. Students read the code, explain each function, identify methods, and sometimes modify the code—such as switching outputs from text files to dictionaries or CSVs. Using real life topics such as sentiment analysis is especially important because it shows students how Python is used to critically evaluate online information, detect biases, and make informed decisions. By learning to read and write sentiment analysis code, students gain practical skills in data analysis, machine learning, and natural language processing, enabling them to tackle real-world challenges in social media monitoring, customer feedback analysis, and opinion mining. More importantly, they also gain a deeper understanding of the “why” behind each coding choice and can make more informed decisions about GPT generated code.

I'm not a big fan of traditional tests, but I've found that short quizzes in a lockdown browser are a great way to see how well my students really understand the basics. During these quizzes, students can use basic Python cheat sheets as a reference, but AI tools and editors are off-limits. I allow cheat sheets because this approach reflects real-world development practices, where developers regularly consult resources like Stack Overflow, documentation, and style guides. These challenges help to focus on their ability to apply their knowledge, rather than just recalling facts. This helps me identify who's got a solid grasp on the fundamentals and who might need more practice applying their knowledge.

I often engage simple visible thinking strategies into the classroom. These can be things like "Think Aloud Protocols" where students have to explain their thought process on how to solve a coding challenge. I also use a lot of code annotations in class. I produce code without comments and with new coding features and have the students explain and write comments for the code. I like giving the students time to work together on these activities on paper. It is a great way to get them away from the computers for a while and work on their communication skills.

AI has a place in education—it can spark creativity and make coding more accessible. However, if students focus solely on speed, they risk producing code that may work but offers little educational value. By combining structured brainstorming, hands-on quizzes, and reflective assignments, I'm helping students understand that authentic learning requires more than a single AI prompt. Finding a balance between AI-driven efficiency and genuine understanding is crucial in CS education. By embracing a balanced approach, we can empower students to develop essential problem-solving skills, critical thinking, and creativity, ultimately preparing them for success in a world where technology and human ingenuity converge.