Quick answers
- How do you comment in a code review?
- Be specific, explain why, suggest alternatives. Use 'consider' or 'could we.'
Key takeaways
- Use 'consider' and 'could we.'
- Explain the why.
- Ask when unsure.
Instead of → Say
| Instead of | Say |
|---|---|
| This is wrong | Consider handling the null case here—we've seen it in production. |
| Fix this | Could we extract this into a helper? It would make the main function clearer. |
| Why? | I'm curious about this approach. Was there a reason we didn't use [alternative]? |
Example dialogue
Reviewer: Consider adding a test for the unauthenticated case. Author: Good catch. I'll add that. Reviewer: Approving.
Common mistakes
- Vague comments.
- Harsh tone.
Frequently asked questions
- How do I write a code review comment?
- Be specific, explain why, use 'consider' or 'could we.'
- How do I respond to review feedback?
- Acknowledge, fix or explain. 'Good point. I've updated it.'
Related
Ready to practice?
Try a scenario with AI and get feedback on your communication.
Start practicing