Joke Collection Website - Talk about mood - What exactly is programming? Detailed explanation

What exactly is programming? Detailed explanation

I think the metaphor in the recipe above is not very appropriate.

Because a recipe is a kind of workflow, which describes what to do first and what to do next, as well as the resources and time used, and a program can not only be regarded as a workflow, but also a kind of generative work. Logical description of flow, that is to say, in addition to arranging the steps in the recipe, you also need to know the logical relationship between the ingredients and steps, such as whether to fry first and then stew or stew first and then stir-fry, whether to put oil, salt, sauce and vinegar first or last. Oil, salt, sauce, vinegar, what things cannot be put together, etc. These are achieved through programming and logical judgments in the program, which are not found in recipes (for example, there will be no description like "if the frying is burnt, add some sugar"). Therefore, recipes are simply process descriptions, and programming and procedures are more advanced and complex concepts than recipes.

In fact, programming in vernacular means how to control a computer to use various hardware resources to process data and information. Therefore, programming is divided into several levels. The bottom layer deals directly with the hardware and is used to control the execution of the hardware, usually assembly programming; the top layer is software programming, which directly processes data and information, and the programs written are directly oriented to the users of the program; between them are Operating system level programming is used to build a bridge between the lower layer and the upper layer. I won’t go into details about each level, otherwise it would be enough to write several books.

Most programmers belong to the software programming level. Other programmers generally must know the hardware they use very well, because their programs are to operate these hardware.

After talking about the classification of programming, let’s talk about what programming actually does. Let me also use an analogy. I liken programming to education. The computer is a child. To sum up, it means teaching the computer what to do and how to do it, that is, educating children to do things. The program written by programming is a code of conduct.

For example, if I want to teach a child to cross the road, then I tell him a code of conduct for crossing the road: "Look left first. If there is no car coming, go to the middle of the road. If there is a car, wait for it to pass." ; When you get to the middle of the road, look to the right. If there is no car, go there. If there is a car, wait. "

I told my "child" about this "code of conduct" (procedure) for crossing the road. computer), he can strictly follow it.

The inappropriate part of this metaphor is that my "child"'s learning ability is really limited. He will only follow the "code of conduct" I have written. He will not know what I have not written. How to do it. However, "children" in the future will definitely enhance their learning abilities and generate new "behavior norms" through "behavior norms", and new "educational methods" (programming methods) are also constantly being researched.