News for hackers. Stuff that matters.
Re:TDD did not live up to expectations by andybak on Thursday June 29, 2017 @12:40PM (#14664648)
> I've never heard TDD being that you write all of your tests up front, before you've written any code.

That's the only way I've ever heard it described. I thought that's why it's called "Test Driven"

Re:TDD did not live up to expectations by skookum on Thursday June 29, 2017 @12:45PM (#14664701)
Can you provide a reference? I'm not a big proponent of TDD but have read up on it and experimented with it some, and none of the TDD literature I've read suggests writing all the tests up front. Virtually all the mainstream TDD literature and talks advocate for the "write a test, make it pass, lather, rinse, repeat" model of development.
Re:TDD did not live up to expectations by taeric on Thursday June 29, 2017 @12:59PM (#14664831)
I think this is a case of two ways to hear "write all the tests first."

If you read that as "write every single one of your tests, then write the code", then you see it as a strawman and not the point of TDD.

If you read that as "before you write any specific line of code, you write the test for it first", then you are likely to see that as the same as TDD.

I intended the second reading. I can see how both are accurate ways to read it, though. Apologies for the confusion.

Re:TDD did not live up to expectations by andybak on Thursday June 29, 2017 @01:19PM (#14665009)
Ah. Exactly the misunderstanding I was labouring under.

Turns out we are all in agreement after all.

Re:TDD did not live up to expectations by s73ver on Thursday June 29, 2017 @03:59PM (#14666388)
I mean before you've written any code at all. Like, you have to have the tests for all units created before you start writing the code for any unit. That's what the person I responded to made it sound like.

Writing tests before you work on the unit you're working on shouldn't be a problem because you should know what that unit is supposed to do. If you don't, then it doesn't matter if you do TDD, Agile, BDD, or whatever. You're not going to be able to do it right. Go have a conversation with someone to find out what that is supposed to do.