35

I wonder what would be a good definition of term "over-engineering" as applied to software development. The expression seems to be used a lot during software design discussions often in conjunction with "excessive future-proofing" and it would be nice to nail down a more precise definition.

8
  • You probably should apply the 'subjective' tag to this. Jun 16, 2009 at 12:20
  • 26
    @abmv I don't agree at all. Questions on Software Development process are completely legitimate. Jun 16, 2009 at 12:23
  • 3
    See this question stackoverflow.com/questions/750112/…
    – Mark
    Jun 16, 2009 at 12:23
  • 23
    "Not related to programming"? Erm, software-design, anti-patterns and development-methods aren't "related to programming" ?
    – cwap
    Jun 16, 2009 at 12:24
  • 3
    SO, PLEASE, be tolerant to good questions like this one that's related to software development, although it's not a specific programming question!
    – Edwin Yip
    Sep 29, 2013 at 17:56

19 Answers 19

62

Contrary to most answers, I do not believe that "presently unneeded functionality" is over-engineering; or it is the least problematic form.

Like you said, the worst kind of over-engineering is usually committed in the name of future-proofing and extensibility - and achieves the exact opposite:

  • Empty layers of abstraction that are at best unnecessary and at worst restrict you to a narrow, inefficient use of the underlying API.
  • Code littered with designated "extension points" such as protected methods or components acquired via abstract factories - which all turn out to be not quite what you actually need when you do have to extend the functionality.
  • Making everything configurable to "avoid hard-coding", with the effect that there's more (complex, failure-prone) application logic in configuration files than in source code.
  • Over-genericizing: instead of implementing the (technically uninteresting) functional spec, the developer builds a (technically interesting) "business rule engine" that "executes" the specs themselves as supplied by business users. The net result is an interpreter for a proprietary (scripting or domain-specific) language that is usually horribly designed, has no tool support and is so hard to use that no business user could ever work with it.

The truth is that the design that is most easily adapted to new and changing requirements (and is thus the most future-proof and extensible) is the design that is as simple as possible.

3
  • 5
    Interesting thought that over-engineering can happen when one tries to find a technically interesting problem instead of just implementing something boring. Something to be cautious about I guess. Jun 16, 2009 at 13:02
  • 2
    I like the last paragraph!
    – Edwin Yip
    Sep 29, 2013 at 17:58
  • There are good ways to build a rules engine. At my last job, I replaced a bad engine with a better one. But you're right; what you described is exactly what happened with the first engine. Aug 13, 2021 at 14:10
33

Contrary to popular belief, over-engineering is really a phenomena that appears when engineers get "hubris" and think they understand the user.

I made a simple diagram to illustrate this:

Somewhat sarcastic illustration of over-engineering

3
  • 12
    Looks like a cancer.
    – Calmarius
    Jan 4, 2013 at 17:38
  • 3
    Nice illustration. What did you use to put that together if I may ask? Jul 6, 2015 at 12:29
  • 1
    image blurred and covered by photobucket logo for me
    – joel
    Oct 19, 2019 at 13:27
22

In the cases where we've considered things over engineered, it's always been describing software that has been designed to be so generic that it loses sight of the main task that it was initially designed to perform, and has therefore become not only hard to use, but fundimentally unintelligent.

1
  • This answer deserves notice. I think a heuristic standard is to check if an abstraction moves towards the requirements or elsewhere.
    – Seideun
    Apr 27, 2022 at 3:16
16

To me, over-engineering is including anything that you don't need and that you don't know you're going to need. If you catch yourself saying that a feature might be nice if the requirements change in a certain way, then you might be over-engineering. Basically, over-engineering is violating YAGNI.

11

The agile answer to this question is: every piece of code that does not contribute to the requested functionality.

8

There is this discussion at Joel on Software that starts with,

creating extensive class hierarchies for an imagined future problem that does not yet exist, is a kind of over-engineering, and is therefore, bad.

And, gets into a discussion with examples.

2
3

If you spend so much time thinking about the possible ramifications of a problem that you end up interfering with the solving of the problem itself, you may be over-engineering.

There's a fine balance between "best engineering practices" and "real world applicability". At some point you have to decide that even though a particular solution may not be as "pure" from an engineering standpoint as it could be, it will do the job.

For example:

If you are designing a user management system for one-time use at a high school reunion, you probably don't need to add support for incredibly long names, or funky character sets. Setting a reasonable maximum length and doing some basic sanitizing should be sufficient. On the other hand, if you're creating a system that will be deployed for hundreds of similar events, you might want to spend some more time on the problem.

It's all about the appropriate level of effort for the task at hand.

3

I'm afraid that a precise definition is probably not possible as it's highly dependent on the context. For example, it's much easier to over-engineer a web site that displays glittering ponies than it is a nuclear power plant control system. Redundancies, excessive error checking, highly instrumented logging facilities are all over-engineering for a glittering ponies app, but not for a nuclear power plant control system. I think the best you can do is have a feeling about when you are applying too much overhead to your features for the purpose of the application.

Note that I would distinguish between gold-plating and over-engineering. In my mind, gold-plating is creating features that weren't asked for and will never be used. Over-engineering is more about how much "safety" you build into the application either by coding checks around the code or using excessive design for a simple task.

2

This relates to my controversial programming opinion of "The simplest approach is always the best approach".

1

Quoting from here: "...Implement things when you actually need them, never when you just foresee that you need them."

2
  • 1
    Only please don't develop software for nuclear reactors with this philosophy in mind ;)
    – 0scar
    Jun 16, 2009 at 12:57
  • 1
    Point taken, but I would argue semantics here and say that you actually need just about every possible safeguard when it comes to software that could affect safety or health. Jun 16, 2009 at 13:02
1

To me it is anything that would add any more fat to the code. Meat would be any code that will do the job according to the spec and fat would be any code that would bloat the code in a way that it just adds more complexity. The programmer might have been expecting a future expansion of the functionality; but still it is fat.!

0

My rough definition would be 'Providing functionality that isnt needed to meet the requirements spec'

5
  • 1
    What is about unspoken requirements? They're often not in the spec, however need to be met to deliver a robust solution.
    – Vlad Gudim
    Jun 16, 2009 at 12:32
  • 1
    If they're unspoken how do you know when you've satisfied them? Jun 16, 2009 at 12:41
  • over engineering often begins at the requirements stage. I remember an SSADM project that generated around 5000 pages of requirement docs before a single line of code was even written. Jun 16, 2009 at 12:49
  • @Visage, that's a very good question. Usually through User Acceptance Testing, although it's way too late. Agile suggests a solution in the way of short iterations and heavy user involvement.
    – Vlad Gudim
    Jun 16, 2009 at 13:40
  • But how does the user acceptance tester know what the criteria are for passing the tests? Agile isnt a substitute for requirements. Jun 16, 2009 at 14:23
0

I think they are the same as Gold plating and being hit by the Golden hammer :)

Basically, you can sit down and spent too much time trying to make a perfect design, without ever writing some code to check out how it works. Any agile method will tell you not to do all your design up-front, and to just create chunks of design, implement it, reiterate over it, re-design, go again, etc...

0

Over-engeneering means architecting and designing the applcation with more components than it really should have according to the requirements list.

There is a big difference between over-engeneering and creating an extensible applcaiton, that can be upgraded as reqirements change. If I can think of an example i'll edit the post.

0

Over-engineering is simply creating a product with greater functionality, quality, generality, extensibility, documentation, or any other aspect than is required.

Of course, you may have requirements outside a specific project -- for example, if you forsee doing future similar applications, then you might have additional requirements for extendability, dependent on cost, that you add on to the project specific requirements.

0

When your design actually makes things more complex instead of simplifying things, you’re overengineering.

More on this at:

http://www.codesimplicity.com/post/what-is-overengineering/

0

Disclaimer #1: I am a big-picture BA. I know no code. I read this site all the time. This is my first post.

Funny I was just told by my boss that I over-engineered a new software produce we're planning for mentoring (target market HR people). So I came here to look up the term.

They want to get something in place to sell now, re-purposing existing tools. I can't help but sit back and think, fewer signups, lower retention, if it doesn't allow some of the flexibility we talked about. And mainly, have a highly visual UI that a monkey could use.

He said we could plan future phases to improve the product, especially the UI. We have current customers waiting on "future improvements" that we still aren't doing. They need it though, truly need it.

I am in the process of resigning so I didn't push back.

But my definition would be.............making sure it only does as little as possible, for as cheap as possible, and still be passable for the thing you say it is. Beyond that is over engineering.

Disclaimer #2: This site helped me land my next job implementing a more configurable software.

-1

I think the best answers to your question can be found in this other qestion

1
  • this should be a comment no?
    – joel
    Oct 19, 2019 at 13:33
-1

The beauty of Agile programming is that it's hard to over engineer if you do it right.

3
  • 1
    But you can end up with a massively over engineered test suite :) (ducks for cover) Jun 16, 2009 at 12:44
  • If you write a manifesto defining what's "right" and what's "wrong" and then follow it, then yes, it's probably pretty hard do do something "wrong".
    – 0scar
    Jun 16, 2009 at 13:09
  • @0scar: that's the point with Agile: you define what is right. :) Jun 19, 2009 at 15:11

Not the answer you're looking for? Browse other questions tagged or ask your own question.