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

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.

主站蜘蛛池模板: 务川| 绥化市| 饶平县| 陇西县| 黎平县| 都昌县| 长汀县| 蒲城县| 平武县| 海淀区| 宁武县| 五台县| 临湘市| 三门县| 桃源县| 赤峰市| 大荔县| 忻城县| 九江县| 开江县| 黑龙江省| 五台县| 浦北县| 北流市| 汽车| 红原县| 万源市| 林州市| 惠安县| 黄大仙区| 巢湖市| 潜江市| 江油市| 广水市| 依兰县| 杂多县| 石屏县| 武陟县| 马尔康县| 金门县| 贵溪市|