Code Review Best Practices Interview Questions
261 multiple-choice tech interview questions on Code Review Best Practices: Why teams review code, what reviewers look for, authoring small pull requests, descriptions, drafts and self-review, giving and receiving feedback, disagreement, automation and AI as an extra pass, ownership and required reviewers, and team review norms. Written for technical phone screens and interview prep, organized by subtopic, with a short explanation for every answer. Learn the 27 key terms with the flashcards first, then test yourself.
Take the practice test · Flashcards · All study tools
What it covers
- 5.1 Purpose of code review
- 5.2 What reviewers look for
- 5.3 Authoring small pull requests
- 5.4 Descriptions, drafts and self-review
- 5.5 Giving feedback well
- 5.6 Receiving feedback and disagreement
- 5.7 Automation and AI-assisted review
- 5.8 Ownership and required reviewers
- 5.9 Team norms and bottlenecks
Key terms
5.1 Purpose of code review
- Code review
- Peer examination of changes before merging
5.3 Authoring small pull requests
- Pull request
- Proposed change submitted for review and merge
- Draft pull request
- Work in progress shared for early feedback
- Stacked pull requests
- Small dependent PRs reviewed in sequence
5.5 Giving feedback well
- Nit
- Minor optional review suggestion
- Review turnaround
- Time a pull request waits for review
5.9 Team norms and bottlenecks
- CODEOWNERS
- File assigning automatic reviewers by path
- Rubber stamping
- Approving without real review
- Conventional Comments
- Prefixes like issue or nit that mark a comment's severity
- Blocking comment
- A review request that should be resolved before merge
- Non-blocking comment
- A suggestion that should not hold the merge
- Self-review
- The author reading their own posted diff before asking for review
- Suggested change
- A concrete inline patch a reviewer offers in the discussion
- Reviewer load
- How much review work one person is being asked to do
- Review SLA
- An agreed target for review turnaround
- Required reviewer
- Someone whose approval is needed to merge
- Optional reviewer
- Someone invited to look, without gating the merge
- Code owner
- A person or team accountable for a path in the repository
- Reviewer fatigue
- Shallow or delayed review caused by overload
- LGTM
- A short approval note, often too thin on a risky change
- Break-glass review
- A documented emergency exception, with a later follow-up
- First-time contributor
- Someone new to the project's review norms
- Review guideline
- A written agreement on tone, scope, and turnaround
- Feature-flagged slice
- A mergeable increment hidden behind a flag
- Reviewer rotation
- A schedule for who is on review duty
- Thread resolution
- Marking or stating whether a review discussion is settled
- False positive
- A tool comment that is not actually a problem
Sample practice questions
What is the primary purpose of code review?
- To identify exactly who should be blamed for each new bug
- To deliberately slow down releases so fewer changes ship
- To measure and rank each individual developer's productivity
- To improve quality and share knowledge before changes merge
Answer: D. To improve quality and share knowledge before changes merge Research and experience show knowledge transfer is a major benefit alongside defect finding.
According to Google's engineering practices, what standard should a reviewer use to approve a change?
- Approve only when the code is completely perfect in every respect
- Approve once it clearly improves overall code health, even if imperfect
- Approve anything submitted by a senior engineer without question
- Approve only if it exactly matches the reviewer's personal style
Answer: B. Approve once it clearly improves overall code health, even if imperfect Seeking perfection blocks progress; continuous improvement is the goal.
Why are small pull requests preferred?
- Small pull requests never contain any bugs, so review is quicker
- Git refuses to merge pull requests above a certain size limit
- They're reviewed faster and better, and are safer to merge and revert
- Small pull requests are allowed to skip the CI checks entirely
Answer: C. They're reviewed faster and better, and are safer to merge and revert Very large PRs often get superficial "looks good to me" approvals.
What should a good pull request description include?
- What changed, why, how it was tested and where to focus, with issue links
- Only the ticket number, since reviewers can look up everything else there
- Nothing at all, since good code speaks for itself without explanation
- A full list of every file that changed, copied from the diff view
Answer: A. What changed, why, how it was tested and where to focus, with issue links Screenshots help for UI changes.
Which code review comment is most constructive?
- "This is just wrong, and you should already know why that is."
- "Why would anyone ever choose to write this code this way?"
- "This queries once per item; could one query avoid N+1 calls?"
- "Please rewrite this whole section before I look at it again."
Answer: C. "This queries once per item; could one query avoid N+1 calls?" Explain the problem and reasoning, and suggest an alternative.
Why is review turnaround time important?
- Slow reviews block authors and lead to bigger PRs and more conflicts
- Fast reviews are always lower quality than slow, careful ones
- Review speed has no effect at all on how quickly teams deliver
- Reviews should always wait until the end of the sprint anyway
Answer: A. Slow reviews block authors and lead to bigger PRs and more conflicts Google suggests responding within one business day at most.
Which checks should run automatically on every pull request before human review?
- Only a spell check of comments and the description
- Nothing at all; humans should check absolutely everything
- Build, tests, linting, formatting and security scans
- A manager's sign-off, recorded as an automated status
Answer: C. Build, tests, linting, formatting and security scans Automation frees reviewers to focus on design and logic.
What is a CODEOWNERS file?
- A file mapping repository paths to the reviewers requested for them
- A list of the people and investors who own the company's shares
- The license file that sets out how the code may be reused
- A file that encrypts selected source code from other teams
Answer: A. A file mapping repository paths to the reviewers requested for them GitHub and GitLab support CODEOWNERS for required reviewers.
What is the "rubber stamp" anti-pattern in code review?
- Approving pull requests without really reading them
- Adding a rubber stamp emoji to every review comment
- Requiring two separate approvals for every change
- Leaving long, detailed comments on every single line
Answer: A. Approving pull requests without really reading them It gives a false sense of safety.
Which is a valuable but often overlooked benefit of code review?
- Increasing the number of meetings the team holds every week
- Making the code longer and more detailed with each review round
- Ensuring that only one person ever understands each module
- Spreading codebase knowledge so more people can maintain each part
Answer: D. Spreading codebase knowledge so more people can maintain each part It reduces the "bus factor" risk.