YAGNI (You Aren't Gonna Need It)
An Extreme Programming principle that states programmers should not add functionality until it is actually needed, avoiding speculative features.
Definition
YAGNI comes from Extreme Programming (XP) and combats the tendency to build for imagined future requirements. Adding unused features increases code complexity, maintenance burden, and introduces potential bugs — all for functionality that may never be used. Studies show that 64% of software features are rarely or never used. YAGNI pairs with iterative development: build what's needed now, refactor when requirements change.
Why It Matters
Speculative features waste development time and create technical debt. Code that anticipates every possible future need becomes bloated and hard to maintain. YAGNI encourages focus on current, validated requirements rather than hypothetical scenarios.
Example
YAGNI violation: building a generic plugin system "in case we need it later" when the app only needs one fixed behavior. Following YAGNI: implement the single behavior now, add plugin architecture only when a second plugin is actually required.