Take a break
Language
English
Kent Beck, on his book Test-Driven Development by Example, lists some patterns for TDD. One of these patterns strongly advices to take regular breaks.
It goes like this:
If you know a straight-forward, clear and easy way to solve a simple problem expressed in terms of a test, then implement this obvious solution.
If you don't know how to solve it, then fake the solution in a manner that will make the test pass.
If you still don't have a clear design to solve the problem, then add a second example to the test. This is called triangulation, and will demand a more general solution than the fake one.
If at this point you still don't know how to solve the problem, then go and take a shower, and stay in the shower until you find the solution.
However, his final advice is that "If you find yourself caffeine-addicted and making no progress whatsoever, then perhaps you shouldn't take quite so many breaks. In the meantime, take a walk". I'll take my walk right now :)
Category:
- Bitácora de elopio
- Log in or register to post comments