The Review Where There Was Nobody To Ask

by Serguey Shinder

I was reviewing a change and I got stuck on a piece of it. Not because it was wrong, exactly, but because it was doing something I did not understand the reason for, a defensive check in a place where I could not imagine the failure it was defending against. So I did what I have always done in that situation. I left a comment asking why. And the answer that came back, honestly and without any embarrassment, was that the author did not know either. The model had put it there and it had looked reasonable.

I sat with that for longer than the review deserved. For my whole career, code review has rested on an assumption so basic that I had never examined it, which is that somewhere behind every line there is a person who can tell you why. The reasoning might be wrong, it might be half-remembered, it might have to be dragged out over a long conversation, but it exists. Review works because it is two people comparing understandings of the same thing. That day I was comparing my understanding to nothing at all.

What I noticed next was more uncomfortable. The code was good. It read well, it was consistent, it did the job, and if I had not stopped on that one line I would have approved it without a second thought. The absence I had bumped into was not a defect in the output. It was a defect in the process, invisible in the artefact, and the only reason I had found it was that I happened to ask a question the artefact could not answer.

I do not think the answer is to refuse code that a model helped write. I use these tools, they make me faster, and pretending otherwise would be theatre. But I have become firm about one thing, which is that the person sending the change has to be able to explain every part of it as if they had written it themselves. Not because the model is untrustworthy, but because review is not a check on the code. It is a check on the understanding behind the code, and if that understanding is missing, the review is inspecting a surface with nothing underneath.

The practical version is unglamorous. Before I send a change now, I read it back as if a reviewer were about to ask me why about every line, and where I cannot answer, I either work out the reason or take the line out.

The thing that has stayed with me is how ordinary that review felt. No alarm, no obvious problem, just a normal change and a normal question and a silence where an answer should have been. That silence is the thing I now listen for, in others and much more often in myself.

– Serguey Asael Shinder

Leave a Reply