how many times you have started a side project to address a simple idea, but after few days a lot of things have come to your mind and you wanted to make it perfect, and whenever you think about a small enhancement or a feature you think about why don't we make it more better or increase the scale to include more things.
this is called overengineering, it's not only limited to side projects or ideas that comes to your mind but also it can extend to your daily tasks.
for example if you want to create a simple login service which has a clear requirements, you start asking why don't we add MFA for example , or external login provider or even integrate with SSO server.
sometimes this thoughts are good as it widen your vision and can reveal some hidden or forgotten requirements but it's also can be very overwhelming, as this adds complexity to your task, cost, bugs, scalability issues or Unnecessary features.
How to avoid overengineering ?
- KISS Principle (Keep It Simple) don't try to add more things to your solution before making sure that it's really requirements.
- Clear Requirements to be able to apply KISS principle properly you need to have Clear Requirements
- Refactoring regularly review and refactor code to eliminate unnecessary complexity as refactoring helps maintain a clean and maintainable codebase without compromising functionality.
- Avoid Premature Optimization avoid optimizing code or introducing advanced features prematurely. Optimize only when performance issues are identified through profiling or when necessary for scalability.
- Pragmatic Design Patterns choose patterns that align with the project's needs, as design patterns can be beneficial, applying them excessively or inappropriately can lead to overengineering.
Top comments (16)
you missed an "s":
I like the phrase "keep it simple stupid".
The word "stupid" refers to the "it".
The word "stupid" does not refer to the programmer or to the user.
If the "it" were made clever, that's bad. Hard to maintain. Hard to reason about. Hard to debug.
If the "it" were made too-clever-by-half, that's really bad.
However, if the wording gets someone upset, I'm okay with "keep it stupidly simple".
even if the word "stupid" is addressed to the programmer it's okay for as it can be consider a good alert to remember. 😁
Means: Dont be stupid, keep it simple!
exactly 👌
you are right 😂😂
Always amaze people arguing of using architecture, technologies or trending solution before studying the problem domain. The abuse of "use of API" for everything, microservice architecture, containerized solution and so on... are the most frequent nowadays.
this is what i said to some of my friends few days ago, when told me he wants to learn DDD ,microservice and these new staff
Nice article. i'll shared in my linkedin
glad you liked it, check also my other articles
It's what I tend to do more when using C# and less when using Go. :-)
i always feel like C# is pushing you to use simplest way without need to go throw a lot of hassle
Pareto principle too
can you explain it?
Pareto is another strategy to keep things simple, by doing what is good enough , and try not to reach perfection. The rule of thumb claims that's about doing 80% of what we could achieve in 20% of the total time, and try not to waste the other 80% on the remaining 20% to perfection.
Wikipedia:
en.wikipedia.org/wiki/Pareto_princ...
thanks for explanation