How often should you refactor?

前端 未结 25 2285
耶瑟儿~
耶瑟儿~ 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条回答
  •  不思量自难忘°
    2020-12-13 02:06

    As the book says, You refactor when

    • you add some code... a new feature
    • when you fix a bug / defect
    • when you do a code-review with multiple people
    • when you find yourself duplicating something for the third time.. 3 strikes rule

提交回复
热议问题