官术网_书友最值得收藏!

Refactor

During the green step, you write just enough code to make all the tests pass again. As I just mentioned, it doesn't matter what the code looks like in the green step. In the refactor step, you should improve the code. You remove duplication, extract common values, and so on. Do what is needed to make the code as good as possible. The tests help you to not break already implemented features while refactoring.

Don't skip this step. Always try to think how you can improve the code after you have implemented a feature. Doing so helps to keep the code clean and maintainable. This ensures that it is always in good shape.

As you have written only a few lines of code since the last refactor step, the changes needed to make the code clean shouldn't take much time.

主站蜘蛛池模板: 三原县| 门头沟区| 泰来县| 石门县| 崇文区| 凤阳县| 英山县| 永吉县| 东至县| 高州市| 大埔县| 临洮县| 万盛区| 濉溪县| 瓦房店市| 八宿县| 甘洛县| 阜新| 临桂县| 扎赉特旗| 临泉县| 富蕴县| 平邑县| 南康市| 海林市| 弥勒县| 晋宁县| 荆门市| 苍梧县| 塘沽区| 乐安县| 高阳县| 福海县| 陇川县| 长垣县| 宁海县| 南乐县| 阿合奇县| 扶风县| 武山县| 岑巩县|