Teaching Computer Science in the Age of AI: A Pragmatic Approach

The integration of AI tools into computer science education has created one of the most significant shifts instructors have faced in recent years. Students now have instant access to chatbots that can generate code for their assignments, leaving many educators grappling with a fundamental question: How do we teach programming when students can simply ask an AI to do it for them?

Cay Horstmann, author of Big Java: Late Objects, has taken a pragmatic middle-ground approach with new content designed to help both instructors and students navigate this complex landscape—wherever they are on their AI journey.

The Reality We’re Facing

“This has hit us really hard,” Horstmann acknowledges. “So many students are using these tools to do their homework, and they’re not always using them well.” The challenge isn’t just about preventing students from using AI—it’s about teaching them to use it effectively while still learning fundamental computer science concepts.

The pressure comes from multiple directions. Students hear from industry contacts that they’ll need to know how to use these tools in their first jobs. Meanwhile, instructors worry that students are bypassing the intellectual work necessary to truly understand programming. Some educators have gone all-in on AI integration, while others have retreated to paper-and-pencil assessments.


A Middle Path Forward

Horstmann’s approach recognizes a simple truth: “The students have these tools. That’s not going to go away.” Rather than fighting this reality or fully embracing it without guardrails, the updated Big Java zyBook provides practical resources to help students develop critical thinking skills around AI-generated code.

The new content includes:

A “How-To” section on working with AI tools that sets expectations early. Using an analogy students can relate to, it asks: What if you wanted to learn Japanese to read graphic novels? Sure, you could have a computer translate everything—but would you actually learn the language? The section helps students understand that having AI do all the work defeats the purpose of their education.

Interactive “Coding with AI” exercises at the end of multiple chapters that put students in realistic scenarios. These exercises take actual homework problems, feed them to chatbots, and then guide students through a critical examination of the results. Students discover that AI-generated solutions often:

  • Use methods and constructs they haven’t learned yet
  • Include unnecessary complexity for early-stage learners
  • May work, but don’t align with course requirements

Through Parsons puzzles and multiple-choice questions, students must actively engage with the code, understand what the chatbot did, and adapt it using only the tools available to them at their current level.

The Power of Reading Code

One unexpected benefit has emerged from this approach. “Now we get students to read code,” Horstmann notes. “Twenty years ago, I would have been deliriously happy to have students read this much code in the first class.”

By having students critically analyze AI-generated solutions, identify problems, and fix them, instructors are teaching valuable skills that go beyond just writing code. Students learn to:

  • Recognize when a solution is unsuitable for their context
  • Match variable names and logic between different implementations
  • Simplify overly complex solutions
  • Prompt AI tools more effectively to get better results

Meeting Instructors Where They Are

The beauty of this approach is its flexibility. Instructors who prefer paper-and-pencil exams can continue using them while incorporating these exercises for homework. Those leaning more heavily into AI can use the materials as a foundation for deeper integration. The content is designed to supplement whatever approach feels right for a particular class.

“Every class is different, you will know what’s best for your students,” Horstmann emphasizes. The exercises are also structured to inspire instructors to create their own similar assignments using problems from previous years.

Beyond the Classroom: Career Perspectives

Students aren’t wrong to want to learn these tools—they’re responding to real industry demands. Horstmann, who maintains connections in both education and industry, reports that managers are asking developers, “How much AI did you use last month?”

But he also offers reassurance about the future of programming careers. Drawing on his own experience—his first job as an assembly programmer became obsolete when compilers improved—he argues that automation doesn’t eliminate programming jobs; it changes them. “Programmers will become more effective with these AI tools,” he predicts. “They will not become crazily more effective, but somewhat, because some of the routine work will have been automated, and they will just do more work.”

The comparison to outsourcing is instructive. While some feared it would decimate U.S. programming jobs, the overall number of programmers didn’t decrease. “There’s so much that needs to be done. There’s so much to be automated. There’s so much where, with IT, one can get better business results.”

Practical Wisdom for Today’s Challenges

Perhaps the most valuable insight is recognizing that this situation isn’t entirely new. In the past, students with poor time management would call friends at 10 PM asking for code. “There’s a lot of cheating,” Horstmann acknowledges. “And those students didn’t learn anything.”

The difference now is that students have a tool that can teach them something in the process—if they use it thoughtfully. The key is giving them exercises that force that thoughtful engagement.

Moving Forward

The additions to Horstmann’s Big Java represent a pragmatic response to a challenge that isn’t going away. Rather than viewing AI as purely a threat or purely a benefit, the new content treats it as a reality that requires new teaching strategies.

For instructors struggling with how to address AI in their courses, these materials offer a starting point—a way to acknowledge the tools students are using while ensuring they still develop the fundamental understanding that will serve them throughout their careers.

“We’ve gotta take what’s been handed to us,” Horstmann says simply. With these new resources, instructors have practical tools to help students navigate the AI landscape, wherever both instructor and student happen to be on that journey.


Ready to explore how Big Java‘s new AI-focused content can support your teaching? Learn more about the latest edition and see sample exercises on the zyBooks catalog.