Unit testing is something that I agree with in principle, but seem to have a problem with in practice.
I haven't posted anything here for a couple of weeks now, partially due to the holidays in the U.S. as well as work, but mainly because I've been busy writing unit tests for the site. Yes, I know, you're supposed to do that before you write your code, but I'm lazy and... well, I'm just lazy.
But, better late than never I suppose. I'm approximately 60% done writing the test cases, and in the process have an internal CruiseControl server set up to tell me just how cool I am that my unit tests pass. :)
Interestingly, I am starting to see the value of writing tests first. There is a large body of code that I have written for this project that while it is documented well and fairly clean, I find myself not knowing precisely what a method's constraints and side effects are (which is of course very important when writing unit tests). Consequently, the tests I'm writing now are probably not as complete as they should be.
Do you write unit tests? How good is your code coverage?