Tag Archives: Code Smells

Code Smells

At times it can be a challenge to figure out what’s wrong with an application or component. It’s just a nagging feeling in the back of your mind that something isn’t quite right.

For me, that’s a code smell.

Here are a few that I try to keep an eye out for and avoid at all costs in my development efforts.

  • Rigidity
  • Fragility
  • Immobility
  • Viscosity
  • Needless Complexity
  • Needless Repetition
  • Opacity

I strive for SOLID and DRY. Anything that violates those principles needs to be reviewed. Single-responsibility principle and Liskov substitution principle are biggies for me. Do one thing and do it really well. Wrap everything in an interface. Implementation details should always be hidden behind that interface.