📁 Sangam Dhakal - Portfolio v2.0 - Netscape Navigator 4.0
_
□
×

📚 Interview question

As a senior engineer, how do you run code reviews on your team so they raise quality and help people grow, rather than becoming a bottleneck or a gatekeeping exercise? Give an example of a change you made to how your team reviews code.

Leading a team's code review practice: norms, turnaround, PR size, automation, blocking versus suggestion comments, coaching through review, and measuring the effect.

Mid-Level Behavioral Intermediate behavioral code-review engineering-practice mentoring pull-requests technical-leadership

🎯 Key points

  • Review is for shared ownership and learning, not gatekeeping
  • Norms agreed by the team (e.g. at retro), not imposed: turnaround, PR size, self-review
  • Automate style and analysers so humans review design and correctness
  • Label comments: blocking vs suggestion vs question
  • Mentor through review: explain the why, pair juniors as reviewers, praise good work
  • Rotate reviewers to spread knowledge
  • Measure: time to first review, review rounds, escaped defects

⏱ 30-second answer

I treat code review as shared ownership and learning, not a gate. On a team, I help us agree norms together: small PRs, author self-review, a turnaround target (e.g. first review within one working day), and automation (formatters, Roslyn analysers, tests in CI) so people review design and correctness, not whitespace.

In comments I label severity (blocking, suggestion, question), explain the why and call out good work. I mentor through review: juniors review my PRs and I pair with them on reviews, so they learn to spot issues themselves. I measure time to first review, review rounds and escaped defects. The trade-off is thoroughness against flow.

🗣 Full answer (senior)

How I would answer this in an interview

"I see code review as how a team shares ownership of the code, and one of the best mentoring tools we have. It goes wrong when it becomes a gate one person controls, or when PRs sit for days.

At [company], PRs were waiting [two or three days] for review, and comments were mostly [formatting and naming], with the occasional [harsh comment that upset people]. I brought numbers from [our last 30 PRs] to retro and we agreed some changes as a team: [dotnet format and analyser rules with warnings as errors in CI] so style stopped being a discussion; PRs [under about 400 lines] with a description and a self-review; [a first review within one working day]; and prefixing comments with [blocking, suggestion or question]. I also paired with [two juniors] on reviewing, so they reviewed my PRs too. One of them [caught a missing cancellation token on a long-running query in my PR], and I made a point of saying so at stand-up.

Over [two months], time to first review dropped from [around two days to under four hours], average review rounds went from [three to about one and a half], and escaped defects per release [stayed at about X, so we didn't trade quality for speed]. The thing I watch for now is reviews that only say 'LGTM'; that's a sign people have stopped engaging."


What humans should review vs what tools should catch

Area Who catches it
Formatting, naming style dotnet format, .editorconfig
Nullable warnings, common bugs Roslyn analysers, TreatWarningsAsErrors
Vulnerable packages dotnet list package --vulnerable, Dependabot
Correctness, edge cases Human
Design, boundaries, naming of concepts Human
Security and privacy (PII in logs) Human plus analysers
Tests that prove the behaviour Human

Comment labels

Label Meaning
blocking Must change before merge
suggestion Better, but author's call
question I want to understand
praise Worth repeating

Measuring it

Metric Source What it tells you
Time to first review Azure DevOps / GitHub PR data Flow
Review rounds per PR PR history Clarity of norms and PR quality
Escaped defects per release Bug tracker, incidents Whether speed cost quality
Reviewers per author PR data Knowledge spread, bus factor

Production example

"After the changes, median time to first review fell from [~2 days to ~3 hours], PRs merged in [about half the time], and [escaped defects per release stayed flat or improved]; [both juniors] were approving PRs on their own within [a quarter]."

🔍 What the interviewer is checking

Checks that the candidate can lead a healthy team review practice that balances quality, speed and growth.

Green flags

  • Automation for style; humans for design and correctness
  • Agreed team norms, not personal rules
  • Uses review for mentoring
  • Measures the effect

Red flags

  • Gatekeeper mindset
  • Harsh or nitpicky tone described as "high standards"
  • No awareness of review wait time

📚 Learn in depth

1. What is being assessed

  • Do you see review as collaboration or control?
  • Can you change a team practice, not just your own habits?
  • Do you balance quality and flow?
  • Do you use review to grow people?

2. The review pipeline

Author self-review ─► CI (build, tests, analysers, format) ─► Human review ─► Merge
        │                         │                               │
   small PR + description   catches style/bugs cheaply     design, correctness, learning

Every issue caught earlier on the left is cheaper.

3. Evidence on review effectiveness

Studies of code review (e.g. the SmartBear/Cisco study) found defect detection falls sharply beyond a few hundred lines per review and after about an hour of reviewing. This is why small PRs and timely reviews matter. Google's published review guidance emphasises speed of review and that the reviewer should approve once the change improves code health, even if it isn't perfect.

4. Frameworks

  • Conventional Comments for labelling comments.
  • SBI (Situation, Behaviour, Impact) for feedback on people, which belongs in a 1:1, not a PR thread.
  • DORA metrics: long review waits inflate lead time for changes.

5. Adapting the story

The same story answers "improving team process", "mentoring" and "a time you changed how the team worked". For a mentoring question, lead with the juniors; for a process question, lead with the metrics.

Try it yourself

  1. Pull your team's last 30 PRs and compute time to first review and review rounds.
  2. Count how many comments a formatter or analyser could have caught.
  3. Draft three team review norms.
  4. Write your story with one before/after number.
  5. Rehearse it in 90 seconds.

💻 Code

Fill-in template (not code):

S  At [company], PRs waited [time] and comments were [mostly style / harsh / rubber-stamp].
T  I wanted reviews to be faster and more useful without lowering the bar.
A  I proposed at [retro]: [automation in CI], [PR size + description + self-review],
   [first review within X], [comment labels], [junior reviewers paired with me].
R  Time to first review [X → Y], review rounds [A → B], [quality signal].
   I learned [lesson].

Illustrative only:

Added dotnet format + analysers as CI errors; agreed <400-line PRs, 1-day first review.
Time to first review [~2 days → ~3 h]; rounds [3 → 1.5]; juniors now review seniors' PRs.

⚠ Common mistakes

  • Mistake: Describing yourself as the gatekeeper who catches everything. Why it is wrong: bottleneck and single point of failure. Instead: show shared ownership and rotation.
  • Mistake: Only talking about your own review style. Why it is wrong: the question is about leading the team. Instead: describe a change to the team's practice.
  • Mistake: No numbers. Why it is wrong: can't judge the effect. Instead: time to first review, rounds, escaped defects.
  • Mistake: Arguing style in reviews. Why it is wrong: wastes human attention. Instead: automate it.
  • Mistake: Blaming a teammate for bad PRs. Why it is wrong: sounds unkind. Instead: describe the system you changed.
  • Mistake: Too much tooling jargon. Why it is wrong: loses non-technical panel members. Instead: "we automated the style checks".
  • Mistake: Ignoring the cost of slow reviews. Why it is wrong: misses the flow trade-off. Instead: mention lead time.

🏛 Senior insight: trade-offs

A senior answer treats review as a system: tooling, norms, people and metrics. It shows you lowered friction while keeping or raising the bar, and that juniors became reviewers, not just authors.

Practice When it fits Cost When not to
Mandatory two reviewers Regulated code (payments, health) Slower flow Small low-risk changes
One reviewer + CI gates Most product teams Relies on good CI Safety-critical code without other controls
Pair programming instead of PR review Complex or urgent work Two people's time Trivial changes
Post-merge review Very small trusted changes Defects reach main Anything touching security or data

Measure time to first review, review rounds and escaped defects together; improving one at the cost of the others isn't a win.

🔗 Follow-ups the interviewer may ask

  1. When: Candidate mentions labelling comments blocking or suggestion. Why: Checks the individual skill of wording and grading review comments.
    How to answer

    Good review is about finding real problems and sharing knowledge without slowing the team.

    • What I look for, in order: correctness and edge cases, security and data handling, design and fit with the codebase, tests, then readability and naming. Style is the analyser's job, not mine.
    • How I word it: about the code, not the person, with the reason: "This query runs once per order line, so 500 lines means 500 round trips. Could we load them in one query?"
    • Blocking vs suggestion: I label every comment (blocking, suggestion, nit, question) so the author knows what must change before merge.
    • Receiving: assume good intent, answer every comment, and take long debates to a quick call.

    The trade-off is thoroughness against flow: block only on what matters, and approve with comments for the rest.

  2. When: Candidate mentions using review to help people grow. Why: Checks how they handle a teammate struggling in review.
    How to answer

    I'd treat it as a system problem first and a person problem second, and my aim is to keep review psychologically safe: people should feel safe opening work early and asking questions, otherwise they hide work and the problem grows.

    1. Gather facts: read their last few rejected PRs and the comment threads. Is it PR size, unclear standards, a real skill gap, or reviewers blocking on preference or being harsh?
    2. Talk privately: ask how they see it, then share specific patterns, not judgements.
    3. Shift feedback earlier: a ten-minute design chat or draft PR before they write the code, and pair on the next ticket.
    4. Fix the team side: a written review guide, labelled comments (blocking vs nit), style automated in CI, and a word with any reviewer whose comments are harsh.
    5. Measure review rounds and time to merge, and check in after a few weeks.

    The trade-off: pairing costs my time now, but it's cheaper than repeated review cycles and losing a frustrated engineer.

  3. When: Candidate mentions small PRs and self-review. Why: Checks what they expect from authors.
    How to answer

    A good pull request is one a reviewer can understand, verify and approve in one sitting.

    • Size: small and focused on one change, ideally under about 400 changed lines. Review quality drops sharply on large diffs, so split refactoring from behaviour change.
    • Description: explain why, not just what: the problem, the approach, how you tested it and any risk or rollout step. Link the work item.
    • Tests: include tests that prove the new behaviour, and make sure CI is green before you ask for review.
    • Self-review: read your own diff in the PR tool first and remove debug code, commented-out code and unrelated changes.

    The trade-off: splitting work into small PRs costs the author a little planning time, but it saves reviewers far more and gets the change merged sooner.

🛠 Real-world problems: how you handle them

Cutting review wait time without lowering the bar
Situation
[Team of N] on [a .NET API]; PRs waiting [2–3 days]; comments mostly style; [one heated thread] hurt morale.
Signals
[Lead time for changes rising], [PRs aging in the board], [retro complaints], [LGTM-only approvals].
Investigation
Pulled [last 30 PRs]: time to first review, rounds, comment types; raised it at retro.
Resolution
Added dotnet format and analysers as CI errors, agreed PR size and description norms, a one-working-day first-review target, comment labels, and paired juniors as reviewers.
Prevention
PR template, CI gates, monthly look at review metrics, review norms in the team handbook.

How to tell it (STAR)

**S:** At [company], our PRs waited [two to three days] and most comments were about style. **T:** I wanted reviews to be faster and more useful without lowering standards. **A:** I brought data from [30 PRs] to retro and proposed automating style in CI, keeping PRs under [~400 lines] with a self-review, a [one-day] first-review target and comment labels. I paired with [two juniors] so they reviewed my PRs too. **R:** Time to first review fell from [~2 days to ~3 hours], rounds from [3 to 1.5], and juniors started catching real bugs. I learned that most review friction was a system problem, not a people problem.

↩ Usually asked after

More in Senior Engineer Expectations

Last updated 23 Nov 2026.

🌐 Sangam's Webring

⏪ Previous 🏠 Main Next ⏩
💬 Chat with me