Sam Newman's site, a Consultant at ThoughtWorks

In an uncharacteristically expletive-light post, Hani talks about the difficulty of defining what good design is:

So what’s the acid test for a good design? I have no idea. The closest I could come up with is A good design allows your code to do things you never expected it to have to do.

I dislike this definition for a few reasons – at least one of which Hani himself touches on:

It’s not about ‘oh I’ll add an interface here so I can plop in different implementations’ when there’s no sane reason you’d ever need more than one implementation, for example.

That is to say using Hani’s definition as a maxim for what makes good design could lead to designs which violate the ever sensible YAGNI principle.

First and foremost, a good design needs to make it easy to do what you are doing right now. There is no point having a design to support future (potential) requirements which makes your current work a pain to do. YAGNI follows from this principle. Second it needs to be easy to change. This can come from having small, loosly coupled, highly-cohesive code. Both of these things require a design that is easy to understand – not just in the sense of “Can I understand the code?” but in terms of all members of the team being able to share a mental picture of the same design.

Good design is inherently contextual. Design that is good today, might not be good for tomorrow. But if your design (which inevitably means your code) is easy to change, it can be made good again.


4 Responses to “What is good design?”

  1. Lee

    __allows your code to do things you never expected it to have to do__

    I’d say Hani is way off with this one, and agree with you. The only way a design can exceed expectations in this way is if it has been over engineered, and there is no guarantee that what has been implemented will work for the new usage, because it hasn’t been designed with this usage in mind.

  2. Brian McCallister

    I think he captured the correct gist of good design, though. A good design enables uses which were never envisioned or planned for. It is an “open” design which enables things, rather than allows the initial requirements to be fulfilled. Damned hard to capture in words =)

  3. Sam Newman

    I think the _spirit_ of what Hani was trying to say is that the design accomodates unforseen requirements by being *flexible* – I simplified this by saying *easy to change* as the word flexible can mean many different things to many different people. I’ve often seen apparently highly configurable/highly flexible systems that were complex – perhaps getting a happy medium between flexibility and simplicity is key.

    If a design is easy to change it kind of follows that it’s flexible (please note that by “change” I don’t mean “configure” – too often highly configurable systems seem to be a result of abdication of responsibility on the part of the developer).

  4. Nick Drew

    Yah – good design. Hmmm – you remind me of my optician testing out lenses: “Better or worse”, he’d say, and try another lens. “Better or worse”. The best lens was the one which ALLOWED ME TO SEE PROPERLY. Was it a good design for a lens? Maybe not for you.

    A good design ( in a technical sense ) is a pretty simple concept. Its the blueprint for something that emerges from a good design process.

    What’s a good design process? It’s where you set up a set of constraints, and morph something until it satisfies those constraints. You consider options, and evaluate each option against your constraints. Where two designs are equivalent, you create a new constraint that allows you to choose between them.

    I say “in a technical sense”, because sometimes I use the term in as if it had some tangible manifestation: “Love the chair, great design”. I may mean its elegant, or stands out, or whatever. But some of those chairs are just plain uncomfortable to sit on.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Basic HTML is allowed. Your email address will not be published.

Subscribe to this comment feed via RSS

%d bloggers like this: