50 Best Comments in Source Code Ever

This articles lists out some of the best comments ever encountered in source code which are taken from a very famous thread at StackOverflow. The question was asked in 2008 and gained immense popularity but it was pulled from the site by some moderator with a misplaced sense of abidance by rules. However, it has been made public again (in locked mode) due to popular demand.

 
 

 


 

 


 

 


 

 


 

 


 

 


 

 


 

 


 

From the 2004 Windows leak,

 

 


 

 


 

 


 

 


 

 


 

 


 

 


 

 


 

 


 

 


 

 


 

 


 

 


 

 


 

 


 

 


 

This is followed by four nested for-loops

 


 

 


 

 


 

 


 

 


 

 


 

 


 

 


 

 


 

 


 

 


 

From source code of some chinese website,

 


 

 


 

 


 

 


 

 


 

 


 

 


 

 


 

 


 

 


 

 


 

 


 

 


 

 


 

Final comment, courtesy of James Gosling himself:

 

 
 
Thanks for reading. Do share with us if you encounter any hilarious comments in your code base.




Please use ideone or C++ Shell or any other online compiler link to post code in comments.
Like us? Please spread the word and help us grow. Happy coding 🙂
 





Leave a Reply

Notify of
avatar
Sort by:   newest | oldest | most voted
arandomguy
Guest
arandomguy

Hahaha!

wpDiscuz