News for hackers. Stuff that matters.
Re:I have complicated feelings about TDD by gjulianm on Thursday August 18, 2022 @11:28AM (#32511001)
> - You write one test.

> - Write JUST enough code to make it pass.

Those two steps aren't really trivial. Even just writing the single test might require making a lot of design decisions that you can't really make up-front without the code.

Re:I have complicated feelings about TDD by User23 on Thursday August 18, 2022 @12:01PM (#32511414)
This acts as a forcing function for the software design. That TDD requires you to think about properly separating concerns via decomposition is a feature, not a bug. In my experience the architectural consequences are of greater value than the test coverage.

Sadly TDD is right up there with REST in being almost universally misunderstood.

Re:I have complicated feelings about TDD by bluefirebrand on Thursday August 18, 2022 @12:34PM (#32511843)
> Sadly TDD is right up there with REST in being almost universally misunderstood.

That's a flaw in TDD and REST, not in the universe.

Re:I have complicated feelings about TDD by 0x457 on Thursday August 18, 2022 @01:26PM (#32512487)
The first test could be as simple as method signature check. Yes, you still have to make a design decision here, but you have to make it either way.
Re:I have complicated feelings about TDD by giantrobot on Thursday August 18, 2022 @02:03PM (#32512914)
Then you need to keep the test and signature in lock step. Your method signature is likely to change as the code evolves. I'm not arguing against tests but requiring them too early generates a lot of extra work.
Re:I have complicated feelings about TDD by lucumo on Thursday August 18, 2022 @02:04PM (#32512923)
Interesting. The method signature is usually the last thing I create.