Chaos Project

General => Entertainment => Topic started by: Blizzard on September 21, 2011, 10:59:50 am

Title: Best comments found in code
Post by: Blizzard on September 21, 2011, 10:59:50 am
http://stackoverflow.com/questions/184618/what-is-the-best-comment-in-source-code-you-have-ever-encountered?page=1&tab=votes#tab-top

While there are many Internet/meme/geek jokes in there, there are also many comments that would make the average person laugh as well. xD I definitely recommend it for a good laugh. You don't have to go through all the 18 pages.
Title: Re: Best comments found in code
Post by: ShadowPierce on September 21, 2011, 11:20:52 am
->LOL @
Quotestop(); // Hammertime!

:rofl:


Title: Re: Best comments found in code
Post by: Blizzard on September 21, 2011, 03:05:48 pm
LMAO!

Quote// A Gorgon class - For the love of Zeus don't look directly at it!


EDIT: :rofl:

v.bpc     := v.pc;  -- Remember to jump back
v.baccu   := accu;  -- Yo dawg, heard you like runing instructions
                   -- so I took backup of your accu so you can run
                   -- instructions while you run instructions.
v.flags.i := false; -- No more interupts
Title: Re: Best comments found in code
Post by: Ryex on September 21, 2011, 04:34:26 pm
I now have the urge to make humorous comments in ARC's source
Title: Re: Best comments found in code
Post by: Blizzard on September 21, 2011, 05:09:00 pm
So do I, so do I.
Title: Re: Best comments found in code
Post by: ForeverZer0 on September 21, 2011, 05:23:02 pm
Same, lol.

I only read a few pages so far, but some of them are hilarious. :)
Title: Re: Best comments found in code
Post by: Blizzard on September 22, 2011, 02:14:43 am
I read them all. The later ones are barely funny anymore or start repeating. I'd say once you get past the Yo Dawg comment that I posted, the rest isn't so funny anymore.
Title: Re: Best comments found in code
Post by: legacyblade on September 25, 2011, 10:25:19 pm
I used to do this in my collage classes. lol. Never knew other people liked to make jokes and references in their comments. A professor even chewed me out for it once. lol.
Title: Re: Best comments found in code
Post by: Blizzard on September 26, 2011, 02:32:19 am
Ever since I read this, I started adding my own comments from time to time. xD Here's one from the other day:

// this is actually a useless and unnecessary class, but my OCD would go haywire otherwise

It's about a class that basically just inherits another class and passes on a parameter to the superclass's constructor.

Code: Dialog.h
#ifndef MENU_OVERLAY_DIALOG_H
#define MENU_OVERLAY_DIALOG_H

#include <hltypes/hmap.h>
#include <hltypes/hstring.h>
#include <scedge/MenuDialog.h>

namespace Menu
{
namespace Overlay
{
// this is actually a useless and unnecessary class, but my OCD would go haywire otherwise
class Dialog : public scedge::MenuDialog
{
public:
Dialog();
~Dialog();

protected:
SCEDGE_DECLARE_INPUT(Dialog);

};

}
}
#endif


Code: Dialog.cpp
#include <hltypes/harray.h>
#include <hltypes/hmap.h>
#include <hltypes/hstring.h>
#include <scedge/SceneManager.h>

#include "Menu/Overlay/Dialog.h"

namespace Menu
{
namespace Overlay
{
SCEDGE_DEFINE_INPUT(Dialog, scedge::MenuDialog)
/****************************************************************************************
* Construct/Destruct
****************************************************************************************/

Dialog::Dialog() : scedge::MenuDialog("menu/overlay/dialog")
{
}

Dialog::~Dialog()
{
}

}
}


This could have been done the same way without the class, but every "overlay menu" that I use has a subclass like this.