Michael’s first days of programming

Interesting conversations with Michael last week … he’s learning programming at school now, Visual Basic. He told us of his first program. Basically, just putting up a text field and a button. The conversation went something like this….

Michael: “The program is too hard to read. The lines go way off to the right and I can’t see it all – I have to scroll over”
Reid: “You can hit return anywhere. Just put an underscore at the end of the line and it’ll know it continues on the next line”
Michael: “The teacher said the G.U. I. …”
Me: “It’s pronounced gooey!”
Michael: “I had to declare a variable”
Me: “Was it called ‘foo’?”
Michael: “???”
Reid: “It comes from FUBAR, which stands for ‘f**ked up beyond all recognition’. Foo came from that, but it’s spelled f..oo..oo. So, was it a global variable?””
Michael: “???”
Reid: “Where did you declare it? Was it inside the button?”
Michael: “Yup”
Reid: “It wasn’t a global variable”
Michael: “I created a button, but when I tried to run the program, there was an error”
Me: Was it a syntax error?
Michael: “???”
Reid: “Where was the error?”
Michael: “It was so dumb. It lit up the button. It didn’t show me where the error really was. Turns out I spelled ‘integer’ wrong.”
Me to Reid: “Awww… he got his first syntax error. *Snif*”
Michael: “The program was so dumb. We had to calculate the cost of CD’s. You entered the number of CD’s and it told you how much everything would cost”
Me: “Huh? Didn’t you have to enter the cost, too? What did you do, hard code the cost?”
Michael: “???”
Me: “Where did it get the cost”
Michael: “In the button. You just had to multiply the number you entered by the cost.”
Me: “That’s hard coding.”
Reid: “He should save it in a database”
Me: “What are you talking about? It’s too early to start learning about databases”
Reid: “He could just save it in an array”
Me: “But that’s not a database!”
Reid: “Well, it’s a sort-of database. But in memory”
Me: “Oh, come on. That’s not a database! Blah, blah, blah…”
And off we go…

The next night…

Michael: “She’s making us declare a variable for a number that doesn’t change. I don’t get it. Why do I have to declare a variable??”
Luisa: “Don’t get hung up on the word ‘variable’. It doesn’t mean the number has to change. The program won’t know whether it has to change or not”
Michael: “But it doesn’t make sense!! It’s VARIABLE!”
Luisa: “You have to tell the program what kind of value it’s going to hold. Whether it changes or not doesn’t matter. They’ll probably make you change it later anyway. Hard coding something is BAD.”
Michael: Mumble, complain…
Reid: “Well, declare a constant then. Just say “const foo=bar””
Me: “Oh! Visual Basic DOES have a const?”
Reid: “Yep, just say “const”.”
Michael: “The whole thing is so dumb. I finish everything before everyone else and then I have to sit around.”
Me: “You got it easy. VB creates the button for you, there’s not much you have to do… back in MY day, no one created a button for you! You had to code everything from scratch…”
Reid: “Ya, line editing, waiting in line for a terminal, …”
Luisa: “Ha!! You think that’s bad… you know-it-alls in 149 HAD terminals! Some of us had to use punch cards! It was so loud I’m sure I lost some of my hearing!”
Off we go again…

We’re such nerds! (Well, not me. Just everyone else in my family, right?)

[I formatted it all as a table. Hopefully a bit easier to read – Reid]

4 thoughts on “Michael’s first days of programming”

  1. If I had to write a comedy sketch about nerd parents teaching their kid the facts of life, I couldn’t have made it any funnier. Welcome to geek world, $CHILD!

  2. Haha & LOL!

    I’m trying to teach a friend of mine VB too. He’s interested but brand new to any kind of programming. Similar converstations!

    Good luck, Mike!

Leave a Reply

Your email address will not be published. Required fields are marked *