Sefism is free for learners. We are here to help you grow, one step at a time.Join for free
Sefism.

Best practices · Stacks and tools

Code Review Best Practices

Opens with credits

A practical guide to code review for both sides of the pull request, built on Google's published engineering practices and GitHub's documentation. It covers when to approve, what to look for and in what order, how fast to respond, how to write comments people act on, how to handle pushback, and how authors can make their changes easy to review.

Written by Tauseef Fayyaz7 chapters, 31 practicesAbout 24 min22 quiz questionsReviewed 13 October 2026

What you will learn

7 chapters · about 24 min

  1. 1The standard for approving a changeBefore looking at any code, a reviewer needs to know what bar a change has to clear. This chapter covers the core rule, what counts as a preference, and how to settle style and design arguments.4 practices · 3 min
  2. 2What to look for in a reviewA checklist of what matters most, in roughly the order Google's guide gives it: design, functionality, complexity and tests first, then naming, comments, style and documentation.6 practices · 5 min
  3. Review speedSlow reviews slow down the whole team. This chapter covers how fast to respond, how to fit reviews around focused work, and when to approve with comments.4 practices · 3 minOpens with credits
  4. Writing review commentsHow a comment is written decides whether it is acted on or resented. This chapter covers tone, explaining why, labelling severity and giving the right amount of direction.5 practices · 4 minOpens with credits
  5. Handling pushback and disagreementAuthors and reviewers will disagree. This chapter covers when to concede, when to hold firm, why "I will clean it up later" rarely works, and how to escalate without stalling the change.4 practices · 3 minOpens with credits
  6. Making your changes easy to reviewMost review pain starts before the reviewer opens the change. This chapter covers small changes, separating refactors, descriptions and reviewing your own diff first.4 practices · 3 minOpens with credits
  7. Team habits and toolingA few team level decisions make every individual review easier: automating style, routing reviews to the right people and taking extra care with risky changes.4 practices · 3 minOpens with credits

About this guide

These code review best practices are for anyone who reviews code or sends it for review, whether on GitHub, GitLab, Gerrit or any other tool. They are built mainly on Google's published engineering practices for code review, one of the most detailed public guides on the topic, plus GitHub's documentation on code owners.

Code review is how a team keeps a codebase healthy while many people change it. A good review catches bugs and design problems before they reach users, spreads knowledge of the code across the team, and keeps the style consistent. A bad review process does the opposite: changes wait for days, comments feel personal, reviewers argue about taste, and authors learn to send huge changes because each review costs so much.

The first chapters are for reviewers: the standard for approving a change, what to look for, how quickly to respond and how to write comments. Then come handling disagreement, the author's side of the process, and the team habits and tools that make reviews smoother.

If you are new to a team, reviewing is also one of the fastest ways to learn the codebase. Reading other people's changes carefully, and asking good questions about them, teaches you how the system fits together.

Common questions

How long should a code review take?

Google's guide says one business day is the maximum time to respond to a review request, and that a typical change should get all its rounds of review within a day. Speed of each response matters more than total time. Keeping changes around 100 lines makes this realistic.

What should I look for in a code review?

Start with the design and whether the change belongs in the codebase. Then check that it works, including edge cases and concurrency, that it is no more complex than needed, and that the tests would fail if the code broke. Finally check naming, comments that explain why, style and documentation.

How big should a pull request be?

Google's guide says about 100 lines is usually reasonable and about 1,000 lines is usually too large, with file spread mattering too. More important than the number is that the change does one self contained thing, includes its tests and keeps the build working.

What does Nit mean in code review?

A Nit: comment marks a minor issue, a small polish point that will not significantly affect the code. Labels like Nit:, Optional: and FYI: show the author which comments are required and which they can skip.

Should I approve a pull request that is not perfect?

Yes, if it clearly improves the overall health of the code. Google's guide says reviewers should favour approving once a change definitely improves code health, even if it is not perfect, and mark remaining polish as optional. Never approve a change that makes the code worse, except in a real emergency.

How do I give code review feedback without sounding harsh?

Comment on the code rather than the person, explain why you are asking for a change, and phrase concerns as observations or questions. Label optional points so they do not read as demands, and mention what was done well. Most upset in review comes from wording, not from high standards.

Sources (8)

Checked against these, last on 13 October 2026.

  1. The Standard of Code Review, Google Engineering Practicesgoogle.github.io/eng-practices/review/reviewer/standard.html
  2. What to look for in a code review, Google Engineering Practicesgoogle.github.io/eng-practices/review/reviewer/looking-for.html
  3. Speed of Code Reviews, Google Engineering Practicesgoogle.github.io/eng-practices/review/reviewer/speed.html
  4. How to write code review comments, Google Engineering Practicesgoogle.github.io/eng-practices/review/reviewer/comments.html
  5. Handling pushback in code reviews, Google Engineering Practicesgoogle.github.io/eng-practices/review/reviewer/pushback.html
  6. Small CLs, Google Engineering Practicesgoogle.github.io/eng-practices/review/developer/small-cls.html
  7. Best practices for pull requests, GitHub Docsdocs.github.com/en/pull-requests/collaborating-with-pull-requests/getting-started/best-practices-for-pull-requests
  8. About code owners, GitHub Docsdocs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners

Picked from the other libraries by shared topics.

Project structures

See all
Work with me

Stuck on something specific?

Writing only gets you so far. If you want an answer to your situation rather than the general case, book a session and we will work through it together. Sessions are free for approved Sefism members, and a few slots open each week.

  • 1:1 Mentorship
  • Fresh Graduate Mentorship
  • Career Guidance

Brand deals, promos and partnerships: tauseeffayyaz@gmail.com