Feeds

Why UML won't save your project

Modelling a badly thought-out project just doesn't help...

High performance access to file storage

The project's been wobbling along for 18 months. A bottle of champagne just went to the tester who logged the one millionth bug in TestDirector (and everybody cheered), the lead programmer looks like a raccoon that's discovered a departed junkie's heroin stash buried beneath a tree, half the programmers have quit, and the customer believes everything's fine... Although it does strike him as odd that all he's seen so far are static screenshots and Gantt charts with every single task stuck at "90 per cent". The project's in trouble.

head shot of Matt Stephens smilingSo what does the team do? They've read the IBM/Rational marketing blurb, so they firmly believe that they can "do UML" on their project and that this'll have a miraculous effect on the bug-riddled codebase. It's this vague desire to start doing the right thing in order to save the project that can sink a team even further into the swamp.

When a project is in trouble because of a lack of initial analysis/design thought, the worst thing to do is to stop everything and start modelling the whole sorry mess in a CASE tool. It seems reasonable to want to create a clear picture of where you're at: a level playing field from which to start fixing the design. But muddy water poured into a crystal flute is still muddy water. Now you've got the same dysfunctional mudball in two places - the code and the UML model. Great.

It's also tempting to automatically reverse-engineer the code into class diagrams using a modelling tool. This might have an unseen benefit in that it'll shock whoever sees the resultant diagrams into realising just how bad the problem has gotten, but the diagrams themselves will be as scary as the code they're modelled on, a jumble of criss-crossed lines and teeny-tiny overlapping boxes that could rival anything in the Tate Modern.

I'm a great fan of UML, but like any tool or language it can be misused horribly – and usually is, because people start to use it for the wrong reasons, e.g. to do the thinking for them or make their team cleverer.

The right time for drawing diagrams is near the start of the project (or new feature, or weekly/monthly development sprint) when you do a little collaborative modelling with the whole team involved and figure out how it'll all fit together.

So it's worth emphasising: the solution is not to start modelling the existing illogical codebase in UML. However, do map out your ideal new improved design, unfettered by the constraints and design dead-ends of the current system. But the first thing to do (assuming you can't just scrap it all and start over) is cover the existing code with unit tests so you can begin refactoring your way to the new design.

But even before that, you must know what it is you're actually designing. Start with the basic questions: Who's the project for? What problems is it addressing? If you're feeling especially virtuous today, map out some use cases and try to drive the new design from them. Don't be afraid to come up with something very different from what you currently have.

UML used at the right time and in the right way can work wonders - it'll set the foundations for a successful, well factored project. But, to adapt Frederick Brooks' famous law about the perils of adding resources to a late project, stopping to map out the bad design on a late project will just make the project later.

Matt Stephens co-authored Use Case Driven Object Modeling with UML: Theory and Practice and Agile Development with the ICONIX Process.

High performance access to file storage

More from The Register

next story
Windows 8.1, which you probably haven't upgraded to yet, ALREADY OBSOLETE
Pre-Update versions of new Windows version will no longer support patches
Android engineer: We DIDN'T copy Apple OR follow Samsung's orders
Veep testifies for Samsung during Apple patent trial
OpenSSL Heartbleed: Bloody nose for open-source bleeding hearts
Bloke behind the cockup says not enough people are helping crucial crypto project
Microsoft lobs pre-release Windows Phone 8.1 at devs who dare
App makers can load it before anyone else, but if they do they're stuck with it
Half of Twitter's 'active users' are SILENT STALKERS
Nearly 50% have NEVER tweeted a word
Windows XP still has 27 per cent market share on its deathbed
Windows 7 making some gains on XP Death Day
Internet-of-stuff startup dumps NoSQL for ... SQL?
NoSQL taste great at first but lacks proper nutrients, says startup cloud whiz
US taxman blows Win XP deadline, must now spend millions on custom support
Gov't IT likened to 'a Model T with a lot of things on top of it'
prev story

Whitepapers

Mainstay ROI - Does application security pay?
In this whitepaper learn how you and your enterprise might benefit from better software security.
Five 3D headsets to be won!
We were so impressed by the Durovis Dive headset we’ve asked the company to give some away to Reg readers.
3 Big data security analytics techniques
Applying these Big Data security analytics techniques can help you make your business safer by detecting attacks early, before significant damage is done.
The benefits of software based PBX
Why you should break free from your proprietary PBX and how to leverage your existing server hardware.
Mobile application security study
Download this report to see the alarming realities regarding the sheer number of applications vulnerable to attack, as well as the most common and easily addressable vulnerability errors.