Feeds

Why simplicity starts with design

Four top tips

3 Big data security analytics techniques

I was talking with a fellow IT professional recently who was saying that you should "program simply" but "design with complexity". I do understand the point that he was trying to make - that is, during the design stage take into account the problems in your domain so that these have been worked out as much as possible before the coding starts.

In many ways this is sound advice as otherwise a solution may be proposed that is inappropriate, inefficient or impossible to implement. However, if this is taken to the extreme, then the design may take on the importance of the final deliverable in the minds of the designers. It may also become complex enough to be worthless!

Last time time I argued to "Keep it Simple Stupid", or KISS, with regard to software implementation. However, it is not just the software that needs to maintain its simplicity - it is also the design. That is not to say the design will be simplistic but rather that it should be as simple as it can be in order to fulfill its requirements.

This in itself sounds straight forward, but consider what I have said here: that the design should be "as simple as it can be in order to fulfill its requirements" - that is a slightly odd phrase. What I am trying to get at is that the design should be no more complex than is needed to help to understand how the software will need to be constructed.

This differs from the requirements of the software itself. Remember, a design is an abstraction of the software that will be written - it is not the software itself. At the end of the day, it should not be as complex as that software - it's a simplified representation of it.

Clear models in any Java-oriented design process, modeling is a key element. An overly complex model may actually be less useful than a simple model anyway. Why? Because a complex model, with a large number of classes, objects, relationships and use cases may actually obscure the meaning originally intended. Worse, the density of elements in the model may actually mean that developers get "model overload" and switch off.

If this happens, then the formal model may be forgotten and developers will work from their own interpretation of the requirements. This may result in the production of an implicit design, which is no more than a set of mental models.

So, how can simplicity in design be achieved? Here are some practices that I believe can help:

Don't try to test designs

As I have said above, a design is an abstraction of the software to be implemented. As such it is not possible to test a design to check its completeness, its suitability or to validate its functionality. So we should not attempt to do so. If we need to validate part of a design then prototypes can be built. If we need to explore some complex concept then a proof-of-concept implementation can be created. We should not pretend that a design is something that can ever be as all encompassing or complete as the resulting software. Instead the test should be: "Is it fit for purpose?" If it passes this test, then it has met its goals.

Use the simplest tools

Tools are another area in modeling that people get hung up on. Some modeling tools tend to promote the creation of large complex models - this may be to do with the modelers creating models for their own sake. However, the use of a dedicated, and isolated modeling tool tends to help promote this. Personally I am a big fan of tools such as Omondo - the Eclipse plug-in that can create models from Java source code and source code from Java models. I like such tools because they are lightweight, do not get in the way of the modeling process and tend to restrict the creation of very large, and potentially meaningless, models.

Use Patterns gently

Design patterns are good things, yes? Not always. Due to their very nature, if a design includes a number of interacting design patterns the end result may become, at best, complex and, at worse, opaque and potentially useless. However, I sometimes wonder whether some designers try and show how clever they are by producing complex designs that encompass numerous design patterns. As Scott Ambler has said: "Use design patterns gently!"

Design with others

Of course most designers do not start out with the aim of producing overly complex designs and models. Actually achieving simplicity in design is a much harder thing to succeed at, than to strive for. One way to keep things simple is by designing with others. In my experience this tends to help to things stay focussed, to ensure that the designs remain meaningful and that they are as clear as possible given the application. It is essentially the design equivalent of XP's LINK pair programming.

Summary

In conclusion, it is important to note that I am not advocating simple design, but rather the goal should be to aim for the simplest design that fulfils its purpose. Thus we should aim for simplicity in design just as we should in actual implementation.®

SANS - Survey on application security programs

More from The Register

next story
Android engineer: We DIDN'T copy Apple OR follow Samsung's orders
Veep testifies for Samsung during Apple patent trial
This time it's 'Personal': new Office 365 sub covers just two devices
Redmond also brings Office into Google's back yard
Batten down the hatches, Ubuntu 14.04 LTS due in TWO DAYS
Admins dab straining server brows in advance of Trusty Tahr's long-term support landing
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
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
Microsoft TIER SMEAR changes app prices whether devs ask or not
Some go up, some go down, Redmond goes silent
Red Hat to ship RHEL 7 release candidate with a taste of container tech
Grab 'near-final' version of next Enterprise Linux next week
prev story

Whitepapers

Designing a defence for mobile apps
In this whitepaper learn the various considerations for defending mobile applications; from the mobile application architecture itself to the myriad testing technologies needed to properly assess mobile applications risk.
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.
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.
The benefits of software based PBX
Why you should break free from your proprietary PBX and how to leverage your existing server hardware.
Securing web applications made simple and scalable
In this whitepaper learn how automated security testing can provide a simple and scalable way to protect your web applications.