2 ms·
I have also noticed that the improvement possible in one refactoring pass is quite significant, but still limited. Somehow, I do a lot of refactoring. I notice
by ahartmetz 3y ago
I have also noticed that the improvement possible in one refactoring pass is quite significant, but still limited.
Somehow, I do a lot of refactoring. I noticed that I am unable to improve code by more than two notches of quality in a single refactoring pass. If it's very bad and the end result must be very good (it happens rarely to never that both are true), I need to come back to the code after a year or so and have another go. To understand the original code, I need to get "into its logic", and that understanding, as well as eagerness to fix the worst problems right away, somehow prevent improvements that involve a completely different approach.
The only way to make improvements larger than that is when I've already seen a very good way to handle a similar enough problem to the code in question.
Making a lot of progress in refactoring is even harder for code I have written myself because I understand the original reasoning behind things a little too well. Getting out of that trap probably requires a good amount of external input and / or a particular mental flexibility. I assume that Bill Atkinson had these.