How to restrain one's self from the overwhelming urge to rewrite everything?

后端 未结 20 752
遥遥无期
遥遥无期 2021-01-30 12:50

Setup

Have you ever had the experience of going into a piece of code to make a seemingly simple change and then realizing that you\'ve just stepped into a wasteland tha

20条回答
  •  暖寄归人
    2021-01-30 13:45

    Just don't - The rabbit hole always goes too deep. Make any small local changes that leave the place cleaner than you found it, but leave big refactoring for when you're alert and have plenty of time to burn.

    A nice starter on tackling big refactorings in small stages at sourcemaking.com :

    you have to make like Hansel and Gretel and nibble around the edges, a little today, a little more tomorrow

提交回复
热议问题