Programming automation with algorithms
Introduction
Programming is the process of creating a set of instructions that tell a computer how to perform some type of task. But not just the action of writing code for the computer or software to execute. It also includes all the tasks necessary for the code to work correctly and fulfill the objective for which it was written.[1].
Currently, the notion of programming is closely associated with the creation of computer applications and video games. In this sense, it is the process by which a person develops a program, using a tool that allows them to write the code (which can be in one or several languages, such as C++, Java "Java (programming language)") and Python, among many others) and another that is capable of "translating" it into what is known as machine language, which can "understand" the microprocessor.[2].
How a program works
To create a program and have it interpreted and executed by the computer, the instructions must be written in a programming language.
The language understood by a computer is known as machine code. It consists of basic instruction sequences that the processor recognizes, encoded as strings of numbers 1 and 0 (binary system). In the early days of computing, it was programmed directly in machine code. Writing programs like this was too complicated, it was also difficult to understand and maintain them once written. Over time, tools were developed to facilitate the work.
The first scientists who worked in the area decided to replace the sequences of ones and zeros with mnemonics, which are abbreviations in English for the function performed by a processor instruction. For example, to add you could use the letter A from the English word add. They thus created a family of higher-level languages, which are known as assembly language or simply assembly (in English, assembly). Over time, assemblers incorporated additional facilities, but always maintaining a direct correspondence with the processor instructions. On a conceptual level, then, programming in assembly is very similar to doing it in machine language, only in a friendlier way.
As the complexity of the tasks performed by computers increased, assembly language showed limitations. To make a program you had to know in detail how the computer where it was going to run worked, what instructions it provided and how to use them. Sometimes the instructions were too basic, for example there could be one to add two numbers but not to multiply, and then it was necessary to program an algorithm that would perform the multiplication based on more basic instructions. Other times, the way to use the instructions was cumbersome. Furthermore, if another computer model was used, in many cases the program had to be rewritten with other instructions. The next step was to create the high-level languages.