I absolutely agree that TDD is more related with the design process than simple testing. As "uncle Bob" wrote in his PPP book:
"The act of writing a unit test is more an act of design than of verification." IMO a good dissertation about the true nature of TDD can be found here: http://www.drdobbs.com/tdd-is-about-design-not-testing/229218691 By other hand, another obvious difference between testing (not necessarily TDD) and debugging is that the first one can be easily automated, though debugging requires manual operation. Rafael Luque 2013/6/6 Dennis Schetinin <[email protected]> > TDD is not about tests (as a bug-finding/debugger tool) at all. And the > anti-regression feature of TDD is just the secondary one. > > First of all, TDD is about structuring thinking/creation process. And > "test" here is a tool that allows and makes developer to formalize > requirements and to translate them to the language they will be implemented > in. This starts and really drives coding. Thus, a programmer that really > masters TDD (really means an ability to apply "pure" TDD for all > programming activities: both top-down and bottom-up design activities) is > expected to produce much better architecture/design/code. > > … So, I don't think TDD is somehow obsolete by Smalltalk. Vice versa, TDD > should be really efficient here. And it's a great pity TDD is not actually > popular in Smalltalk society. One of the dire consequences is that modern > Smalltalk environments are not "TDD-oriented" and don't advantage from good > TDD methodology. > > … Yea, that's just one of my pet peeves :) > > > > -- > > Best regards, > > > Dennis Schetinin > > > 2013/6/6 kilon <[email protected]> > >> I dont think a debugger can ever replace TDD for two reason >> >> a) Tests are faster way to find bugs that don't want to be found ;) >> >> b) Tests are more than debugging tools >> >> (A) If you have already created a large suite of tests then all it takes >> is >> to fire those tests and just wait for the result to come out. Much fastert >> than going one by one bug. Also I dont know if the same applies for >> smalltalk but when i was coding for python not all code was executed and >> so >> I did not see all the bugs my code contains. So I had to test the app >> myself >> in many diffirent ways and I quickly found out that writing tests was way >> faster in the long run. >> >> (B) tests also make sure that your code behaves the way you want to behave >> and produces the result you want to produce. It may not be a bug per se, >> just a weird behavior. They also set a design pattern for your code to >> follow in the future. >> >> Generally speaking I use TDD for long code or code that is going to be >> maintained in the long run and get larger and larger. I think in that >> scenario TDD really excells. TDD is very popular in python, its part of >> the >> main library cpython(unittesting.py) comes with and there is also a third >> party library called "Nose" that even offer more features. >> >> I think TDD helps you keep your sanity in the long run especially with >> big >> projects and complex code. >> >> Debuggers are more like microscopes while i see TDD more like Satelites on >> orbit. ;) >> >> >> >> >> >> >> >> -- >> View this message in context: >> http://forum.world.st/Pharo-dev-Necessity-of-TDD-with-Smalltalk-tp4691867p4691929.html >> Sent from the Pharo Smalltalk Developers mailing list archive at >> Nabble.com. >> >> >
