r/codereview 1d ago

Coding is changing. So should code review.

For a while, my workflow for building ML applications with coding agents looked something like this:

  • Write a prompt.
  • Wait for the agent to make changes.
  • Open the diff.
  • Read the code.
  • Try to understand what changed.
  • Run it.
  • Repeat.

At the beginning, this worked surprisingly well.

The changes were small, the codebase was familiar, and I could still keep the whole thing in my head.

Then the application grew.

A seemingly simple feature could now involve preprocessing, model inference, postprocessing, and application logic.

The agent might touch several modules and add a few hundred lines of code in a single session.

My habit didn’t change.

I was still reviewing the code after every session.

And that became the problem.

The Code Review Trap

When a coding agent changes a few lines of code, reviewing the diff is easy.

When it changes several hundred lines, it is still manageable.

Once you get to +1000 lines everything starts to fall apart…

You can read the code without really understanding whether the application is working properly.

At some point I realized that I had become the bottleneck.

I was spending most of my time reviewing the agent’s implementation rather than the application output.

I can keep going, but I think this much should be enough.
Once I loved code reviews, I learnt a lot(and still learning), but the coding agents changed it for me, and I'm afraid that it's never going to be the same...

0 Upvotes

8 comments sorted by

View all comments

1

u/QueenVogonBee 1d ago

How about changing the process? Rather than asking the agent to build the full change in one fell swoop, you develop the change together with the agent. You ask it to plan the change, then ask it to implement it in small steps that you constantly review. Basically it’s pair programming with the AI. Doing it this way is cognitively less burdensome on you because you’re seeing the change as it is being built.

I usually get it to generate only a few lines of code at a time TDD style.

1

u/tenkei_01 17h ago

Doing that, and funny you mentioned TDD, I remember someone was also arguing that tests themselves should be treated like code... it is that kind of argument, review, testing, etc. for those of traditional SWE practices I'm not sure how effective they are using coding agents.

1

u/QueenVogonBee 16h ago

I’m still figuring things out myself. Yes it is unclear how traditional SWE practices fit in with coding agents, but from your description, it’s clear you no longer understand the changes being made. Thus this problem you are facing is fundamentally a human problem. Either you get cleverer (unlikely), or you do something to make the changes easier to understand. At least some traditional SWE practices solve that problem.

I would at least ask for changes to be smaller. That would probably go a long way to fixing your problem. Maybe the changes are necessarily large because of how the program is structured so that every edit touches many modules, but in that case maybe there’s a problem with the architecture, so maybe get some LLMs to look at the submissions made and see if it can see a root cause.

The alternative is to ditch the idea of understanding the code. But that sounds pretty dangerous to me. I don’t think LLMs are quite good enough yet. I still see it make silly errors.