Key practice in effective product development culture.
Also known as
- Emergent design;
- Continuous design;
- JIT (just-in-time) design
- Big Design Up Front;
- Planned design;
- Anticipatory design
YAGNI (You Ain’t Gonna Need It)
YAGNI means building features only when they are necessary. Don’t build features that “you know” you will need later.
When you build features before they are necessary:
- you introduce delay in releasing the features that are necessary now;
- you’re more likely to build the features wrong given they’re not needed yet (and may never be needed);
- you’re having to maintain a more complicated design to accommodate features that aren’t needed yet (and may never be needed)
- YAGNI by Martin Fowler
Simple Design means 4 rules in order of importance:
- Passes the tests (aka it has to verifiably work)
- Reveals intention (aka it should be clear what it’s doing)
- No duplication (aka things that should change together are in one spot)
- Fewest elements (aka less code is generally easier to understand and maintain)
Simple designs are easier to modify than overcomplicated “future-proof” designs that guessed wrong…. AND are not that much harder to modify than “future-proof” designs that guessed right.
NOTE: “No duplication” is probably the most complicated rule to get right as it’s closely tied to coupling. I find the best way to thing about this is what you want to change together and what you want to be decoupled. And this should be from a product perspective, not just textual similarity.
- Beck Design Rules by Martin Fowler;
- What are Rules of Simplicity? | Agile Alliance;
- Avoiding Repetition by Martin Fowler
Refactoring means continuously improving the design of the code so that it remains simple.
Refactoring is not rewriting.
Refactoring is not making a big mess and then scheduling time to clean it up. Refactoring is cleaning up as you go.
Evolutionary design strategy: start with the core and evolve
Although it’s possible to start anywhere and evolve the design, a more strategic approach is to focus on the core of the product problem, and only the core, first and then iterate.
“A Walking Skeleton is a tiny implementation of the system that performs a small end-to-end function. It need not use the final architecture, but it should link together the main architectural components. The architecture and the functionality can then evolve in parallel.”
Alistair Cockburn, Walking Skeleton (c2.com)
“A primitive whole is a fully assembled yet extremely under-developed version of a finished whole.”
Joshua Kerievsky, “Evolutionary Design”
Evolutionary design reflects trust in ability to change
Evolutionary design means you trust your ability to respond to change more than you trust your ability to predict the future.
Developing this trust requires practice.