logoalt Hacker News

zemtoday at 2:36 AM0 repliesview on HN

> And it happens to be a case where a lot of people see the benefits of test: before refactoring.

it's also very nice if you have a test-last working style, that is, develop the code first using some sort of ad hoc testing method, then when you're convinced it's working you add tests both as a final check that the output is what you expect across a lot of different corner cases, and to prevent regressions as you continue development.