Okay, I'm stunned. A long time ago I decided to learn how to use Devel::Dprof to profile some code. As a test, I took some code that I wrote and knew was fairly good and probably couldn't be improved upon. I managed to improve its performance by about 30%. Talk about a lesson in humility.
Now, I'm writing a bunch of tests for a system that, as of last week, had only one known bug -- and that was an intermittant one. I'm only writing tests for those areas that I know I need to do work on, so the tests are limited in scope, but I now have about 147 of them. In the process of this, I have uncovered numerous bugs, most of which have never been exposed because of our previous standard of testing things manually.
I just stumbled upon a bug that was discarding data and returning bogus results. However, because our client hasn't been using this section of our application, they never noticed a problem. I just can't believe it. This is a system that's been running for years, constantly being tweaked, redesigned, extended, etc. I'm kind of dumbfounded by these results.