Top 10 Design Guidelines for building good software solutions

I have been building software solutions and systems for a while now. The following rules should be obvious to any programmer but more so for programmers who build typical enterprise systems.
These are sort of high-level guidelines more than hard-and-fast recommendations. As always experience will be the best teacher.
Here are the guidelines in no particular order:

0) Accept the fact that you will have to change or modify your design a few times and keep it Flexible. Design does not end when coding begins. Use an iterative approach.
If your final product after coding matches your very initial design exactly – either you are working on some fairly small product OR you have not found the issues yet.

1) Always document key assumptions that you make while designing any component. Implicit and out-of-date assumptions cause a lot of troubles down the road.

2) Keep it simple – do not devise complicated or fancy solutions unless there is no other way to meet requirements –
Good code IS NOT Fancy code; Good code IS Simple to Maintain Code; Good Code IS Easy to Understand Code;
This is the so called KISS principle. Over-engineered design is almost impossible to remedy and can add a great deal of dead weight that can sink any effort.

3a) You will almost never have to think up a solution from scratch. A little bit of research can save you a lot of trial and error. Google is your friend.
3b) If you use any code or libraries you find online make sure you consider the licensing aspects first.

4) Java specific – Favor Object Composition over Inheritance – Deep nested hierarchies are often a sign of design gone haywire (sometimes necessary but often avoidable).

5) Think about Program structure at Run-time and not just Compile time. How do the objects interact with each other at run-time? Do you understand it well?

6) Non-functional requirements can make or break a project – ALWAYS keep things like Performance, Memory utilization, Database impact, Threading Issues, etc in mind while going thru the design process.

7) Make sure you are aware of common Design Patterns and understand the context that they can be used in.
Gang-Of-Four design patterns such as Factory Methods, Mediators, Facades, Iterators and Singletons often will be the solution that you are looking for, they appear all over the place pretty frequently.
Many Java/J2EE patterns will also make your design process less prone to error by giving you pre-tested solutions. At the same time avoid pattern overuse.

8 ) Think of ways to test your components at design time. Very often, thinking about how some feature will be tested, will actually help you design it.
There are full-blown methodologies such as Test Driven Design/development that depend on this principle. A strong test suite saves you lots of grief while debugging.

9) Design to an Interface never to an Implementation. Try to minimize dependencies on specific implementation details of Objects in your code. Remember that internal implementation details of Objects are subject to change without notice.

10) Collaborate with others on the team and Have fun while doing it :).
Design by mandate is recipe for failure. Design by committee is the other extreme and equally bad but Design by collaboration produces great results.

Advertisements

0 Responses to “Top 10 Design Guidelines for building good software solutions”



  1. Leave a Comment

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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




Suprgeek Tweeting

Error: Twitter did not respond. Please wait a few minutes and refresh this page.


%d bloggers like this: