Code Review

Code review is when other developers review your code (or you review theirs) before it's merged, to catch bugs and improve quality.

Quick answers

What is code review?
When other developers review your code before it's merged to catch bugs and improve quality.
How do I give constructive code review feedback?
Be specific, explain why, and suggest alternatives. Avoid vague or harsh comments.
How do I respond to code review comments?
Acknowledge the feedback, ask for clarification if needed, and explain your reasoning if you disagree.

What it is

Code reviews happen in pull requests (PRs). Reviewers read the code, run it, and leave comments. They may request changes, suggest alternatives, or approve. As an author, you respond to comments and iterate.

Why it matters

Clear communication in code review saves time and avoids friction. Polite, specific comments—whether you're author or reviewer—keep the process constructive. Many non-native speakers struggle to phrase feedback or respond to critique.

Instead of → Say

Instead ofSay
This is wrongConsider handling the null case here—we've seen it in production.
Fix thisCould we extract this into a helper? It would make the main function easier to follow.
Why did you do this?I'm curious about this approach. Was there a reason we didn't use [alternative]?
I disagreeI'd suggest [alternative] because of [reason]. Happy to discuss.
Looks goodLooks good. One minor suggestion: we could add a test for the edge case in line 42.

Example dialogue

Reviewer: Can you add a test for when the user is unauthenticated?

You: Good catch. I'll add that. Should it go in the existing auth test file or a new one?

Reviewer: The existing one is fine.

You: Done. I've also fixed the lint error you flagged.

Reviewer: Thanks. Approving.

You: Merging now.

Common mistakes

  • Writing vague comments—"fix this" or "?"
  • Being harsh or personal—focus on the code
  • Not explaining the "why" behind suggestions
  • Getting defensive when receiving feedback
  • Approving without actually reviewing

Frequently asked questions

How do I ask for clarification in a code review?
Be specific: "Can you explain the reasoning behind [approach]? I want to make sure I understand."
How do I push back on a review comment?
Explain your reasoning: "I went with [approach] because [reason]. Happy to change if you feel strongly."
How do I suggest a change without sounding harsh?
Use "consider" or "could we": "Consider handling the error case here. We've seen this in production."
What if I don't understand a comment?
Ask: "I'm not sure I follow. Could you elaborate or share an example?"
How do I respond to negative feedback?
Acknowledge and respond: "Good point. I've updated it to [change]. Let me know if you'd prefer a different approach."

Ready to practice?

Start practicing with our available scenarios and get instant feedback.

Start practicing