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, e.g. the blue "Extract Method" item. The purpose of this graphic is to give you some ideas about how to improve your code when you notice your code is difficult to understand or maintain.

Instructions

  1. Tap or click on one of the grey items (what Martin calls "Bad Smells"). You see a short description of that smell in the light blue box above the diagram. And icons pop up smell popup icon.
  2. Click on the top icon Hide Again icon to show ONLY the (differently coloured) refactoring items which explain what to do to relieve that smell.
  3. Click on a refactoring. You see a short description of that refactoring in the light blue box above the diagram. And the popup appears.
  4. You can click on the arrow icon Link icon to open a longer description on an archived version of Martin's own website. (This is shown in a new browser window or tab.) These descriptions are from the 1st edition of the book which uses Java.
  5. When you click Hide Again icon on a refactoring, you see which smells it can fix.
  6. To show all the items again, click on any item's bottom icon Revoke Hide icon.
  7. The green arrows represent solutions to smells which Martin describes explicitly. Others are of course possible.

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

The name of the aspect which currently determines the colours of the items