<< Post Comments | Home | Testy Development >>

TDD or POUT

posted @ Thursday, January 31, 2008 5:41 PM

pouty boy Because Unit Testing is the plain-Jane progenitor of Test Driven Development, it’s kind of unfair that it doesn’t have an acronym of its own. After all, it’s hard to get programmer types to pay attention if they don’t have some obscure jargon to bandy about. UT is too awkward, besides being a state abbreviation in the U.S., so for this post (and, if it catches on, future posts as well) I’ll borrow from the telco folks and call unit testing Plain Old Unit Testing.

The Best of all Possible Worlds

Part of my problem with TDD has been that it claims to provide complete testing. You see, even if this is true, it runs up against my gut feeling that worse is better when it comes to unit testing. Or, to throw in yet another development aphorism, it is my suspicion that unit testing lies squarely in the realm of the 80/20 rule—80% of the value of unit testing comes from 20% of your unit tests.

While it is functionally impossible to know in advance exactly which 20% of your unit tests will be important later on down the line, that doesn’t mean that we’re throwing darts at a board. Experienced developers can make pretty good guesses about what the problem areas are likely to be. And they’re pretty good about developing unit tests that cover those problem areas.

Which is my way of saying (or restating, really) that number of tests is no more important to me than number of lines of code as a measurement of value in programming.

Crossing the Beams

I think some of the confusion with TDD discussions is that TDD is an intensified version of POUT. Both POUT and TDD use unit tests. Both do so as part of a process. Both are concerned with future maintenance and functionality. The primary substantive difference is that TDD writes the unit tests before developing anything else.

Unfortunately, the popularity of TDD followed the widespread use of POUT very closely. This hurts because we never had a chance to get comfortable with POUT on its own before TDD appeared on the scene. Indeed, many people went from no POUT (or just beginning to learn) straight into TDD.

What that means in practical terms is that we have a tough time separating the value of POUT from the value of TDD. Few people have done both thoroughly enough to judge them based on this relatively singular point of differentiation. The inability to distinguish or track the value of each separately lies at the heart of much of the cross-talk surrounding TDD and TDD evangelism. Indeed, many of the testimonials I’ve seen (including many comments on a prior post) seem to assume that without TDD, no testing is done at all.

Those of us who are happy with POUT (and looking at the extra effort needed for TDD with some distaste) are left wondering what TDD offers us that we don’t already have. We don’t want some hogwash about forcing us to do our job. We see the value of testing and have learned to take time out for POUT (Oh. There’s a slogan that you can paste up on your very own office wall "Time out for POUT!" Remember you read it here first.). Frankly, it seems to me that we’re getting the goodies the TDD folk go on about just fine and without having to retrain how we develop.

A Call for Differentiation

So here’s my request for those of you who are using and enjoying TDD who want to invite us all to partake of its superior benefits: please couch your arguments in the assumption that I am already POUTing, that my POUTing already delivers substantial benefit, and that adopting TDD is a non-trivial training and practice burden. Thank you.

Technorati Tags: ,,,

Comments

  1. david fauber

    Posted on: 1/31/2008 6:24 PM

    # re: TDD or POUT

    TDD was kind of natural evolution from POUT (I actually had to google this) for me. I think this was at least in part because for larger problems my former methodology of stubbing in a lot of code was not holding up well, but writing tests instead was much more resilient while still letting me get the full idea expressed in code.

    I agree with you on the 80/20 part. Sometimes I feel it becomes a little gratuitous adding in some methods that I just know are to simple to be required, but for me I get the slippery slope feeling when I start lopping things off. I do draw the line at writing tests that I feel are too contrived, though, and am still not sold on the value of mocking frameworks.

  2. Jeremy

    Posted on: 1/31/2008 8:17 PM

    # re: TDD or POUT

    Just plain old unit testing vs TDD isn't an apples to apples comparison. TDD is first and foremost a *design* technique.

    Yes, absolutely. Unit testing after the fact is much better than not unit testing at all. No argument.

    If you've done any reading whatsoever, you know the pro-TDD arguments are that you actually write the tests and that the code is actually testable. TDD, and the thorough test coverage, does a lot to make evolutionary design possible. You can't refactor safely without tests. If you can't refactor, your first design has to be right on the money.

    More positives:

    - Faster feedback. You know the code works faster

    - The code tends to come out with far better cohesion and coupling (and remember that coupling means more than just an interface between you and something else)

    - Being able to work and design one thing at a time. You can know that a piece at a time works and turn your back on it to focus on other things.




    "Part of my problem with TDD has been that it claims to provide complete testing"

    Where are you getting this? TDD advocates have spent years trying to debunk this idea that TDD is all about testing. One of the primary reasons that BDD is taking off is just to remove the fixation on the word "Test"

    Can I ask? What experience do you really have with TDD? I know you think you're being persecuted by some sort of imaginary DI mafia, but that's not the whole story of TDD by any means.

  3. Dave^2

    Posted on: 1/31/2008 9:02 PM

    # re: TDD or POUT

    Was going to leave a big comment but see that Jeremy already addressed my main points.

    TDD is all about design, and as a nice side effect you get some POUTs :)

  4. Jacob

    Posted on: 2/1/2008 10:19 AM

    # re: TDD or POUT

    @Jeremy: Thanks for dropping by and leaving some good comments from the "other side".

    Refactor ready code is important as I've said a couple of times in the past (even calling it the key skill for an in-house developer). But TDD isn't the real requirement for easy refactoring, is it? Frankly, unit tests, while extremely valuable in refactoring, aren't required either. Being able to refactor competently is a primary skill set for any non-Jr. level programmer. One of the reasons unit tests have caught on as they have is their use in easing refactoring concerns. I just don't buy that TDD makes it easier to refactor. If you are designing refactor-able code and you have unit tests where you need them, when you wrote the tests isn't a material concern.

    Thorough testing: The thing is POUT is as capable of providing "thorough" test coverage as TDD is. And it's this refrain of "TDD is thorough" that leads people to translate TDD's claims into "claims to provide complete testing". You see, because I and other POUTers know that POUT provides thorough testing, we read the claims of TDD's superiority in this regards as touting superfluous test coverage--i.e. complete testing.

    Faster feedback: meh. If you are doing iterative development with POUT, your feedback loop is just fine. You'd have to make the case for why any faster feedback provides additional benefit over current practices. Both TDD and POUT have to compile and run both code and test together before you "know your code works". If I wanted faster feedback I'd write my POUT sooner.

    Cohesion and coupling: tends to? Please see my request re: forcing us to do our job. I don't have problems with my cohesion or coupling. If I did, I'd correct them whether I was using TDD or not.

    Focus: see above. Just because I use POUT doesn't mean that I have to wait for the end of a project to create my unit tests. If I know something is going to be an important factor in later development, I'll make sure the unit tests are in place before I get there. Frankly, I make sure the unit tests are in place before moving on to the next section/task/piece anyway. Again, POUT does just fine in the hands of a competent developer and TDD provides zero advantage here.

    Your final comment worries me because it comes across as rather dismissive. I'm not sure you meant it that way, but that's how it comes across when we know in advance that we're in different camps (at least on this issue). Asking if I have any experience with TDD implies that without that experience I'm not competent to evaluate TDD tenets and make reasonable judgements about them. I reject that implication outright. I've said in prior posts that I'm reluctant to "gain the experience" before I've seen a reason to believe I'll receive benefit from it. That case hasn't been made to my satisfaction yet. And your "imaginary DI mafia" first implies that I'm delusional (imagining things) and then puts me in a straw man outfit (I've never said anything that implies "mafianess" about the DI crowd).

    Now that you mention it, though, I've been very pleased with the TDD discussions. They've been mostly without the heat surrounding DI and the TDD advocates who have dropped by have made substantive points without resorting to cheap tricks or rhetorical dead-ends.

  5. Jacob

    Posted on: 2/1/2008 10:22 AM

    # re: TDD or POUT

    @David: I get the slippery slope argument. That's kind of at the heart of "worse is better", though. As Jeremy has said here, TDD doesn't actually claim "complete" unit testing so you're already on the slope...

  6. Adron

    Posted on: 2/3/2008 1:39 AM

    # re: TDD or POUT

    Once again another great post that has made round table discussion among us beer drinking software types. :)

    Gratz on such well written blog entries. I've got to work up some better material in the future... I feel outclassed. Keep up the kick ass work!

  7. JD

    Posted on: 2/3/2008 1:44 AM

    # re: TDD or POUT

    Hey Jacob. I've read your last three TDD posts, and I've been very unimpressed with your objectivity. For starters, you never really acknowledged Jeremy's question about where your comment "Part of my problem with TDD has been that it claims to provide complete testing" comes from. You acknowledge the untruth of the statement in a reply to another comment, but in an extremely oblique way. That you’d even include such a glaring straw man reveals your inability to remain intellectually honest on this subject.

    I also found your defensive reply to Jeremy about your TDD experience very revealing. You said "Asking if I have any experience with TDD implies that without that experience I'm not competent to evaluate TDD tenets and make reasonable judgments about them. I reject that implication outright. I've said in prior posts that I'm reluctant to "gain the experience" before I've seen a reason to believe I'll receive benefit from it." The sheer unwillingness to try after emitting so much rhetoric on the subject is the very definition of zealotry and smacks of further intellectual dishonesty. TDD isn’t a body snatcher--you won’t start howling and pointing at your friends and family if you try it.

    I'd be interested to know if you took a similarly rigorous research-oriented approach to arrive at your current methodology, or if it's more experience-based than your critiques of TDD would have your readers believe.

    I have a problem with another part of your entry: “What that means in practical terms is that we have a tough time separating the value of POUT from the value of TDD. Few people have done both thoroughly enough to judge them based on this relatively singular point of differentiation.” It’s as if you’ve completely forgotten the 23 TDD studies mentioned by Hakan Erdogmus in a comment to which you replied in an earlier blog entry. Perhaps you’ve read the other 22 and the text I’ve just quoted is very informed, but in case you’ve only read the one by Erdogmus, et al., how on earth do you arrive at your conclusion?

    I also have a problem with your closing statement:

    “So here’s my request for those of you who are using and enjoying TDD who want to invite us all to partake of its superior benefits: please couch your arguments in the assumption that I am already POUTing, that my POUTing already delivers substantial benefit, and that adopting TDD is a non-trivial training and practice burden. Thank you.”

    I guess there’s no further need for argument, and we should all consider the matter closed--especially since your assumptions about TDD and of your own benefit potential couldn’t *possibly* be flawed!

    In all seriousness, you’re smart enough to know that methodologies are religious in nature. By simultaneously crapping on good studies about the subject and then insisting that people only pursue intellectual discourse under your restrictive rhetorical terms paints you as part of the problem--just another zealot in the "methodology wars".

  8. Jacob

    Posted on: 2/4/2008 2:27 PM

    # re: TDD or POUT

    @Adron: Thanks for the encouragement! I really appreciate it.

    @JD: Let me just point out that you aren't doing your cause any good here, JD. Stomping in and insulting me may have the virtue of representing your honest feelings, but it does little to further the discussion or encourage rational response in return. I thought my response to Jeremy's comment above was thorough enough to stand on its own so I won't bother repeating my arguments. As for having an obligation to try something that's new, I will simply disagree with your characterization. I have no obligation to try TDD. Anything new carries the burden of convincing people it is worth their efforts to adopt. TDD is no different. All developers have constrained resources and I am no different. I am going to use those resources as carefully as I can. Since TDD is a relatively major remapping of how you develop software, the hit will be both lengthy and intrusive. In order to spend the resources to take that hit, I want to have an idea of what I'll get in return. There's a risk/reward calculation here and for me, I don't have confidence that the eventual reward is worth the resource risk.

    And yes, I take a similar approach to all my software practices--which practices I am happy to re-evaluate. I have no investment other than time (and that's a sunk cost) in any of them. If there's a better way, I want to hear it. I'm just not going to be a push-over about every new thing that comes along.

    Also, I never said there was no further need for argument. If there are flaws in my arguments or assumptions, please point them out. I've been wrong before, sometimes egregiously. Just because I think I'm right doesn't mean that I am. I'm just trying to let TDD advocates know up front what kind of assumptions I'm making and what arguments I'd like to see addressed.

    I could care less about "methodology wars". I have enough religion at church without bringing faith into the work place. I couldn't care less about who is advocating what any more than I cared about who was in the in-crowd in High School.

    And I'm not going to allow a critique of something to be characterized as "crapping" on it without protest. Seriously, if you can't critique a report without being so viciously labelled, I can see why it is that more reasonable people don't want to provide critiques. To be fair to other TDD advocates, JD here is a clear outlier statistically speaking. JD's vicious rhetoric and personal attacks are certainly not the norm (in my experience so far). Still, this kind of vituperation does rather stand strong in the emotional memory so I can see why others might not want to open themselves up to them.

    Finally, let me just say up front that I appreciate the efforts of those who try to articulate their theories and reasoning in software development. Most of us aren't paid to explain, argue, or advocate different methodologies and trying to persuade developers is a non-trivially difficult task. I value any clear explanations and arguments even when I disagree with them. If I didn't find them valuable, I wouldn't bother arguing with them.

  9. Dave^2

    Posted on: 2/4/2008 5:15 PM

    # re: TDD or POUT

    Hi Jacob,

    It sounds like you are challenging someone to prove to you that TDD is worthwhile. I don't think anyone can -- software quality and practices are very difficult to quantify, so I don't think you'll ever get that kind of definitive assurance.

    One of the arguments for TDD is that it encourages "good" design (depending on your definition of "good". :) Testable/refactorable maybe?)

    A good POUTer and a good TDDer can obviously both end up with well designed software. Use whatever tool you like to get the job done. But I don't think you'll ever know if TDD helps *you* produce a good design unless you try it.

    If you are interested in TDD and have the time, I'd recommend having a quick look into the method and then trying a small example.

    After reading about the "red, green, refactor" stuff, I first got into TDD following this example: http://www.xp123.com/xplor/xp0201/index.shtml

    I converted it to C# and NUnit, commented out all but one test, and started coding. I saw a positive effect on the way I worked and the design that "fell out" of the process, and also noticed some of the challenges faced when using it for real world problems. At that point you're in a good position to evaluate whether you want to spend more time on it.

    Of course if you're not interested, then no one should really be trying to convert you. The information's out there -- try it or don't. Completely up to you. :-)

    Really enjoy your posts btw. :-)

    Regards,
    David

  10. Jacob

    Posted on: 2/5/2008 12:01 PM

    # re: TDD or POUT

    @David: I'm not so much interested in proof as I am in reasons. If I can follow a logic chain that leads to TDD == superior, I'm happy to spend the resources to confirm the effects. It seems to me that if TDD's benefits are as widespread as they are claimed to be that we should be able to track back how it works to produce those benefits. When I was first learning OOP, for example, things like encapsulation and orthogonal design explained the benefits that were attributed to OOP. Or when learning to use unit testing where the ability to refactor with confidence makes for a clear maintenance gain. With both, there was a clear path from process to result--a path that bears fruit whatever your skill level with programming might be. A path that helps guide efforts so that they can be verified as correct. That's what I'm looking for with TDD.

    I'm not happy with the "try it, you'll like it" answer. It smacks of magical thinking. What if I try it and it isn't all that? If I do, then I'm way worse off than before. Not only have I wasted my time, but I'm stuck without a framework to compare my results to anyone else's. There's no equivalent way to say something like "Encapsulation is good and all, but I find that code reuse isn't as big a payoff as I expected." For all I'll know (or anyone else for that matter), I just did it wrong. There's no logical mile posts to check myself against and that makes me uneasy.

  11. Dave^2

    Posted on: 2/5/2008 6:16 PM

    # re: TDD or POUT

    Hi Jacob,
    Thanks for the reply.

    I never said "try it, you'll like it". I said "if you are interested, try it and see if you like it". If you try it and it isn't "all that", then you can cut your losses after only losing an hour or two of experimentation :-)

    I also don't think you can show TDD == superior. TDD is a technique. If you find it helps then it is superior for you.

    Anyway, I made an attempt to run through what I feel are some of the *potential* benefits of TDD:
    <shamelessBlogPlug>
    http://davesquared.blogspot.com/2008/02/brief-look-at-logic-of-tdd.html
    </shamelessBlogPlug>

    It doesn't cover a "path from process to result", but it might help give you an idea as to why some people find it useful. Or at least why I feel it is useful :-)

    Finally, you mentioned the arguments for OO as an example of an open and shut case. It is actually quite possible to argue against OO: http://oop.ismad.com/
    Now you'll be forgiven for thinking that site is complete bunkum :), but it does show that what seems clearly superior to one person may not appear that way to another. :-)

    Regards,
    David

  12. Martin Ecker

    Posted on: 2/6/2008 12:59 AM

    # re: TDD or POUT

    Hi,

    As was mentioned by previous posters, for me TDD is mostly about design and not so much about tests. I like the fact that when I'm doing TDD I sit down and I "eat my own design-dog food" first, before I've even written a class or a function. I'm the first client of my code even before it is written.

    In general, I find that my low-level design skills have improved quite a bit ever since I started using TDD (and with it DI). My classes and their coupling with each other are easy to understand. The code is easy to extend and easy to refactor. This doesn't really have anything to do with TDD in general, I think. It just happened to be this way for me. You could say TDD helped me see my designs from a different perspective, and writing tests first helped me design better interfaces earlier instead of realizing later on when writing the unit tests that something was hard to use.

    Finally, for me personally TDD is just a whole lot of fun. I used to be in the POUT camp only two years ago, but it was always a pain for me to write the unit tests after the fact. Call it laziness. In my mind, once I was done writing the code I felt I was done even though I hadn't written any unit tests yet. So I can say that TDD is simply a more fun way for me to work. It simply works for me, but that doesn't mean that it'll work for everyone.

    Apart from my personal affection for TDD, I agree that you can probably get the same results with just POUTs. For me personally, I just enjoy using TDD and I'm happy to work at a company that promotes it. But unlike TDD zealots, I don't necessarily see it as vastly superior from thinking about your design first, writing the code, and then writing tests last.

    Cheers,
    Martin

  13. Jacob

    Posted on: 2/6/2008 10:45 AM

    # re: TDD or POUT

    @David: That was a nice blog post--forthright and clear. I have nothing to argue with in it. I don't find it personally compelling, but I don't want that to detract from your post or prevent others from reading it.

    And yeah, I'm already there on the usefulness of OO, actually. As I indicated recently any process has its limitations and I have a hearty distrust of silver bullets, dogma, and didacticism. Frankly, I don't think you truly understand a process or tool set unless you can describe counter-indicators or weaknesses in it. Claims of universal applicability are always wrong.

  14. Dave^2

    Posted on: 2/6/2008 12:26 PM

    # re: TDD or POUT

    @Jacob,

    If it wasn't personally compelling then at least we may have answered your question, "Should I try TDD?" (although that may have just been the author's fault ;-)).

    I don't claim to fully understand the complete depth and consequences of TDD, but I can still describe weaknesses and drawbacks with it. But you only asked for the reasons why it could work :) Fully agree with your statement on universal applicability (the lack of).

    Thanks for the mini-debate anyway. Always good to challenge my own assumptions and views. Look forward to your next post.

    Regards,
    David

  15. Troy DeMonbreun

    Posted on: 2/6/2008 1:12 PM

    # re: TDD or POUT

    [... Where TDD is always Test-First and Unit Testing is traditionally Test-Later, TSD is a mixture of the Test-First and Test-Later approaches. Unlike "Plain Old Unit Testing" (POUT), TSD does recognize value in a Test-First approach, just not a Test-First-ALWAYS approach ...]

  16. Adron

    Posted on: 2/6/2008 2:21 PM

    # re: TDD or POUT

    We should do like guitarists do when they cut heads...

    ...and have a code off. :)

    TDD vs. Test Last vs. no tests.


    yeah... now that would make for an interesting geek session.

  17. noel darlow

    Posted on: 2/17/2008 11:14 AM

    # re: TDD or POUT

    "Asking if I have any experience with TDD implies that without that experience I'm not competent to evaluate TDD tenets and make reasonable judgements about them.

    Yes it does and rightly so. As Wittgenstein said: "Whereof one cannot speak, thereof one must STFU".

  18. Jacob

    Posted on: 2/19/2008 5:22 PM

    # re: TDD or POUT

    @noel: I'm not sure about others, but being told to shut up about something has never been very effective in convincing me that I'm wrong. Frankly, it makes you sound kind of closed-minded and the lack of cogent counter-argument makes it seem like you have no argument to offer.

  19. terry chay

    Posted on: 2/19/2008 7:36 PM

    # re: TDD or POUT

    I suppose the best argument for Test Driven Development is that it follows the same path as Design By Contract. Hence the inversion of control with the maxim that behavior should be defined by it's interfaces.

    What has worries me often (and this has been born out by my particular attempts at the practice) is that, like most programming, it is not without consequences. Consequences in this case are it's egalitarian approach to the Pareto principle.

    I’ve found that up-front it is very difficult for me to determine the 20% of my code that is really going to need 80% of my regression tests (of which unit testing forms the bulwark). I think it is dangerous and counterproductive (and many studies and practice have born it up) to blindly demand Test Driven Development as a best practice.

    My suspicion is that TDD is best done, ironically(?), in rewrites and refactoring of systems having no existing unit tests in place. Many of the examples of TDD have born this out with some of the most memorable successes being in areas of code porting.

    I don't know, and in many ways, I'm stating common sense.

    I abhor dogma too, but I’m not going to say, flat out, that Test Driven Development is everywhere and always inferior to Plain Old Unit Testing (nor do you, but some read that implication in the post).

    http://terrychay.com/blog/article/pragmatic-programmer-review.shtml

  20. Noel Darlow

    Posted on: 2/20/2008 10:00 AM

    # re: TDD or POUT

    Jacob: is TDD really about "testing"..?

  21. Jacob

    Posted on: 2/20/2008 5:15 PM

    # re: TDD or POUT

    @Terry: Thanks for dropping by. I ran across the post you linked yesterday and enjoyed it immensely. When starting this blog, I very nearly went with "The Pragmatic Programmer". I think pragmatism is an important, oft-neglected perspective in programming, protestations otherwise notwithstanding. (I ended up feeling that such a title really carries little meaning, though, so decided against it). I particularly liked your replies in the comments. Like you, I'm not sure if TDD is better than POUT. I'm just saying that the burden of proof for such a radical alteration in program methodology lies with its proponents. Which is more or less what you said in comments to your post.

    @Noel: I've heard the "TDD is about design" schtick (and its close cousin "TDD is about process"). I'm not sure I buy it simply because it seems like such a cop-out. A methodology that has "Test" as the first word of its title/description is as much about testing as it is anything else. The claims of adherents otherwise strike me as somewhat disingenuous. Testing permeates the discussion, description, goals, and claimed rewards of both the "process" and "design" of TDD. Those who claim (smugly or not) that it isn't about "testing" aren't helping their case, IMO.

    But lets break this down. A degree in English ought to be useful for something after all. In the term "Test-driven Design", "Test-driven" is the modifier of the noun "Design". Since "Design" is the noun, you can claim that TDD is about design if you really want to. That said, since "design" is such a general term on its own, it seems to me that the presence of "Test-driven" is required for the phrase to have any useful meaning. As such, "Test-driven" is both the focus and distinguishing characteristic of the term. So while you could claim that TDD is about "design", it would be as accurate to say that TDD is about subordinating design to testing and thus it can as accurately be claimed that TDD is about "testing". At least, linguistically speaking.

  22. noel darlow

    Posted on: 2/22/2008 8:44 AM

    # re: TDD or POUT

    Can you really infer all the details of a process from a simple examination of its label? If the time wasted torturing logic to death had instead been spent reading an article on TDD you could have gained some real insight into the process.

    Just to be clear, not knowing something isn't a crime. It's not about what you know it's about being willing to learn. We learn by exploring new ideas, blundering about a bit, maybe bumping into things, getting things wrong. It's important to maybe make some mistakes rather than never to explore at all. On the other hand, sniping at new ideas - TDD "schtick" - which challenge your current skill level is the opposite of an open, exploring mind. The danger is that you will be left behind: a big fish only because you have chosen a small pond.

    Test-driven design is a formal method of exploring a new domain where tests are used to drive the design - hence the name. Tests will always be "tests" but in this context it's better to think of them as executable specifications. Each new test describes an atom of behaviour, another little piece of the program design. TDD-ers will talk about top-down, outside-in, fast feedback, about an evolutionary process which allows design to emerge in little steps, but you won't really "get" it until you've tried it. It's a fundamental change in perspective. I don't think of myself as writing code any more: instead I write tests and code is just something that happens while I'm testing.

    It will help if you have a handy TDD guru to lead you through your first steps. For many people it's a real eureka moment. There's a good reason for the term "test-infected".

  23. Jacob

    Posted on: 2/22/2008 10:11 AM

    # re: TDD or POUT

    @noel: You assume that I make my comments about TDD in ignorance. That simply isn’t the case. I've read plenty of articles, blog posts, and other explanations of it. You keep making these poorly founded assumptions and that is hurting your credibility here. Your snipe about being unwilling to learn is particularly galling. Here's a hint: any developer with nearly fifteen years development experience is not likely hard of learning. Seriously, take a gander at the rest of this blog and ask yourself if this could possibly be coming from someone unable or unwilling to learn new things.

    I do appreciate the time you've spent here giving an overview of some of the philosophy of TDD. None of this is new to me, though. I've heard of all those explanations including the cop-out that you have to try it to understand it. That's crap and I'll continue to call it crap every time that meme shows up. Any new methodology has to have guiding principles and reason behind it (assuming it isn't faith-based pap). Those foundational principles are necessary to give people a roadmap while implementing the methodology that assures them that they are doing it correctly. As a result, any responsible organization (or individual for that matter) should use those guiding principles to evaluate their situation to see if the new methodology is a good fit. For me, right now, TDD doesn’t seem like a good fit based on its underlying principles.

    It sounds to me like our specific dispute arises from your fundamental assumption that I would agree with you if I only understood what you understand. I need a term for this because it happens so often. Here's the thing: ignorance and stupidity aren't the only reasons for disagreement. We disagree about TDD because we consider different things valuable. I don't value executable specifications as you do. I get all the fast feedback and evolutionary process that I need from other iterative practices. If you're going to make a case for TDD that I find reasonable (assuming that you want to do so), you'll have to either convince me that I should re-evaluate how I weight TDD's provable benefits or show me benefits that I haven't already considered. So far, neither has happened.

  24. William Pietri

    Posted on: 2/25/2008 12:48 AM

    # Really, you have to try it

    Jacob, you can argue the theory all you want. But whether something works or not is orthogonal to whether you have come across an explanation that you happen to like. Until you've tried it both ways, I expect you'll have a hard time getting people to take your views very seriously.

    In this case in particular, anybody who has done test-first development has also done test-after. When I started doing TDD, about 80% of my tests were written after the fact. I'd miss a case. Or I wouldn't know how to test something. Or I'd get excited and just forget about testing for a bit. Getting to do TDD properly was a slow climb from POUT.

    At this point, I probably code about 90% test-first. Why? Because it works better for me than test-after. Whenever I backslide, I notice problems and push back to what works best for me.

    And that focus is a point you seem to be missing. I'm uncomfortable with your insistence that others should convince you of something. I do TDD because it works well for me. I teach it to teams that are interested in learning it. If test-after is working well for you, then that's fab. Carry on. I will continue to suspect you could do better with broader experience, but when it comes down to it, that's your problem, not mine.

Your comment:



 (will not be displayed)


  Please add 5 and 1 and type the answer here: