Current location - Recipe Complete Network - Complete cookbook of home-style dishes - What is programming?
What is programming?
1, the so-called programming is to give orders to the computer to make it do what you want.

2, the so-called object is the object you want it to do, just like you want Zhang San to buy cigarettes, Zhang San is the object, you want Li Si to buy wine, and Li Si is the object. In flash, it can be mc, button or something.

Ten packs of .35 cards are attributes of cigarettes. The wine bought is Erguotou. Erguotou cards are attributes. These are attributes such as quality and weight. In flash, there are many attributes such as transparency, rotation angle, coordinate values of X and Y, etc.

4. The so-called methods are things that can be done. For example, Zhang San is a sister, and she can buy a car, a house, etc. Marry her and buy a car.

5, the so-called instance, the instance of an object is a copy of the object, all the attributes and methods of the object, etc. All the instances have all the attributes and methods of the prototype object, and you can also use the methods of the object, etc. For example, Zhang San's son can marry a wife and start a family like Zhang San. The son of a mouse can steal things and grind his teeth like his father.

6, the so-called function makes the commands organized so that they can be completed. And give this set of commands a name. When using this function again in the future, it is ok to tell this set directly with a command, so that this set of commands is a function.

7. The so-called grammar, when programming, the object or instance is connected with its attributes and methods by "."

Simply put, programming is to use a program to achieve a certain purpose or solve a certain problem with the help of a computer.

although computers are very powerful. It can be used for you to surf the Internet, play games, manage the company's personnel relations, etc., but without the program, it is equivalent to a pile of scrap iron and will not pay attention to the "orders" we give it. Therefore, we have to tame it in only one way-program, which is also the only way for us to communicate with computers.

what exactly is the program?

A program is a collection of instructions that tell a computer how to perform a special task.

For example, it is like instructing you to cook a menu or directing a traffic policeman (or a traffic sign) to drive all the way to your destination. Without these special instructions, the expected tasks cannot be carried out. The computer is the same. When you want the computer to do something for you, the computer itself can't actively work for us, so we must give instructions to it, and it can't and can't understand the description of things in human natural language at all, so we must use programs to tell the computer what to do and how to do it. Even the simplest tasks require instructions, such as how to get keystrokes, how to put a letter on the screen, how to save files on disk, and so on.

it's so troublesome, even the programming of these things should be considered! No wonder people say that programming is so difficult! You are wrong. In fact, many of these instructions are ready-made, contained in the processing chip and embedded in the operating system, so we don't have to worry about their work. They are all completed by the processor and the operating system, and we don't need to intervene in these processes.

The computer mentioned above will not do anything on its own initiative. Therefore, we should make the computer "serve" for us by means of programs. And this process is made up by us. Programming can be realized by using a certain programming language, and what the computer is asked to do is described according to the grammar of this language.

The grammar we are talking about here is completely different from the grammar in a foreign language. The grammar we are talking about here is just to read your program and write rules.

After writing the program, your program will be interpreted or translated into a "computer language" that the computer can recognize, and then the computer can "understand" your words and do things according to your instructions. Therefore, programming is actually a process of "people make rules for computers".