Tuesday, July 20, 2010

What are the best code comments you have ever heard? “Fix Me Lior Ugly” @Typemock

Apparently developers sometimes like to name their code comments, and can be very creative while inventing them.

And when I say creative I mean creative!

The results are usually pretty funny, at least funny enough to make the rest of the team or other developers that will see the code, laugh out loud…

 

Hammertime

 

But what is really funny, is when amusing code comments are not written as a joke, but are actually a comment that one put in order to make sure that he will be understood. The combination of the words without pauses can make a completely different statement i.e. :

// fix me lior ugly

(Lior, please forgive me, I HAD TO blog about it ;)

What Lior tried to say, is that this part needs to be fixed, because it’s ugly. And he made sure to sign his name. This comment has been floating around Typemock for years later and is still good for a laugh …even if it’s not there anymore (Wait, is it???)

So what is the best code comment you have ever heard or made???

 

Tal Druyan

3 comments:

  1. That's a nice one! :)

    A friend of mine once asked me if I'd please include his name in my code (god knows why!), so in one of my projects you'll find a comment that says: "XXX, this is for you!"
    ReplyDelete
  2. Mine was an old, legacy VB6 solution with 15 projects, thousands of class files and only 5 or 6 comments. The best one was, "This is crap code but it's 3 a.m. and I need to get this to work."
    ReplyDelete
  3. Actually fixed the ugly part in the code but we decided that such a classic comment should stay forever.

    Ohad,
    Typemock developer
    ReplyDelete