Link: https://codibly.com/blog/articles/yagni-how-to-do-things-when-you-actually-need-them-to-be-done
The blog post “YAGNI – how to do things WHEN you actually need them to be done” goes over the YAGNI (You Ain’t Gonna Need It) principle and why it is necessary as a guardrail against over-engineering in software development. The blog starts off by explaining the origins of YAGNI, as it originated from eXtreme Programming (XP) used in agile software development teams. Essentially, YAGNI should be used so that developers can resist the urge to implement features that are not necessary or needed. The blog compares YAGNI to KISS (Keep It Simple, Stupid), as while KISS advocates for more simplicity overall, YAGNI is more focused on discouraging unnecessary functionalities. The blog also goes over the risks of over-engineering, as it can lead to more bugs and simply be a burden when it comes to maintenance. Furthermore, it can also just lead to making your code way more complex for no reason. In the end though, in order to apply YAGNI in a responsible way it requires good judgement, as some additions are harmless as long as they don’t increase the complexity, but generally speaking it is better to keep it clean and simple.
I picked this blog post because I think that this is very important practice that will apply to a workplace environment. You always want to plan ahead and implement features that may be needed in the future, but overdoing it is not good. It is very important to find a balance, as doing too much of either can lead to big problems. For our course, this blog post also covers other software design principles, as well as some agile practices too. I think that all of these principles are very important for when it comes to working in a team environment, which is something that I will most likely have to do in the future. In a team environment, it is important to make sure your code is not complex, as other people will have to read it and potentially debug it as well.
Going forward, I plan on applying YAGNI principles to my current code as well as any code that I work on in the future. This blog gave me a good reminder that just because we might need an abstraction in the future, that doesn’t mean that we have to add it now. This can just lead to more maintenance, bugs, and just unnecessary complexity. I can apply these principles favoring simple versions of programs, as well as consistently reevaulating the requirements of a program. Overall, this blog post on YAGNI gives a great view and perspective on a principle that is very important in software design.
From the blog CS@Worcester – Coding Canvas by Sean Wang and used with permission of the author. All other rights reserved by the author.