3 ms·
The flip side of that is that refactoring can be a surprisingly effective tool for understanding.
by codeflo 5y ago
The flip side of that is that refactoring can be a surprisingly effective tool for understanding.
- hn_go_brrrrr 5y agoSometimes by breaking prod. You learn what you didn't understand very quickly then.
- sorokod 5y agoA non prod breaking scenario I have seen - only towards the end of a fairly long refactoring exercise, when tests for certain edge cases start failing, you finally understand the full purpose of the code you are refactoring.
- hn_go_brrrrr 5y agoNot to fall into the obvious trope too much, but: Your legacy code has tests for edge cases? I'm happy when it has any tests. More often, it's untested and I write the tests myself before refactoring the implementation.