Code review
Reviewing changes to catch problems and share knowledge.
Code review finds bugs, spreads knowledge and keeps standards consistent. Small changes get better reviews. With AI-generated code, reviewing well has become an even more important skill.
Why it matters for a product engineer
Code review is where a team keeps its standards, finds bugs and spreads knowledge of the system. It also decides how fast work moves: slow or harsh reviews make people batch changes, and big changes get worse reviews. With more code written by agents, reading code well matters more than writing it fast.
How to do it
- Keep changes small. Google’s guidance: about 100 lines is usually reasonable, 1,000 is usually too large.
- As the author, explain why the change exists and how you tested it.
- As the reviewer, start with the design and the behaviour, then the details.
- Approve when the change clearly makes the code better, even if it is not perfect.
- Mark small suggestions as optional, so they do not block.
- Answer quickly. A review that waits a day costs more than one that is a little less thorough.
Common mistakes
- Large changes that nobody can review properly.
- Arguing about style that a formatter or linter should handle.
- Blocking on personal preference.
- Approving without running or reading the code.
- Comments about the person instead of the code.
Example
Google’s code review guide sets one rule above all the others. The reviewer’s job is not to get perfect code, which does not exist, but continuous improvement. A change that improves the maintainability, readability and understandability of the system should not wait days or weeks for polish.
In general, reviewers should favor approving a CL once it is in a state where it definitely improves the overall code health of the system being worked on, even if the CL isn't perfect.
Sources: The standard of code review (Google engineering practices) ↗ · Small CLs (Google engineering practices) ↗
AI leverage
Use AI in your workUse AI to support this skill. Your judgment and verification remain part of the work.
- Workflow
- Use an assistant to scan a bounded diff for edge cases and inconsistencies before a human review.
- Limitations
- Generated review comments may be false positives, while architectural or product mistakes can remain invisible.
- Verification
- Reproduce suspected bugs and check the change against its requirements, permissions and existing contracts.
Technical leverage
Evaluate generated code for data integrity, security, maintainability and whether it solves the actual product problem.
Evidence of mastery
Put it into practice- Practice
- Review a real change and follow its most important behavior through the system.
- Artifact
- A review with reproduced findings and a clear rationale for accepting the final change.
What good looks like
- Each blocking finding has a concrete failure scenario.
- Verification covers the user-visible outcome.
Use this evidence to assess your work. Your map status is a self-assessment, not a certification.
Resources
1- docsStart here
Google engineering practices, code review ↗
Google · 30 minHow Google reviews code, from what reviewers look for to how authors should write small changes.
Tools
2- ToolOpen source
- ToolOpen source