Programming is the orderly organization of computing instructions to achieve the desired things and results.
first, logical semantics and physical semantics
The logical and physical semantics of instruction are the starting point of programming. Logical semantics refers to the semantics from the point of view of the problem and the natural understanding, and the physical semantics refers to the semantics from the point of view of computer storage and operation. For example, the logical semantics of int i = 4 is to create an integer variable with an initial value of 4 in the program, and the physical semantics is to allocate 4 bytes in computer memory with a value of 0x00000004. Programming languages provide semantic mappings from the logical semantics of instructions to physical semantics, and we usually use programming languages to programmatically program them from logical semantics. When writing a line of code, you should understand the physical semantics of what it refers to.
Second, encoding and decoding
Coding and decoding is the method and technique of representing and restoring all things in the computer. To solve the real world problem in the computing world, we must map the real world to the computing world, which involves the coding problem; To map the solution of the computational world to the real world involves decoding.
Third , data structure and algorithm
After understanding the logical-physical semantics of programming language, the next two major weapons to master are data structures and algorithms. The data structure is an important magic weapon to store and organize in the program, and the algorithm is the operation sequence which is designed on the data structure. Data structure and algorithm is the basis of problem solving, is the essential element of writing large-scale program, is the cornerstone of computing world.
Four, design mode
After you are familiar with basic data structures and algorithms, you will learn design patterns.
Writing a small program, the code is not related to a group, but when writing a large-scale software system, without the help of design patterns, the code organization will be mess pasta, difficult to modify, expand and maintain, the system will soon be corrupted as no one wants to move its waste. The design pattern is the structured thinking gymnastics of cultivating object programming.
V. modularity and encapsulation
Mastering programming language, coding and decoding, data structure, algorithm, design mode, basically can be competent for the construction of small and medium-sized programs. However, in order to master medium and large software systems, we must learn to modularize and encapsulate the universal logical flows (data structures, algorithms, functions, methods, objects, code structures, business logic, etc.) that have been realized, become reusable modules, and carefully design the interaction between modules.
Vi. Process and memory
When building and running the program, you should understand the program's operating mechanism. Understanding process and memory management is a must. Further, it is necessary to understand the CPU, memory, disk IO, network resources and the program response time and concurrent throughput that the program occupies. Know it but know why.
The programming technique is changeable, but original aim. Mastered the programming of the six most basic internal strength of the heart, you can begin to contact a wider range of technical moves:
such as databases, management and retrieval of a large number of sequential records of the technology;
such as regular expressions, flexible manipulation of text technology;
such as socket programming, the basic technology of network programming;
。。。。。
Programming Ramble (10): six most basic internal organs heart