Loading...
Loading...
Compare original and translation side by side
收到代码审查反馈时:
1. 阅读:完整阅读反馈,不急于反应
2. 理解:用自己的话复述需求(或提问)
3. 验证:对照代码库的实际情况检查
4. 评估:对这个代码库来说技术上合理吗?
5. 回应:技术性确认或有理有据的反驳
6. 实施:一次一项,逐个测试When receiving code review feedback:
1. Read: Read the feedback fully, don't rush to react
2. Understand: Paraphrase the requirement in your own words (or ask questions)
3. Verify: Check against the actual state of the codebase
4. Evaluate: Is this technically reasonable for this codebase?
5. Respond: Provide technical confirmation or a well-reasoned counterargument
6. Implement: Do one item at a time, test each individually如果有任何一项不明确:
停下来——先不要实施任何内容
就不明确的项目提出澄清
为什么:各项之间可能有关联。部分理解 = 错误实施。搭档:"修复第 1-6 项"
你理解 1、2、3、6。对 4、5 不确定。
❌ 错误做法:先实施 1、2、3、6,稍后再问 4、5
✅ 正确做法:"第 1、2、3、6 项我理解了。第 4 和第 5 项需要澄清后再动手。"If any item is unclear:
Stop—don't implement anything yet
Ask for clarification on the unclear items
Why: Items may be interconnected. Partial understanding = incorrect implementation.Partner: "Fix items 1-6"
You understand 1, 2, 3, 6. Unsure about 4, 5.
❌ Wrong approach: Implement 1, 2, 3, 6 first, ask about 4,5 later
✅ Correct approach: "I understand items 1, 2, 3, 6. I need clarification on items 4 and 5 before proceeding."实施之前:
1. 检查:对这个代码库来说技术上正确吗?
2. 检查:是否会破坏现有功能?
3. 检查:当前实现这样写是否有原因?
4. 检查:在所有平台/版本上都适用吗?
5. 检查:审查者了解完整上下文吗?
如果建议似乎有误:
用技术理由反驳
如果无法轻易验证:
说明情况:"没有 [X] 我无法验证这一点。我应该 [调查/提问/先做]?"
如果与搭档之前的决策冲突:
先停下来和搭档讨论Before implementing:
1. Check: Is this technically correct for this codebase?
2. Check: Will it break existing functionality?
3. Check: Is there a reason the current implementation is written this way?
4. Check: Does it work across all platforms/versions?
5. Check: Does the reviewer have full context?
If the suggestion seems incorrect:
Push back with technical reasons
If verification isn't easy:
State the situation: "I can't verify this without [X]. Should I [investigate/ask/proceed with other tasks]?"
If it conflicts with previous partner decisions:
Stop and discuss with your partner first如果审查者建议"正规地实现":
在代码库中 grep 实际使用情况
如果没人用:"这个接口没有被调用。删掉它(YAGNI)?"
如果有人用:那就正规实现If the reviewer suggests "implementing it properly":
Grep the codebase for actual usage
If no one uses it: "This interface isn't being called. Should we delete it (YAGNI)?"
If someone uses it: Implement it properly对于包含多项的反馈:
1. 先澄清所有不明确的项
2. 然后按以下顺序实施:
- 阻塞性问题(崩溃、安全)
- 简单修复(拼写、导入)
- 复杂修复(重构、逻辑)
3. 逐个测试每项修复
4. 验证没有回归For feedback with multiple items:
1. Clarify all unclear items first
2. Then implement in this order:
- Blocking issues (crashes, security)
- Simple fixes (spelling, imports)
- Complex fixes (refactoring, logic)
3. Test each fix individually
4. Verify no regressions✅ "已修复。[简要说明改了什么]"
✅ "发现得好——[具体问题]。已在 [位置] 修复。"
✅ [直接修复并在代码中体现]
❌ "你说得太对了!"
❌ "好观点!"
❌ "感谢你发现了这个!"
❌ "感谢你 [任何内容]"
❌ 任何感谢的表达✅ "Fixed. [Briefly describe what was changed]"
✅ "Good catch—[specific issue]. Fixed at [location]."
✅ [Fix directly and reflect it in the code]
❌ "You're absolutely right!"
❌ "Great point!"
❌ "Thanks for catching this!"
❌ "Thank you for [anything]"
❌ Any expression of gratitude✅ "你是对的——我检查了 [X],确实 [Y]。正在实施。"
✅ "验证后确认你是对的。我最初的理解有误,因为 [原因]。正在修复。"
❌ 长篇道歉
❌ 为自己的反驳辩护
❌ 过度解释✅ "You're right—I checked [X], and indeed [Y]. Implementing now."
✅ "After verification, I confirm you're correct. My initial understanding was wrong because [reason]. Fixing now."
❌ Long apologies
❌ Defend your pushback
❌ Overexplain| 错误 | 修正 |
|---|---|
| 敷衍附和 | 复述需求或直接行动 |
| 盲目实施 | 先对照代码库验证 |
| 批量实施不测试 | 一次一项,逐个测试 |
| 假设审查者一定对 | 检查是否会破坏现有功能 |
| 回避反驳 | 技术正确性 > 社交舒适度 |
| 部分理解就开始实施 | 先澄清所有项 |
| 无法验证却继续推进 | 说明限制,请求指导 |
| Mistake | Correction |
|---|---|
| Perfunctory agreement | Paraphrase requirements or take direct action |
| Blind implementation | Verify against the codebase first |
| Batch implementation without testing | Do one item at a time, test individually |
| Assuming reviewers are always right | Check if it will break existing functionality |
| Avoiding pushback | Technical correctness > social comfort |
| Starting implementation with partial understanding | Clarify all items first |
| Proceeding without verification | State limitations and request guidance |
审查者:"删除遗留代码"
❌ "你说得太对了!让我删掉它……"审查者:"删除遗留代码"
✅ "查了一下……构建目标是 10.15+,这个 API 需要 13+。向后兼容需要保留遗留代码。当前实现有错误的 bundle ID——修复它还是放弃 pre-13 支持?"审查者:"实现完善的指标追踪,包括数据库、日期过滤、CSV 导出"
✅ "在代码库中 grep 了一下——没有任何地方调用这个接口。删掉它(YAGNI)?还是有我遗漏的调用?"搭档:"修复第 1-6 项"
你理解 1、2、3、6。对 4、5 不确定。
✅ "第 1、2、3、6 项我理解了。第 4 和第 5 项需要澄清后再动手。"Reviewer: "Delete legacy code"
❌ "You're absolutely right! Let me delete it..."Reviewer: "Delete legacy code"
✅ "Checked... The build target is 10.15+, and this API requires 13+. Backward compatibility requires keeping the legacy code. The current implementation has an incorrect bundle ID—should we fix it or drop pre-13 support?"Reviewer: "Implement comprehensive metrics tracking including database, date filtering, CSV export"
✅ "Grep'd the codebase—this interface isn't called anywhere. Should we delete it (YAGNI)? Or is there a call I'm missing?"Partner: "Fix items 1-6"
You understand 1, 2, 3, 6. Unsure about 4, 5.
✅ "I understand items 1, 2, 3, 6. I need clarification on items 4 and 5 before proceeding."gh api repos/{owner}/{repo}/pulls/{pr}/comments/{id}/repliesgh api repos/{owner}/{repo}/pulls/{pr}/comments/{id}/replies