'Gotcha' or 'I've got you' is defined as an unexpected or unintuitive, but documented, behavior in a computer system (as opposed t
We are all some time or the other newbies. The problem is what you do when you know you don't know much. Choices include keeping quiet and be taught and shouting, proclaiming ignorance.
I hate gotchas. Or, at least, I used to. They tell every one you are a newbie.
Remember when you started feeling like you were beyond the little league of 'hello world' and wanted to go a little beyond the sample code given in the tutorial you were reading? Of course, a good hacker (and programmer) is poor at following instructions and so does not exactly loop from 1 to 5 because the manual says so. If because you do follow instructions exactly, you think it is good you're not a hacker, read RFC 1392 to see the real definition of hacker and think carefully about why you didn't know that the for loop could increment by more than 1 until that newbie 'hacker' intern told you. But I digress.
You went a little to far and passed an argument by value, expecting the changes to stick. Or that thing about C++ templates declaration and implementation you had to learn from cplusplus.com after screaming around in your forum self-righteously about why your nifty code which YOU KNOW SHOULD WORK but doesn't. Haven't found yours? They abound here.
Any time I see rants of this particular flavour (sometimes by me - every one is sometimes a newbie, remember?), I always reply with one of these:
- Be patient. Sometimes, just enough to turn over the next page where the tutorial fully explains why you had that error. RTFM!
- A hundred thousand lemmings can't be wrong! We know you're now an expert after reading the tutorial for 2 days but do you really think the computer is wrong when it says error: expected ',' or ';' before 'string'?
- Hmmmm, maybe you're unto something here.
Truth be told, I have not said the last to anyone yet. I'll just keep it in mind.
So, while we are on the subject, let me find out why my NHibernate Criteria query returns 4 copies of the same row when my database has four unique rows. I need the gotcha which brands me as a newbie in this case!