Team Project Development "code specification": overview

Source: Internet
Author: User
Tags coding standards

This article from: http://www.cnblogs.com/huyong/archive/2011/03/18/1988423.html

 

"ProgramMembers and programmers ", as the name suggests, are the people who compile programs. They are the same as general staff and all need to work together. For a large project program, there may be more than 10 people or more than people working together in a team company. Code specifications make programs standardized and easy to understand, in order to better cooperate.

There are a lot of software for developing programs. However, all of their checking methods are checking the syntax, and there is no rule for the naming of variables and Methods. Therefore, annotations are necessary. However, if you want to standardize the naming of variables. Naming in Java and C # is the closest to the natural language. The disadvantage is that the name is too long. You don't like your boss, but you have to make money from the boss.

Like is one thing. Making money is another thing. It is too difficult to find something that you like and make money. The name is actually longer and better, because the ideographic nature is very good.ArticleAt a glance. This will make others better understand your program writing ideas.

Many people are reluctant to write long names. The main reason may be that they are afraid of hard work. The Visual Studio 2005 we are using now has a very convenient copy function. In fact, all of my variable names and function names are copied and pasted.

Another benefit is that I wroteCodeThere will never be a mistake, or a bug caused by a wrong character. Using a good habit to solve a whole bug is not cost-effective? If you are not very familiar with English, you can go to Kingsoft and learn about English and coding. Besides, if you choose the programmer path, English is the key.

Code specification 1: it makes your code easier to maintain. A program is not a one-time product and needs to be expanded, modified, and maintained. However, you must be the person who performs this operation. Therefore, you need to carry out the standard code to the end for your successor!

Code Specification 2: code quality can be improved. No one programming is completed at a time. It requires continuous testing and debugging to modify its own code in various states, and code standardization, the program itself can have a clearer structure, thus reducing debugging and becoming a fast and efficient code.

The third and most important part of coding standards is to personalize yourself into a team-based process. When you use coding standards skillfully, it will be equal to a broader career path in the future.

Coding standards are a habit, so at first we get used to being unhealthy and never write engineering code.

 

1.1Definition

1.1.1 PascalCase sensitivity

The first letter of the identifier and the first letter of each word connected to the end are capitalized. It can be used for three or more characters of identifiersPascalCase. For example: Backcolor

 

1.1.2 camel Case sensitivity

The first letter of the identifier is lowercase, and the first letter of each connected word is uppercase. For example:Backcolor

 

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.