What Is a Programming Algorithm?
If you are reading these lines, it is because you already know what a computer is. Anyway, you know what it’s for, and what it looks like. Here, now, we are going to explain how a computer works as well as the principles of programming.
This machine contains a whole bunch of electronic components and also some mechanical components, fans, for example, to cool the whole.
You will know very well how to find the screen, the mouse (or trackpad) and the keyboard.
You probably know the others less: you have to be able to open a computer to see what’s inside. Yet, while not all machines look exactly like the diagram above, all contain the components shown.
In particular, the motherboard is made up
- of a microprocessor that executes what you ask of it
- of a random access memory used by the programs during their execution,
- of several “cards”, electronic components responsible for a specific task.
- The graphics card manages the screen displays, the network card access to the Internet, as for the sound card, it is for the sound, of course!
- and a hard disk that stores data over the long term.
You can have several hard drives, it is safer to save what is on the computer in two different places.
Hard drives do not have an eternal lifespan even if it is 3 to 4 years in general.
“The microprocessor does what you ask it…”
Ah but that’s great, you think! However, you’ve never seen a computer prepare your afternoon snack….
In fact, it will only do what it was programmed to do. But because they are programmed to do more and more things, some people think that soon computers will be able to do as many things as humans. This is why we are going to dwell here on what “programming” means, you will realize for yourself that these people speak more of science fiction than of reality.
Computer programming what is it?
What does programming a computer mean?
A program is a list of instructions written to solve a problem, or to perform an action.
For example, when you start the computer, a program called operating system starts. It is used to manage the display and execution of other programs.
Then if you want to go read a Kidisciences page on the Internet, you need to open a navigation program, which will manage access to the Kidisciences site as well as the display of the site. It will communicate with the network card and the graphics card. There are several: Firefox, Safari, etc.
Also, when you want to watch the video at the end of the article, an image and sound processing program will be run.
Programs are therefore mainly used to manage information, transfer it, generally from the Internet to your screen, transform it and store it if necessary.
The term programming appeared before the first computers saw the light of day, thanks to famous computer theorists Ada Lovelace (1815-1852), Charles Babbage (1791-1871), and Alan Turing (1912-1954) ( more information at the bottom of the article with links to videos and other articles). Computers were, in fact, created to run programs. Better and faster.
- But to design software, you don’t just need to know how to program.
- The software must be attractive, easy to use, and also easy to improve and adapt to other functions or new machines.
There is therefore a lot of software design work, not only on the visual aspect but also on all the programs to be written:
- How to break it down into several “subroutines”?
- Which programs for which function?
- What tests do I do to be sure it won’t crash?
- What data is needed?
It is software engineering: it begins with the analysis of the different functions and requirements, then continues with the technical choices, and finally ends with programming.
Rather than programming, we sometimes say coding because programming consists of translating actions into a language understood by the computer so that it can perform them.
What is a programming language?
With computers, powerful calculating machines, another element appears: the programming language. These are the words, vocabulary, and grammar with which the program is written.
The machines being, as you saw, only electronic components, they do not understand our language, we must therefore translate everything for them.
An instruction from a program in assembly language, one of the oldest languages, looks like this:
more 61,% al
It is about a single line of a program which makes it possible to make additions.
This language is close to the machine because you have to break down all the actions into very simple, elementary operations that tell the processor exactly what to do.
For example, this programming line means that you have to store 61 in the place named “al”.
- You can imagine that the following lines allow to store the second number, to add these two values, and to store the result of the addition in a different place.
- Yes, yes, this language is very technical, but it allows maximum control over the execution of the calculations of the machine!
- And one of the first programming rules to respect is that you have to be able to reread and understand a program that you yourself wrote a few months ago, or a few years ago!
- So we created other languages to be able to write complicated programs without getting lost.
- The source program, written and understood by humans, has thus been separated from the binary program which is the source program automatically translated for the computer.
- Yes, a program is responsible for translating the source program and handling memory and all that boring or hard-to-know stuff for those who are not experts in machine architecture.
- No, it sounds complicated but it’s very simple: a program is a series of instructions to be followed in order, for example, to open a video on the Internet.
A programming language is used to communicate with the computer so that it can run the program efficiently.
The same program can be written in different programming languages, but some languages facilitate certain actions or allow better handling of complicated data structures.
IT = disciplines
We have approached some of the computer disciplines:
- Architecture, which is concerned with the electronic components of the computer,
- The networks which manage the external connections between computers, in particular efficient transmission and security,
- Development software, which is the development of successful, complex programs that can be used by everyone.
- It is also important to remember that all of these disciplines are linked. And since you can’t find experts in everything, you have to work as a team!