coding Notes (summary)

Recently I write code, always Tucao, the code is badly written, not the details of the deal.

So to sum usually encountered under the following points and areas for improvement.

First, the name is not standardized

1, often encountered variable name wrong

 2, the name is not authentic, Pinyin do not exist, and when reading the code to see the name to know the role of this function and variables

 3, do not appear brainless wrong spelling

4. For each comment we have to seriously

 

 While some look to understand the usage of the function, we do not add descriptive text, but must correspond to function well

Second, the use of naming and cherish each parameter variables

1, useless to try not to apply variable parameters

 

 param obviously not used, this time we have no need to declare, you can send directly to a nil function inside.

 

  

2, for the operation of some of the array to be passed when we know the value of time can be initialized directly, do not deliberately append

 

 

 If the change is not below a lot of it will be refined

 

 

Guess you like

Origin www.cnblogs.com/ricklz/p/11645679.html