As a programmer, there is no code comments make you feel both speechless and crashes?

As a programmer, it can be described as every day, stay up late to work overtime, can not read countless times program code, do not know how many times to see those people both feel speechless and Ben collapse of the code comments. You think you can read the code, and have the confidence to optimize the code, once you begin to try this code, you will be trapped in the endless night, the end of this painful process of swearing in.

There are more users with respect, to write their own code is the variable name and Chinese phonetic annotation, for fear of being kicked out of the programmer team. The following code comments probably say a lot of code to write the voice of the people.

// I write this line, only God and I know what I'm writing

// Now, only God knows

Code comments make people laugh and cry, is so good

Taking a more diss class code comments

// somedev1 - 6/7/02 adding temporary track on the login screen functionality

// somedev2 - 5/22/07 temporarily ass

Playfully type code comments

// do not write comments to you

// This code is written in such a strenuous

// So you have to read strenuous

Unsolved Mysteries Code

Sasha Krassovsky Once upon a time, from the student to his code just pick a point of view, then found such a comment:

/* Do NOT delete this comment */

/ * Do not delete this comment * /

Curiosity, if he wants to try to delete the comment in the end what will happen. So he removed, and then recompile. The results really can not run the program. He then re-add a comment back, a good result.

Later deleted the comment will complain LINK1000, according to the instructions linker error document, the direct cause of the error is: "Unknown error; please refer to the documentation or for technical support." For Sasha Krassovsky, it's always been a mystery unsolved codes .

Tucao type code comments

User Liiu Wei week ago to see a lot of people on social networking sites include these comments in the discussion on this site, the site's source code.

It is said that the company should strengthen the review mechanism of the code. Some suspect the company may not have sufficient human resources to do code review because it requires at least two programmers to do the job.

Drawing class code comments

Edwin Romero said he did not confirm how many people are familiar with the Robots.txt file within the site. In fact, this document is not necessary to run the code, but it declares crawlers / search engines can climb / to search what site. He found on the Nike website Robots.txt files are very interesting and add an interesting pattern on the inside:

This session can only sigh really really good programmer, these eye-catching Program code Comment enough of.

Tips Class Code

As a programmer, has a strong good psychological quality is very important, even in the face of these people speechless code comments and crash, you can still rely on a strong psychological qualities smiling face.

Published 509 original articles · won praise 3168 · Views 810,000 +

Guess you like

Origin blog.csdn.net/JiuZhang_ninechapter/article/details/104928200