Simberon Design Minute
 

Fragility

One sign that your code is experiencing code rot is when you experience fragility. Fragility is the tendency for a system to break when changes are made to it or when new code is added. In a fragile system, you keep playing whack a mole with bugs. When you fix one bug, three more pop up. Any changes you make are likely to cause problems of some sort. Fragile systems are very difficult to deal with. If you are experiencing fragility, the first thing you should do is make sure you have a comprehensive test suite that verifies that the system is working correctly. Next, you have to locate the root cause of the fragility and fix it. This can be a difficult task. Inheritance often causes fragility. If it does, try replacing inheritance with delegation. The more you can reduce fragility in your system, the easier it will be to enhance the software.

Download