Programming specifications and example training (1)

Source: Internet
Author: User

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.

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.