tag:blogger.com,1999:blog-15558048.post5332666292691533228..comments2023-10-12T09:10:31.269-04:00Comments on Modern Software Development Fun: Test first != TDDAnonymoushttp://www.blogger.com/profile/10695648911502574065noreply@blogger.comBlogger5125tag:blogger.com,1999:blog-15558048.post-68243308986488454922011-12-09T18:31:05.530-05:002011-12-09T18:31:05.530-05:00@anonymous, thanks for the correction:)@anonymous, thanks for the correction:)Anonymoushttps://www.blogger.com/profile/10695648911502574065noreply@blogger.comtag:blogger.com,1999:blog-15558048.post-38498420489386558942011-12-09T18:30:01.088-05:002011-12-09T18:30:01.088-05:00@Paul and James, thank you both for the comments. ...@Paul and James, thank you both for the comments. <br /><br />@Paul your definition of TDD is exactly I am trying to argue against in this entry. TDD is not about test coverage. The test mentioned in the article does not provide any value to any potential refactoring. <br /><br />@James, version control tells you code is changed, this test does very little more than that. I am not sure I understand your reason why that logger isn't a good example. Can you be more specific? Thanks!Anonymoushttps://www.blogger.com/profile/10695648911502574065noreply@blogger.comtag:blogger.com,1999:blog-15558048.post-87141195644726738722011-12-09T09:36:54.953-05:002011-12-09T09:36:54.953-05:00"wah lah" is usually spelled "voilĂ ..."wah lah" is usually spelled "voilĂ ". It's french :)Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-15558048.post-65077481230568352472011-12-09T08:12:59.487-05:002011-12-09T08:12:59.487-05:00@Paul - Regarding test value the idea is that test...@Paul - Regarding test value the idea is that tests carry both a cost and a value. If the value doesn't exceed the cost then it's net negative and shouldn't exist.<br /><br />@Kai - I disagree with the comment "That's what version control is for.". This sorta echo's what Paul is saying....version control doesn't tell you that the code was broken. I just think the logger isn't the best example because you could use a fake there to avoid having to assert the fine grained interactions with a mock.Jameshttps://www.blogger.com/profile/03823299769438459491noreply@blogger.comtag:blogger.com,1999:blog-15558048.post-91111044119202187772011-12-09T05:31:50.981-05:002011-12-09T05:31:50.981-05:00I think I agree with what you are trying to say, b...I think I agree with what you are trying to say, but your post is quite hard to follow. TDD is test first, the refactor step is only optional if needed; you don't refactor until you need to. But you're right in that your test continues to validate your refactoring whether it happens today or the future. You also say that somebody doing "real" TDD would not write the logger test you document. IMO I'd say that they aren't doing TDD at that point because there is no test validating the code or expected behaviour. Tests with little value are still better than no tests - they allow you to refactor the tests into something that over time provides more and more value (and are less brittle)Paul Hadfieldhttps://www.blogger.com/profile/07627705298347359480noreply@blogger.com