Brilliant comments you wish you could find in your source code

Brilliant comments you wish you could find in your source code Brilliant comments you wish you could find in your source code Brilliant comments you wish you could find in your source code Brilliant comments you wish you could find in your source code
Though programming is a very serious work and often associated with introverts, who says they can´t have fun from time to time? Here are some of the most creative easter eggs hidden among all the seriousness.

As you know, comments are an integral part of the source code. Usually, these lines are very useful for understanding the logic of the code; however sometimes, if we are lucky, there are some truly hilarious ones that can be found. Let’s explore together one thread at stackoverflow.com and see how creative developers can really be:

1. Writing code for your future you

If you’re writing a part of the code and know that the maintainer won’t be anybody else but you, the best way how to prevent yourself from being upset in the future is:

User Banang

// Dear future me. Please forgive me.
// I can't even begin to express how sorry I am.

2. Star Wars fan?

A lot of us, developers, love Star Wars (sorry Star Trek fans), we can’t stop ourselves from using sentences from the movie in the code...

User Juliano

long long ago; /* in a galaxy far far away */

3. You should trust the Architect

Sometimes, the author of the code will warn you in advance. If you listen to him/her, you’re safe, otherwise, you may have a lot of sleepless nights. Can´t say the author did not warn you!

User PoppaVein

/*
 * You may think you know what the following code does.
 * But you dont. Trust me.
 * Fiddle with it, and youll spend many a sleepless
 * night cursing the moment you thought youd be clever
 * enough to "optimize" the code below.
 * Now close this file and go play with something else.
 */

4. If you don’t understand what the code does, delete it!

In a huge monolithic application, there can be a lot of useless code. Using GIT can definitely save your day but this developer has decided to be safe rather than sorry.

User Abarax

// I am not sure if we need this, but too scared to delete.

5. Family support is very important

Are you familiar with that strange feeling in your belly when doing something not entirely correct? Well, if you have it while programming, supportive family is all you need.

User sharkin

// 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.

6. Let’s count all the wasted time!

When you’re working long enough on optimizing part of the code only to figure out that you can´t, it is good to know you were not the only one and that there will be probably someone after you.

User Jens Roland

//
// 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
//

These were our choices but if you know another ones, please let us know at support@codeac.io.

If you are too familiar with sleepless nights fixing some code over and over again and see similar comments across your projects, don’t lose hope and try Codeac.

Ready to get started?

Use your favorite version control system to sign-up.

Sign up for free