Skip to content

Code Review

Code Review Overview

Why Code Review Matters


What to Review

Code Review Checklist


Giving Effective Feedback

Feedback Guidelines

Comment Examples

// BAD Comments:

"This is wrong."
"Why did you do it this way?"
"This is confusing."
"Fix this."

// ─────────────────────────────────────────────────────────────

// GOOD Comments:

"🔴 Blocker: This query runs in a loop and could cause N+1
issues with large datasets. Consider using a batch query
or join instead. Happy to pair on this if helpful."

"🟡 Suggestion: We could simplify this by using
Optional.map() here:
```java
return user.map(User::getName).orElse("Unknown");
Not a blocker, but would improve readability."

"💬 Question: I'm curious about the decision to use a HashMap here instead of TreeMap. Is ordering not important for this use case?"

"👍 Really clean implementation of the retry logic! I like how you extracted it into a reusable component."

"🟢 Nit: Per our style guide, we typically use camelCase for variable names (userCount instead of user_count)."

---

## Code Review Workflow

![Review Process](../images/engineering/review-process.svg)

---

## PR Description Template

```markdown
## Summary
[Brief description of what this PR does]

## Motivation
[Why is this change needed? Link to ticket/issue]

## Changes
- [Change 1]
- [Change 2]
- [Change 3]

## Testing
- [ ] Unit tests added/updated
- [ ] Integration tests added/updated
- [ ] Manual testing performed

## Screenshots
[If applicable, add screenshots]

## Deployment Notes
[Any special deployment considerations]

## Checklist
- [ ] Code follows style guidelines
- [ ] Self-review completed
- [ ] Documentation updated
- [ ] No security vulnerabilities introduced


Handling Disagreements

Resolving Review Conflicts


Code Review Metrics

Review Metrics


Senior/Staff Engineer Review Focus

Staff Engineer Review Priorities


Automating Code Review

Automation Opportunities


Code Review Anti-Patterns

Anti-Patterns to Avoid


Building Review Culture

Building a Healthy Review Culture


Common Interview Questions

  1. How do you approach code review?
  2. Check correctness, design, readability
  3. Focus on important issues
  4. Be constructive and kind
  5. Balance speed and thoroughness

  6. How do you handle disagreements in reviews?

  7. Understand their perspective
  8. Focus on technical merits
  9. Provide evidence
  10. Escalate if needed
  11. Accept and move forward

  12. What makes a good code review?

  13. Timely (< 24 hours)
  14. Thorough but focused
  15. Constructive feedback
  16. Knowledge sharing
  17. Clear approval criteria

  18. How do you give feedback to junior engineers?

  19. Explain the "why"
  20. Suggest alternatives
  21. Be patient and kind
  22. Recognize good work
  23. Use as teaching moment

  24. How do you balance review quality and speed?

  25. Automate style checks
  26. Focus on high-impact issues
  27. Set time expectations
  28. Accept "good enough"
  29. Small, frequent PRs