Hacker News new | ask | show | jobs
by bluefirebrand 495 days ago
> Red-green-refactor can also provides live feedback about whether your code is behaving correctly as you write it.

No, it provides live feedback about whether your code is passing your tests

If you have written your tests poorly then set out to make the tests pass, then your tests become the target rather than the correct behavior

If you are continuously updating your tests while your code evolves because you missed test cases or your understanding of the behavior has improved, then writing the tests first didn't actually give you any value. In fact it just wasted a lot of your time

Write the code Manually test to verify correctness and to identify the test cases you have to write THEN write tests to protect against regressions