Test-Driven Development (Chinese Edition)

Author: (USA) Kent Beck
Publisher:
Publish Date: 2004-03-01
Features: Test-Driven Development (TDD) is a development methodology that controls concerns during the development process. I don't mean meaningless and unnecessary worries—(powwiddleprwogwammewneedsapacifiew)—but rather reasonable concerns. Whether a concern is reasonable is a very difficult question and cannot be determined from the beginning. If pain naturally says "Stop!", then concern naturally says "Be careful!". Imagine programming as turning a crank to lift a bucket of water from a well. If the bucket is small, then a freely rotating crank is sufficient. If the bucket is large and full of water, you will get tired before the bucket is fully lifted. You need a ratchet mechanism to ensure you can rest after each turn. The heavier the bucket, the closer the teeth of the ratchet. In Test-Driven Development, test cases are like the teeth of the ratchet. Once one of our test cases works, you know it will work from now on and forever. Compared to a test case failing, you are closer to making all test cases work. Now our task is to make the next test case work, then the next, and so on. Analysis shows that the harder the problem to be programmed, the smaller the scope each test should cover.

📌 Related Posts