This content originally appeared on DEV Community and was authored by Richard Wynn
? 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
This content originally appeared on DEV Community and was authored by Richard Wynn
Richard Wynn | Sciencx (2021-05-30T07:20:45+00:00) YAGNI Principle in 100 seconds. Retrieved from https://www.scien.cx/2021/05/30/yagni-principle-in-100-seconds/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.