This article is more than 1 year old

Telltale signs your model is stuck

Analysis paralysis: part two

Teams can get stuck wallowing in trivial details when modeling in UML. Sweating such details can lead to frustration and premature, and rash, decisions on using UML later in a project. But how do you know when a particular nuance is inconsequential and when it's an important item to specify?

You learn to recognize the signs of analysis paralysis - aside from the obvious one, that no progress is being made: the team is having a profound philosophical discussion around the whiteboard, and it has virtually nothing to do with the project, and virtually everything to do with splitting hairs. The line from the Gershwin classic on "tomato" versus "tom-ah-to" sums up these debates pretty well.

It's understandable that people spend ages arguing over the finer details, because most UML books describe each part of the notation with equal weight. You might see a description of dependencies between packages - not terribly important, except maybe as a high-level overview - right next to a description of relationships between classes.

One rule of thumb is: will it affect the source code that falls out of the end of the design process? If you use <<precedes>> instead of the <<invokes>> stereotype to link up your use cases, will the code - or the unit tests, or the test specs - be any different? Answer: Almost certainly not.

Similarly, modeling the dependencies between packages will have absolutely no effect whatsoever on the resultant source code. It's also debatable whether it would add any value to your documentation. However, modeling the relationships between classes definitely will affect the source code - especially if you're generating code directly from the model.

Another rule of thumb: is the distinction less about the semantics of your problem domain or design, and more about the semantics of the modeling language? If so, the distinction probably isn't an important one.

And finally: are you worrying about finer details at the wrong stage? For example, debating the multiplicity between domain objects before you've even begun to think about the design, or debating too early - when the domain model is only just emerging, all wide-eyed and blinking in its innocence, from the customer's subconscious - whether two real-world domain objects should be connected with aggregation or composition. When teams discuss this stuff too early, you end up with some deep discussions that border on philosophy and existentialism: is object A object B's keeper? If A pings out of existence, what happens to B? Is an A without its B really an A? And so on.

In the song, the tomato versus tom-ah-to impasse produces the exasperated cry of: "Let's call the whole thing off!". This is pretty much what people decide to do with UML after they have wasted time and effort getting into the not-very-important and extremely arcane aspects of modeling.

And that's a shame, because they miss out on all the useful, pragmatic aspects such as allocating behavior, eliminating ambiguity in your requirements descriptions, and identifying code "hot spots" ripe for unit and functional testing.

Analysis paralysis is an insidious beast that pounces when you have disagreements over issues that seem important and takes things off track. Keep an eye out for this creature's tell tale signs, and you'll quickly start to recognize when your project is spinning its wheels over non-issues.®

Matt Stephens has co-authored Use Case Driven Object Modeling with UML: Theory and Practice, which illustrates how to step nimbly from use cases to code while avoiding the dreaded analysis paralysis.

More about

TIP US OFF

Send us news


Other stories you might like