Class definition π
The name of a class should describe what responsibilities it does .
In fact, naming is probably the first way of helping determine class size.
If we cannot derive a concise name for a class, then itβs likely too large.
The more ambiguous the class name, the more likely it has too many responsibilities.
#CleanCode #Class
The name of a class should describe what responsibilities it does .
In fact, naming is probably the first way of helping determine class size.
If we cannot derive a concise name for a class, then itβs likely too large.
The more ambiguous the class name, the more likely it has too many responsibilities.
#CleanCode #Class
Classes Should Be Small βοΈ
The first rule of classes is that they should be small .
The second rule of classes is that they should be smaller than that .
Our immediate question is always βHow smallβ β
With functions we measured size by counting physical lines .
With classes we use a different measure .
We count responsibilities .
#Cleancode #Class
The first rule of classes is that they should be small .
The second rule of classes is that they should be smaller than that .
Our immediate question is always βHow smallβ β
With functions we measured size by counting physical lines .
With classes we use a different measure .
We count responsibilities .
#Cleancode #Class