Feeds

Why UML won't save your project

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

The next step in data security

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.

Security for virtualized datacentres

More from The Register

next story
New 'Cosmos' browser surfs the net by TXT alone
No data plan? No WiFi? No worries ... except sluggish download speed
'Windows 9' LEAK: Microsoft's playing catchup with Linux
Multiple desktops and live tiles in restored Start button star in new vids
iOS 8 release: WebGL now runs everywhere. Hurrah for 3D graphics!
HTML 5's pretty neat ... when your browser supports it
Mathematica hits the Web
Wolfram embraces the cloud, promies private cloud cut of its number-cruncher
Google extends app refund window to two hours
You now have 120 minutes to finish that game instead of 15
Mozilla shutters Labs, tells nobody it's been dead for five months
Staffer's blog reveals all as projects languish on GitHub
SUSE Linux owner Attachmate gobbled by Micro Focus for $2.3bn
Merger will lead to mainframe and COBOL powerhouse
iOS 8 Healthkit gets a bug SO Apple KILLS it. That's real healthcare!
Not fit for purpose on day of launch, says Cupertino
Profitless Twitter: We're looking to raise $1.5... yes, billion
We'll spend the dosh on transactions, biz stuff 'n' sh*t
prev story

Whitepapers

Secure remote control for conventional and virtual desktops
Balancing user privacy and privileged access, in accordance with compliance frameworks and legislation. Evaluating any potential remote control choice.
WIN a very cool portable ZX Spectrum
Win a one-off portable Spectrum built by legendary hardware hacker Ben Heck
Intelligent flash storage arrays
Tegile Intelligent Storage Arrays with IntelliFlash helps IT boost storage utilization and effciency while delivering unmatched storage savings and performance.
High Performance for All
While HPC is not new, it has traditionally been seen as a specialist area – is it now geared up to meet more mainstream requirements?
Beginner's guide to SSL certificates
De-mystify the technology involved and give you the information you need to make the best decision when considering your online security options.