Every computer programmer knows and understands that a computer can only do what it’s told. That’s a simple enough concept to grasp. The catch is what the computer does as a result of what it’s told isn’t always what the programmer wants. More succinctly, a computer does what it’s told, not what we want.
This point of computer programming is flummoxing the boy for the moment. He seems to understand what he wanted to make the computer do using Scratch. The problem is he also seems to be under the delusion that the computer should understand what he wants it to do. It was a recipe for disaster which led me to temporarily leading a tearful boy away from the computer for a while to collect himself.
I then had him sit down and work through the step-by-step guide at the Scratch website. His being able to see how to use the programming tools and create a sample program helped tremendously and he was able to go back and work out his own “game.”
I put that in quotes because apparently, the game was figuring out how to play his game. Or something. It involved one little sprite fighting a troll sprite with a bow-and-arrow. The idea is to figure out how to make the bow-and-arrow appear, then shoot the troll with it. The end.
I’m sure EA Sports will be holding a slot for him.
He’s now more curious about real programming languages and wanted to check out one of my books. I don’t have an extensive library for programming languages, as most anything I could ever want to know is available on the web. However, like any decent programmer, I do have a couple of different versions of K&R. So I pulled that down for him to look through. “C” wouldn’t be my first choice for him to learn at this point, but syntactically it’s pretty compact. Versus PERL, the only other books I had.
Once again, he didn’t seem to quite grasp what he was looking at. I even fired up a hello world program for him so he could start to get some kind of idea. He was unimpressed.
I think part of his problem is he’s so used to Google and search that he has a skewed impression of what is happening inside a computer. He goes to a Google prompt and types in whatever he looks for and gets relevant results almost instantaneously. Contrast that with having to cryptically tell a computer to write “hello world” onto a screen which involves writing words and characters into a file with a special syntax and there’s the chasm that must be crossed.
The good thing, at this point, is he isn’t turned off to programming. Yet. Perhaps by the end of the weekend when he first encounters “debugging.”
One reply on “A Tenet of Computer Programming”
well … ‘trial’ and ‘error’ are partners on the path to learning …
MAYBE, it’s time to watch that old movie SHORT CIRCUIT … not so much about computer programming … but still about what happens with computers, learning, etc.