Jump to content

  • Log In with Google      Sign In   
  • Create Account

Best comment ever

  • You cannot reply to this topic
9 replies to this topic

#1 alkisbkn   Members   -  Reputation: 407

Like
8Likes
Like

Posted 27 May 2014 - 10:50 AM

Okay, although this is not a code snippet, it can trigger your imagination about what we've been going through with this guy's code smile.png

This is the comment that I came across (obviously after another programmer fixed his mental code design and bugs)

 

// TODO BILLYPotentially improve programming skills


Edited by alkisbkn, 27 May 2014 - 10:50 AM.


Sponsor:

#2 Zaoshi Kaba   Crossbones+   -  Reputation: 4337

Like
11Likes
Like

Posted 27 May 2014 - 01:49 PM

You can find more at http://stackoverflow.com/questions/184618/what-is-the-best-comment-in-source-code-you-have-ever-encountered



#3 Crichton333   Members   -  Reputation: 283

Like
1Likes
Like

Posted 28 May 2014 - 12:56 PM

LOL :) golden


"Smoke me a kipper i'll be back for breakfast." -- iOS: 2048 Numbers Mania -- Android: 2048 Numbers Mania


#4 alkisbkn   Members   -  Reputation: 407

Like
13Likes
Like

Posted 09 June 2014 - 02:29 AM

/*

      .o.       ooooooooo.   ooooo      ooo   .oooooo.   ooooo        oooooooooo.   o8o  .oooooo..o      oooooooooooo       .o.       ooooo     ooo ooooo        ooooooooooooo 
     .888.      `888   `Y88. `888b.     `8'  d8P'  `Y8b  `888'        `888'   `Y8b  `YP d8P'    `Y8      `888'     `8      .888.      `888'     `8' `888'        8'   888   `8 
    .8"888.      888   .d88'  8 `88b.    8  888      888  888          888      888  '  Y88bo.            888             .8"888.      888       8   888              888      
   .8' `888.     888ooo88P'   8   `88b.  8  888      888  888          888      888      `"Y8888o.        888oooo8       .8' `888.     888       8   888              888      
  .88ooo8888.    888`88b.     8     `88b.8  888      888  888          888      888          `"Y88b       888    "      .88ooo8888.    888       8   888              888      
 .8'     `888.   888  `88b.   8       `888  `88b    d88'  888       o  888     d88'     oo     .d8P       888          .8'     `888.   `88.    .8'   888       o      888      
o88o     o8888o o888o  o888o o8o        `8   `Y8bood8P'  o888ooooood8 o888bood8P'       8""88888P'       o888o        o88o     o8888o    `YbodP'    o888ooooood8     o888o     
                                                                                                                                                                               





*/


#5 JonathanLyons   Members   -  Reputation: 184

Like
1Likes
Like

Posted 24 September 2014 - 03:15 PM

I once read through a piece of code of an open source project that was filled with

//don't even try to make sense of this

and

//get out whilst you can



#6 phantom   Moderators   -  Reputation: 7267

Like
8Likes
Like

Posted 25 September 2014 - 03:04 AM

From 3rd party code for a game I worked on;

// This is always 2
#define MAX_PLAYERS 3


#7 ferrous   Members   -  Reputation: 2006

Like
0Likes
Like

Posted 25 September 2014 - 12:59 PM

From 3rd party code for a game I worked on;
 

// This is always 2
#define MAX_PLAYERS 3

Back when it was 2nd party code, I'm sure it was 2. =)



#8 fastcall22   Crossbones+   -  Reputation: 4333

Like
0Likes
Like

Posted 25 September 2014 - 01:16 PM

I sprinkle my code with such :
# (Coffeescript)

# TODO: derp, move this
numericSort = (a,b) -> a-b

# ...

# TODO: less huehue
ids = (_.pluckDeep models, '*.foo[*].bar[*].id').sort numericSort

c3RhdGljIGNoYXIgeW91cl9tb21bMVVMTCA8PCA2NF07CnNwcmludGYoeW91cl9tb20sICJpcyBmYXQiKTs=

#9 DiegoSLTS   Members   -  Reputation: 1373

Like
2Likes
Like

Posted 25 September 2014 - 01:18 PM

I always laugh a little when I found a comment like:

//TODO move this somewhere else

And it literally says "somewhere else", the original developer knew it was a bad place but didn't know where was a good place, so with that comment it's automatically fixed and pasted there forever. It's more funny when you find it in a codebase that's grown a lot over a few years and you think about how many people saw it and didn't want to take the risk of changing it, possibly introducing bugs. Also, it's even more funny when you realize you're one of them... it works there, there are bigger problems in the code, so it's not that bad. Anyway, it has a TODO comment, it will be done some time in the future... right?



#10 xoxos   Members   -  Reputation: 119

Like
0Likes
Like

Posted 17 October 2014 - 10:21 PM

hardly the best comment ever, but it acts like it..

      angle_x  = 0;                      /* Set X-axis angle to zero */
      trx      =  mat[5];                 /* And calculate Z-axis angle */

may not seem like an issue until you try to decomment that section of code...


neither a follower nor a leader behttp://www.xoxos.net





PARTNERS