Responding to Code Reviews
Code Review is a Gift
Every code review is free mentorship. Treat it that way.
The Review Reality
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β WHAT CODE REVIEWS REALLY ARE β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β What beginners think: "They're judging ME" β
β What it actually is: "They're improving the CODE" β
β β
β Your response matters MORE than your initial submission. β
β β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββTypes of Feedback
1. Blocking (Must Fix)
Reviewer: "This will cause a race condition in production."
β Bad response: "Works on my machine"
β
Good response: "You're right! Fixed in abc123. Added test to prevent this."2. Suggestions (Nice to Have)
Reviewer: "Consider extracting this into a helper function"
β Bad: "Not necessary"
β
Good: "Great idea! Done in xyz789"
β
Also good: "I kept it inline because this logic is used only once here,
but happy to extract if you feel strongly"3. Questions (Clarification)
Reviewer: "Why did you choose approach A over B?"
β Bad: "Because it's better"
β
Good: "I chose A because of X constraint. B would require Y which adds
complexity. Happy to reconsider if you see an issue with A"4. Nits (Minor Style)
Reviewer: "nit: missing comma here"
β Bad: "It's optional in JS"
β
Good: "Fixed! Thanks for catching that"Response Timeline
Don't Disappear
If you can't respond within 48 hours, leave a comment: "Traveling this week, will address feedback by Friday."
The Response Framework
Step 1: Thank the Reviewer
Always start with gratitude:
β
Good openings:
- "Thanks for the detailed review!"
- "Great catches, appreciate your time"
- "Thanks for the feedbackβaddressing these now"
β Avoid:
- Starting with defensive explanations
- No acknowledgmentStep 2: Address Each Comment
Reviewer: "This function is doing too much"
Your response:
"You're absolutely right. I've split it into three functions:
- validateInput() for validation
- processData() for business logic
- formatOutput() for formatting
Changes in commit abc1234. Does this look better?"Step 3: Ask for Clarification (If Needed)
Reviewer: "The naming here is confusing"
Your response:
"Thanks for pointing this out. Which variable names specifically?
I'm thinking:
- `userData` β `authenticatedUser`
- `data` β `requestPayload`
Would that address your concern?"Step 4: Push Changes
After addressing feedback:
"All feedback addressed:
β
Fixed race condition (commit abc1234)
β
Extracted helper function (commit def5678)
β
Added error handling (commit ghi9012)
β
Updated tests accordingly
Please take another look when you have time. Thanks!"Handling Different Feedback Tones
Harsh but Valid
Reviewer: "This is completely wrong. You clearly didn't read the docs."
β Bad: "That's rude"
β
Good: "You're right, I missed that in the docs. Fixed now.
Which section should I review more carefully?"Separate Tone from Content
Focus on WHAT they're saying, not HOW they're saying it. Maintainers are often stressed and terse.
Vague Feedback
Reviewer: "This doesn't feel right"
β Bad: "Can you be more specific?"
β
Good: "I want to make sure I address your concern. Is it:
- The approach itself?
- The implementation details?
- Performance implications?
- Something else?
Happy to explain my reasoning or change direction."Conflicting Feedback
Reviewer A: "Extract this into a separate file"
Reviewer B: "Keep this in the same file for cohesion"
Your response:
"@reviewerA and @reviewerB have different preferences here.
I'm inclined toward [choice] because [reason].
Can you two align on the preferred approach? Happy to go either way."Disagreeing Professionally
Sometimes you'll disagree. That's okay.
The DEAR Framework
Describe - State the feedback objectively Explain - Your reasoning Ask - For their perspective Respect - Their final decision
Example:
"Thanks for suggesting we use Library X instead of Y.
I chose Y because:
1. It's 10x smaller (5KB vs 50KB)
2. Active maintenance (updated last week vs 2 years)
3. Better TypeScript support
That said, I might be missing context about X's benefits for this project.
Is there a specific advantage you see that outweighs these factors?
Of course, if you prefer X for project consistency, I'm happy to switch."Remember: They Have Veto Power
If a maintainer insists after your explanation, implement their suggestion. Save your energy for important battles.
Common Response Patterns
Pattern 1: Simple Fix
Reviewer: "Missing semicolon on line 45"
Response: "Fixed in abc1234. Thanks!"Pattern 2: Needs Discussion
Reviewer: "Why not use approach B?"
Response: "I considered B but went with A because [reasons].
Trade-offs:
- A: Pros X, Cons Y
- B: Pros Z, Cons W
Given [project constraints], A seemed better fit. But if you see
issues with this reasoning, I can switch to B."Pattern 3: Will Fix Later
Reviewer: "We should also refactor module X while we're here"
Response: "Great point! That's a bigger change though. Would you prefer:
1. I do it in this PR (delays merge by ~3 days)
2. I create a follow-up issue and tackle separately
I'm leaning toward option 2 to keep this PR focused, but happy to do 1
if you think it's important to couple these changes."Pattern 4: Already Fixed
Reviewer: "This needs error handling"
Response: "Good catch! I actually added that in commit def5678
(lines 45-52). Does that address your concern?"Pattern 5: Out of Scope
Reviewer: "This entire approach should be redesigned"
Response: "I think you're right that the overall architecture could be improved.
This PR specifically addresses issue #123 within the current architecture.
Would you prefer:
1. I open a separate issue for the architecture discussion
2. I pause this PR and tackle the redesign first
3. We merge this as-is and refactor in a follow-up
What do you think?"The Edit-Push Cycle
Commit Strategy
# Option 1: Separate commits per concern
git commit -m "fix: address race condition from review"
git commit -m "refactor: extract helper as suggested"
git commit -m "test: add edge cases requested"
# Option 2: Single commit (for very small changes)
git commit -m "fix: address review feedback
- Fix race condition in auth flow
- Extract validateUser helper
- Add edge case tests"Commit Granularity
Separate commits help reviewers see what changed between review rounds.
Responding to Specific Comment Types
Testing Requests
Reviewer: "Can you add tests for the error case?"
Response: "Added three test cases in test/auth.test.js:
- Invalid token β 401
- Expired token β 403
- Missing token β 400
All passing. Commit: abc1234"Performance Concerns
Reviewer: "This might be slow with large datasets"
Response: "Good point. I ran benchmarks:
- 100 items: 5ms
- 1,000 items: 48ms
- 10,000 items: 450ms
For our use case (max 1000 items), this should be fine.
But if you expect larger datasets, I can optimize with [approach]."Security Questions
Reviewer: "Is this input sanitized?"
Response: "Yes, sanitized on line 67 using escapeHtml().
Also added a test to verify XSS prevention (line 120).
Let me know if you'd like additional sanitization."The Approval Dance
After First Approval
Maintainer A: "LGTM! β
"
[But there are 2 other reviewers]
Your response: "Thanks @maintainerA!
Waiting for @maintainerB and @maintainerC to review as well."After All Approvals
All reviewers approved
Your response (optional): "Thank you all for the thorough review!
Learned a lot from your feedback."
[Wait for maintainer to mergeβdon't merge your own PR unless told to]Mistakes to Avoid
β Arguing Instead of Listening
Bad:
"No, you're wrong. My way is better because [5 paragraphs]"
Good:
"I understand your concern. I chose this approach because [brief reason].
What issues do you see with it?"β Defending Without Action
Bad:
"I disagree but I'll change it"
Good:
"I see your point. Changed to your suggestion in commit abc1234"β Over-Explaining
Bad:
[10 paragraphs explaining every decision]
Good:
"Changed as suggested. Happy to explain the reasoning if helpful."β Getting Personal
Bad:
"You always criticize my PRs"
Good:
"Thanks for the feedback. I'll address these points."When Reviews Stall
No Response for 1 Week
Polite ping:
"Hi @reviewer, just checking if you had a chance to look at the updates.
No rushβjust want to make sure this is on your radar. Thanks!"No Response for 2 Weeks
Tag project lead:
"Hi @maintainer, this PR has been waiting for review for 2 weeks.
Could someone take a look, or should I close and revisit later?"Abandoned PR
After 1 month of silence, it's okay to close:
"Closing this PR due to inactivity. Happy to reopen if there's renewed
interest. Thanks for the initial feedback!"Success Metrics
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β GOOD REVIEW RESPONSES β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β β
Response within 24-48 hours β
β β
Gracious and professional tone β
β β
All feedback addressed or discussed β
β β
Changes pushed promptly β
β β
Commits are logical and clean β
β β
No defensive or argumentative language β
β β
Questions asked for genuine understanding β
β β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββBuild a Reputation
Respond well to reviews β Reviewers look forward to your PRs β Faster merges β More contributions