The second week of personal blog work--whether code specification is required

Source: Internet
Author: User

1. Whether code specification is required

Consider the following arguments and refute / support for whether you need to have code specifications:

    1. These norms are the result of the bureaucratic system of wasting everyone's programming time, affecting people's development efficiency , waste of time things.
    2. I am an artist, a craftsman, I have my own norms and principles.
    3. Norms can not be forced to all, should allow many exceptions.
    4. I'm good at coding, you can listen to me.

First, there is no doubt that code specifications must be there. Remember when you first learned C language, the teacher told us some examples of coding, such as the equal sign on both sides to add a space, the operator on both sides of a space. At that time, I feel that these rules are too cumbersome and pedantic, that we Chinese people like to engage in such formalized things.

Sophomore semester, I enrolled in the Coursera of a Princeton University algorithm course, this course is a rave. However, when the first time I submitted the programming job I was dumbfounded, the evaluation system even for the style of the code also has a clear test, there is a failure can not be correctly submitted. The style is even fine-grained to The inside of the For loop, and the next statement is empty, with spaces on both sides of the IF statement ...

To say the truth, according to the system prompts, the code 1.1 points modified, obviously feel the code from visually more beautiful. At the same time I also gradually found around the students are also in the habit of developing such habits, they also understand the meaning of such norms. The so-called norms, more like a conventional practice, you can choose not to comply with the norm is not the law. But as long as you need to integrate into a collective, need to communicate with a group of people, work together to complete a project, need to read other people's code also need to put their own code for others to read, at this time, the value of the norms can be reflected. If members of the group are able to follow the same rules and develop a universally accepted code style, it will reduce the frustration of many reading habits and make everyone happy.

Based on the above sentiment, in fact, the above several problems are not difficult to answer.

1. Compared with the time spent on naming, knocking a few spaces, reading the code does not correctly understand the meaning of variables, because the code heap together to see the mood irritability more influence efficiency, wasting time.

2. This is not a problem, if you are particularly strong, able to support a large-scale project, in the future work completely do not need to cooperate with others, you can stand alone.

3. There is no problem with a modest exception, like the use of curly braces, everyone is different. But too much, try to make yourself accustomed to the public better.

4. Those who are qualified to say this sentence, the entire computer science community, the dead are counted on no more than 10.

The second week of personal blog work--whether code specification is required

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.