DEV Community

Cover image for How do you identify "over-engineering"?
Ben Halpern
Ben Halpern Subscriber

Posted on

How do you identify "over-engineering"?

How do you spot over-engineering as it is happening, how do you communicate around this issue?

Top comments (48)

Collapse
 
gwutama profile image
Galuh Utama • Edited

I've seen many software engineers implement things that aren't in scope of their projects just because:

  • "hey, what happens if the customer needs this feature in the future? We must adjust the architecture so that it can accommodate that feature."
  • "hey, micro services are all the rage right now, we've got to have it for our next project"
  • "hey, this brand new shiny library looks cool. We must use it for this project."
  • "hey, the customer pays us a lot of money, let's use it to learn new languages and use for that project"
  • and so on ...

These are all warning flags for me, as an engineering manager, that the engineers will potentially over-engineer things that bring zero value for the customer.

When we follow the lessons of V-Model:

  • There's requirement and use case analysis,
  • based on that you build a system design,
  • based on that you build a functional system design,
  • based on that you build technical system design,
  • and based on that you write the code.

What I'm saying is, each step is based on the previous one and each step must be verified against the previous one. Anything else is over-engineering unless there are other business cases behind it.

You shouldn't identify over-engineering as it is happening because it might be too late to change direction. You should prevent over-engineering from happening.

Collapse
 
yerac profile image
Rich • Edited

hey, what happens if the customer needs this feature in the future?

Although there is a big advantage to stepping back during the design process and thinking of extensibility or abstractions which will allow features to be expanded easily, or suit alternate approaches without mass refactoring. Sometimes, these thoughts come at a later implementation phase, and we have had big wins by doing iterative stuff at a later point to "enhance" the offering rather than go back via the planning and design phases.

There is a big difference between "gold-plating" and forward-thinking, and the line between the two is extremely fine and easy to end up on the wrong side of!

Collapse
 
gsto profile image
Glenn Stovall

I agree, and I think the difference is in how you approach it. You want to leave yourself open to extension, but not over-extend.

Collapse
 
xanderyzwich profile image
Corey McCarty

Start from the Minimum-Viable-Product and then iterate from there. If there are pet pieces that the developers would like to make along the way then you let your customer handle prioritizing that work.

There is another side of this issue that you mentioned. If people are trying to push projects into a new language then they obviously have interest in learning something new and are not given an outlet for that energy. Letting them get some down time to work on a small pet project to learn a new language and report back as to how it performs would be great. Help them to understand that there is a time for experimenting and the Customer's product should not be that.

Collapse
 
puritanic profile image
DarkΓΈ Tasevski

Amen.

I know a few people who are overengineering stuff all the time, just for the sake of what if... Meanwhile, there are a bunch of serious problems with the apps they're working on. I guess that most of them hope that the problems would just go away on their own.

Collapse
 
tsalman80 profile image
tsalman80 • Edited

how do you address over engineering when the person who is doing is the architect/fo-founder.

lets build a user management system with log-queue pattern, you know so each web app can manage their own users (which they dont, all collections need to be in sync otherwise the app breaks). have 3 micro service, one which for crud on the source and the other two are responsible for replication.

WTH.

Collapse
 
ben profile image
Ben Halpern

Great comment

Collapse
 
javascriptinginfo profile image
javascripting-info

GREAT post!

Collapse
 
spiritupbro profile image
spiritupbro

keren sekali penjelasannya mas galuh saya terpana

Collapse
 
jsn1nj4 profile image
Elliot Derhay

Instructions unclear. Duct tape soaked in WD-40. 😡πŸ€ͺπŸ™ƒ

Collapse
 
dwd profile image
Dave Cridland

I once saw someone trying to remove marks left on a glass table by duct tape. She thought I was joking when I told her what would remove it. WD-40 - works every time. No idea how to remove that though.

Collapse
 
meatboy profile image
Meat Boy • Edited

Using external libs for trivial problems. Reinventing the wheel isn't good but very often the real problem is easier to solve than people think.

Also, forcing to use design patterns everywhere without thinking if they match requirements makes code crappy after time. They are for special purposes but some people are trying to put them everywhere.

Collapse
 
themobiledev profile image
Chris McKay

I've been guilty of the latter. It used to be that when I found a new pattern I would put it everywhere. I justified it by telling myself that I was learning about it, but all I was doing was stalling a release. Quick and dirty, while not always the best solution, isn't always the worst, either.

Collapse
 
jenc profile image
Jen Chan

I'm guilty of this a lot. And it requires my teammates to tell me that so far. I feel like maybe it's a step-back-and-look thing. Or maybe stopping before diving straight into a problem and trying to see if there's already something in an existing lib or codebase to do it simply.

Collapse
 
ryanlanciaux profile image
Ryan Lanciaux

I think over engineering can often be synonymous with over abstracting. As developers, we often build abstractions to future proof our software. Unfortunately, we can often plan for a future that doesn't exist. Since we get more information about the future as time goes on, it can be a better practice to defer building abstractions until we have more information. This helps us avoid unnecessary complexity, and make decisions based on data, rather than guessing :D

Sandi Metz has an awesome article about this topic. sandimetz.com/blog/2016/1/20/the-w... This article has some great words of wisdom in it "duplication is far cheaper than the wrong abstraction" and many others.

Collapse
 
jsn1nj4 profile image
Elliot Derhay

I think Jeffrey Way would agree about over abstraction. When I was learning Laravel, a lot of times he would say to not worry about abstraction until it became clear that a part of the code was going to start getting messy. He'd also show a good number of ways to accomplish the same thing, depending on what's needed.

Collapse
 
daedtech profile image
Erik Dietrich • Edited

Personally, I find the term "over-engineering" to be about as helpful as describing code as "bad." Baked right into the word is relativism centered on the speaker's axiomatic perception of themselves as the correct arbiters of "Goldilocks engineering." In other words, I would define "over-engineering" as "a descriptor indicating that the speaker doesn't fully understand the context of someone else's design decision, but knows they don't like what they do understand."

To give this a concretion, I spent a bunch of years doing a specialized form of management consulting that involved using static analysis to help enterprise IT leaders make decisions about codebases. In other words, I earned a living analyzing codebases and the decisions of the engineers who brought the codebase to its current (usually bad, since people never called me to tell me how great things were going) state.

This led me to find myself looking at a lot of codebases that had what most would probably agree was "over-engineered solutions." Here are some particularly fun ones:

  • A DTO code generation scheme that... also generated unit tests for those DTOs.
  • An application consisting of multiple "layers" of degenrative pass-through calls.
  • An interesting character that created a new flavor of MVC that he called "MVCD," where the "D" was his first initial.
  • A Winforms app that achieved "multi-tenancy" by generating every token in a SQL query with a complex stringbuilder scheme, tuning them with every token based on the logged in user.

The list goes on.

But here's the thing. "Over-engineering" is a judgement-assigning, dimestore root cause analysis that doesn't matter. Those designs had actual, tangible problems that had nothing to do with what the designer was (over) thinking:

  • Unit testing property bags has little, if any, regression detection capability for the cost.
  • Do-nothing application layers create maintenance overhead without any encapsulation upside.
  • New people onboarding to the team will be familiar with MVC, but not with "MVCD," so you're burning money on staff learning curve for no apparent reason.
  • That Winforms app took something like an average of 30 seconds to do anything that hit the databse.

So, I guess for me the tl;dr is "when cataloging issues with a codebase/design, and especially when communicating them, I try to stay away from personal taste and deal instead in cause/effect reasoning and tradeoffs being incurred by the design choice."

Collapse
 
pavelloz profile image
PaweΕ‚ Kowalski • Edited

I guess you heard that you overengineered stuff enough to dig yourself in a defense of it. That will be a tough one to defend, especially considering how often startups fail because they are polishing their kubernetes config and polishing CI instead of getting paying clients.

Example:
I can perfectly understand react app, but when i see business card-type of page done in react+redux, its overengineered. Period.
Even if I didnt understand it, i can still judge when someone is clearly using wrong tools for the job.

Collapse
 
daedtech profile image
Erik Dietrich • Edited

Period spelled out? Wow, you must be right.

I imagine that always settles the matter at code review for you, especially when you yell it. Glad you showed up to correct me!

(BTW, what you're describing -- speculatively adding unneeded functionality -- is called gold plating. People commonly use "over-engineering" to describe something else)

Thread Thread
 
pavelloz profile image
PaweΕ‚ Kowalski

Cool.

Collapse
 
alainvanhout profile image
Alain Van Hout

Overengeneering is when you add architectural complexity for a perceived (rather than actual) future need. The trick to avoid this, though it's by no means self-evident, is to leave open a path for future change, without already paving that path right now.

Collapse
 
adam_cyclones profile image
Adam Crockett πŸŒ€ • Edited

Anything for the future is not for the now so should be looked at with a sceptical eye.

I just spent 2 evenings on a personal project trying out different sub module and other strategies but in the end it all felt insane so I just stopped. No with that distraction out of the way I managed to refine my release scripts so that they at-least work.

Collapse
 
somedood profile image
Basti Ortiz

In my side projects, I know I've over-engineered when not even Git could save me from my spaghetti code... πŸ˜”

Collapse
 
ferricoxide profile image
Thomas H Jones II

Simply put, if a given "enhancement" requires more than a fractional- or even trivial-effort to implement but puts delivery timelines at risk for something that's likely not even in scope for the next major phase of the project, somebody's probably lost the ball.