November 2018
Intermediate to advanced
346 pages
8h 12m
English
At the interface and struct level, applying SRP results in many small interfaces. A function that complies with the SRP has few inputs and is quite short (that is, it has less than one screen of code). Both of these features inherently address the code bloat smells we mentioned in Chapter 1, Never Stop Aiming for Better.
By addressing the code bloat, we find that one of the less-advertised advantages of SRP is that it makes code easier to understand. Simply put, when a piece of code does one thing, its purpose is clearer.
When applying SRP to existing code, you will often break the code into smaller pieces. You may experience a natural aversion to this, due to the feeling that you might also then have ...
Read now
Unlock full access