'You aren't gonna need it'
A design principle from Extreme Programming (XP) that states that a programmer shouldn't add any functionality until it's actually necessary.
Ron Jeffries, one of the founders of XP wrote that programmers should "always implement things when you actually need them, never when you forsee that you need them" and "do the simplest possible thing that will work".
Why is it useful?
- This can help you iterate really quickly.
- It helps prevent design fatigue or fear of a large all-encompassing up-front design.
YAGNI is meant to be combined with continuous refactoring, automated unit testing and continuous integration.
Failure to refactor code early could require huge amounts of technical debt and rework.
Therefore, in order to do YAGNI well, developers first need to know how to:
- write code that's testable
- run automated tests
Learning the SOLID principles and how to refactor are a good start on how to be successful with YAGNI.
Enjoying so far? Join 15000+ Software Essentialists getting my posts delivered straight to your inbox each week. I won't spam ya. 🖖
Commenting has been disabled for now. To ask questions and discuss this post, join the community.
"technical dept" should be "technical debt"?