17

how often did this happen to you?

- fix a bug
- think, now that i'm here, let's smuggle in some refactoring, just this aspect, won't take too long
- spend more than half a day refactoring, finally finding yourself entangled in a spaghetti nightmare
- stash / shelve and revert all your refactoring changes
- continue on your other tasks and talk to noone about it ._.

Comments
  • 3
    *spanks your arse*

    You do not smuggle in some refactoring.

    Do the refactoring after the bug was fixed and was pushed to production.

    ... Or assuring it is cherry pickable.
  • 3
    Too many times to know better and create a clear separation btwn the bugfix commits and refactoring commits
  • 2
    i committed the bugfix first and then wanted to do some refactoring, i meant "smuggling in" in terms of "i tell management i'm still working on the bugfix" 😅
  • 2
    All the time, but I usually end up with a refactoring that involves 50 files and at least 4 distinct goals in the monorepo.
  • 1
    Sounds like you refactor wrong. It’s not refactoring if the code is not in working state at all times and it’s not backed by tests that can verify it. I work with a very bad spaghetti legacy monster, but refactoring has never given me any headaches, as it should not. If you are confused about how to refactor efficiently, read Fowler’s book on it. Highly recommended.
  • 0
    @100110111 thanks for the hint, will check this out!
Add Comment