Software Design Principles
Module 2
DRY, KISS and YAGNI
Three heuristics that are quoted more often than they are understood: what DRY is actually about, why simplicity is a budget rather than a style, and where YAGNI is dangerously wrong.
31 min2 lessons
Start moduleWhat you will be able to do
- Distinguish duplicated knowledge from coincidentally similar code, and deduplicate only the first.
- Explain the coupling that a shared abstraction creates and price it against the duplication it removes.
- Separate essential from accidental complexity when arguing about simplicity.
- Apply YAGNI to reversible decisions and name the three categories where it must not be applied.
- 10 min
01DRY Is About Knowledge, Not About Text
Two pieces of code that look identical today may encode two different rules. Deduplicating them couples two teams to one abstraction — often the most expensive mistake in a young codebase.
- 11 min
02Simplicity Is a Budget: KISS and YAGNI
Complexity you cannot remove and complexity you chose, why "You Aren't Gonna Need It" is about reversibility, and the three categories where applying it will hurt you badly.
DRY, KISS and YAGNI
6 questions · pass at 75%