« Adventures in Techno-Tard Land | Main | Lend Me Your Ear »
March 30, 2005
More Adventures
Lest you think my parents are the only techno-tards I know, there's also a rotating one in my C++ class. Sometimes it's me. Other times, it's this other guy. He's a pretty good programmer, but he sometimes gets hung up on the simplest stuff......and just goes on and on about it. It's like he gets hung in an infinite loop of annoyance.
Like last night. We're working our way through exceptions, you know, it's those annoying error messages that you get sometimes that make no sense, like "Error number 1462" and then your program crashes. So the instructor's writing some code, showing us how to do exception throws & catches. Basically what you do is tell the computer hey, if this program tries to do something stupid like divide by zero, throw (send) a text string. It might be something like "Hey moron. You broke it." Then this other part of the program catches (receives) the text string and displays it on the screen. It doesn't have to display it, but that's just the way our example was done.
Without getting too technical (I hope), you have to name a variable to hold the text string during all this. (Think of it as an envelope holding a message that's being mailed.) Now there's a few rules about what a variable can be called, you can't use a word that's a C++ command or it can't start with a number, but basically you can call a variable pretty much anything. You can even name it Fred if you want. But you usually try to name it something that will remind you what the variable is meant to do. Very basic, beginner type stuff.
So the instructor writes "catch (char * ex)", which is just a way of saying that the catch part is going to receive a text string and store it in the variable 'ex'. And Annoying Guy asks why the variable is called 'ex'. And starts going on and on about how there's some special reason why and he wants to know what it is.
The instructor starts trying to explain there's no reason, he just decided to call it 'ex'. I'm sitting there, wishing I could throw my very heavy book at Annoying Guy and make him shut the hell up so we could finish the chapter & go home sometime before my hair gets any greyer. I mean, Hello? We're studying exceptions and he named the variable 'ex'. Think there's a connection?
Then for the rest of the class, every time the instructor would name a new variable he would say "Now there's nothing magical or special about this name."
Good grief.
Posted by Rita at March 30, 2005 01:45 PM
Comments
Why do all classes have that one person who drags the rest of us down into his personal mental bog?
(I could name a couple of attorneys that do that as well.)
Posted by: Keith at March 30, 2005 03:33 PM
The thing is he's not that dumb. He's lots better at programming than I. It's like his brain gets stuck and he repeats things while waiting for it to reboot or something....a very slow process. Come to think of it, he does that in conversations too.
Posted by: rita at March 30, 2005 04:26 PM
Instructors in this situation do better to name their variables FRED or Foo or Bar or whatever, just to avoid this....
Posted by: Zendo Deb at March 30, 2005 07:15 PM