Slide 19
Slide 19 text
RANDOM REFACTORING
BY CLASS RENAMING
Select a random class
If it is not an entity or a value object
Add intention to the name if not exists
Extract new structures into new classes or methods
Go to line 1
1
2
3
4
5
That turns our big fat X_Manager into A_Remover, B_Provider,
C_Calculator, D_Creator, E_Validator. Now we can start to talk
about Single Responsibility Rule.
Developers hate creating classes with few lines. Even though
the majority know big fat classes need refactoring, they o!en
prefer few number of big fat classes over many small classes.
Here is a way of breaking this habit.