Code Review Best Practices
Code review is examining a teammate's code before it merges. Great reviews catch bugs early, improve design, share knowledge across the team, and maintain quality standards. It is one of the most valuable skills a developer can build.
01.How to Review Code Well
Read the PR description first to understand intent and context before reading any code. Review logic and architecture — not just style (linters handle style). Ask questions rather than demanding: "Could this be a race condition if two users click simultaneously?" Be specific: cite file names and line numbers. Approve good things too — positive reinforcement matters. Distinguish blocking issues from optional suggestions.
02.How to Submit Reviewable PRs
Keep PRs small and focused on one change — under 400 lines is ideal (large PRs get poor reviews). Write a clear description explaining why the change was needed. Test your own code thoroughly before requesting review. Respond to every comment — even just "done" or "good point, will address separately". Never force-push after review starts.
Commands
What is the recommended maximum PR size for effective code review?