|
|
|
|
|
by recroad
405 days ago
|
|
This article seems like a very long-winded and complicated way to say that we should write tests. Am I missing something here? Wouldn't most developers write tests when creating algorithms, let alone something relating to finance as tax calculations? Yes, you should reproduce a defect by writing a failing tests first. Where I hoped/thought this piece would go was to expand on the idea of error-prone[1] and apply it to the runtime. https://github.com/google/error-prone |
|
Writing a failing test that reproduces a bug is something I learned pretty early on.
But I never consciously thought about and approached the test as a way to debug. I thought about it more of a TDD way - first write tests, then go off and debug/code until the test is green. Also practically, let's fill the gap in coverage and make sure this thing never happens again, especially if I had to deal with it on the weekend.
What was interesting to me about this was actively approaching the test as a way of debugging, designing it to give you useful information and using the test in conjunction with debugger