Funniest/Most Annoying Code Comments

A place to discuss the implementation and style of computer programs.

Moderators: phlip, Moderators General, Prelates

User avatar
superglucose
hermaj's new favourite
Posts: 2353
Joined: Wed Sep 12, 2007 1:59 am UTC
Location: Domain of Azura
Contact:

Funniest/Most Annoying Code Comments

Postby superglucose » Wed Sep 12, 2007 3:51 am UTC

I didn't know whether to put this in the comp science (it didn't seem to fit) or here... and I'm sure this exists somewhere else, but I couldn't find it. Of course, my post-finding skills are sub par... so I apologise if this is a redundant topic.

Alright, I was one of those people who hated commenting. It comes from a deep-seated laziness, and the fact that I usually worked on a program until it was done, so I never had the need.

At the start of a program: "This program does something."
"This creates an integer 'x' and assigns the value '0.'"

This one was seen by me on someone who wanted me to fix his code but couldn't be there to discuss it with me: "The object 'pony' is intended to write on the object 'horse' using the methods 'stable' 'woah' 'giddy-yup' and 'roam.'"

User avatar
wing
the /b/slayer
Posts: 1876
Joined: Tue May 29, 2007 5:56 am UTC

Postby wing » Wed Sep 12, 2007 3:55 am UTC

String name; //Creates a String called name


I see things like that ALL THE TIME in intro CS classes.
I AM A SEXY, SHOELESS GOD OF WAR!
Akula wrote:Our team has turned into this hate-fueled juggernaut of profit. It's goddamn wonderful.

Dark Shikari
Posts: 113
Joined: Mon Jul 16, 2007 7:03 am UTC

Postby Dark Shikari » Wed Sep 12, 2007 6:31 am UTC

wing wrote:String name; //Creates a String called name


I see things like that ALL THE TIME in intro CS classes.


i++; //add 1 to i

/.... tons of other code, completely without comments ..../

int b = 0; //initialize b

/.... tons of other code, completely without comments ..../

User avatar
ArchangelShrike
Rodan's Title
Posts: 1533
Joined: Sun Apr 01, 2007 8:39 am UTC
Location: Waikiki

Postby ArchangelShrike » Wed Sep 12, 2007 6:40 am UTC

Uh... this one time, we had to make a java applet that drew a figure, to get familiar with the commands. So I drew Hat Guy, and posted a link to the "e to the pi minus pi" comic. Started with the hat, then the head, the body and such...

At the end I wrote //Maybe he should've stopped when he was a head.

Pretty lame, but that was a intro class. I was bored out of my skull....

User avatar
keozen
The Bearded FaiD Batman
Posts: 1497
Joined: Wed Aug 01, 2007 6:31 am UTC
Location: Yorkshire, UK
Contact:

Postby keozen » Wed Sep 12, 2007 8:37 am UTC

I once put the following comment in one of my web usability design projects when I was at uni:

<!--Hey there Prof, do i get an A for this or what?-->
Image

TiberiusM
Posts: 344
Joined: Mon Apr 02, 2007 4:20 pm UTC
Location: Louisville, KY
Contact:

Postby TiberiusM » Wed Sep 12, 2007 1:11 pm UTC

On international talk-like-a-pirate day, I coded my lab assignment in pirate speak, along with the comments and such. My program didnt work, but I got points for the "aye++;"

Mostly, my error code comments contain things like
//If this happens, neat! otherwise, BAD THINGS

Rysto
Posts: 1459
Joined: Wed Mar 21, 2007 4:07 am UTC

Postby Rysto » Wed Sep 12, 2007 3:40 pm UTC

From the original Unix code:

Code: Select all

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

@trophy
Posts: 1684
Joined: Wed Sep 12, 2007 3:32 pm UTC
Location: Springfield, MO
Contact:

Postby @trophy » Wed Sep 12, 2007 4:52 pm UTC

This is my personal favorite:

Code: Select all

/*¤***********************************************************

     *                                                           *

     *  .=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-.       *

     *   |                     ______                     |      *

     *   |                  .-"      "-.                  |      *

     *   |                 /            \                 |      *

     *   |     _          |              |          _     |      *

     *   |    ( \         |,  .-.  .-.  ,|         / )    |      *

     *   |     > "=._     | )(__/  \__)( |     _.=" <     |      *

     *   |    (_/"=._"=._ |/     /\     \| _.="_.="\_)    |      *

     *   |           "=._"(_     ^^     _)"_.="           |      *

     *   |               "=\__|IIIIII|__/="               |      *

     *   |              _.="| \IIIIII/ |"=._              |      *

     *   |    _     _.="_.="\          /"=._"=._     _    |      *

     *   |   ( \_.="_.="     `--------`     "=._"=._/ )   |      *

     *   |    > _.="                            "=._ <    |      *

     *   |   (_/                                    \_)   |      *

     *   |                                                |      *

     *   '-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-='      *

     *                                                           *

     *      LASCIATE OGNI SPERANZA, VOI CH'ENTRATE               *

     *************************************************************/

jtniehof
Posts: 312
Joined: Mon Sep 10, 2007 9:00 pm UTC

Postby jtniehof » Wed Sep 12, 2007 8:23 pm UTC

In my CS classes, I had a habit of commenting top of functions and anything tricky, otherwise relying on intelligent whitespace and variable functions, and the assumption that the person reading it could read code. So that meant a comment every 10 lines, usually. I kept getting docked for undercommenting, so I handed in a project with every line commented...and of course got docked.

I'm still a fan of "Wirzenius wrote this portably, Torvalds fucked it up :-)"

EDIT: Variable functions?! Wha? I mean variable NAMES.
Last edited by jtniehof on Wed Sep 12, 2007 10:36 pm UTC, edited 1 time in total.

User avatar
mabufo
Posts: 105
Joined: Sun Sep 09, 2007 11:17 pm UTC

Postby mabufo » Wed Sep 12, 2007 8:57 pm UTC

If you have ever looked at the source code for either of the Half Life games, most of those comments can be pretty comical. I'm afraid I don't have any good ones on hand however.

mrkite
Posts: 336
Joined: Tue Sep 04, 2007 8:48 pm UTC

Postby mrkite » Wed Sep 12, 2007 9:31 pm UTC

The funniest comment I've seen:

// I want my mommy!

it is right before this:

Code: Select all

 $sql = "SELECT SQL_CALC_FOUND_ROWS *,
COUNT(user_recommendations.biz_dex_id) AS recommendations,
DATE_FORMAT(recommend_before.recommend_date,'%b %D, %Y at %r') AS recommended_byuser,
1 AS score,
IFNULL(business_enhanced.premium,0) AS premium_null,
IFNULL(business_enhanced.featured,0) AS featured_null
FROM
business, business_categories, categories
LEFT JOIN business_enhanced ON (business.biz_dex_id = business_enhanced.biz_dex_id)
LEFT JOIN user_recommendations ON (business.biz_dex_id = user_recommendations.biz_dex_id)
LEFT JOIN user_recommendations AS recommend_before ON (business.biz_dex_id = recommend_before.biz_dex_id AND recommend_before.user_id = '$user_id')
WHERE
categories.h3_id = '$h3_id' AND
categories.h3_id = business_categories.h3_id AND
business_categories.biz_dex_id = business.biz_dex_id";

User avatar
Cosmologicon
Posts: 1806
Joined: Sat Nov 25, 2006 9:47 am UTC
Location: Cambridge MA USA
Contact:

Postby Cosmologicon » Thu Sep 13, 2007 12:50 am UTC

Haha, these are great!

Code: Select all

const double accelerationDueToGravity = 9.8; // g

I don't remember if I actually put that one in a program, but I just found this in some of my old code:

Code: Select all

    // It took me like two hours to come up with this formula...
    NewWhere = Red ? Where ^ 1 : Where + (Where % 6 < 3 ? 3 : -3)

At the top of a function that reverses a path object:

Code: Select all

// You're a fine motherfunction. Won't you back that path up?

User avatar
Aperfectring
Posts: 252
Joined: Fri Sep 07, 2007 3:47 am UTC
Location: Oregon (happily)

Postby Aperfectring » Thu Sep 13, 2007 12:59 am UTC

At the top of a 2500 line file:

Code: Select all

//TODO write comments in this file



I almost broke down in tears when that was the first thing I saw....

EDIT: put the comment into a code block because I don't get to use them often enough.
Odds are I did well on my probability exam.

Euanthes
Posts: 26
Joined: Sun Sep 02, 2007 11:54 pm UTC

Postby Euanthes » Thu Sep 13, 2007 5:22 am UTC

I had some function this one time that was ridiculously complex, so I assumed that I would not remember the hours of work I did figuring it out. I assumed correctly.

Code: Select all

double CrazyComplexFunction(...) // Trust me - it works
This is not an automates signature, I hand type it into every post.

The Invisible Englishman
Posts: 5
Joined: Thu Sep 13, 2007 4:17 pm UTC
Location: Cambridge, England.

Postby The Invisible Englishman » Thu Sep 13, 2007 5:34 pm UTC

Following a long and extremely hairy 500 line uncommented section of Java:

Code: Select all

System.gc();//Just for luck

Agentlien
Posts: 31
Joined: Mon Sep 10, 2007 6:06 pm UTC
Location: Göteborg, Sweden

Postby Agentlien » Thu Sep 13, 2007 9:52 pm UTC

Oh this certainly is a necessary topic! :D

I have seen (and perhaps written) far too many strange comments. The most stupid and most recurring are the far too obvious comments which people have already brought up a few examples of. But some of my favourites are from the JKA MP source.
I'll list some quick examples, though I can't remember where I found most of the really funny ones. I can however always find tons of apologies for writing hackish code, in that source.

At one point there are a two blocks of #defines preceeded by these comments respectively:

Code: Select all

//How handy it would be if this were an enum.
// Yes it would be handy


Well that really tells me the purpose and enlightens regarding the underlying design of the code. :p

And here are some other ones, also from JKA, in rather random order:

Code: Select all

//Let me know if this causes problems, pat.
if ( /*!self || ...haha (sorry, i'm tired)*/ !self->ghoul2 )
i  = 0x5f3759df - ( i >> 1 );               // what the fuck?
//what the? I don't know why I was doing this.


The last one was just above a block of commented code seems to ensure that if you didn't block a saber attack in the right way, your block will never end.

And the last part from JKA. Although not quite a comment it seems somehow related: There's a function called G_TossTheMofo. Rather descriptive, especially since it's used exclusively for handling kicks.

Then again, a classmate of mine often talks about the one person he will never let in on any of his projects again. It is the guy behind this piece of beautifully commented code:

Code: Select all

char Mode = 0; //weeee... doing a reform!! humm... mode 0 = output all text, mode 1 = code mode, mode 2 = echo mode!!, mode 3 = echo return mode =_=;;, mode 4 = vars, mode 5 = return vars,mode 6 = IF MODE!! YAY!!, mode 7 = return if :3 , mode 8 = change variables mode, n mode 9 = return change variables, mode 10 = POLYMORF MODE #1, mode 11 = return!! polly!! T_T va vackert, mode 12 = POLYMORF MODE #2, mode 13 = return addpoly, etc..
 


In case you're wondering: This is in the code which handles scripts in a MUD, yes this was a one-liner, and "Va vackert" means "How beautiful". The main reason my classmate refuses to let that guy work with him is because that guy wrote a nice piece of code which lets scripts define temporary rooms within themselves. When those scripts are run, the player is teleported into the new room. That room only exists while the script is running.

Please let me know if you think I'm over-/misusing code blocks. I wasn't quite sure how to do in this case.
You C, I aim to Assemble a PERL of knowledge, helpful FOR TRANsit to new languages.
___
When writing a report, always include valid references. You never know when the Garbage Collector may stop by.

EvanED
Posts: 4327
Joined: Mon Aug 07, 2006 6:28 am UTC
Location: Madison, WI
Contact:

Postby EvanED » Thu Sep 13, 2007 10:29 pm UTC

Agentlien wrote:Please let me know if you think I'm over-/misusing code blocks. I wasn't quite sure how to do in this case.


I think you're fine. The only thing I'd say is that it helps if you don't put newlines before and after the tags; that causes a blank line to appear at the top and bottom of the block.


I'm sure I have a couple amusing comments somewhere, but I'm not sure where off the top of my head. I do have this though:

Code: Select all

/// Averages two ints in the face of possible overflow correctly.
inline int average(int lo, int hi)
{
    BOOST_STATIC_ASSERT( sizeof(int) < sizeof(long long) );

    // This only works if long long is bigger, otherwise there is overflow.
    // Suggested replacements if this changes:
    //     * lo/2 + (lo%2 + hi%2)/2 + hi/2
    //     * lo>>1 + hi>>1 + (lo & hi & 1)
    //       BOOST_STATIC_ASSERT( (-1 >> 1) == -1 )
    // Note that the use of /2 and >>1 is important, as is the term with the %2s
    // in the first solution not being the last term. The former solution will
    // (should) work for any conforming C++ implementation, even if it is actively
    // trying to subvert you. The second assumes 2's complement notation and that
    // >> does an arithmetic shift rather than logical shifts (hence the suggested
    // static assert when using that solution.)
    //
    // The latter should be slightly faster, because VC compiles x%2 into code with
    // branches (?!), while the latter is straight-line code.
    //
    // See http://forums.xkcd.com/viewtopic.php?t=3648 for the source of both of
    // these.

    long long lo64 = lo;
    long long hi64 = hi;

    return static_cast<int>((lo64 + hi64)/2);
}

User avatar
biolution
Ken
Posts: 560
Joined: Wed Sep 05, 2007 10:05 pm UTC
Location: San Francisco, Ca
Contact:

Postby biolution » Fri Sep 14, 2007 4:54 pm UTC

My personal favorite:
// I was a littel toasted when i wrote this

Love, Sex & Relationships: I'D RATHER BE HAVING SEX WITH BEES.

User avatar
jobriath
Posts: 255
Joined: Wed Apr 04, 2007 2:11 pm UTC
Location: North of England

Postby jobriath » Fri Sep 14, 2007 9:55 pm UTC

While all my code has been sensible, well-written and well-documented, I remember a friend telling me about a summer job he spent coding. After an all-nighter, he felt he couldn't hack around with this piece of production code any longer, and left it with:

Code: Select all

// Fuck my furry furry badger with a chainsaw


To his knowledge, it's there to this day.

Animos
Posts: 8
Joined: Wed Dec 20, 2006 12:44 am UTC
Location: Nowhere

Postby Animos » Sat Sep 15, 2007 4:20 am UTC

I tend to throw in sarcastic/joke comments whenever I'm doing something I know I shouldn't. Things like:

Code: Select all

// Magic numbers, now with twice the magic!
// Will gracefully burst into flames and die if given bad input, possibly inflicting the user with some kind of STD.
// This thing does some stuff, taking some things and returning something.

Looking through some of my older code, though, I've got to say that this line takes the cake:

Code: Select all

// I forgot what this was supposed to do, but it's unnecessary so oh well.

Followed by some lines of code. So now, looking at the comment, I can assess that the code following that comment did something unnecessary, but for whatever reason couldn't be removed. I guess it set the switch to the "more magic" position.

Another good comment I've come across was when I was asked to work on a website written in PHP. Now, not to get on a tangent about the merits of PHP, but this website was the quintessential display of why things shouldn't be written in PHP. And within one of the PHP files for this website contained a function. And quite a ways down the same file (it was a large file) was the exact same function, copy and pasted, preceded by a comment stating simply "GOD PHP IS SO STUPID!!!"

I decided against asking or trying to figure out why it was there. That's the kind of comment that tells you that the story behind this piece of code is one wrought with unmentionable agony and despair, and that if you ask about it the original programmer's seething hatred of his creation could potentially give you cancer.
--Animos

jzamor
Posts: 2
Joined: Sat Sep 15, 2007 7:27 am UTC

Personal Favorite

Postby jzamor » Sat Sep 15, 2007 9:04 am UTC

My personal favorite as seen in a Coldfusion comment:

Code: Select all

<!--- TODO: WTF? --->


Unfortunatly upon seeing that I had to investigate who on the team had written that and svn blame dutifully informed me that it was not someone else from the team, but apparently myself (on a Friday)...

Ah well.

recurve boy
Posts: 353
Joined: Wed Jan 31, 2007 5:48 am UTC
Location: Sydney Australia
Contact:

Postby recurve boy » Sat Sep 15, 2007 2:44 pm UTC

Worst comment I have seen:

Code: Select all

// this is fucked

Agentlien
Posts: 31
Joined: Mon Sep 10, 2007 6:06 pm UTC
Location: Göteborg, Sweden

Re: Personal Favorite

Postby Agentlien » Sun Sep 16, 2007 1:26 pm UTC

jzamor wrote:My personal favorite as seen in a Coldfusion comment:

Code: Select all

<!--- TODO: WTF? --->


Unfortunatly upon seeing that I had to investigate who on the team had written that and svn blame dutifully informed me that it was not someone else from the team, but apparently myself (on a Friday)...

Ah well.


Hahaha, that has to be a wonderful insight. "Oh.. When did I..?"
You C, I aim to Assemble a PERL of knowledge, helpful FOR TRANsit to new languages.

___

When writing a report, always include valid references. You never know when the Garbage Collector may stop by.

msully4321
Posts: 7
Joined: Fri Aug 10, 2007 10:20 pm UTC

Postby msully4321 » Sun Sep 16, 2007 5:40 pm UTC

One of mine, on line 12 of a 300 line file:

Code: Select all

/* Everything beneath this line makes me cringe. */

Agentlien
Posts: 31
Joined: Mon Sep 10, 2007 6:06 pm UTC
Location: Göteborg, Sweden

Postby Agentlien » Sun Sep 16, 2007 6:13 pm UTC

msully4321 wrote:One of mine, on line 12 of a 300 line file:

Code: Select all

/* Everything beneath this line makes me cringe. */


Nice. :D That's usually when I sigh heavily and decide to restructure.

I just looked through an old project of mine and found a lot of ridiculously obvious statements in the comments. I guess this was as I was learning the whole point with commenting. But it also had some funny things. Such as...

Code: Select all

void Events(); //Makes things happen during the course of the game

}while(loop); //The show must go on, until the player is bored

RelMap->DrawMap(tempmap); //Maybe not so neat...

//BETA METHOD, CHANGE THIS LATER ON!

//Error checking?

The second last.. Something I thought was very important to change before the assignment was over. That was many years ago, now.. It's still in the code. And the last one, well.. The function it was in required a lot of error checking, but had none.
You C, I aim to Assemble a PERL of knowledge, helpful FOR TRANsit to new languages.

___

When writing a report, always include valid references. You never know when the Garbage Collector may stop by.

User avatar
niteice
Posts: 186
Joined: Wed May 02, 2007 4:17 am UTC
Contact:

Postby niteice » Sun Sep 16, 2007 8:09 pm UTC

In a python script used to automatically generate a header:

Code: Select all

# we don't add the build number here. rather, the master build process keeps track of it, and passes it to us.
# TODO: write master build process

free-zombie
Posts: 6
Joined: Sun Sep 16, 2007 8:55 pm UTC
Location: Bavaria
Contact:

Postby free-zombie » Sun Sep 16, 2007 9:07 pm UTC

Code: Select all

    _api_version = 2 # TODO: give this a meaning
Just remember: If the world didn't suck, we'd fall off

Agentlien
Posts: 31
Joined: Mon Sep 10, 2007 6:06 pm UTC
Location: Göteborg, Sweden

Postby Agentlien » Sun Sep 16, 2007 9:13 pm UTC

niteice wrote:In a python script used to automatically generate a header:

Code: Select all

# we don't add the build number here. rather, the master build process keeps track of it, and passes it to us.
# TODO: write master build process


Hahaha. That's such a lovely one. I like that kind of comments a lot. Reminds me of something I did in a Java game for school, last year.. Maybe I can find it again?
You C, I aim to Assemble a PERL of knowledge, helpful FOR TRANsit to new languages.

___

When writing a report, always include valid references. You never know when the Garbage Collector may stop by.

Quan
Posts: 71
Joined: Mon Aug 20, 2007 6:17 pm UTC
Location: Manchester, UK

Postby Quan » Mon Sep 17, 2007 2:58 am UTC

Dark Shikari wrote:
wing wrote:String name; //Creates a String called name


I see things like that ALL THE TIME in intro CS classes.


i++; //add 1 to i

/.... tons of other code, completely without comments ..../

int b = 0; //initialize b

/.... tons of other code, completely without comments ..../


Haha, I read that the other way around when I read it, from now on I'm always adding them comment

Code: Select all

i++; //adds i to 1
I'm so geeky I got really excited about making this signature in SVG until it occurred to me HTML would obviously be turned off ¬_¬'

User avatar
Agent Anderson
Posts: 25
Joined: Mon May 21, 2007 11:44 am UTC

Postby Agent Anderson » Mon Sep 17, 2007 4:12 pm UTC

Not exactly a comment, but related to the spirit of this thread:

Exception up = new ArgumentException();
throw up;
Image

elminster
Posts: 1560
Joined: Mon Feb 26, 2007 1:56 pm UTC
Location: London, UK, Dimensions 1 to 42.
Contact:

Postby elminster » Mon Sep 17, 2007 4:32 pm UTC

Code: Select all

// Wyvern...stupid koreans

Code: Select all

//stupid koreans...

Code: Select all

//korean idiots...


Was in a poorly written mmorpg server that got leaked into private community. Featuring:

Code: Select all

BOOL CGame::bGetMultipleItemNamesWhenDeleteNpc

Nice naming guys. Some

Code: Select all

int CGame::iCalculateAttackEffect
A 2000 line function that handles about 4 seperate things... that runs every single time a physical attack is done (a good place to optimise in game server terms).

Search: "goto "
Matching lines: 226

I dont think the state machines arguement is at work here.

Bare in mind, when this game was in its prime, it had 1000's of people online at the same time (subcription as well...). Some of the code wanted to make me cry. Some of it i managed to strip out and recode in 5x less and actually add functionality and maintainability.
Image

User avatar
evilbeanfiend
Posts: 2650
Joined: Tue Mar 13, 2007 7:05 am UTC
Location: the old world

Postby evilbeanfiend » Mon Sep 17, 2007 5:05 pm UTC

gah, magic numbers with out-of-date magic comments e.g.

Code: Select all

return a*b+ 121 //from 32 * 4


what is 4, what is 32 and why is it no longer 128!
in ur beanz makin u eveel

User avatar
Eschatokyrios
Posts: 244
Joined: Fri Dec 22, 2006 6:49 pm UTC

Postby Eschatokyrios » Tue Sep 18, 2007 5:39 am UTC

We had a very basic overview of HTML/learn how to make a website unit for the last part of my graphics art class. Since I already knew HTML, and was generally sour on learning HTML in a graphics art class, I knocked out the requirements for the page in about 10 minutes each day, and spent a lot of rest of the class period writing gigantic comment blocks with all sorts of random shit in them. "asdfjdsakfjsdkafj"'s, blank lines, silly one-line poems, you name it. I think I got downgraded for that, but I had an A in the class anyway so what the fuck. It was funny, though, seeing everyone else printing out five or six pages of code at the end to turn in and me with like 20.

I also like to give variables creative names. I wrote a java hangman program with a certain variable to store the string containing the word that the user had to guess. I called it wordguessanda, -anda being the latinate suffix of the 1st conjugation feminine future passive participle ("to be VERBed"). It amused me, anyway.
კაცი ბჭობდა, ღმერთი იცინოდაო
k'atsi bch'obda, ghmerti itsinodao
"Man was discussing, God was laughing"
-Georgian proverb

User avatar
phlip
Restorer of Worlds
Posts: 7543
Joined: Sat Sep 23, 2006 3:56 am UTC
Location: Australia
Contact:

Postby phlip » Tue Sep 18, 2007 7:22 am UTC

evilbeanfiend wrote:gah, magic numbers with out-of-date magic comments e.g.

Code: Select all

return a*b+ 121 //from 32 * 4


what is 4, what is 32 and why is it no longer 128!

From an enumaration:

Code: Select all

USER=13 /* Normally 1 but for <client's name removed> is 12*/

Code: Select all

enum ಠ_ಠ {°□°╰=1, °Д°╰, ಠ益ಠ╰};
void ┻━┻︵​╰(ಠ_ಠ ⚠) {exit((int)⚠);}
[he/him/his]

User avatar
evilbeanfiend
Posts: 2650
Joined: Tue Mar 13, 2007 7:05 am UTC
Location: the old world

Postby evilbeanfiend » Tue Sep 18, 2007 11:12 am UTC

oo yes that enum would irk me

@ Eschatokyrios

you had to print out your source code? that is the real wtf
in ur beanz makin u eveel

User avatar
Archena
Posts: 54
Joined: Tue Sep 11, 2007 10:08 am UTC
Location: York, England
Contact:

Postby Archena » Tue Sep 18, 2007 12:08 pm UTC

Code: Select all

//This shouldn't happen[/quote]

User avatar
User? What User?
There are like 4 posters on XKCD that no more about ...
Posts: 39
Joined: Sat May 12, 2007 12:30 am UTC
Location: Location? What Location?

Postby User? What User? » Tue Sep 18, 2007 3:58 pm UTC

Image

Clearly this is the win.
Signature? What Signature?

UchihaJax
Posts: 12
Joined: Thu Sep 06, 2007 7:37 pm UTC

Postby UchihaJax » Tue Sep 18, 2007 4:36 pm UTC

This is my current favourite from a large framework i'm currently working on.
It's littered all over the place.

Code: Select all

#define DEBUG//to enable Debug.WriteLines


Yea, because Debug.WriteLines are supposed to run in release builds, right?

User avatar
Sc4Freak
Posts: 673
Joined: Thu Jul 12, 2007 4:50 am UTC
Location: Redmond, Washington

Postby Sc4Freak » Tue Sep 18, 2007 10:36 pm UTC

Any half decent compiler would automatically define the DEBUG and _DEBUG macros for debug builds, anyway.

User avatar
shawncplus
Posts: 15
Joined: Wed Aug 01, 2007 3:10 am UTC
Contact:

Postby shawncplus » Wed Sep 19, 2007 2:38 am UTC

Code: Select all

/* Horrible, ugly hack that I will fix later (god help me) */


It was a hack to stitch together an element affinity system in a game. At the time I was ashamed at the code, perhaps if I commented better I would understand why it is so bad now. *shrug*
Excuse me while I gather the virgin sacrifice and assemble the pentagram required to solve your problem.


Return to “Coding”

Who is online

Users browsing this forum: No registered users and 7 guests