Tuesday, November 26, 2013

Simpleton Geek Teaches Computer Programming Book 2 Ch 9


9. Arithmetic
9.1 Simple calculator
“Does anybody know what a computer does?” asked the teacher.
“It plays game!” “It makes music!” “It does web and e-mail!” answered the students.
“He computes.” said the teacher.
“HE computes?” the students were confused.
“Sure. We're talking about the original computer. Computer as a profession, instead of a machine. So, this is all before Charles Babbage and his Differential Engine.” Of course, the explanation went over the head of the students. They're still in high school, after all.
“And what about modern computers. You say it plays games?” asked the teacher.
“Yes.”
“Well, underneath, it's still the same: shuffling numbers. Loading and saving data, but shuffling numbers, mostly. There is an exception to that, however. In the future, we may not be dealing with bits and bytes.” He surveyed the class. “We may be dealing with qubits.”
“Qubits? What are they?”
“It's like a bit, but it can be 0,1 or both.”
“I'm sorry, teacher, but I don't understand.”
“That's fine. Neither do I, to be honest. As the venerable Richard Feynman said, 'if you think you understand quantum physic, it means you don't.' So, don't be too hard on yourself.”
The students are all waiting patiently for the other shoe to drop. They are now used to long periods of peace, punctuated by moments of sheer terror.
“Of course, that doesn't mean that you can slack off and not understand basic skills necessary to the functioning of every day life! With that comment, I think we should explore STRING functions. I hope you understand that once you learned strings, you will find that it is a better solution to your data storage as to make RESTORE-DATA keyword obsolete!”
“What? You mean we can't use them anymore?” The students are having trouble accepting the fact. “But teacher! We spent so much time learning them, and we're really good at it! Why can't we use them anymore?” The students were disappointed. Does that mean they're spending a lot of time learning obsolete concept? Why even bother?
“Of course, you can still use it. It's just that I don't think you want to do it when the alternative is much better than that. Why bother learning how to crawl, when you will be walking eventually? Because you need to! It's too much to try to learn everything all at once, so you need to be eased into the concept. Remember when I talked to you about growing?” The student remembered. Broken branches and all that. “There are many ways to do something, and the problem is everybody is different. So, the only way to PROPERLY learn computer programming, is to learn as many different techniques as possible, and pick the best one for your use.”
“Which one is the best one?” asked Nancy.
The teacher stamped her head immediately. “Didn't I just tell you to pick the best one? Do you even think about what you're saying?” Of course, with Nancy, that doesn't happen too often.
“Anyway, in the course of developing your computer programming skill, you will learn so many different languages, each with its own strength and weakness. No one can tell you what's the best language to learn. If he does, he's wrong!” 

No comments:

Post a Comment