Agile Design

As I have already mentioned in a previous post, I purchased and are currently reading the book “Agile Software Development Principles, Patterns and Practices” by Robert C. Martin. I am about to start reading section 2 titled “Agile Design”.

The author lists the following seven symptoms of poor design which on their own are very important to observe (I believe they are called code smells):

Symptom Description
Rigidity The design is hard to change.
Fragility The design is easy to break.
Immobility The design is hard to reuse.
Viscosity The design does not lend itself to do the right thing.
Needless Complexity Overdesign.
Needless Repetition Mouse abuse.
Opacity Disorganized expression.

Each of the symptoms is covered in detail in the following chapters in the book. At this time I am going to take a stab interpreting them based on my experience. I will revisit each symptom as needed after reading each associated chapter.

Rigidity According to the Oxford dictionary the word is defined as unable to bend or be forced out of shape; not flexible. When an architecture, design, class or method is not flexible, it makes it hard to use and extend. This leads to additional artifacts and not a coherent implementation.

Fragility The Merriam-Webster dictionary defines the term as easily broken or destroyed; constitutionally delicate. Delicate code is difficult to use. One must invoke it in the way it was intended and deviations will cause in exceptions or worse yet, incorrect results.

Immobility The Collins dictionary defines it as not moving; motionless; not able to move or be moved; fixed. The design fits one and only one approach and attempts to modify other uses casting it back to an original test case. One could think of this as a slightly different instance of rigidity.

Viscosity According to the Merriam-Webster dictionary the term is defined as the quality or state of being viscous; the property of resistance to flow in a fluid or semifluid. The design does not flow with the intended use. Developers need to adapt it for most test cases (stories).

Needless Complexity The Oxford dictionary defines complexity as consisting of many different and connected parts; not easy to analyze or understand; complicated or intricate. Overdesign does not seem to come to mind. It has been stated that junior developers tend to come up with complex solutions while senior peers tend to come up with simple solutions. Designs should always follow the KISS (Keep It Short and Simple) rule. A complex design takes too not relevant conditions into consideration instead of concentrating on what is actually expected of it.

Needless Repetition The Oxford dictionary defines repetition as the action of repeating something that has already been said or written. My immediate thought is refactoring. The design needs to be simplified to reduce the same or similar approaches when dealing with slightly different uses. In addition, we would be able to use some object design patterns to avoid it.

Opacity The Merriam-Webster dictionary defines the word as obscurity of sense; the quality or state of being mentally obtuse. The design as a whole or some of it parts is not simple to follow and use. The design needs to be made transparent for developers and users. It seems like it might need application of the KISS rule.

Given that there are seven smells, the book should identify them explicitly and without overlaps.

I have been architecting, designing and implementing software for several decades. It always takes effort and dedication from team members to produce software that is a pleasure to use, extend and maintain.

If you have initial comments or suggestions regarding this or any other post in this blog, please do not hesitate and send me an email message with your thoughts. I will keep your name in confidence unless you explicitly tell me the contrary.


Follow me on Twitter: @john_canessa

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.