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

后端 未结 20 723
遥遥无期
遥遥无期 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:34

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

    Become old*

    As this has happened to me, I've gradually lost the urge to rewrite everything. Why?

    • Once you've done it a few times, you realise that you often end up worse off than you started.
    • Even if you're god's gift to programming and your brilliant rewrite introduces no new bugs, you'll simply fail to notice or implement about 30% of the small edge-case features/bugs which things rely on. This will cost you months in fixing
    • Nothing wears down your irrational exuberance like time. Often this is a sad loss, but in this case, it's a win.

    *(more experience may also be a suitable substitute if you lack the free time to become old)

提交回复
热议问题