Vào quora xem có bài này vui vui share cho mọi người cùng đọc
Chuẩn bị lết xác lên công ti/ trường học/… và chào đón một tuần mới không mấy vui vẻ gì
Comment code nên text hơi mờ
#Chủ đề: What are the best comments in a code?
##Nirmal Mevada
// Dear maintainer:
//
// Once you are done trying to 'optimize' this routine,
// and have realized what a terrible mistake that was,
// please increment the following counter as a warning
// to the next guy:
//
// total_hours_wasted_here = 42
//
/**
* For the brave souls who get this far: You are the chosen ones,
* the valiant knights of programming who toil away, without rest,
* fixing our most awful code. To you, true saviors, kings of men,
* I say this: never gonna give you up, never gonna let you down,
* never gonna run around and desert you. Never gonna make you cry,
* never gonna say goodbye. Never gonna tell a lie and hurt you.
*/
//When I wrote this, only God and I understood what I was doing
//Now, God only knows
stop(); // Hammertime!
// Autogenerated, do not edit. All changes will be undone.
// sometimes I believe compiler ignores all my comments
// I dedicate all this code, all my work, to my wife, Darlene, who will
// have to support me and our three children and the dog once it gets
// released into the public.
#define TRUE FALSE
//Happy debugging suckers
long long ago; /* in a galaxy far far away */
/////////////////////////////////////// this is a well commented line
// I don't know why I need this, but it stops the people being upside-down
x = -x;
// I am not sure if we need this, but too scared to delete.
// I am not responsible of this code.
// They made me write it, against my will.
last = first; /* Biblical reference */
LOL
//define ProjectManager
//A person who thinks nine women can deliver a baby in ONE month
//you vs. the guy she tells you not to worry about
//O(n^2) - O(1)
//solution to every error:- sudo rm -rf/
/* Roses are Red
* Violets are Blue
* I use Linux
* What about you?*/
// set break point here - you'll never reach it
// HACK ! COPY/PASTE this and look for another job
//this used to be a comment
//If harambe had been white they would have never killed
/*I can’t divide with zero, so I have to divide with something very similar result = * number / 0.00000000000001.*/
/* If this code works, it was written by Paul DiLascia. If not, I don’t know who wrote it.
*/
stepOff(); //bitch
//Mr. Compiler, please do not read this.
long time; /* just seems that way */
//uncomment the following line if the program manager changes her mind again this week
In a GIGANTIC 800 line ‘switch’ statement, somewhere in the middle:
// Joe is sorry
A few hundred lines later…
// Harry is sorry too
Not quite a comment but a goto label
ICantBelieveImUsingAGoto:
virgin = 0; /* you're not a virgin anymore, sweety */
long time; /* know C */
##Shaikh Tahmidur:
Updating…