How I Learned to Stop Worrying and Just Fix Tests
engineering.bookrenter.comI had the exact same revelation two weeks ago, and surprisingly that is almost the same phrase I tell myself :).
You know, after 2 failed upgrade attempts to Rails 3... we eventually came to the understanding that we shouldn't attempt to simultaneously make "improvements". Because without a green test suite, we had no idea if the failures were new or upgrade related. That was the cause of 99% of worry until we said "fuck it, let's just fix everything first."
My revelation came from more simpler stuff. I was programming some service at work, and as usual there were a lot of bugs. I tend to worry a lot during programming about corner cases etc. I analyzed myself analyzing, and thought may be this is what a computer should do, which is inline with an earlier epiphany that "It is cardinal sin of a developer to do himself what a computer can do".
Now I tend not to worry about corner cases etc while programming. I just write all the stuff I can, and write tests for all the stuff that could possibly go wrong. And let the computer figure out the bugs for me :). It somewhat reminds me of Prolog.