Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,217,618 members, 8,034,856 topics. Date: Sunday, 22 December 2024 at 02:04 PM

Funny Source Code Comments - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Funny Source Code Comments (16599 Views)

39 Android Apps With Source Code For Beginners To Learn From & Make Their Own / Here Is How To Get The Source Code From Any APK File / Runnable Java Atm Source Code Anybody,pls For Project, Very Urgent (2) (3) (4)

(1) (2) (Reply) (Go Down)

Funny Source Code Comments by Javanian: 11:49pm On Oct 06, 2012
I recently stumbled upon an awesome Stack Overflow thread, entitled "What is the best comment in source code you have ever encountered?".

As you might have guessed, it is a collection of funny source code comments, provided by developers all over the world. Take a look at it, it could definitely make your day.

I am reposting here my personal favorites from that long long collection:

1, Exception up = new Exception("Something is really wrong."wink;
throw up; //ha ha

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

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

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

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

6, // hack for ie browser (assuming that ie is a browser)

7,
try {

}
catch (SQLException ex) {
// Basically, without saying too much, you're screwed. Royally and totally.
}
catch(Exception ex)
{
//If you thought you were screwed before, boy I have news for you!!!
}


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

9, /**
* If you don't understand this code, you should be flipping burgers instead.
*/

10, // For the sins I am about to commit, may James Gosling forgive me

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


You can add yours... grin
http://www.javacodegeeks.com/2011/07/funny-source-code-comments.html

11 Likes

Re: Funny Source Code Comments by Nobody: 12:19pm On Oct 07, 2012
lol at

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

1 Like

Re: Funny Source Code Comments by Nobody: 1:02pm On Oct 10, 2012
Mine is not much but an error from javac while trying 2 help a friend compile his code in school computer LAB.
The error reads:

1326 errors. Error can not be displayed.

1 Like

Re: Funny Source Code Comments by PrinceNN(m): 2:02am On Oct 13, 2012
lmao @
// 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

and


6, // hack for ie browser (assuming that ie is a browser)

// Import world.smart.charming.females
//Supercoolchick hottie = new Supercoolchick()
grin
Re: Funny Source Code Comments by mkwayisi: 7:22am On Oct 13, 2012
₱®ÌИСΞ:
Import world.smart.charming.females
Supercoolchick hottie = new Supercoolchick()
I don't think that would compile wink
Re: Funny Source Code Comments by Nobody: 8:19am On Oct 13, 2012
mkwayisi:
I don't think that would compile wink

it will compile as long as the capital case of "Import" is corrected

you definitely need a directory structure like so
and have to name your class Supercoolchick

one way to enjoy programming is to try to make it more fun while at it
it will become natural over time and would even make you happier.

check these out too.

// drunk, fix later

/*
* OK; before you read the following code know what I am trying to do.
* I needed to get the list of child catagories from the root node so that
* the root node didn't appear in the selection box. But for some stupid
* fucking reason the stupid fucking DB Administrator wont let me access the items using
* indices and I instead have to use their stupid fucking Iterator
* implementation. So there you go.
*/
$firstList = $this->getRootNode()->getChildren();
foreach ($firstList as $node)
{
$nodes = $node->getChildren();
break; // wtf?
}



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

this next line got me laughing real hard
look at "double" as type, just like string and int
double penetration; // ouch


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

// Children may need their
// parent's privates for their
// constructor...heh heh.

3 Likes

Re: Funny Source Code Comments by Javanian: 8:56am On Oct 13, 2012
^ lol i also got this one today...from an islam programmer...

//if you can debug this i will give you 2 of my 72 virgins

3 Likes

Re: Funny Source Code Comments by mkwayisi: 4:10pm On Oct 13, 2012
webdezzi:
₱®ÌИСΞ:
Import world.smart.charming.females
Supercoolchick hottie = new Supercoolchick()
it will compile as long as the capital case of "Import" is corrected
No, I'm afraid it won't. Take a look again.
Re: Funny Source Code Comments by Javanian: 4:21pm On Oct 13, 2012
mkwayisi: No, I'm afraid it won't. Take a look again.
Import world.smart.charming.females
Supercoolchick hottie = new Supercoolchick()

It wont compile if it were
import world.smart.charming.females.*
OR
import world.smart.charming.females.Supercoolchick

it would compile...Nice observation...Stop derailing the thread grin
Re: Funny Source Code Comments by mkwayisi: 6:15pm On Oct 13, 2012
import com.nairaland.*;
try {
new Comment("Hello, fellas!" );
} catch (DerailedThreadException e) {
System.out.println("What now, " + e.getWhinyUser() + "?" );
}

1 Like

Re: Funny Source Code Comments by PrinceNN(m): 8:07pm On Oct 13, 2012
mkwayisi:
I don't think that would compile wink
it must compile ooo grin
and i must get the output.... lemme go buy a 3d printer grin
Re: Funny Source Code Comments by PrinceNN(m): 8:09pm On Oct 13, 2012
webdezzi:

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

hahahaha cry


double penetration; // ouch
lipsrsealed i reserve my CUMments

1 Like

Re: Funny Source Code Comments by lordZOUGA(m): 8:11pm On Oct 13, 2012
Javanian: @lordZOUGA Didn't you read where i said i got them online?? Whats your own?? Do i have any problem with you?? undecided
looks like you are upset, sorry about that but I did not see where you said you got it on-line on the post I quoted... so I just pointed out what I thought it meant. I do not know how it is am supposed to know if you have any problem with me.
Re: Funny Source Code Comments by vitriol: 4:29am On Dec 13, 2012
/*
* IOC3 is bleeped bleeped beyond believe ... Don't try to access
* anything but 32-bit words ...
*/

Linux Kernel: arch/mips/pci/ops-bridge.c

/* Those damn T11 guys defined another format for
* Vendor-specific objects.
*/
Wireshark: epan/dissectors/packet-fcswils.c

/* Only Sun can take such nice parts and Bleep up the programming interface
* like this. Good job guys...
*/
Linux Kernel: drivers/net/sunhme.c

# This still doesn't work right - something funny is going on with return
# and linefeed in the reach program.
OpenSolaris: usr/src/lib/libxcurses/src/terminfo/heath

/* Bleep, we are miserable poor guys... */
Linux Kernel: net/core/skbuff.c

/* I see RENUMBERED constants in bits/in.h - !!?
* What a Bleep is going on with libc? Is it a glibc joke? */
BusyBox: busybox_1_13_stable/networking/ping.c

/* Bleep me plenty... */
/* <AOL></AOL> */
Linux Kernel: fs/binfmt_aout.c

And last, but not least, a funny function from FreeBSD's src/sbin/shutdown/shutdown.c:

void
die_you_gravy_sucking_pig_dog()
{

1 Like

Re: Funny Source Code Comments by Nobody: 1:35pm On Dec 13, 2012
i guess thats mr linus
Re: Funny Source Code Comments by vitriol: 8:06pm On Dec 13, 2012
webdezzi: i guess thats mr linus

Not all of them. A couple though.
Re: Funny Source Code Comments by 53cur3m0d3(m): 6:00pm On Dec 14, 2012
2, //When I wrote this, only God and I understood what I was doing
//Now, God only knows
8, // 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.
10, // For the sins I am about to commit, may James Gosling forgive me

Wit dese few points of mine, I think I've been able to convince U that Programming is fun... Hell Yeah! #OkBye
Re: Funny Source Code Comments by Nobody: 7:15pm On Dec 14, 2012
53cur3m0d3: 2, //When I wrote this, only God and I understood what I was doing
//Now, God only knows
8, // 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.
10, // For the sins I am about to commit, may James Gosling forgive me

Wit dese few points of mine, I think I've been able to convince U that Programming is fun... Hell Yeah! #OkBye
Programming is real fun #WeCodeHard
Re: Funny Source Code Comments by Maleeq(m): 10:16am On Dec 17, 2012
Lol...funny thread.

One that I ran across in an oracle app:

/*Something has gone wrong. Not my fault.....Shhhhh....dont tell customer, act like nothing happened....silence the error!!!*/

1 Like

Re: Funny Source Code Comments by 53cur3m0d3(m): 5:39pm On Dec 17, 2012
Maleeq: Lol...funny thread.

One that I ran across in an oracle app:

/*Something has gone wrong. Not my fault.....Shhhhh....dont tell customer, act like nothing happened....silence the error!!!*/
I swear, that Programmer needs to be shot in the fingers for leaving comments like that.....
Re: Funny Source Code Comments by NoiseMaker1: 1:06pm On Jan 03, 2013
Hmmm I don't understand this, I don crack brain tire.
Re: Funny Source Code Comments by Nobody: 1:07pm On Jan 03, 2013
53cur3m0d3:
I swear, that Programmer needs to be shot in the fingers for leaving comments like that.....
I'm sure he was in a programmers trance when he did it so not his fault.
Re: Funny Source Code Comments by blackmann(m): 1:23pm On Jan 03, 2013
Buy was told to write "i will not throw paper planes in class" on the board 500 times as a punishment. here's his response -

#include <stdio.h>
int main (void)

{
int count;

for (count=1; count <=500; count++)
printf("I will not throw paper planes in class"wink;

return 0;
}


Nice try though. Smart kid.

1 Like

Re: Funny Source Code Comments by 80million1: 1:25pm On Jan 03, 2013
*speechless*
Re: Funny Source Code Comments by DaWhiz: 1:35pm On Jan 03, 2013
Javanian:

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

Haha this happens always... grin

1 Like

Re: Funny Source Code Comments by DaWhiz: 1:36pm On Jan 03, 2013
@Op Thanks for sharing. Very hilarious post #iLike grin
Re: Funny Source Code Comments by cripnip(m): 1:45pm On Jan 03, 2013
// Children may need their
// parent's privates for their
// constructor...heh heh.

the best!
Re: Funny Source Code Comments by Javanian: 1:48pm On Jan 03, 2013
DaWhiz: @Op Thanks for sharing. Very hilarious post #iLike grin

Your welcome. They are lot of interesting threads in the programming section. If you are programmer reading this please try as much as possible to visit the programming section as often as possible. Lets embrace what we love.

2 Likes

Re: Funny Source Code Comments by jimctu: 2:20pm On Jan 03, 2013
lol! I like to post some funny comments on my codes... sometimes when I open an old code I always laugth cheesy

1 Like

(1) (2) (Reply)

Microsoft To Retire Internet Explorer: Will You Miss It? / Is C# Better Than C/C++? / Is It Advisable To Learn Java As My First Programming Language?

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 50
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.