YAGNI is a principle from Extreme Programming (XP) that states a programmer should not add functionality until deemed necessary.
Why it matters
- Premature features waste time and add complexity
- Unused code is a maintenance burden that must still be tested and understood
- Requirements change — what you build speculatively may never be needed
Ron Jeffries, co-founder of XP, put it simply: Always implement things when you actually need them, never when you just foresee that you need them.