Feeds

Hafta Man and the threat to agile design

Pragmatism, not grand plans

The next step in data security

This bloke once walked into a meeting I was attending and introduced a new word to my vocabulary: "Hafta", as in: "We hafta do it this way because..."

I've been trying to shake it off ever since.

Hafta is really a design mindset - albeit an especially poor one. Broadly speaking there are three attitudes to design:

1. We hafta do it this way because...

2. Wouldn't it be great, if it could work this way...

3. My grand design is just getting started!

These represent three successive plateaus, with number two really being the sweet spot.

The hafta mindset usually leads to compromises and decaying designs. It's a defeatist attitude disguised as pragmatism. This mindset is easy to spot in the wild. Explanations such as: "Yeah well we have to do it like this, because the Trade Blotter team's client API demands X,Y and Z..." are usually accompanied by an apologetic shrug of the shoulders and a wan smile.

If your team just keeps falling back on haftas and rationalizations, you'll inevitably end up with an architecture that's built on compromises and is difficult to extend or modify, stuck with ancient APIs, hampered by duplicate data across several databases, and handicapped by disparate systems reinventing each others' wheels using incompatible data formats or protocols. That sort of thing.

Onto the next plateau. The "wouldn't it be great, if" attitude is the agile mindset, and is the ideal to strive for. But you'll hear people rubbish this approach because they confuse "ideal" with "idealistic". That is, they'll tell you that spending more time getting it right is just making the project take longer. But not spending that time will result in all the problems I just described.

With this mindset, teams refuse to compromise. They'll thrash out the details until they have an optimal solution, even if it means rapping on the partition of the Trade Blotter team and demanding a rethink of their crappy client API.

With this approach, the overall system evolves into a thing of great quality, devoid of the warts and boils that afflict the hafta teams. New functions are easy to add on because different parts of the project work well together. Duplicate functionality, meanwhile, is stomped out before it can take old.

If your team adopts this mindset, you'll often hear them mentioning maintainability and figuring out how the system can be improved with each new feature. They'll also be geared towards providing value to the business rather than just checking out the latest enterprise design pattern.

That brings me to the final plateau - the "grand design" that soars several hundred meters higher than the others. Anyone who's suffered through too many Discovery Channel pieces about explorers wandering up Everest, becoming disoriented and getting in trouble will be familiar with the facts that at such giddy heights there exists virtually no oxygen. Peoples' thinking turns cloudy and judgment impaired. Yet teams so often seem to push their design way up to this great height of vision.

The "grand design" mindset is the antipattern. It's basically number two on our list taken too far, and is a lurking danger of the refactoring state of mind. Picture a pluggable framework that only ever has one plug. The framework is there "in case we need it later", but is really just more complexity to maintain. It's incredibly easy for well-meaning developers to fall into this trap.

I'll delve deeper into the grand design mindset next time.

It's surprising how often a team falls into the first mindset, because they think they're being pragmatic and how often a team dismisses the second because they mistakenly think it's ivory tower. It's also surprising how often a team falls into the trap of striving for the grand design, because they think they're saving their project.

Learning to spot these attitudes and acting on them, though, can turn out to be a real project saver.®

Matt Stephens co-authored Use Case Driven Object Modeling with UML: Theory and Practice, which illustrates how to create the ideal - rather than idealistic - software design with Enterprise Architect, Spring Framework and JUnit.

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
'People have forgotten just how late the first iPhone arrived ...'
Plus: 'Google's IDEALISM is an injudicious justification for inappropriate biz practices'
Mathematica hits the Web
Wolfram embraces the cloud, promies private cloud cut of its number-cruncher
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
Not appy with your Chromebook? Well now it can run Android apps
Google offers beta of tricky OS-inside-OS tech
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.