Indicate the source and author's contact information during reprinting.
Contact information of the author: Li xianjing <xianjimli at Hotmail dot com>
I often admire foreigners, a large project with hundreds of thousands of linesCode, It looks like a person wrote it. In the previous projects, let alone all the code. Even the code written by the same person in different periods is inconsistent, and the style is also refreshing. I have maintained a lot of code. I have a deep understanding that it is very important to adopt the same programming style for the same project team. I often say to my team members that developing a good programming style will reduce the curse of people who maintain your code.
For programming style training, I generally use Huawei's "programming specifications and Examples" and Lin Rui's "high-qualityC/C ++Programming as training materials, thanks to their efforts to sort out these materials.
The program specifications and examples are explained twice, and some terms are discussed. For example, spaces are used as indentation and at least20%And so on, I do not quite agree with them and do not require them to comply with them.
I will explain it all over again. For some new students, on the one hand, they have no experience and have no idea why they should have such a provision. On the other hand, they cannot remember that. I want to give them the impression that programming must be conducted according to specifications. It will make them write a little bit laterProgram, Points out the problems in their programs, this effect may be better.