Sunday 22 February 2009

Bad Code Smells

"Have a look at this application and identify where we need to / better do refactoring"

Apart from understanding refactoring techniques, understanding code smells help identify where you need to apply the refactoring techniques. Main code smells are given below:
  • Duplicated Code.
  • Long Method.
  • Large Class.
  • Long Parameter List.
  • Divergent Change.
  • Shotgun Surgery.
  • Feature Envy.
  • Data Clumps.
  • Primitive Obsession.
  • Switch Statements.
  • Parallel Inheritance Hierarchies.
  • Lazy Class.
  • Speculative Generality.
  • Temporary Field.
  • Message Chains.
  • Middle Man.
  • Inappropriate Intimacy.
  • Alternative Classes with Different
  • Interfaces.
  • Incomplete Library Class.
  • Data Class.
  • Refused Bequest.
  • Comments.
More info:

No comments: