Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411515 Posts in 69376 Topics- by 58431 Members - Latest Member: Bohdan_Zoshchenko

April 27, 2024, 05:02:26 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)Post if you just laughed at your code.
Pages: 1 2 [3] 4 5 ... 27
Print
Author Topic: Post if you just laughed at your code.  (Read 86637 times)
Triplefox
Level 9
****



View Profile WWW
« Reply #40 on: March 18, 2011, 12:07:30 AM »

Code:
Unknown identifier: priorities
Corny Laugh
Logged

bateleur
Level 10
*****



View Profile
« Reply #41 on: March 18, 2011, 01:04:50 AM »

I really must stop using string literals as abstract handles to things.

Today's first bug located...

Code:
mainView.switchTo("TitLepage");

I'm pretty sure I saw one of her DVDs for sale in a banner ad once. Big Laff
Logged

BitPuffin
Level 0
**



View Profile WWW
« Reply #42 on: March 18, 2011, 02:32:54 AM »

I was once bored enough to type this and laugh at it:
Code:
double rainbow;

I was also laughing like a mad scientist while finishing up my Java Tetris clone, at both the things that actually worked and the things that went horribly wrong.

HAHA, damn; that cracked me up  Evil
Logged

You can\'t spell \"Programmer\" without \"Pro\"
Triplefox
Level 9
****



View Profile WWW
« Reply #43 on: March 21, 2011, 04:43:17 PM »

Code:
		// units to be rescued
var resQueue = new Array<Dynamic>();
Logged

Evan Balster
Level 10
*****


I live in this head.


View Profile WWW
« Reply #44 on: March 21, 2011, 09:05:14 PM »

Hah.  ResQueue.

Quote
LOG ("Cancel lock (" << x << ", " << y << ") for #"
   << client << endl << "    Result: ");if (world.checkLock(x, y) == client)
{
   LOG("OKAY");
   user.lock = false;
   cell.lock = 0;
   resp.sendTo(client) << NC_CELL << NC_CELL_CANCEL << x << y;
   world.toUsers(resp)
      << NC_CELL << NC_CELL_EVENT
      << NC_CELL_CANCEL << x << y;
}
else
{
   LOG("NO SUCH LOCK"); //The third time I saw this I laughed.

   //Anyway, humor the little fella
   resp.sendTo(client) << NC_CELL << NC_CELL_CANCEL << x << y;
}
Logged

Creativity births expression.  Curiosity births exploration.
Our work is as soil to these seeds; our art is what grows from them...


Wreath, SoundSelf, Infinite Blank, Cave Story+, <plaid/audio>
Cheezmeister
Level 3
***



View Profile
« Reply #45 on: March 23, 2011, 12:11:21 PM »

My favorite line of code in the history of ever, just in case it hasn't been posted already:

Code:
stop(); //hammertime
Logged

෴Me෴ @chzmstr | www.luchenlabs.com ቒMadeቓ RA | Nextris | Chromathud   ᙍMakingᙌCheezus II (Devlog)
grapefrukt
Level 1
*



View Profile WWW
« Reply #46 on: March 24, 2011, 02:39:37 AM »

i recently stumbled upon this comment in code i wrote about two months ago, the code itself isn't very amusing, but my nice little insult at the end cracked me up.

Code:
if(isLandscape){
// w/h needs to be swapped here for landscape, took me about half a day to figure that out. communists.
glTranslatef(-h/2,-w/2,0);
} else {
glTranslatef(-w/2,-h/2,0);
}
Logged
Wilson Saunders
Level 5
*****


Nobody suspects the hamster


View Profile WWW
« Reply #47 on: March 24, 2011, 10:29:02 AM »

I used to put little puns in my comments about how the World class was by far the best class in the the entire program. Recently I spent 20 minutes trying to figure out why a sprite wasn't rendering when I was drawing it before the background. That caused the laugh of stupidity and dispair.
Logged

Play my games at http://monkeydev.com/
Evan Balster
Level 10
*****


I live in this head.


View Profile WWW
« Reply #48 on: March 24, 2011, 11:52:38 AM »

Oh, laugh of stupidity and despair.

At times, you are my only true friend.
Logged

Creativity births expression.  Curiosity births exploration.
Our work is as soil to these seeds; our art is what grows from them...


Wreath, SoundSelf, Infinite Blank, Cave Story+, <plaid/audio>
BitPuffin
Level 0
**



View Profile WWW
« Reply #49 on: March 24, 2011, 01:54:56 PM »

Code:
 String tanga = "Worst joke ever"; 
  Noir
Logged

You can\'t spell \"Programmer\" without \"Pro\"
GeoffBorchers
Level 0
**



View Profile
« Reply #50 on: March 24, 2011, 05:47:24 PM »

My favorite line of code in the history of ever, just in case it hasn't been posted already:

Code:
stop(); //hammertime


I find myself preferring:

Code:
stop(hammertime);
Logged
Derakon
Level 2
**


View Profile
« Reply #51 on: March 24, 2011, 09:36:16 PM »

Here's one I found in my code just a bit ago:
Code:
if not shouldContinue:
    continue
Of course, when I named the variable, I was thinking in terms of "should continue with the rest of the iteration", not in terms of Python keywords...
Logged
Evan Balster
Level 10
*****


I live in this head.


View Profile WWW
« Reply #52 on: March 24, 2011, 09:47:59 PM »

Code:
if not shouldContinue:
    continue

You rebel, you.
Logged

Creativity births expression.  Curiosity births exploration.
Our work is as soil to these seeds; our art is what grows from them...


Wreath, SoundSelf, Infinite Blank, Cave Story+, <plaid/audio>
RobAnthony
Level 0
**



View Profile WWW
« Reply #53 on: March 25, 2011, 03:29:13 PM »

It's late at night, I'm working on my GLSL

I read Uniform as Unicorn...

can't unsee it!
Logged
st33d
Guest
« Reply #54 on: March 28, 2011, 12:09:04 PM »

http://stackoverflow.com/questions/184618/what-is-the-best-comment-in-source-code-you-have-ever-encountered

An old link, but worthy of this thread.

Logged
BadgerManufactureInc
Guest
« Reply #55 on: March 28, 2011, 12:41:50 PM »


Cheesy First time I've seen that.

This line should be another thread 'post if you just made your code impossible to debug':

#define TRUE FALSE //Happy debugging suckers

Of course, that kind of idea could be good for deliberate obfuscation, if you wanted to avoid decompiling for example.
Logged
drChengele
Level 2
**


if (status = UNDER_ATTACK) launch_nukes();


View Profile
« Reply #56 on: March 28, 2011, 01:17:28 PM »

Code:
void add_influence(Influence influence) // influence influence influence.
// influence.
{ ...
}

But this :
#define TRUE FALSE //Happy debugging suckers
This wins the evil olympics.

Logged

Praetor
Currently working on : tactical battles.
Evan Balster
Level 10
*****


I live in this head.


View Profile WWW
« Reply #57 on: March 28, 2011, 07:55:55 PM »

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

Hah!
Logged

Creativity births expression.  Curiosity births exploration.
Our work is as soil to these seeds; our art is what grows from them...


Wreath, SoundSelf, Infinite Blank, Cave Story+, <plaid/audio>
Player 3
Level 10
*****


View Profile
« Reply #58 on: April 13, 2011, 04:49:19 AM »

My favorite line of code in the history of ever, just in case it hasn't been posted already:

Code:
stop(); //hammertime


I find myself preferring:

Code:
stop(hammertime);

Time to put actual use to the hammertime!

Code:
stop();

this.loaderInfo.addEventListener(ProgressEvent.PROGRESS, hammertime);
this.loaderInfo.addEventListener(Event.COMPLETE, onComplete);

function hammertime(e:ProgressEvent):void {
...
...

It actually stops for hammertime.
I'm dead inside.
« Last Edit: April 13, 2011, 04:57:04 AM by Player 3 » Logged
Klaim
Level 10
*****



View Profile WWW
« Reply #59 on: April 13, 2011, 01:31:00 PM »

I didn't laugh right now but I just remembered about the time I read the code I did 7/8 years before for my first C++ game that was also my first "big" game.

The gameplay mechanics were fully written in one unique function. (the GUI and graphics were well separated, only the gameplay was a unique block of ifs...)

The gameplay function started with a if that looked if there was at least one game entity of a specific type. If there was, it did one half of the function. If there wasn't, it did the other half. Both the if and else blocks were the same but few minor modifications.

I created objects using new. I deleted them using free. It's still apparently stable on Windows7.

There was 5 cpp files and 5 headers files. One for each "module". (really fast compilation!)

The scripting was done using a command-line application that asked you for each script line what instruction and parameter you wanted.

That was so wrong and naive, yet it's the most complete game I ever done outside my dayjob.
I was almost crying from laughing (is it english?) while reading this code. Incredible.
Logged

Pages: 1 2 [3] 4 5 ... 27
Print
Jump to:  

Theme orange-lt created by panic