Knowledge
Search knowledge... ⌘K
Knowledge · Anti-Patterns
Smell Divergent Change
Anti-pattern indicating need for refactoring
Tags
refactoring-fowlercode-smellmaintainability
Impact
One class is commonly changed in different ways for different reasons. Any change to handle a variation should change a single class, and all the typing in the new class should express the variation.
Symptoms
- Have to change multiple methods every time there's a new type of change
- Different reasons cause changes to different subsets of methods
- Class has multiple axes of change
Source
Martin Fowler — Refactoring: Improving the Design of Existing Code, 1st Edition (1999)