4 ms·
My personal mentality about TDD is that it is an unreachable ideal. Striving for it puts you on a good path, but business logic is rarely so straight forward.
by ImPleadThe5th 4y ago
My personal mentality about TDD is that it is an unreachable ideal. Striving for it puts you on a good path, but business logic is rarely so straight forward.
If you are lucky enough to be writing code in a way that each unit is absolutely clear before you start working, awesome you got it. But in business-logic-land things rarely end up this clean.
Personally, I program the happy path then write tests and use them to help uncover edge cases.
- radus 4y ago> I program the happy path then write tests and use them to help uncover edge cases. This approach resonates with me as well. I would add that writing tests when investigating bugs or deviations from expected behavior is also useful.