Good code is the best documentation. In pursuit of this goal, it is a good habit of good programmers to comment code in addition to writing elegant code. Because comments do not affect the program itself, they are corrupted by programmers.



Someone to entertain, someone to tease, someone to tease. Programmers are stressed and need a place to vent without losing their train of thought, so code comments are the perfect place to do so.

Last year, xiami Music APP was exposed for its code annotation containing discriminatory and insulting words, and marked the VIPs given by the event as poor XVIPs. As soon as the incident was exposed, it attracted wide attention and drew a lot of opprobrium.



Programmer a look at this note, don’t say, also very interesting, next time I also play, is a way to decompress. But if the boss saw, serious point, estimate fry dish squid to this programmer eat, how can write so blind?

Comments, it seems, are not the only good place for programmers to vent their emotions. ID is also an emotional garbage can. Earlier, zhihu’s HTML code had an ID name like “Get in Zhihu because I am stupid”, which translated as “Get in Zhihu because I am stupid”. The address directly pointed to the home page, which had a bad influence. This thing estimates the boss does not know, otherwise light deduction performance, heavy is a K ah.



You think only Chinese programmers play like this? No! It’s even crazier abroad. This is from bell LABS, version 6 of the Unix Kernel, annotated with the words “You are not expected to understand this,” meaning, you are not going to understand this.

In “Hammer of Thunder 3 Arena” this game, there are also strange code comments, and very explicit, in order to harmony, the key position of the code, please imagine.



When Google founder Sergey Brin applied for a job as a student, his resume didn’t say what he expected, but if you look at the HTML code he created, he did.

A large office,good pay,and very little work.

Frequent expense-account trips to exotic lands would be a plus.

That means a big office, a high salary, a low workload, and, preferably, frequent business trips to foreign countries.

That’s a lot to ask. I wonder if Sergey Brin would jump up and bang the table if a Google applicant told him that.

What do outgoing programmers do with annotations? Well, don’t say, this is the most conscientious programmer in fashion. Just tell the new guy how screwed up this company is. The new programmer will probably be scared off and thank the senior. If the boss sees this, he’ll probably have a fit.



As a customer, if you can’t read a code comment, you may not know how tragic it is to be cheated.

Of course, the idle ape will also make notes like this:

Or this:



Huh? Don’t try it, or you’ll end up with an angry boss or a distraught project manager…

This article is from the “W3C Programming tutorial”, a partner of the cloud community. For more information, you can pay attention to the “W3C Programming Tutorial”.