第一遍是:Clues For Reading New Code,网址如下
期间描述的所有的糟糕的情况我都正在经历,呵呵,no document, no test ,and so on, 因为没有test,所以重构势必会受到影响,最近我也正在寻找思路来梳理
这些代码,呵呵,我觉得从这些工作中应该可以积累一些重构的实际经验。
另一篇是: TDD on Three Index Cards ,网址如下:
http://blog.objectmentor.com/articles/2008/03/06/tdd-on-three-index-cards
在说 tdd 的三张卡片的时候又谈到了一个新名词,对我而言 BDD(Behavior-Driver Development) 。
官方网址为: http://behaviour-driven.org 。有兴趣的兄弟们搞一下吧。
重温了下 tdd 三条军规,上面三张卡片中的第一张,的确够简练,够经典 ~ en pass
Card 1: Uncle Bob’s Three Laws (Object Mentor)
Write no production code except to pass a failing test.
Write only enough of a test to demonstrate a failure.
Write only enough production code to pass the test.