ข้ามไปยังเนื้อหา

ภาษาอังกฤษใน Code Review

Code review ไม่ใช่แค่การให้ข้อเสนอแนะทางเทคนิค — มันคือการสื่อสารในทีม การใช้ถ้อยคำที่ไม่เหมาะสมอาจ:

  • ❌ ดูหยิ่งหรือเสียดสี
  • ❌ ทำให้เพื่อนร่วมงานเสียขวัญ
  • ❌ สร้างความเข้าใจผิด (โดยเฉพาะในทีมข้ามวัฒนธรรม)

ข่าวดีคือ: มีชุดสำนวนมาตรฐานที่ทุกคนเข้าใจ

“Nit” มาจาก “nitpick” แต่ใน code review เป็นคำในแง่บวก: “เล็กน้อย ไม่กระทบภาพรวม แต่ควรปรับปรุง”

❌ "This variable name is bad"
✅ "Nit: could we rename this to `userCount`?"

ตัวย่อที่แสดงว่าคุณตรวจแล้วและเห็นด้วยกับการ merge

ปัญหาสำคัญที่ต้องแก้ไขก่อน merge

Blocker: This will cause a race condition in `handleUserLogin`.

เมื่อใครบางคนพบ bug หรือปัญหาที่ซ่อนอยู่

Nice catch! I didn't think about the edge case where `null` ...

เสนอทางเลือกโดยไม่บังคับ

Have you considered using `useCallback` to prevent unnecessary re-renders?

ข้อเสนอแนะอ่อนๆ ไม่จำเป็น แต่แนะนำ

We should probably add error handling here for the case where the API call fails.

การเห็นด้วยแบบไม่เป็นทางการ: ดูแล้วไม่มีปัญหา deploy ได้เลย

Ship it! 🚀

สูตร: บริบท → ปัญหา → ข้อเสนอแนะ

❌ "This code is inefficient"
✅ "In `processUserData`, iterating O(n²) might be slow with large datasets.
Could we use a Set to get O(n) instead?"
❌ "That's wrong"
✅ "I see your approach. One concern: `Math.random()` isn't cryptographically
secure for auth tokens. Should we use `crypto.getRandomValues()`?"
สำนวนผิดเหตุผลเวอร์ชันที่ดีกว่า
”This code is not good”ตรงเกินไป ดูหยิ่ง”Could we refactor this for clarity?"
"You must change this”ฟังดูเหมือนคำสั่ง”We should probably change this"
"This is wrong”เจ็บปวด”This might cause X in scenario Y”
สถานการณ์สำนวน
เห็นด้วย + รายละเอียดเล็กน้อยLGTM, just one nit: …
ไม่เห็นด้วยกับการตัดสินใจI see your approach, but have we considered…?
ปัญหาสำคัญBlocker: This will cause…
ข้อเสนอแนะเล็กน้อยNit: Could we…?
เห็นด้วยทั้งหมดLGTM! Ship it.