I am all for testing. Whether you always write unit tests in advance as Test Driven Development (TDD) advocates call for, write them after, write them alongside, a little of each, I don't care. Tests are your friend. You want tests, and specifically you want good tests. There's a lot of opinions on what constitutes a "good" test, of course, and much is subjective to the type of code you're working