⛔ Software Design Principles · Core Principles
YAGNI - You Aren't Gonna Need It
Do not build speculative features without a real requirement.
Future-proofing can become expensive over-engineering.
Do not build support for 20 payment providers when only one is required.
💡 Like buying a giant freezer for food you might cook someday — it just sits there costing you space and money.
💡 Why it matters
Features built "just in case" cost time now and must be maintained forever, even if they are never used. Guesses about the future are often wrong, so you end up reworking the guess anyway. Building only what is needed today keeps the code smaller, cheaper and easier to change when the real need arrives.
🛠️ How to achieve it
⚠️ Signs of trouble
- •There are config options and hooks that nothing uses.
- •Abstractions were built for cases that never arrived.
- •Dead code paths exist "for the future".
- •People spend time maintaining features no one asked for.
🎯 Quick check
Score: 0/3Three questions to test the idea.
1. What does YAGNI warn against?
Answer: Building features before there is a real requirement
YAGNI says don't build speculative features; wait until a concrete need actually appears.
2. Only one payment provider is required. What does YAGNI advise?
Answer: Support just the one, and extend later if needed
Build for the real requirement today; adding the rest now is cost with no current benefit.
3. Why are speculative features risky?
Answer: Guesses about the future are often wrong and must be maintained anyway
You pay to build and maintain a guess that may never be needed or may need reworking.
