Clean Design Habits
DRY, KISS, YAGNI, coupling and cohesion, the Law of Demeter and "tell, don't ask", with the judgement calls that go with them.
Rules of thumb, not laws
SOLID gave you structure-level guidance. These habits work at the level of everyday code. Each one is a trade-off, and each has a way of being overdone.
| Habit | Full name | One line |
|---|---|---|
| DRY | Don't Repeat Yourself | Every piece of knowledge has one home |
| KISS | Keep It Simple | Choose the simplest design that works |
| YAGNI | You Aren't Gonna Need It | Do not build for requirements you do not have yet |
| Cohesion | Things inside a class belong together | |
| Coupling | Classes should know as little about each other as they can |
1 of 7