DEV Community

Cover image for What is overengineering
Hasan Elsherbiny
Hasan Elsherbiny

Posted on

What is overengineering

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.

overengineering

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 ?

  1. KISS Principle (Keep It Simple) don't try to add more things to your solution before making sure that it's really requirements.
  2. Clear Requirements to be able to apply KISS principle properly you need to have Clear Requirements
  3. Refactoring regularly review and refactor code to eliminate unnecessary complexity as refactoring helps maintain a clean and maintainable codebase without compromising functionality.
  4. 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.
  5. 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)

Collapse
 
efpage profile image
Eckehard • Edited

you missed an "s":


Kiss

Collapse
 
eljayadobe profile image
Eljay-Adobe

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".

Collapse
 
hasanelsherbiny profile image
Hasan Elsherbiny

even if the word "stupid" is addressed to the programmer it's okay for as it can be consider a good alert to remember. 😁

Thread Thread
 
efpage profile image
Eckehard • Edited

Means: Dont be stupid, keep it simple!

Image description

Thread Thread
 
hasanelsherbiny profile image
Hasan Elsherbiny

exactly 👌

Collapse
 
hasanelsherbiny profile image
Hasan Elsherbiny

you are right 😂😂

Collapse
 
arocha profile image
Nefario313

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.

Collapse
 
hasanelsherbiny profile image
Hasan Elsherbiny

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

Collapse
 
muhamadsyahrulmubarok profile image
Muhamad Syahrul Mubarok

Nice article. i'll shared in my linkedin

Collapse
 
hasanelsherbiny profile image
Hasan Elsherbiny

glad you liked it, check also my other articles

Collapse
 
ruicraveiro profile image
Rui Craveiro

It's what I tend to do more when using C# and less when using Go. :-)

Collapse
 
hasanelsherbiny profile image
Hasan Elsherbiny

i always feel like C# is pushing you to use simplest way without need to go throw a lot of hassle

Collapse
 
valvonvorn profile image
val von vorn

Pareto principle too

Collapse
 
hasanelsherbiny profile image
Hasan Elsherbiny

can you explain it?

Collapse
 
valvonvorn profile image
val von vorn

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...

The Pareto principle states that for many outcomes, roughly 80% of consequences, come from 20% of causes (the "vital few").[1] Other names for the principle are the 80/20 rule, the law of the vital few and the principle of factor sparsity.[1][2]

Thread Thread
 
hasanelsherbiny profile image
Hasan Elsherbiny

thanks for explanation