- 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.
- 企業級Java EE架構設計精深實踐
- 零基礎玩轉區塊鏈
- 華為HMS生態與應用開發實戰
- Python Game Programming By Example
- 編譯系統透視:圖解編譯原理
- Getting Started with Eclipse Juno
- Visualforce Developer’s guide
- ASP.NET 4.0 Web程序設計
- 黑莓(BlackBerry)開發從入門到精通
- Python物理建模初學者指南(第2版)
- Wearable:Tech Projects with the Raspberry Pi Zero
- WCF編程(第2版)
- 大象:Thinking in UML(第二版)
- 精通Oracle 12c 數據庫管理
- JSP程序設計與案例教程