This Article is pretty different from my other articles. This time we will look at the grander picture by answering what is programming. I will try to provide three kinds of answers; What the Census (Internet People) says, What my school education says and what I say. You may have another opinion.
There are somewhat two answers that you will find when going to the internet one just says programming is instructing the computer to do various tasks and the others try to answer what a programming language is. Let us get to the first one.
When we code we tell the computer to do something. When we want to get the sum of
6 we tell the computer
print(3 + 6). These tasks can also be way more complex than that for example we could edit images or do requests to get data from API’s. But how do we tell the computer what to do?
When we program we use dedicated languages that the computer can understand or translate into
Now, what does my education say?
In school, we have learned that you can imagine programs like a flow chart of Commands and Decisions. This has to do with the instructions I mentioned earlier. A flow chart for a program might look something like this.
As you see the program starts at the top and it then creates a new variable called
x. After that, it will check if the variable holds the value
5 if that is not the case we print it out with a command (function), add one to it, and then check again. But if
x turns out to be
5 we print out
Finished. After that, the program is done.
But to make computer programs you need to have Computation Thinking which means that you can or understand five things.
- Split up the problem into smaller more manageable parts. (functions)
- The program should be able to solve problems like this not only this one.
- Pattern Recognition
- You need to be able to see the similarities between problems and work them out. (Loops)
- You need to be able to take out the detail and ignore irrelevant information.
- You need to be able to define simple rules or processes by which the program acts.
The last one
algorithm is pretty important. Even people that don’t program encounter an algorithm. As you know you can get out of any labyrinth by sticking to the left side but this does not work if the labyrinth has islands. If you press the reset button on the frame below you will see that the white rectangle will navigate out of the labyrinth by sticking to the left wall and by using the pledge algorithm
Now in my opinion programming is when you do four things with any kind of data.
I think almost all if not all programs just do these four things. It has not to be in that order but all of them are needed. For example, when I open paint the program opens an image gets the data from it and displays it. If we now draw onto the image the program once again gets data changes, saves them and will display our changes.
Now, what do you think?