What is computer programming?
Simply put, programming is the process of using a programming language, with the help of a computer, to write a program code to achieve a certain purpose or solve a certain problem, and finally get the result. \x0d\ Although computers are very powerful. It can be used for you to surf the Internet, play games and manage the company's personnel relations. But without a program, it is equivalent to a pile of scrap iron and will not pay attention to the "orders" we give it. Therefore, we can only tame it in one way-program, which is the only way for us to communicate with computers. \ x0d \ x0d \ What exactly is the program? A \x0d\ program is a collection of instructions that tell a computer how to perform a special task. \ x0d \ x0d \ For example, it is like guiding you to make a menu, or directing a traffic policeman (or a traffic sign) to drive all the way to the destination. Without these special instructions, the expected task will not be carried out. So is the computer. When you want a computer to do something for you, the computer itself can't actively work for us, so we have to give it instructions, and it can't and can't understand the description of things in human natural language at all, so we have to tell the computer what to do and how to do it with programs. Even the simplest tasks need instructions, such as how to get keystrokes, how to put a letter on the screen, how to save files on disk, and so on. \x0d\ So much trouble, even the programming of these things should be considered! No wonder some 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. It's all done by the processor and the operating system, and we don't need to get involved in these processes. \x0d\\x0d\ The computer mentioned above will not take the initiative to do anything. Therefore, we should make the computer "serve" for us through the program. And this process is made up by ourselves. Programming can be realized by using a programming language, and what the computer is required to do is described according to the grammar of this language. \ x0d \ x0d \ The grammar we speak here is completely different from that in foreign languages. The grammar we are talking about here is just reading your program and writing rules. \ x0d \ x0d \ 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. So programming is actually a process of "people making rules for computers". \x0d\ With the variety of computer languages, it can be generally divided into three categories: machine language, assembly language and high-level language. \x0d\ Every action and step that a computer does is executed according to a program compiled in a computer language. A program is a collection of instructions that a computer needs to execute. All programs are written in the language we have mastered. Therefore, if people want to control the computer, they must send commands to the computer through computer language. \x0d\\x0d\ The only language that a computer can recognize is machine language. But usually people don't use machine language when programming, because it is very difficult to remember and recognize. \x0d\\x0d\ At present, there are two general programming languages: assembly language and high-level language. The essence of \ x0d \ x0d \ assembly language is the same as that of machine language, which operates directly on the hardware, but the instructions use English abbreviation identifiers, which are easier to identify and remember. It also requires programmers to write out each specific operation in the form of commands. \ x0d \ x0d \ Each instruction of the assembler can only correspond to a very subtle action in the actual operation process, such as moving and self-increasing. Therefore, the assembly source program is generally lengthy, complex and error-prone. Programming in assembly language requires more computer expertise, but the advantages of assembly language are also obvious. What assembly language can do is not what ordinary high-level languages can do, and the source program generated by assembly is executable. \x0d\\x0d\ advanced language is the choice of most programmers at present. Compared with assembly language, it not only synthesizes many related machine instructions into one instruction, but also removes details related to specific operations but not related to the completion of work, such as using stacks and registers, which greatly simplifies the instructions in the program. Because many details are omitted, programmers don't need much professional knowledge. \ x0d \ x0d \ High-level language is mainly relative to assembly language. It does not refer to a specific language, but includes many programming languages, such as VB, VC, FoxPro, Delphi and so on. These languages have different grammars and command formats. \x0d\\x0d\( 1) Interpretation category: The implementation method is similar to "simultaneous interpretation" in our daily life. The source code of the application program is translated into the target code (machine language) by the interpreter of the corresponding language and executed at the same time, so the efficiency is relatively low and an executable file that can be executed independently cannot be generated. An application can't live without its interpreter, but this mode is relatively low-level. \x0d\\x0d\(2) Compilation class: Compilation refers to "translating" the program source code into the target code (machine language) before the application source program is executed, so the target program can be executed independently from its language environment, which is more convenient and efficient to use. But once the application needs to be modified, it must first modify the source code, and then recompile to generate a new target file (*. To be executed. It is inconvenient to modify only the target file without modifying the source code. At present, most programming languages are compiled, such as Visual Basic, Visual C++, Visual Foxpro, Delphi and so on. \x0d\ This question is actually very simple. As we said before, programs are the only way for people to communicate with computers, so if we want computers to serve us, we must have programs. Where do programs come from? Of course we wrote it. Maybe you will ask another question: Why should I program when I have all the programs I want? This is where you are wrong. Although there are many programs now, it won't take long to find a similar program directly on the internet, which may be what you need. However, it's like buying clothes. Although clothes are sold everywhere, which one is tailor-made for you! \x0d\ Programs can do many things, and different programs can accomplish different things. The big aspect is the management of national finance, and the small aspect is the management of family accounts. \x0d\\x0d\ For another example, if you want your computer to play animation, you should also have a corresponding animation player in your computer. Below is an F 1ssh animation player. We will describe the programming process of this program in detail in later chapters. \x0d\ With the rapid development of computers, people who can't program will be classified as "illiterate" one day. You don't want it, do you? Then learn a programming language well. \x0d\\x0d\ Will programming become obsolete \x0d\\x0d\ Will programming become obsolete? Let me ask you a question first: Will computers disappear? The answer is the same. Knowing whether computers will disappear, you will know whether programming will be out of date. \x0d\\x0d\ Programming tools will be out of date, but programming will not be out of date \x0d\\x0d\ A computer system consists of a visible hard inverted system and an invisible software system. In order to make the computer work normally, it is impossible to have only a hardware system. A computer without a soft drop system (that is, without a program) can be said to be just a pile of scrap metal, and nothing can be done. For example, if you write an article, you need to use the text editing software in the operating system to input the text, but without these text input software, have you ever thought about how to input the article into the computer? It's hard to imagine how to input text on a computer without any software (we call it bare metal). And these softwares are actually what we usually call programs. \x0d\\x0d\ programming will be out of date? Let's consider this problem from another angle. Will computers disappear? If one day everything in the world does not use computers, computers will soon disappear, and programming will not only be outdated, but also disappear. But will computers disappear? Of course not. Nowadays, computers are used in various fields and have made immeasurable contributions to human development. Imagine what the world would be like if computers all over the world suddenly disappeared one day. Maybe it will be as terrible as a power outage all over the world, and the loss will be even greater. The existence of computers must be maintained by software systems. Therefore, programming will never and cannot be out of date. \ x0d \ x0d \ Computer programming language has developed from the most primitive machine language to today's visual integrated development environment, and even integrated many languages on the same development platform, like Microsoft's NET platform. Looking back on the development history of programming languages, it is not difficult to see that for programming, only programming tools will be outdated, and programming itself will not be outdated. \ x0d \ x0d \ Changing technology requires changing programmers \ x0d \ x0d \ Since 1960s, computers have developed by leaps and bounds. It seems that no science in history has developed faster than computers, and hardware, software and network have all developed at an alarming rate. The development speed of computer hardware follows Moore's Law, doubling every 18 months (in fact, it has exceeded this speed now). The development speed of software is the same as that of hardware. In the 1990s, China's software industry was not very mature. Nowadays, large and small software companies abound, and * * * software can be seen everywhere on the Internet. The ever-changing technology requires ever-changing programmers. For example, Visual Basic can quickly build applications under Windows, and the technology of programming is constantly developing, and new concepts and methods are constantly introduced. For example, from the beginning of structured C, when the object-oriented idea was put forward, C++ appeared. On the basis of C++, Microsoft introduced Visual C++ to make it easier for users to build win32 applications. This also requires programmers to constantly update their skills. \ x0d \ x0d \ Computer science is very different from other disciplines. Unlike linguistics and history, it is almost permanent. Computer science needs to constantly update its knowledge, otherwise it will soon be eliminated, even in programming. \ x0d \ x0d \ programming is a very interesting thing, because programming can do many advanced things. For example, in the following chapters, we will introduce how to write a Flash animation player with Visual Basic and how to write a download software manager. You can write more advanced programs than these if you like. \ x0d \ x0d \ With the development of computer software industry, the position of "programmer" was born. So a concept is formed that the person who writes the program sequence is the programmer, so programming is the programmer's business. But programmers were not programmers from the beginning, but gradually became programmers from our current positions. \ x0d \ x0d \ programming is a very interesting thing, because programming can do many advanced things. For example, in the following chapters, we will introduce how to write a Flash animation player with Visual Basic and how to write a download software manager. You can write more advanced programs than these if you like. \ x0d \ x0d \ programming can also be used as a hobby or interest. If you are interested in it, it will be much easier to learn! Because if you are interested in programming, you will read more books about it and compile more small programs to practice on the computer, which is very helpful for learning programming, and with the continuous advancement of the learning process, you will find that it is not difficult, but easy. \x0d\\x0d\ In short, learning programming must be persistent, as long as you have confidence and perseverance, you will learn it well; Don't shake your confidence because of some specious ideas. \ x0d \ x0d \ Let's program \ x0d \ x0d \ how to operate the computer in front of us. I believe this problem is no longer the primary problem that bothers everyone. There are many kinds of software now. When choosing, did "computer enthusiasts" ever think that they could write their own software one day? Will friends who want to learn programming have a big headache when choosing a programming language because they don't know how to choose it? When I don't know how to start, will my friends say, "Can I program?" But any programmer can succeed without learning! In fact, programming is not as difficult and complicated as people think, and every friend who is committed to learning computers can try! \x0d\\x0d\ The necessity of choosing an appropriate programming language.