This sounds like a dumb or obvious thing to say but I can’t count the number of times that this rings true. It’s not a phrase that I came up with, I have to give that credit to a past supervisor of mine. I’d be digging through a page going this has to work. What on earth is wrong with it? It’s the same as this other page. I’d ask my supervisor to take a look as make that very assertion to him and he would respond with “things that are different are not the same.” Man that irked me, but then he would have me go step by step through the problem and proceed to show me where I was doing something different.
I’ve even seen ASP.NET come to this conclusion when it throws an InvalidCastException stating that it cannot cast an object of type foo to type foo. I’m like what the heck! It’s the same type people! Well, what’s happened is that one of the dynamically complied dlls in the ASP.NET temporary files folder got cached and wasn’t deleted properly. So even though the type has the same name, the two types are from a different dll. Thankfully (once you know what is going on) it’s an easy enough fix, just delete the ASP.NET temporary files folder (C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files).
My favorite example of this is in the requirements of a project. “Just copy whatever the page does from over here” or “just make it look the same" they say. Problem number one with this, the BA in this scenario typically doesn’t know what the original page does which leads to the second problem. The second problem appears when you do what they ask and then they realized its not what they wanted or “just change this to be…” comes at you. Let me say that again, “things that are different are not the same.”
I’ve also been bitten by this adage with the infamous copy-paste bug. In this case however, I want the code to do something different but naturally forget to change one string value, enumeration, constant, or what have you. Someday I wish there would be a nationwide ban on copy-paste and other times it’s a life saver.
So in the end, pay attention. Start with the basics. When you are debugging something where everything should work just like this other thing is working or you “only” changed this one thing that doesn’t affect anything else, take a step back. Look at how even the most minute change or difference can cause a problem.