| DRY (Don't Repeat Yourself) | Every piece of knowledge has a single, unambiguous representation. | Copy-pasted logic, duplicated constants, repeated validation rules. |
| KISS (Keep It Simple, Stupid) | The simplest solution that works is the best solution. | Over-engineered abstractions, unnecessary design patterns, premature optimization. |
| YAGNI (You Aren't Gonna Need It) | Do not build functionality until it is needed. | Speculative features, unused abstractions, configuration for hypothetical scenarios. |
| Separation of Concerns | Each module addresses a distinct concern. | UI logic mixed with business logic, data access scattered across layers. |
| Law of Demeter | A method should only talk to its immediate friends. | Long chains like order.getCustomer().getAddress().getCity(). |
| Principle of Least Surprise | Software should behave in a way that users and developers expect. | A save() method that also sends an email; a getter that modifies state. |
| Composition over Inheritance | Favor assembling behavior from small parts over deep class hierarchies. | Deep inheritance trees, fragile base class problems. |
| Fail Fast | Report errors as soon as they are detected. | Swallowing exceptions, returning null instead of throwing, silent data corruption. |
| Single Source of Truth | Every data element is mastered in exactly one place. | Duplicated database columns, config in multiple files, competing state stores. |
| Encapsulation | Hide internal details and expose only what is necessary. | Public fields, leaking internal collections, exposing implementation types in APIs. |