Tuesday, April 10, 2007

ABCs of good design

Good design and architecture has always been identified as a key requirement for a product to succeed in the long term.
But how how can you measure the quality of a design or identify the recipe to come up with the best design always?
These are not questions with easy answers, but help to illustrate the challenges in the area.

There have been many approaches to improve the quality of design in computer software over the course of time:

1. Functions & subroutines - This helped improve the design of monolithic programs by separating commonly used functionality into functions & subroutines. This improved the maintenance and reuse of code by having less duplication etc.

2. OOP - This was another major step forward in design in which we tried to model the objects in real world using classes having methods & properties. This was more natural to humans than working with procedures. eg. Rumbaugh & Booch.

3. CASE - 'Computer aided software engineering' evolved into excellent tools like Rational Rose which helped document the design using UML etc. This indirectly helped to improve the understanding of the system before implementation and added 'engineering' to software.

4. Design patterns - formalized the various constructs used to solve common problems, documented it, gave them names so that the language used to express the design is almost universal.

5. Agile development - uses evolving design approach based on user feedback using a working prototype. It assumes that the user knows what he really wants only when he uses it.

Still, can anyone claim that their design is perfect even if it uses all of the advancements in software design given above? It is probably why one of the comments posted earlier mentioned that you can never learn design from a book, rather it comes from experience and expertise in a variety of disciplines.


There is no secret pill to always come up with the best design, I don't claim to be an expert either but here are some of my thoughts that might help.

1. Identify the goals, requirements and the problem you are trying to solve correctly.Here is where mockups, prototypes and documentation help. If possible, share it with the target user to see if the solution is appropriate.

1. View the problem space and solution from different perspectives. eg. UML has various diagrams which help you do this. A better undestanding of what you are trying to build is always good.

2. Stick to basics and simple constructs. These will stand the test of time rather than the 'fad' of the time. Complexity in design helps nobody.

3. There will be always be related problems which have already been solved. Use the learning from them to improve or adapt your design. Don't try to reinvent everything.


The factors by which I usually evaluate a design are it's simplicity & extensibility. There are many others which are covered in related literature.

1. Simple - this is one of the most underrated features of a good design. If a design is not simple, it is usually not maintainable or extensible either. This is where bulk of your experience, intelligence & expertise in various disciplines come to play.

2. Extensible - this is also related to maintenance & readability which are all required for the design to stay relevant over a long time. The strength of a good design is often proven when the component or product can be easily adapted to un-planned scenarios.

3. Effective - it solves the problems it was meant to. ie. it doesn't fail to address the original requirements or loses sight of it's goals.

In the real world, it is not enough to have a good design to succeed. But it is always a good start!

No comments: