Re:Ask HN: Seriously, how do you TDD?
by dominotw on Sunday September 11, 2022 @11:24AM
(#32800413)
> Even a string length api like len(s) is not exhaustively testable;
But this has nothing do with what GP said. That isn't what gp is using TDD for. GP is using TDD for,
1. starting with api of a function vs code.
2. avoiding unused lines of code
3. reducing dependencies, its hard to tdd something that has a lots of deps so it drives your refactor it something more testable and thus more readable/maintainable also.
But this has nothing do with what GP said. That isn't what gp is using TDD for. GP is using TDD for,
1. starting with api of a function vs code.
2. avoiding unused lines of code
3. reducing dependencies, its hard to tdd something that has a lots of deps so it drives your refactor it something more testable and thus more readable/maintainable also.
4. simplest set of input/output.