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

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.

主站蜘蛛池模板: 巫山县| 福泉市| 大庆市| 青冈县| 墨脱县| 温州市| 秦安县| 景德镇市| 富平县| 舟山市| 夹江县| 丽水市| 南江县| 平乡县| 资溪县| 县级市| 新泰市| 玉溪市| 阜城县| 洞头县| 盖州市| 方正县| 盘山县| 郑州市| 河池市| 青州市| 上高县| 威远县| 南昌县| 连云港市| 卫辉市| 永丰县| 三门县| 朝阳县| 蓬莱市| 贵德县| 荥阳市| 关岭| 旺苍县| 普兰店市| 聂荣县|