>If you’ve ever heard someone claim that Test-Driven Development leads to zero-defects code<p>I havent. It's a <i>lot</i> more reliable, still not 100% reliable.<p>>If you can define the inputs, predict the outputs, and cover edge cases, TDD is like a superpower. But the real world is rarely that tidy.<p><i>shrug</i> it ought to be that tidy if you specify your features before building them.<p>For writing code to test a sin function (a bit of a contrived example, but let's run with it) - well, that would be an excellent candidate for property test driven development because there are straightforward invariants you can define.<p>When edge cases crop up for other styles of code, well, talk about them with your PM and write test cases for them too.<p>If the spec is something like a UI which is visual and specified imprecisely with a sketch or something, snapshot test driven development more appropriate but that's still just a variant of TDD.