Refactor Code Smells
Martin Fowler, in his excellent and groundbreaking book, Refactoring: Improving the Design of Existing Code, creates a categorization and terminology for many refactors. We will not dive into this too much since it's covered in his book. Terminology is often disregarded, but it plays an important role in communicating effectively. In the following table, we list the most common refactors we can use to remove particular code smells. The refactors in this table are also taken from Fowler's book:
Figure 7.2: Refactor code smells
BLO – Bloater, CHP – Change preventer, COU – Coupler, DIS – Dispensable, OOA – Object Orientation Abuser
For those interested in a deeper dive into the world of refactoring, see the web links and books in the Resources section of this lesson.