Re:Ask HN: Do you write tests before the implementation?
by jswizzy on Friday November 15, 2019 @10:11AM
(#21545401)
From what I understand about TDD it's more about getting the design right then testing for bugs.
[ Parent
| on HN ]
Re:Ask HN: Do you write tests before the implementation?
by hackerm0nkey on Friday November 15, 2019 @10:16AM
(#21545462)
TDD is also a design tool. I agree for newly written code, yes.
Writing a test before fixing a bug reveals the bug and solidify a proof that the fix addresses it adequately. So in this context, it's less about the design (since it's already there) and more about fixing and proving that the fix works.
Re:Ask HN: Do you write tests before the implementation?
by eyelidlessness on Friday November 15, 2019 @01:03PM
(#21547098)
TDD is about getting design right, but it's also about ensuring that the design's functionality is defined, demonstrated and protected from regression.