Software design is blueprint of the system. We design systems based on requirements. It rarely happens that the requirements we get does not change.So, design also keeps changing with the requirements.

It becomes very difficult to keep the sanity of design with the changing requirement, if not handled carefully. After sometime it becomes very difficult to maintain the basic feature of good design like maintainability, extensibility, re-usability, minimal complexity etc. and the

Robert C. Martin defines this problem as design smells. He defined some basic characteristics of design smells, which we could find in the designs which become rotten.

Rigidity
Whenever a design becomes difficult to change, we should know that the design is going into or already in bad shape. A design is rigid if a single change causes a cascade of subsequent changes in dependent modules. The more modules that must be changed, the more rigid the design.

Fragility
Fragility is the tendency of a program to break in many places when a single change is made. It happens that the new problems occur in the area which has nothing to do with the code piece which was changed. Fixing those problems leads to even more problems. As the fragility of a module increases, the likelihood that a change will introduce unexpected problems approaches certainty. This seems absurd, but such modules are not at all uncommon.

Immobility
A design is immobile when it contains parts that could be useful in other systems, but the effort and risk involved with separating those parts from the original system are too great. This is an unfortunate but very common occurrence.

Viscosity
Whenever you are going to change a piece of software and you find more than one way to change, it means the design is exhibiting Viscosity. Some of the ways preserve the design; others do not. Viscosity comes in two forms: viscosity of the software and viscosity of the environment.

When the design-preserving methods are more difficult to use than the hacks, the viscosity of the design is high. It becomes easy to do the wrong thing but difficult to do the right thing.

Viscosity of environment comes about when the development environment is slow and inefficient. For example, if compile times are very long, developers will be tempted to make changes that don’t force large recompiles, even though those changes don’t preserve the design. If the source code control system requires hours to check in just a few files, developers will be tempted to make changes that require as few check-ins as possible, regardless of whether the design is preserved. In both cases, a viscous project is one in which the design of the software is difficult to preserve. We want to create systems and project environments that make it easy to preserve and improve the design.

Needless Complexity
Many times in developers add features in the anticipation of future requirements. These changes they do just for the future requirements or unforeseen scenarios.

A design smells of needless complexity when it contains elements that aren’t currently useful. At first these things look good for the flexibility of the system, but these changes actually add needless complexities to the system

Needless Repetition
As the title suggests, it usually happens in the system, same piece of code lies in more than one place. This may be because of simple copy paste habit and reduce the maintainability and bugs found in these needless repetitions require fixing in every place. And most commonly the fixes vary in different places because the repeated code has been changed as per the requirements in all different places.

Leave a comment