clean-code-simple-design
Installation
SKILL.md
Simple Design (Emergence)
Four simple rules, applied in priority order, help good designs emerge. They also make deeper principles like the Single Responsibility and Dependency Inversion principles easier to apply. A design is "simple" if it:
- Runs all the tests.
- Contains no duplication.
- Expresses the intent of the programmer.
- Minimizes the number of classes and methods.
Rule 1: Runs all the tests
First, the system must demonstrably work as intended. A design that can't be verified is questionable, however elegant it is on paper.
Making a system fully testable pushes it toward a better design. Classes that are easy to test tend to be small and single-purpose. Tight coupling makes testing hard, so writing tests drives you toward dependency injection, interfaces and abstractions. So testability isn't only a verification goal; it's a design force.