Old code can be scary

In replacing the payment gateway I was using, one of the things I did was replace an ASP.old script. Ugh... how did we get anything done in those days? Looking back now, I can see why someone with an object-oriented background would want to use COM objects as much as possible. Sure, installing them was a pain, but not any worse than dealing with that awful script.

Slightly more pleasant, but not entirely unscary, I decided this week to actually finish the ad serving software I half-wrote back in 2002. Basically the scenario was that I needed to write something quick to serve a campaign I sold at the time. I wrote the serving part, but didn't write a single line of UI code, so I had to do everything by manually plugging stuff into the database.

The code wasn't horrible, but there was a lot of room for improvement and a better approach. I was able to refactor it pretty quickly into something I was comfortable with, and some initial testing shows it'll perform a little better.

I have a new found appreciation for reporting the statistics though. Millions of impressions create a lot of data. Data warehousing is not something I have a lot of experience with, but creating aggregate data on a regular interval seems pretty straight forward. The biggest decision is figuring out how much detail is really necessary. I'm guessing hourly stats are fine.

I know I've mentioned this before, but I wonder if revisiting old code ever becomes less scary.