by gridspy · 4y ago · 0 comments
I concur. Refactoring should be as much about removing unneeded abstraction and features as it is about adding same.
> there is little incentive or bonuses for improving the situation.
Yeah, I just can't seem to believe this in my soul. I just want to fix ugly code and can't stop myself. I get huge satisfaction from speeding up, tidying up or fixing up bad code.
It doesn't help when management wants to minimize time spent on such tidy-up, especially when it's hurting our productivity to maintain it without fixing it.
1. Figure out what needs doing and what code you need to use
2. Refactor the code you're using until the new code or change is easy
3. Make the change
4. Tidy and document.
Repeat
I often also document during step 1, while I am trying to understand code and realise that comments are missing.