C-SHARP - 2.1 What is programming?
Hello everyone and welcome to this new video. Today we will see together "What is programming" We often hear about this notion of programming, but what is it in reality? Well simply programming is a series of instructions or tasks if you want, that we will give to our machine and that will allow us to have what we want. As we saw in a previous video, the computer was instructed to display something in the output window. We clicked on the Play button the code ran and we got what we wanted to display. However, small precision a machine executes the orders given to it, but it does not have this ability to think for itself. It is therefore necessary to explain to her in detail what she must do. I will take an example so that you understand better. Let's go and get the recipe for a chocolate cake. First of all: - Preheat the oven to 180° - Melt 2 chocolate bars and 250gr butter. Then we must -Mix. - Add 3 eggs and beat -If the oven is 180°, put in the oven. And once finished we get the cake Bah you see all this, it's called an algorithm. These are tasks that are performed in order to obtain an end result. The recipe is basically the code we are going to give to our machine, and then our machine will execute this code to get what we want who, here is the cake. Our machine here is not a computer but rather a Thermomix. Code has been injected into this machine and it is running it in turn. If the code he was injected with is perfectly written then the machine will execute what it was asked to do without having any problem and we will have our cake at the end. On the other hand, if our code contains errors then the machine will not execute the code or we will have a different result than what we wanted to have. An uncooked cake, too sweet or other... If we summarize all this, that's what programming is. We first have a step in designing the algorithm: We will define the instructions, information, conditions to get what we want. Then once the algorithm is designed, the developer will transcribe it into the desired language. The famous lines of code. And to finish we have the compilation step. Here we will translate what the developer wrote into Machine language also known as binary language because yes, indeed a computer only understands one thing, it is the binary language. 0 and 1 And once translated, the computer will run the program. Now if we go back to the recipe in more detail, we see that here we have several information. For example, here we have numerical values that will be called in programming: Variable. Here we have an "if" that will check that if the oven is at 180° then we will put the preparation in the oven and that in programming it is called a condition. Well, we're not going to detail everything in this video, however we'll see together in the next videos the notions of variable, conditions, loop, functions, collections etc... with theory but also a lot of practice in order to properly master all its notions that we have just mentioned. So I'll tell you right away to start with the variables.