The three
- KISS (Keep It Simple): the simplest design that meets today's requirements. Complexity must earn its place.
- DRY (Don't Repeat Yourself): every piece of knowledge has one authoritative place. This is about knowledge, not similar-looking code.
- YAGNI (You Aren't Gonna Need It): don't build for speculative requirements. The cost isn't only the build; it's carrying and maintaining it.
The tension
Duplication is far cheaper than the wrong abstraction (Sandi Metz). Two pieces of code that look alike but change for different business reasons should stay separate. Merging them couples two things that aren't related.
An architect's version
| Principle | At code level | At architecture level |
|---|---|---|
| KISS | Plain functions before class hierarchies | Monolith before microservices; Postgres before Kafka |
| DRY | Shared validation schema | One source of truth per data item; events carry it to others |
| YAGNI | No config flags "just in case" | No multi-region until an SLO or customer needs it |
When extending release APIs for cross-locale items, we reused the existing SKIPPED status and error envelope instead of inventing new statuses and error codes. That's KISS and DRY at the API-contract level: clients already understood those shapes, so nothing new had to be learned or versioned.
Sources & further learning
Videos, courses, docs and books I recommend for this topic.
Related topics
SOLID Principles
Five object-oriented design principles that keep code open to change — single responsibility, open/closed, Liskov substitution, interface segregation, dependency inversion.
Coupling, Cohesion & Separation of Concerns
High cohesion inside a module, loose coupling between modules — the single most important property of a maintainable architecture.
Architecture Decision Records (ADRs) & Trade-off Thinking
Capture each significant decision — context, options, decision, consequences — so the "why" survives people leaving. Plus how to reason about trade-offs.