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

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

    I'm a big fan of making lists!

    As soon as the urge takes you to re-write something - spend 10 minutes making a list of the things that need re-writing. Follow all of the alleys that take you further into the code that needs attention and list those, too.

    Hopefully within a relatively short space of time you'll have one of two things:

    • A really long list that completely puts you off wanting to rewrite anything ever again.
    • A list which actually isn't that long, so why not indulge yourself and go for a re-write?!

提交回复
热议问题