Thursday, June 5, 2025

The AI Productivity Trap: More Code, Less Thought?

 Can the quality of code degrade much faster because, with AI, new engineers may have fewer opportunities to practice and learn? But what about experienced engineers? Could we become so overwhelmed by the volume of code to review that we start becoming sloppy?

Lately, like much of the industry, I've been exploring various AI tools and models. My focus isn't experimentation for its own sake—I'm aiming to improve productivity. One project where I use AI agents extensively is an open-source initiative I maintain to demonstrate different design and architectural approaches: https://github.com/smalaca/training-center-microservices.

Here’s how most of my recent pull requests are created:

  1. I define the task requirements.
  2. I craft a prompt and use an AI agent to generate code and the necessary tests.
  3. I review the code after the agent’s edits.
  4. I create a pull request.
  5. I request a review from GitHub Copilot.
  6. If there's a comment I agree with, I either let Copilot apply it right away, turn it into a new prompt for the AI agent when it’s more involved, or implement the change myself if it's more efficient that way.

The productivity gain is remarkable.

But this workflow raises a recurring concern—one that many others have voiced: how will new developers gain the experience needed to assess whether code is maintainable? Learning to code well involves practice, failure, and iterative improvement. Many of these learning opportunities are now handled by AI agents.

Still, another concern has surfaced—one that applies to experienced developers as well. In the workflow I described, my own coding time is minimal. The AI agent is fast enough that it doesn’t make sense to switch contexts between tasks. As a result, my role often boils down to writing prompts, reading, validating, and repeating.

I’ve caught myself, on several occasions, skimming through code rather than reviewing it with focus. This tends to happen when I’ve already generated and reviewed multiple pull requests in quick succession and my confidence in the AI-generated code is high.

But what if I don’t catch myself next time? What if I overlook a subtle issue that ends up being harmful? Code review has never been perfect, which is why I’ve always advocated for small, atomic pull requests. They help maintain focus and make reviews quicker and more effective. But what if the actual coding effort becomes so minimal that we’re reviewing far more often than we're writing? In such a scenario, even small pull requests could become overwhelming due to sheer volume.

For now, this isn't a constant issue—the pattern of repetitive prompt-driven tasks is still occasional. AI agents excel at boilerplate and solutions easily found on Stack Overflow. There are still plenty of tasks that demand original thought and manual coding—or at least collaboration with an AI agent.

Yet the question remains: could the very productivity boost we gain from AI end up degrading code quality simply because our brains don’t have the capacity to review as carefully as needed?




1 comment: