It's never fun relearning something you already knew…
- Last year I worked a lot against a database that was missing a lot of referential integrity and even a few uniqueness checks. You know how the old timers say that's a really bad thing, but you've never actually seen it happen because you don't ever leave off the integrity? Orphan records and duplicate records and other things that go bump in the night that you've heard campfire stories about? Bad, bad stuff. You can fix bugs in your code, but invalid data in the production database can be awfully dicey to clean up.
- The doozy for me this week. When you have performance problems, you profile the code because the performance problem may not be where you would expect it. We have a performance problem in some new code inside a brand spanking new architecture. We did a few (minor, it wasn't that bad) changes for performance that didn't help that much. Then one of my coworkers used the JetBrains profiler on it and found that a 3rd party component in the mix was throwing and swallowing an exception on every single data record going through that component. In one fell swoop we identified our performance problem. A quick support request and we've got a patched version of the component to correct the problem.
- Oh yeah, you know how they tell you that throwing and catching exceptions is expensive in CPU time? Believe you me, that one's true.