The purpose of using the computer is to solve the problem, we can regard the program as a problem-solving process and a description of the results. This is not fundamentally different from the way we use processes and norms to guide things, and it is much simpler. So we want the computer to understand our natural language one day so that we can communicate with the computer using natural language and direct the computer to do things. But both natural and existing programming languages require computers to understand, and this understanding is consistent with the understanding of communicating with others. Therefore, it is crucial to organize and express exactly what is to be done in a clear and accurate manner. This also tells us from another angle that the ability to program is communicated with the ability to express (and organize) our daily work. But it is important to note that this kind of organization and expression, can be said (voice), writing (writing), doing and thinking of a single or combination. At present, the organization and expression in programming tend to be written and thought. This is why some friends are not very good at speaking, but will do (programming).
Many of the experiences that humans accumulate in work, study, and life are very useful in programming. Because programming itself is digitizing the simulation process that we're dealing with. Therefore, when we are experiencing problems in our programming process, we should be proactive in learning from the past (experience) and now (other areas). There is no need to regard programming as a mysterious thing. For example, object-oriented and process-oriented programming ideas, a series of design patterns, etc. are derived from real life. This also reminds us that if we have problems in the programming process, we can put aside the programmed thinking of the computer and see what we would do without the computer.
We know that for natural languages, there are three elements of speech, vocabulary and grammar. For programming languages is based on natural language, so there will be some differences in composition, speech is to take natural language voice. Vocabulary is much less than natural language vocabulary. The programming language has only the basic vocabulary, which is the key word in our programming language. Similarly, the syntax of a programming language is much simpler than the syntax of natural languages. Although the vocabulary and grammar of programming languages are much simpler than natural languages, programming languages are very strict. Polysemy and ambiguity are generally not allowed.
Different programming languages generally have their own vocabulary and grammar, but in fact the difference is not particularly large, in terms of vocabulary: Data type Vocabulary (string, number, etc.), flow expression vocabulary (statements, judgments, loops), auxiliary vocabulary (note). The syntax similarity is actually much larger (refer to the compilation principle). The biggest difference between programming languages, I think, comes from the base Class library (but that's not really the difference in language itself). The difference between high and low-level languages is mainly lexical. The difference between strongly typed and weakly typed languages mainly comes from the processing of data types. Mainstream high-level language mainly has C style, Pascal style and so on. When we went to college, the specific language only learned one, the general course involves the use of pseudo-code, the pseudo-code between natural language and programming language. If you want to practice, you can easily convert from pseudo-code to a target programming language.
The Basic vocabulary plus order (implied), branching and looping three elements of the flow of expression constitute the basis of the programming language organization and expression. The most important difference between process-oriented and object-oriented is the way the program is organized. Service oriented, aspect-oriented programming is more of a perspective difference. This is discussed later in more detail.
Because of the nature of the computer itself, the vocabulary and syntax of a programming language are simple, but it is because of this simplicity that complicates programming and makes the workload surprisingly difficult. For example, "Save the order in the database", for natural language, the expression is very simple. But for programming languages it requires a large number of statements (if implemented directly with 01 instructions, then the programmer of cow B to complete this task, not a two days can be done). Therefore encapsulation, reuse becomes very important.
1) If the programming process does not understand how the business process, you can imagine how to do the manual;
2) to improve their organization and expression skills for work, learning, life and programming are very useful;
3) Some experience patterns in work and life can also be used in programming design. (scenario analogy can be used). It is suggested that you should think more about similar scenes in real life when learning design patterns.
I have a lot of articles in front of me about design patterns. Interested can be consulted.
??
Learn to program together (3--organization and expression)