Posts Tagged ‘design principles’

7 Deadly Sins of Design

Friday, March 12th, 2010

Reproduced from a paper on object oriented principles by Arnon Rotem-Gal-Oz.

7 deadly design sins to avoid:

  1. 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.
  2. Fragility. Make it easy to break. Whenever you change something, something breaks.
  3. 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.
  4. 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).
  5. 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.
  6. Needless Repetition. The same code is scattered about which makes it error prone.
  7. Not doing any design.