As a programmer, it can be said that I stay up late every day to work overtime, but also can not read countless program code, I don’t know how many times I see those code comments that make people speechless and broken. You think you can read it and feel confident that you can optimize it, but once you start trying it out, you’ll be stuck in an endless night of swearing at the end of the ordeal.

Some netizens said that they wrote their own code is pinyin variable names and Chinese annotations, afraid of being kicked out of the programmer team. The following code comment probably speaks for many people who write code.

// When I write this line, only God and I know what I am writing

// For now, only God knows

Funny code comments, that’s how good they are

There are more comments on disS class code

// someDev1-6/7/02 adds temporary tracking to the login screen

// somedev2-5/22/07

Arrogant code comments

// I will not write comments for you

// This code is so hard to write

// So you will have to struggle to read

Unsolved code

Sasha Krassovsky once looked at a random piece of code given to him by his students and found this comment:

/* Do NOT delete this comment */

/* Do not delete this comment */

Curious, he wanted to see what would happen if the comments were removed. So he just deletes it and recompiles it. As a result, the program really doesn’t work. Then he added the note back, and it was fine again.

After deleting the comment will report an error LINK1000, according to the description of the linker error document, the reason for the error is directly: “unknown error; Please refer to the documentation or seek technical support. For Sasha Krassovsky, it’s always been an unsolved code.

Teasing code comments

Liiu Wei saw many people talking about the site on social networking sites a week ago, and the source code of the site included the comments.

Some say the company should strengthen its code review system. Others suspect that the company may not have enough human resources to do the code review because it takes at least two programmers to do it.

Drawing class code comments

Edwin Romero says he’s not sure how many people are familiar with the site’s robots.txt file. This file doesn’t actually run the necessary code, but it does declare what the crawler/search engine can crawl/find on the site. The robots.txt file he found on the Nike website was very interesting, and he added an interesting pattern to it:

I can only sigh that this year’s real programmers are really good, these program code comments are enough to attract attention.

Warm prompt class code

As a programmer, it’s important to have a strong mental frame of mind, and you can still smile when faced with a code comment that makes you speechless and crashes.


Free audition for the nine-chapter basic Algorithm class (Java), taught by Zhang Sanfang, a senior Java engineer who graduated from top one universities in China and won the gold medal in ACM Algorithm Competition.