4 ms·
you will end up with something that passes all your tests then smashes into the back of the lorry the moment it sees anything unexpected writing comprehensive
by blibble 1y ago
you will end up with something that passes all your tests then smashes into the back of the lorry the moment it sees anything unexpected
writing comprehensive tests is harder than writing the code
- reenorap 1y agoThen you write another test. That's the whole point of TDD. As you keep writing more tests, the closer it gets to its final form.
- blibble 1y agoright, and by the time I have 2^googolplex tests then the "AI" will finally be able to produce a correctly operating hello world oh no! another bug!
- 3vidence 1y agoI've definitely seen a number of files where the implementation is maybe like 500 LOC and the test file is 10000+ LOC. I agree rigidly defining exactly what the code does through tests is harder than people think.
- topaz0 1y agoThe idea of TDD is that you should have the tests before you have the code. If your code is failing in real life before you have the tests, that's no longer TDD.
- BobbyTables2 1y agoHave you ever seen someone carve the inverse of a statue from a solid block of stone? If so, they are doing TDD. Yeah, me neither…
- throwaway7783 1y agoAI can help here too, by exploding the spec into a series of questions to clarify behavior. Today, it just does something and when corrected it says "You are right!....".