Clean Code
โค้ดที่ดีอ่านเข้าใจได้เหมือนประโยคภาษาธรรมดา

1. ตั้งชื่อให้สื่อความหมาย

// Bad
int d; // elapsed time in days

// Good
int elapsedTimeInDays;

2. ฟังก์ชันควรทำแค่อย่างเดียว

Single Responsibility Principle: ฟังก์ชันหนึ่งควรทำงานหนึ่งอย่างเท่านั้น

3. หลีกเลี่ยง Magic Numbers

const MINIMUM_AGE = 18;
if ($user->age > MINIMUM_AGE) { ... }

"Any fool can write code that a computer can understand. Good programmers write code that humans can understand." — Martin Fowler