代码审查是核心协作实践——并且做好它(无论是给予还是接收反馈)都是一项重要的专业技能。良好的代码审查能改进代码质量、分享知识并建立健康的团队文化;如果做得不好,则会引起摩擦。
进行有效的代码审查
✓ Be CONSTRUCTIVE and KIND → critique the CODE, not the person; assume good intent;
be respectful (reviews can feel personal)
✓ Be SPECIFIC and clear → explain WHY (reasoning, not just "change this"); suggest solutions
✓ Distinguish must-fix (bugs, security) from nitpicks/preferences (label them; don't block
on minor style)
✓ Praise good things too (not just criticism); ask questions vs demanding
✓ Be timely (don't block teammates); focus on what matters (logic, design, bugs, not just style)
接收代码审查反馈
✓ Don't take it PERSONALLY → feedback is about the code and improving it (separate ego)
✓ Be OPEN and grateful → it's a learning opportunity and a quality safeguard
✓ Consider feedback genuinely; ask for clarification if unclear; discuss respectfully
✓ It's OK to DISAGREE → explain your reasoning; find the best solution together (not winning)
✓ Learn from it → reviews are a great way to grow
