Live data from Hacker News

Maybe we shouldn't be reviewing all this code

martinfowler.com

1–10 of 87 posts

Re: Maybe we shouldn't be reviewing all this code

#2
>If we want to explore alternative solutions, I’d rather do that before implementing one of them.

>If we want knowledge transfer, pair. Sitting next to someone, physically or virtually, while they reason through a problem teaches you far more than reading their completed solution afterwards.

>If we want junior engineers to learn how experienced engineers think, let them work with experienced engineers while they’re thinking. Pairing comes to mind again here, but teams could also do design sessions collectively with a whiteboard before they write (or instruct the agent to write) anything.

>If we want collective ownership, organise teams so people actually build and operate software collectively rather than relying on a pull request to tell everyone what somebody else has already built. For this again use pairing, mob programming, or team design sessions around whiteboard.

...

So in short, talk to people about decisions before you code (obvious advice, but plenty of shops don't do it) ... and replace all other functions of code review with pair programming!?!?

I mean, seriously, the answer to "what do we do with so much code to review" in this article is moronic! The vast vast majority of shops are not going to adopt Extreme Programming, and cut their velocity in half, by using twice as many programmers as they needed yesterday to get the same amount of work done!

The author frames the whole thing as an argument between her and some other guy, but I don't even know what the other guy's argument is (she left it out). Still, her argument so incredibly tone-deaf and awful, I'm definitely on his side.

Re: Maybe we shouldn't be reviewing all this code

#4
This approach doesn't scale.

Pair programming once in a while can be incredibly valuable. I am glad to meet with anyone and talk over their code in person, brainstorm designs, run through a debugger together investigating it.

But if you asked me to do that for most of an 8 hour day - much less most of the time in general - I would quit the job faster than you could fill out the paperwork. Constantly having someone looking over your shoulder is a world of stress and overstimulation that I (and I suspect many others) will not stand for.

Re: Maybe we shouldn't be reviewing all this code

#6
How about.. "it depends" ?

I review things that I know are "important".. but I've learned that there are many things that I don't care how it works at this point- they aren't critical in terms of I know it's not going to cascade and break other things (that's where us senior engineers know what to look for).

But there's no way in the hell I can review all the code that is being generated for so many things that just don't need reviewing. They work- that's honestly good enough for a lot of use cases. I review the code that touches sensitive areas and I know aren't very straightforward (which, I would put at only 10%).

Re: Maybe we shouldn't be reviewing all this code

#7
> significant lines of code per human-landed diff

Claude would be proud.

That said, code reviews have never worked well, and it's a weird argument for wanting to preserve them.

Pairing is great and under-utilized. On one hand it's a hard sell to managers (let's use two people to do one person's job) and from the developer's point of view, it's intense and exhausting.

Re: Maybe we shouldn't be reviewing all this code

#8
i do find it deeply funny that a polemic against peer review has an AI generated header image with easily identifiable problems (notebook contents upside down, one child is about to cut her hand with scissors, the other is building a geometrically impossible "lego" structure). if only it had been reviewed by someone else before publishing!

Re: Maybe we shouldn't be reviewing all this code

#9

>If we want to explore alternative solutions, I’d rather do that before implementing one of them. >If we want knowledge transfer, pair. Sitting next to someone, physically or virtually, while they reason through a problem teaches you far more than reading their completed solution afterwards. >If we want junior engineers to learn how experienced engineers think, let them work with experienced engineers while they’re t…

I didn't read this as "pair program every line".

I write a bunch of features. Most are pretty boring. A junior isn't going to learn much by pairing. But occasionally, I do big architecture changes. Those ones are perfect for early collaborative design, pairing, and discussion. The whole team benefits from understanding the architecture better and juniors get to see how seniors think about it. Then you can pair with juniors on the prompting or, more likely, the implementation plan to hand to the agents. That's maybe once a week.

Re: Maybe we shouldn't be reviewing all this code

#10
Imo, the article misses the main point of code review. It's not about finding bugs or spreading around knowledge, but about maximizing value vs maintenance costs. Code is expensive, not to produce but to maintain. Every line of code added to a codebase must be read and understood many times over its lifetime, and therefore imposes a burden on future maintainers. We review code in order to weigh its value against that high cost of ownership. High quality, maintainable code is code which maximizes that value delivered while minimizing the cost of its future maintenance.

AI is changing the game here not by increasing (or decreasing) the value of code, but by reducing its cost of ownership. When it's significantly cheaper to understand, modify, and replace code, the balance point shifts significantly. It's the definition of "maintainable" that's changing.

Post reply on HN