Program code:
Programming languages
Structured programming
Programming style
Program Complexity Metrics
Programming Languages:
Category: Low-level language, high-level language
1, can be divided into assembly language and high-level language two categories
① Machine languages, assembly language
② High-level language (same problem, high-level language coding can be 3~7 times less than assembly)
2, from the intrinsic characteristics of language, high-level language can be divided into system implementation language, static high-level language, block structure of high-level language and dynamic high-level language four categories:
① System Implementation Language
② static high-level language
③ block structure high-level language
④ dynamic High-level language
The choice of language: The ① of different application areas the choice of language ② system user requirements determine ③ can use the compiler program ④ Programmer's experience and knowledge ⑤ software portability requirements ⑥ when the project scale is large, and there is no perfect language, can be a dedicated language ⑦ algorithm and computational complexity, Software reliability ⑧ data structure complexity, software maintainability ⑨ Efficiency Considerations ⑩ understand the development prospects of language
In short, the principle of choosing a language is: ① minimum workload principle ② least skill Principle ③ least error Principle ④ minimum maintenance principle ⑤ memory reduction principle
First, the general principle:
1, the first to seek the right after the fast
2, the first to seek clarity after seeking fast
3. To keep the procedure correct, please do not forget
4, keep the procedures clean and fast
5. Do not sacrifice clarity for efficiency
Second, good procedure standard
1. Easy to test and debug
2. Easy Maintenance
3. Easy to modify
4. Easy and simple
5. High efficiency
Structured programming
There are two main aspects of structured programming:
1. When writing a program, emphasize the use of several basic control structures
2, in the process of programming, as far as possible to use the principle of top-down and gradual refinement, from coarse to fine, step-by-step expansion
The main principles of structured programming:
Representation of program logic using limited basic control structures such as order, selection, repetition, etc. in a language
The chosen control structure permits only one inlet and one exit
Complex structures should be combined and nested with basic control structures to achieve