Make refactoring easier - I quite often write tests for legacy code if I'm going to refactor it. It's the only way I can know it's still doing the same thing. Sadly, this sometimes means doing some blind (test-less) refactoring to make testing possible, but that's sometimes unavoidable... And still far better than doing the whole thing blind.
Have more confidence - I use to dread the day we pushed things live. I would actually cringe while it happened, and just wait for the shit to the fan. The more tests I have, the less I cringe and the more I enjoy the releasing of new, better code.
Make refactoring easier - I quite often write tests for legacy code if I'm going to refactor it. It's the only way I can know it's still doing the same thing. Sadly, this sometimes means doing some blind (test-less) refactoring to make testing possible, but that's sometimes unavoidable... And still far better than doing the whole thing blind.
Have more confidence - I use to dread the day we pushed things live. I would actually cringe while it happened, and just wait for the shit to the fan. The more tests I have, the less I cringe and the more I enjoy the releasing of new, better code.