
“Did you ever notice that other peoples stuff is crap, but your crap is Stuff?” George Carlin
Last year I came across an article with the same title on Jeff Atwood’s “The Coding Horror.”
Whether I am looking at Made2Manage or another vendor’s code or code created by a previous employee that I’ve been asked to review and refactor- I’ve certainly had this feeling. We all have.
It is indeed a knee-jerk response to dislike code written by another person; however, this is not really what I’m writing about.
Over the past two years, I have really thrown myself into learning SQL Server in general. More specifically, I have focused on writing better SQL code. While looking through some code about six months ago, I again had the same question flash through my mind: “Ugh, who wrote this crap?” It wasn’t aliased or optimized and was very difficult to read.
Then it hit me! The culprit was…. ME. I wrote that code the previous year. It struck me just how far I have come in my SQL development, and I immediately refactored it. The same thing has happened several times since then.
I suspect (or at least hope) the rest of my professional life will be filled with moments like this- realizations of just how far I have come along with the knowledge that I always have a lot more to learn.



Ha. Great post.
It’s always fun to revisit something you created back when you didn’t know ‘X’ and see that you can improve it with your since-updated body of knowledge.
The other side of that coin is revisiting something you created way back when and realizing how much you’ve forgotten over the years.
Ah well.
[...] errors in some of my T-SQL example code. That shouldn’t be a surprise to me since I’ve come so far in the past several years. What did surprise me is that people must not be running my code or they [...]
One of the main reasons I add comments to my code is to explain (to either others or my future self) why I made certain choices.
Sometimes you do it for reasons that aren’t completely obvious in the future, especially if the optimizer is behaving differently then.
But I am well familiar with this moment, and I think that all good developers should know it well. Love the picture of George.