tags:

views:

325

answers:

15

We have all seen this type of code. A calls B, which calls back A, which delegates to C which does a few difficult to understand tests and depending on results calls a single method of D with different parameters, which has a big switch block all of which do essentially similar but slightly different things. There is most likely some polymorphism involved, possibly with a factory creating handler instances and registering in a map but it always always ends in a static method with a huge switch block. The call graph looks like a cats cradle gone bad.

I am looking for an English phrase that describes this. If I were to coin one, I would say the code jumps more hoops then a monkey on a trapeze, but I am looking for something well known.

Any suggestions?

EDIT: Most if not all of the responses I got are geeky, technology related. What I am looking for is an English language phrase.

+6  A: 

spaghetti code?

Nir
Yes, that is quite well known. But I am looking for something in active voice :-)
Hemal Pandya
then how bout "The code is very reminiscent of an Italian restaurant - just without the sauce"
AviD
+5  A: 

In Hindi, we just call it Bhasad which may be literally translated to (Code)-chaos. ;-)

Cerebrus
Hadn't heard that expression before. Interesting.
Hemal Pandya
A: 
  • Big Ball of Mud
  • Code Smell
MrWiggles
+2  A: 

Cyclomatic complexity is "sort of" applicable, but is more technically precise - maybe that's what you want?

Cyclomatic complexity is a software metric (measurement). It was developed by Thomas J. McCabe in 1976 and is used to measure the complexity of a program. It directly measures the number of linearly independent paths through a program's source code.

But ultimately you're going to have to face the fact that you will never be able to properly express the horror to you're loved ones - they'll never realize the magnitude of f**ked up-ness that is the code you're working on. Some things are so bad that no word could capture it.

Steve B.
It is possible to write spaghetti code with not very high level of Cyclomatic Complexity, at least the kind I am thinking about, e.g. A has many methods, which look up registry and call a virtual method of some instance of B, all of which call a static method of C, with the Big Switch.
Hemal Pandya
+2  A: 

WTF

AviD
A: 

The best professional term that I can think of would be something along the lines of "excessively complex code." In most documents that I have seen, the code is either referred to as "spaghetti code" as mentioned in this first answer, or as having a "high cyclomatic complexity value" as referenced in this answer.

Rob
+3  A: 

byzantine: adj. Highly complicated; intricate and involved

recursive
A: 

In-Need-Of-Refractoring.

Chance
+1  A: 

There's more than one way to do it!

A: 

This program is a:

kludge. hack. bad. poor. attrocious.

You could just sigh.

johnny
A: 

"This code sucks."

Robert S.
+3  A: 

a solution inspired by Rube Goldberg?

Webjedi
Goldbergian? Goldbergesque?
R. Bemrose
Perhaps even a "Goldberg Abomination" for the musically inclined.
Jeff Sternal
Yes! Some reference to Rube Goldberg seems most appropriate, in terms of being understood by non-geek English speaking audience. But I don't get the music reference.
Hemal Pandya
A: 

I would say it is Fubar

Martin
A: 

I'd say the application is put together with electrical tape and bailing wire.

This means that it is easily broken if you try to modify the way the system works in it's exact, current incarnation.

Brad Barker
A: 

Depending on how common this type of code is in your company....

SNAFU - Situation Normal - All **cked Up

AviD