YAGNI Principle in 100 seconds
Richard Wynn
Posted on May 30, 2021
💡 What does YAGNI stand for?
YAGNI stands for You Ain’t Gonna Need It. It’s a principle from software development methodology of Extreme Programming (XP). This principle says that you should not create features that it's not really necessary.
This principle is similar to the KISS principle, once that both of them aim for a simpler solution. The difference between them is that YAGNI focus on removing unnecessary functionality and logic, and KISS focus on the complexity.
Why YAGNI?
- Any work that's only used for a feature that's needed tomorrow, means losing effort from features that need to be done for the current iteration.
- Creeping featurism leads to code bloat; the software will becomes larger and much more complicated.
Quotes
- Always implement things when you actually need them, never when you just foresee that you need them. (Ron Jeffries, one of the co-founders of the XP)
📝 When not to practice YAGNI
- Learning something new: Evaluate a new technology exclusively to gain the time back later and minimize the risk of losing more time by making the wrong decision.
- Current design decisions based on future needs: Don't sabotage your efforts because you think they violate YANGI. Instead, make the future-proof design decision, but only implement enough to fulfill the current need.
- Abstracting external dependencies: Take time to astract these dependencies will avoid rework and decrease the complexity.
- Testing, Security, Scale, and Business Requirements: YAGNI is not a free-pass on writing tests, secure code, considering scale, or business requirements.
📱 Keep in Touch
If you like this article, don't forget to follow and stay in touch with my latest ones in the future by following me via:
- Twitter: https://twitter.com/RichardWynn01
- Medium: https://richard-wynn.medium.com
- Github: https://github.com/richard-wynn
📰 Other Programming Principles
Be interested? 😃 You can visit the links below read my other posts in my programming principles series
Posted on May 30, 2021
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.