Reproduced from a paper on object oriented principles by Arnon Rotem-Gal-Oz.
7 deadly design sins to avoid:
- Rigidity. Make it hard to change, especially if changes might result in ripple effects or when you don’t know what will happen when you make changes.
- Fragility. Make it easy to break. Whenever you change something, something breaks.
- Immobility. Make it hard to reuse. When something is coupled to everything it uses. When you try to take a piece of code (class etc.) it takes all of its dependencies with it.
- Viscosity. Make it hard to do the right thing. There are usually several ways to work with a design. Viscosity happens when it is hard to work with the design the way the designer intended to. The results are tricks and workarounds that, many times, have unexpected outcomes (esp. if the design is also fragile).
- Needless Complexity. Over design. When you overdo it; e.g. the “Swiss-Army knife” antipattern. A class that tries to anticipate every possible need. Another example is applying too many patterns to a simple problem etc.
- Needless Repetition. The same code is scattered about which makes it error prone.
- Not doing any design.