Skip to main content

Reviewing code when you're also the lead

Being the person whose approval everyone waits for changes how you review. Some things I try to do, and a few I keep getting wrong.

Vishwajit BhosleSoftware developer, Pune 3 min read
On this page

When I became Technical Manager at Zoniq at the start of this year, the most noticeable change in my day wasn't meetings. It was code review. I used to review as a peer, and now my comment carries more weight than I intend it to. A suggestion from me can land as an instruction, and a silence can feel like disapproval.

I'm still figuring this out, honestly. But here's what I've settled on so far.

Say what kind of comment it is

The single most useful habit has been labelling. "Nit:" for style stuff the author can ignore. "Question:" when I'm genuinely asking and might be wrong. "Blocking:" when I think it shouldn't merge as is. Without labels, a junior developer reads everything as blocking, and spends an afternoon rewriting something I'd have been happy to leave.

It costs me two seconds per comment and it removes a lot of unnecessary anxiety.

Ask before telling

When I see something that looks wrong, my first instinct is to write the fix. Lately I try to write a question instead: "what happens here if the list is empty?" Sometimes the author has an answer I hadn't thought of. Sometimes they go "oh" and fix it themselves, which they'll remember far better than if I'd handed them the code.

It's slower, and it's still the better trade on most days. The exception is when something's actually urgent or genuinely dangerous, and then I just say it plainly.

Review the design before the details

The worst time to learn that an approach is wrong is after the pull request is finished. By then the person has put in days, and rewriting feels like a punishment. So I try to catch the big things earlier, with a short chat or a quick sketch before the code exists.

Review comments about variable names are fine, but they're the cheap end of the job. The expensive mistakes are structural, and those need a conversation, not a comment thread.

Praise specific things

I don't mean empty "great job!" notes. I mean pointing at a particular decision and saying why it was good: "this test caught the case I was worried about", "I like that this function does one thing". People repeat what gets noticed. Pointing out good work is also the best way I know of raising the bar without sounding like I'm lecturing.

What I keep getting wrong

I review too much in one sitting and get sloppy and grumpy by the end. I sometimes comment on things that are really my preference, and then forget that the author doesn't have to share it. And I still catch myself approving something quickly because I trust the person, which is exactly when a second look is most worth it.

I try to remember that review isn't a gate I stand at. It's a way for a team to look after its own code, and mine is one voice in it. When the other voices get louder than mine, I take that as a good sign that it's working.

Enjoyed this? Pass it on

Written by Vishwajit Bhosle

I build and lead web and mobile products from Pune, and write about what I run into along the way. If something here helped, or you have a project in mind, say hello.

Follow along

New posts show up in any feed reader the moment they are published: no account, no email, no tracking.

Open in Feedly

Comments

Anyone can comment, no sign-up. Upvote what helped, reply to anyone. I read all of them and reply where I can.

Loading comments…