views:

635

answers:

18

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.

A: 

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

soulmerge
+5  A: 

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.

nik
Here's is another one on over engineering of frameworks:http://discuss.joelonsoftware.com/default.asp?joel.3.219431.12
yx
+1  A: 

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

Visage
What is about unspoken requirements? They're often not in the spec, however need to be met to deliver a robust solution.
Totophil
If they're unspoken how do you know when you've satisfied them?
Visage
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.
Noel Walters
@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.
Totophil
But how does the user acceptance tester know what the criteria are for passing the tests?Agile isnt a substitute for requirements.
Visage
A: 

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

cwap
+10  A: 

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.

darasd
A: 

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

JosephStyons
Only please don't develop software for nuclear reactors with this philosophy in mind ;)
0scar
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.
JosephStyons
+1  A: 

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

Kees de Kooter
+6  A: 

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.

Bill the Lizard
A: 

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

Andrew Sledge
But you can end up with a massively over engineered test suite :) (ducks for cover)
Noel Walters
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
@0scar: that's the point with Agile: you define what is right. :)
Andrew Sledge
A: 

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.

AlexDrenea
+1  A: 

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.

sangretu
+1  A: 

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.

tvanfosson
A: 

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

CodeMedic
+11  A: 

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.

Michael Borgwardt
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.
Fabian Steeg
A: 

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.

Larry Watanabe
+4  A: 
0scar
A: 

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

Brad C