Martin Fowler's Refactorings

This diagram represents the Bad Smells which can occur in object-oriented code. Those are the grey items on the left.

The green lines link the smells to recommended refactorings, like the blue "Extract Method" item. So the point of this graphic is to give you some ideas about how to improve your code when you realise your code smells.

Instructions

  1. Tap or move the mouse on to one of the grey items (what Martin calls "Bad Smells"). Icons pop up.
  2. Tap or click on the top left icon to show ONLY the (differently coloured) refactoring items which explain what to do to relieve that smell.
  3. Tap or click on a refactoring. You see a short description of that refactoring in the light blue box above the diagram.
  4. Or click on the arrow icon to open a longer description on Martin's own website. (This is shown in a new browser window or tag.) These longer descriptions are from the 2nd edition of the book and use JavaScript.
  5. When you click on a refactoring, you see which smells it can fix.
  6. To show all the items again, click on any item's 2nd icon .

Click a smell or a refactoring to see its description here.

Colour legend: