Ain’t this the dumbest code I’ve ever written?
Look at that! How does that happen? When you see logic written like that you have to wonder what goes through the developer’s mind as he keys it. I know, I know, in today’s age of modern IDEs you can sometimes blame the computer for writing stoopidity like that in an awkward refactor command or something. The difference is that I remember writing the logic. I remember what my intent was. I remember saying, “hmm… that doesn’t look necessary but it fixed the problem.” I was in some ugly code way deep at the time. Have you ever added something that you knew was dumb only to find out later how idiotic it was?