--- robots: noindex, nofollow tags: refactoring --- # 重構是什麼? ![](https://i.imgur.com/LDhn7HA.jpg) ![](https://i.imgur.com/ivdzbYg.jpg, =40%x40%) ## 名詞定義 出自於 Refactoring 2/E :::info Refactoring (noun): a change made to the internal structure of software to make it easier to understand and cheaper to modify without changing its observable behavior. ::: :::info Refactoring (verb): to restructure software by applying a series of refactorings without changing its observable behavior. ::: 出自於 Working Effectively with Legacy Code ![](https://i.imgur.com/TrprTBW.png) ## 常見迷思 - 一定需要用很多時間來重構。 - 重構會讓推出新功能的速度變慢。 - 重構會讓程式運行速度變慢。 - 重構過程中可以順便添加新功能。