cheap thrills (2 Viewers)

Martin

Senior Member
Dec 31, 2000
56,913
#1
Dunno if anyone is in the habit of reading The Daily WTF, but I found this gem today I thought I would share, which demonstrates the importance of commenting code properly:

/// The GaidenCommand is a specialized Command for use by the
/// CommandManager.
///
/// Note, the word "gaiden" is Japanese and means "side story",
/// see "http://en.wikipedia.org/wiki/Gaiden".
/// Why did I call this "GaidenCommand"? Because it's very similar to
/// a regular Command, but it serves the CommandManager in a different
/// way, and it is not the same as a regular "Command". Also
/// "CommandManagerCommand" is far too long to write. I also toyed with
/// calling this the "AlephCommand", Aleph being a silent Hebrew
/// letter, but Gaiden sounded better.
http://www.thedailywtf.com/forums/52710/ShowPost.aspx

Notice also how the comment doesn't explain the function in the slightest and only serves to confuse "similar, but different". :biggrin:
 

Buy on AliExpress.com

Users Who Are Viewing This Thread (Users: 0, Guests: 2)