Hey 54.226.34.209, do you really want to belong to yesterday's generation? Nag your ISP about the all-new and shiny IPv6
devwebninja — + -9 - — Oct. 25, 2011, 6:35 p.m.

Late night/Early morning coders.

/* ==|== Update Plugin =====================================================
THE UPDATE CODE GOES HERE! PLEASE DO NOT MODIFY ANYTHING IN THIS SECTION
YOU *WILL* BREAK IT
=========================================================================
*/

/**
* Standard database check, make sure we're using
* at least version 1.1, otherwise, request the update.
* @return bool
*/
function update_db_check()
{
# I must be going crazy.. it's 3am and I can smell bacon..
[code] ...
}

Sarek — + -69 - — May 26, 2011, 5:18 p.m.

This is a nice comment/code ratio...
Also note that you may not redistribute this program in binary form without changes, because it does not reproduce the copyright message...

/*
* Copyright (c) 1995, 2008, Oracle and/or its affiliates. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of Oracle or the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

/**
* The HelloWorldApp class implements an application that
* simply prints "Hello World!" to standard output.
*/
class HelloWorldApp {
public static void main(String[] args) {
System.out.println("Hello World!"); // Display the string.
}
}

Golradir — + -24 - — Jan. 13, 2011, 7 p.m.

I thought it was funny

StringBuilder Bob = new StringBuilder(); // Bob the StringBuilder

Vinicius — + 42 - — Jan. 13, 2011, 7 p.m.

/*
* 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 DBA wont let me access the items using
* indices and I instead have to use their stupid fucking Iterator
* implementation. So there.
*/
$firstList = $this->getRootNode()->getChildren();
foreach ($firstList as $node)
{
$nodes = $node->getChildren();
break; // wtf?

Raj — + -24 - — Jan. 13, 2011, 7 p.m.

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

Jules — + -2 - — Jan. 13, 2011, 7 p.m.

I hope the code never got released...

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

KYA — + -62 - — Jan. 13, 2011, 7 p.m.

/*
* I know this isn't a very efficient algorithm, but I ran out of time. Also,
* I enjoy reinventing the wheel. So there!
*/

Aicumbo — + -62 - — Jan. 13, 2011, 6:53 p.m.

Don't we all just love those little peculiarities of the glibc?

#ifdef __GNU_LIBRARY__
/*
* Idiot glibc uses extensions to struct dirent for readdir with
* ALTDIRFUNCs. Not that this is documented anywhere but the
* source... Fake an inode number to appease it.
*/
ret->d_ino = inum++;
if (!inum)
inum = 1;
#endif /* __GNU_LIBRARY__ */

BeardHat — + -14 - — Jan. 13, 2011, 6:53 p.m.

From the original UNIX source:

/*
* If the new process paused because it was
* swapped out, set the stack level to the last call
* to savu(u_ssav). This means that the return
* which is executed immediately after the call to aretu
* actually returns from the last routine which did
* the savu.
*
* You are not expected to understand this.
*/

Grunzel — + -34 - — Jan. 13, 2011, 6:53 p.m.

From the database conversion script for Slash 1 to Slash 2 databases

If you lose your data, it is your problem, not ours. I deleted all of
the data on http://use.perl.org/ while preparing this program. However,
I had a backup ready to go (although I still lost about 12 hours of
data, and I feel like an idiot). Back up your data on your Slash 1.0
database. You have been warned.

Also, consider what happens if you have two Slash sites on one machine;
what if you give this program the wrong virtual user? Perhaps you
just deleted a working site! Back up any existing data on the target
database server, too. See, even after writing this warning, I did this,
too, and typed "slash" as my virtual user instead of "useperl", and
I overwrote some of the existing database, and didn't have a backup
for some of it. After that, I felt like a total moron.

This program does not write to your Slash 1.0 database, so you should
be fine, but there are no warranties, expressed or implied. If you
are running a Slash site, you should be backing up your database
nightly anyway, right?

So backup all your data on both boxes, so you don't feel like a moron,
like me.

Cylon — + -37 - — Jan. 13, 2011, 6:53 p.m.

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

BSD — + -51 - — Oct. 17, 2010, 12:20 p.m.

From a MD5 function

/* The fucking berkloids went off and decided that 4Gb wasn't a big enough
file, and doubled the size_t. Fix A is to printf "%qd", statp->st_size;
fix B is to convert the size back into a long. Using fix B for now,
since even these days you could go out and eat a lot of ravs before
MD5 of a 4Gb file finished!! */

Linus — + -54 - — Oct. 17, 2010, 12:16 p.m.

/*
* linux/lib/vsprintf.c
*
* Copyright (C) 1991, 1992 Linus Torvalds
*/

/* vsprintf.c -- Lars Wirzenius & Linus Torvalds. */
/*
* Wirzenius wrote this portably, Torvalds fucked it up :-)
*/

Netcat — + -33 - — Oct. 17, 2010, 12:15 p.m.

From a shell script in netcat:

## WARNING: You may have to change "cc" to "gcc" below if you don't have
## "cc" [e.g. solaris, thank you very fucking much, Sun].
## Please note any errors this generates, too...

Martin — + -43 - — Oct. 17, 2010, 12:09 p.m.

I posted this "license statement" in a WordPress template I released. I thought it was funny, anyhow.

/* The License:
You (from this point on referred to as The You) are hereby
granted by me (from this point on referred to as The Me)
license to knock yourself silly with this template.
By using this template The You implicitly accepts this
license and pledges solemnly to never claim creative
ownership of any graphics, code, concepts, eggs, bacon, ideas,
colors, shapes, hypertext-transfer protocols or other conduits
of the visual splendor thatis this template.

The Me, in turn, pledges equally solemnly to be far too
lazy to ever check up on you, so if you do manage to pull
some chicks The Me won't have a cow.
However The Me would be sorely disappointed if The You
were to try and sell or distribute this work without
acknowledging The Me. Seriously. The Me will come down on
The You like a large quantitiy of hard and heavy objects
that in large quantities may be harmful and possibly even
lethal to The You; So don't even think about it, The Buster.
*/

XCondE — + -11 - — Oct. 17, 2010, 12:06 p.m.

On the linux 1.0 kernel scheduler (sched.c):

/*
* 'schedule()' is the scheduler function. It's a very simple and nice
* scheduler: it's not perfect, but certainly works for most things.
* The one thing you might take a look at is the signal-handler code here.
*
* NOTE!! Task 0 is the 'idle' task, which gets called when no other
* tasks can run. It can not be killed, and it cannot sleep. The 'state'
* information in task[0] is never used.
*
* The "confuse_gcc" goto is used only to get better assembly code..
* Djikstra probably hates me.
*/
asmlinkage void schedule(void)

Samutz — + 18 - — Oct. 17, 2010, 12:03 p.m.

/*
after hours of consulting the tome of google
i have discovered that by the will of unknown forces
without the below line, IE7 believes that 6px = 12px
*/
font-size: 0px;

Lyudmil — + -21 - — Oct. 17, 2010, 12:01 p.m.

public boolean isDirty() {
//Why do you always go out and
return dirty;
}

Zifre — + -34 - — Oct. 17, 2010, noon

In drivers/net/sunhme.c (Linux kernel):

/* Welcome to Sun Microsystems, can I take your order please? */
if(!hp->happy_flags & HFLAG_FENABLE)
return happy_meal_bb_write(hp, tregs, reg, value);

/* Would you like fries with that? */
hme_write32(hp, &tregs->frame,
(FRAME_WRITE | (hp->paddr << 23) |
((reg & 0xff) << 18) | (value & 0xffff)));
while(!(hme_read32(hp, &tregs->frame) & 0x10000) && --tries)
udelay(20);

/* Anything else? */
if(!tries)
printk(KERN_ERR "happy meal: Aieee, transceiver MIF write bolixed\n");

/* Fifty-two cents is your change, have a nice day. */

Martin — + -10 - — Oct. 17, 2010, 11:59 a.m.

A classic case of why you shouldn't off shore your software development:

public class Contact
{
//...

/// <summary>
/// Gets or sets the name of the first.
/// </summary>
/// <value>The name of the first.</value>
public string FirstName
{
get { return _firstName; }
set { _firstName = value; }
}
}