- Mastering React Test:Driven Development
- Daniel Irvine
- 181字
- 2021-06-24 14:45:03
Refactoring your work
The next step of the TDD cycle is to refactor your work. This step is often the hardest, because our natural impulse can be to get straight into the next feature. Chasing green, as I like to call it: building more and more functionality is much more exciting. Refactoring, however, is much more zen.
The rule "more haste; less speed" applies to coding, just as in many other areas of life. If you skip the refactoring phase, your code quality will deteriorate. If you develop a habit of skipping refactoring, your code base will soon become difficult to work with.
It takes a lot of personal discipline to consistently refactor, but you will reap the rewards of a code base that remains maintainable as it ages.
Right now, we have some repeated code between our two tests. Let's fix that.
- Learning Cython Programming
- Visual Studio 2012 Cookbook
- Building Cross-Platform Desktop Applications with Electron
- Learning Firefox OS Application Development
- TypeScript實戰指南
- Python編程:從入門到實踐
- Kotlin從基礎到實戰
- Python深度學習:基于TensorFlow
- 運用后端技術處理業務邏輯(藍橋杯軟件大賽培訓教材-Java方向)
- Getting Started with Hazelcast(Second Edition)
- 深入剖析Java虛擬機:源碼剖析與實例詳解(基礎卷)
- UML2面向對象分析與設計(第2版)
- C++程序設計教程(第2版)
- WordPress Search Engine Optimization(Second Edition)
- Yii2 By Example