News for hackers. Stuff that matters.
Re:I have complicated feelings about TDD by yibg on Thursday August 18, 2022 @12:29PM (#32511771)
The first test is never the problem. The problem as OP pointed out is after iterating a few times you realize you went down the wrong track or the requirements have changed / been clarified. Now a lot of the tests you iterated through aren't relevant anymore.
Re:I have complicated feelings about TDD by majikandy on Friday August 19, 2022 @03:10AM (#32518261)
Is it possible that it was those tests and code in the TDD cycle that helped you realise you’d gone down the wrong path?

And if not, perhaps there was a preconceived idea of the code block and what it was going to do, rather than specifying the behaviour wanted via the RGR cycle. With a preconceived idea, with or without the tests, if that idea is wrong, you’ll hit the dead end and have to back track. Fortunately I find that even though I do sometimes find myself in this situation, quite often those tests can be repurposed fairly quickly rather than being chucked away, after all the tests are still software, and not hardware.