Code style advice from Google

Different codes have different styles. This is normal. If the same code has many different styles, it may not be a good thing.

The communication between project personnel and the cost of changing project personnel will all change because of the code style. The code is not executed by the computer, but it is written, viewed, and modified by humans, so even if your No matter how well the code is written, if no one can understand it, the computer may not be willing to read it (the last sentence is my guess).

 

Let people understand your code, and if they are comfortable, the logic of the code is very important, and the style of the code is also very important.

I am a person with code cleanliness. Usually, I do not allow the content with yellow prompts in my code. I often communicate this problem with my TEAM staff. Whoever, whoever, there are things in your code that are not used now can be removed. No, I look at the big head, that sort of thing.

 

How to make my code style acceptable to everyone? If I make a code style according to my own habits, it may not be convincing to the public. So I recommend everyone to use Google's coding style to restrain themselves. Rules are awkward at first, but the longer you go, the more benefits you will receive. Of course good rules!

 

The link below is google's CodeStyle suggestion, which contains code styles for various programming languages.

https://code.google.com/p/google-styleguide/

 

At present, I may be more exposed to Java, c++/c, js, html/css, python, etc. Next, I will decide which aspect to learn first according to the frequency of use of the programming language and the use of the project.

 

CONTENT LINK //TODO

1. JAVA code style advice

http://tangmingjie2009.iteye.com/blog/2121984

2. Python CodeStyle

http://tangmingjie2009.iteye.com/blog/2173668

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326480688&siteId=291194637