Laws of Software Engineering · Principle
Principle
Beck's Four Rules of Simple Design
A simple design passes its tests, makes intent clear, has no duplicated knowledge, and uses the fewest elements possible. The rules apply in that order.
How to use it. When two designs both work, walk down the list. The order matters. A small but unclear design is less simple than a larger, obvious one.
How it gets misused. Treated as a checklist. The order is the rule. Removing elements before clarifying intent makes things worse.
Related
-
Principle SOLID Five rules for designing object-oriented code: each class does one thing, code should be open to extension but closed to modification, subclasses should be substitutable, interfaces should be small, and code should depend on abstractions rather than specifics.
-
Saying DRY (Don't Repeat Yourself) Each piece of knowledge in the system should live in one place.
-
Saying YAGNI (You Aren't Gonna Need It) Do not build features you might need someday.
Clusters
- The Code Design cluster - How to write code that survives change.