Using the Correct Ruler
Sometimes, the guys controlling the synapses are asleep at the switch, and things I've always known are momentarily gone. It's one thing when I know that to be the case — knowing what I don't know — such as seeing an actress on the screen and being asked who it is.
I knew until I was asked.
It's not knowing that I don't know that's the bigger problem...not realizing that I've forgotten, because the switchman hasn't fallen asleep, he's thrown the wrong switch.
I had a relatively large piece of code I was debugging, and much of what I was trying to do was using a new API (not just new to me...new to the public), and I had little idea of what I was doing on so many levels, that it took quite awhile to zero in on the first of my many issues.
This first one made me chuckle, though.
strlen() is not the same as
It may imply the same thing in English, but it is obvious, when all synapses are firing correctly, that strlen() is the length of a string, while sizeof() is the number of elements in an array, so that sizeof(array) is probably going to return a much different (and unwanted) value than strlen(array) !