Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: A danger of test driven development.

by tirwhan (Abbot)
on Oct 03, 2005 at 12:49 UTC ( [id://496898]=note: print w/replies, xml ) Need Help??


in reply to A danger of test driven development.

Hmm, maybe it's just me, but I fail to see how this problem is an artifact of TDD.

  1. Write tests first:
    1. Write broken test
    2. Write correct code
    3. Run test, which fails
    4. Change code, which breaks it
  2. Write code first:
    1. Write correct code
    2. Write broken test
    3. Run test, which fails
    4. Change code, which breaks it

So unless you're doing something different in 2.1 than in 1.2 (like for example eyeballing the code more thoroughly or running it manually, which is a kind of "test" in itself) you'll end up with the same result, I don't see how you can fault the methodology for this.

TDD does not guarantee that you produce exclusively working code. It's just a methodology which highlights errors more quickly and makes it less likely for broken code to appear in production (and IMO also gives you a better approach at code design for free)

  • Comment on Re: A danger of test driven development.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://496898]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (4)
As of 2024-04-19 05:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found