Most of you have probably been through this list of smells to refactoring. In Recent refactoring sessions I discovered a new (at least unusually new) way to identify "hot-spot" needing refactoring.
This might be in turn related to some other smells (like most of them), but here it is:
- A (set of) source file with significantly more revisions compared to it's dependencies demands refactoring.
The obvious question here is why?
- Number of revisions for a source file indicate that it is being modified more frequently than it should. There can be many reasons why a source file is being modified among:
- Imperative requirements change or
- A source file that tries to do so much than it should
A source file trying to do more than it could is always a problem and is generally perceived as 'God module', it's time to slice it down.
So next time you feel like hunting for bad code, look at the revisions and you will have hint where to start. Good hunting.
PS: Note that I've deliberately generalized this to 'source files' and not the configurations.
No comments:
Post a Comment