On 2013-06-20 20:44, Walter Bright wrote:
Uncle Bob's 3 laws of TDD:
1. You are not allowed to write any production code unless it is to make
a failing unit test pass.
2. You are not allowed to write any more of a unit test than is
sufficient to fail; and compilation failures are failures.
3. You are not allowed to write any more production code than is
sufficient to pass the one failing unit test.
http://butunclebob.com/ArticleS.UncleBob.TheThreeRulesOfTdd
Your procedure is much more reasonable, but I suspect the latter is more
"principled" TDD, although it is fairly absurd as it implies a complete
lack of understanding or design, and was what I was referring to.
I don't care about Uncle Bob. I say use your common sense.
And, btw, your lexer example of TDD is exactly what I think is wrong
with TDD.
I never write those dummy implementation, I really don't see the point.
--
/Jacob Carlborg