Best comments in source code

Embedding non-constructive or funny comments together with code poetry and little jokes into projects is something programmers do to either mark their work or leave hints for future developers working their code.

Some of the best comments found in source code:

// I’m sorry

// drunk, fix later

// I am not responsible of this code.
// They made me write it, against my will.

//I am not sure why this works but it fixes the problem.

// If this comment is removed the program will blow up

// no comments for you
// it was hard to write
// so it should be hard to read

// Abandon all hope, ye who enter here.

//This code sucks, you know it and I know it.
//Move on and call me an idiot later.

// Houston, we have a problem

//When I wrote this, only God and I understood what I was doing
//Now, God only knows

//Happy debugging suckers

// somedev1 – 6/7/02 Adding temporary tracking of Login screen
// somedev2 – 5/22/07 Temporary my ass

# too drubnk to make this workkkkj. debugg latter

// oh please oh please oh please

// At this point, I’d like to take a moment to speak to you about the Adobe PSD
// format. PSD is not a good format. PSD is not even a bad format. Calling it
// such would be an insult to other bad formats, such as PCX or JPEG. No, PSD
// is an abysmal format. Having worked on this code for several weeks now, my
// hate for PSD has grown to a raging fire that burns with the fierce passion
// of a million suns.

// Replaces with spaces the braces in cases where braces in places cause stasis
$str = str_replace(array(“\{“,”\}”),” “,$str);

// Magic. Do not touch.

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

// Autogenerated, do not edit. All changes will be undone.

stop(); // Hammertime!

Exception up = new Exception(“Something is really wrong.”);
throw up; //ha ha

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

// Please work!

// If you’re reading this, that means you have been put in charge of my previous project.
// I am so, so sorry for you. God speed.

See also: The least useful comments ever

Related Blogs

Web developer
Symfony-PHP-Developer_02
Quick question?