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

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.

主站蜘蛛池模板: 保康县| 克拉玛依市| 辰溪县| 和政县| 合江县| 金寨县| 尖扎县| 瑞安市| 宾川县| 马鞍山市| 罗定市| 尖扎县| 深泽县| 盐城市| 长沙县| 双桥区| 富川| 德惠市| 孟津县| 永顺县| 万州区| 屯昌县| 西宁市| 惠来县| 监利县| 吉木乃县| 临西县| 民乐县| 新津县| 齐齐哈尔市| 平遥县| 三门县| 新津县| 宁德市| 顺义区| 雷州市| 颍上县| 辽宁省| 黔西| 永兴县| 广水市|