This lesson will give a quick but thorough overview of what programming is, what we need to know to program, and the contents of our programming toolbox.
Computers are intended to help people solve problems, from weaving cloth, to doing complex calculations for the Army during WWII, to helping man fly to the moon and back. They are an amazingly useful tool.
But, they’re also as dumb as a pile of rocks. By themselves, they only take up space. Friends of mine have referred to them as ‘boat anchors’ or ‘door stops.’ By themselves, they are just expensive collections of metal, plastic, and silicon.
If that’s all they are, how do they do all of the things they do?The answer is programming. Somewhere, a programmer wrote a program (or a bunch of programs) to tell the computer what to do. As a programmer, your job is to take a problem, break it down into a series of steps, and describe those steps to the computer so it can arrive at a solution to the problem.
Making Pancakes: An Example
Let’s look at making pancakes. (And, who doesn’t like pancakes?)I get up on a Saturday morning and decide to go to the Pancake House for pancakes. I go in, get seated, and the server comes up with coffee and takes my order.
I ask for pancakes, he writes down my order, and disappears into the kitchen. I sip my coffee a bit, and after a couple of minutes, the server appears with pancakes!Now, let’s say I decide to have my computerized robot make pancakes for me at home. I go down to the kitchen and say, ‘Robot, I’d like some pancakes, please!’ Nothing happens. So, I say, ‘Robot, make pancakes, please!’ Nothing.Finally, Robot says, ‘Boss, I don’t know how to make pancakes!’ I knew I’d forgotten something!
Programming Pancakes: What Do We Need to Know?
In order to get Robot to make pancakes, he has to know about such things as: what a kitchen is, what a stove is, what a griddle is, what a bowl is, what pancake mix is, what eggs are, what milk is, what cooking oil is, what a spoon is, where everything is, how to measure and mix ingredients, how to tell when the griddle is hot enough, how to tell when to flip the pancakes, how to flip pancakes, how to tell when to take them off the griddle..
.Which means I have to tell him all of this and describe it all to him in a language he can understand! And, that’s just to make pancakes. We haven’t even talked about how to serve them, what to serve them with, and, of course, how to clean up!
Programming Pancakes: How Do I Do It?
I have to look at the process of making pancakes, break it down into chunks, and describe each chunk to Robot using a language he can understand. And, that’s programming – describing the problem in code so that the computer can give you the answer you’re looking for.To do this for Robot, I’ll need to know all of the steps to make pancakes.
Then, I’ll use the tools in my programming toolbox to write the code for Robot. I’ll need math, logic, the five basic kinds of programming instructions, and how to put all those together in something called an algorithm.Or, as I said in the beginning: take a problem, break it down into a series of steps, and describe those steps to the computer so it can arrive at a solution to the problem.
Programming requires two important skills – the ability to analyze and understand a problem and the ability to describe that problem to a computer so it can arrive at a solution.Now, I gotta go teach Robot how to make pancakes!
After watching this lesson, you’ll be able to explain what programming is and its importance.