How often should you refactor?

前端 未结 25 2326
耶瑟儿~
耶瑟儿~ 2020-12-13 01:36

I had a discussion a few weeks back with some co-workers on refactoring, and I seem to be in a minority that believes \"Refactor early, refactor often\" is a good approach t

25条回答
  •  旧时难觅i
    2020-12-13 02:14

    Absolutely as soon as it seems expedient. If you don't the pain builds up.

    Since switching to Squeak (which I now seem to mention every post) I've realised that lots of design questions during prototyping fall away because refactoring is really easy in that environment. To be honest, if you don't have an environment where refactoring is basically painless, I recommend that you try squeak just to know what it can be like.

提交回复
热议问题