|
Subject: Re: Theoretical basis of TDD? Newsgroups: gmane.comp.programming.extreme-programming Date: 2005-09-22 15:47:01 GMT (2 years, 50 weeks, 4 hours and 6 minutes ago) Yes, I probably knew all that, I certainly accept all that. What I'm pointing to is a logical fallacy: it is not the "writing the test code" that causes the desired effect, it is the "refactoring" that causes the desired effect. While TDD also contains the key refactoring step, other development methods also contain incremental code growth with refactoring, without the test-first code. Those also would show the desired end effect. A more correct statement would be something like "TDD and other incremental-growth-with-refactoring methods produce modular code etc etc." At which point one would shift the TDD portion of the statement to the end and say something like, "work with genetic algorithms hint that incremental-growth-with-refactoring methods produce modular code etc etc., and TDD is one of those such methods" --- In extremeprogramming <at> yahoogroups.com, Ron Jeffries <ronjeffries <at> X...> wrote: > On Thursday, September 22, 2005, at 10:30:59 AM, aacockburn wrote: > > > OK, ... it seems the basis for our little disagreement is how much we > > bundle into the phrase TDD. To my eyes, it is OAOO plus refactoring > > that causes the effects you're talking about, and the test-driven part > > is fairly irrelevant. My worry is that if you go around saying TDD > > generates this behavior, people will think it's the presence of a small > > test before coding that is the active ingredient, when really it's the > > refactoring after the code is written that is the active ingredient. > > > However, I can live with just marking an entry in my mental thesaurus. > > As far as I know, Kent Beck invented the phrase and wrote the > definitive book. He states clearly that refactoring is part of it. > For example, from the preface: > > In Test-Driven Development, we > * Write new code only if an automated test has failed > * Eliminate duplication > > and ... > > The two rules imply an order to the tasks of programming. > > 1. Red -- Write a little test ... > 2. Green -- Make the test work ... > 3. Refactor ... > > TDD without refactoring isn't TDD. It might be test-first. It's not > TDD as far as I can tell. > > Ron Jeffries > www.XProgramming.com > Curiosity is more powerful than skepticism. To Post a message, send it to: extremeprogramming <at> eGroups.com To Unsubscribe, send a blank message to: extremeprogramming-unsubscribe <at> eGroups.com ad-free courtesy of objectmentor.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/extremeprogramming/ <*> To unsubscribe from this group, send an email to: extremeprogramming-unsubscribe <at> yahoogroups.com <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/ |
|
|