Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411561 Posts in 69384 Topics- by 58443 Members - Latest Member: junkmail

May 03, 2024, 05:06:16 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 ... 15 16 [17] 18 19 ... 27
Print
Author Topic: Post if you just laughed at your code.  (Read 86680 times)
Code_Assassin
Level 5
*****


freedom


View Profile
« Reply #320 on: November 30, 2012, 05:15:40 PM »

So I'm making some lil monkeys in my game, and I store them in a generic List. I'm looping through them, with an index named 'c'. While checking if the current monkey in the list is null, the code ends up like:

Code:
if(monkey[c]){//monkey do
...


lol  Big Laff
Logged
Muz
Level 10
*****


View Profile
« Reply #321 on: December 03, 2012, 02:53:15 AM »

items.add(NOTHING);
setHeight(NOTHING);
Logged
Dr. Cooldude
Guest
« Reply #322 on: December 03, 2012, 03:24:52 AM »

items.add(NOTHING);
setHeight(NOTHING);
This kind of reminds me of the NOP instruction that some CPUs has. Durr...?
Logged
Geti
Level 10
*****



View Profile WWW
« Reply #323 on: December 03, 2012, 04:28:09 AM »

I wonder why "" when stored in a std::string is becoming some random IP address now?...

Code:
if ( fscanf( thefile, "%s", ip.c_str() ) < 0 )
Facepalm
Logged

DelishusCake
Guest
« Reply #324 on: December 03, 2012, 11:02:07 AM »

I'm making a simple level editor, and needed a way to grow and shrink rectangles based on button presses. It wasn't working and I think I found out why:
Code:
if love.keyboard.isDown('lshit') then 
Editor.active.w = Editor.active.w + 2
end
Logged
Muz
Level 10
*****


View Profile
« Reply #325 on: December 03, 2012, 06:52:06 PM »

items.add(NOTHING);
setHeight(NOTHING);
This kind of reminds me of the NOP instruction that some CPUs has. Durr...?

It's supposed to initialize stuff to 0, but I don't like putting 0 as a variable anywhere. I guess renaming it to NOP makes more sense, but the doThis(NOTHING) code in capital letters makes me giggle.
Logged
Sergi
Level 1
*



View Profile WWW
« Reply #326 on: December 04, 2012, 02:11:25 AM »

After wondering why part of the program isn't doing what it should, and putting breakpoints in the function that are never hit, I realized that yesterday I put
Code:
return;
at the beginning of the function in order to test a different part of the program. Painful but difficult not to laugh at the stupid mistakes...
Logged

Dr. Cooldude
Guest
« Reply #327 on: December 04, 2012, 03:02:08 AM »

You and Muz should collaborate and make it to
Code:
return NOTHING;

Couldn't resist
Logged
kiddRaddical
Level 0
***

ALT UNIVERSE SEGA SATURN DEV


View Profile WWW
« Reply #328 on: December 14, 2012, 08:20:37 AM »

Rewriting my EnemyManager in better, cleaner C# and came across a lame pun:

Code:
public Enemy...

YEEEEAAAA BOOOOOIIII. Only 90s hip-hop fans will get it Wink
Logged

posting (too) regularly on Twitter: @EthanRedd
EthanRedd.com
Dr. Cooldude
Guest
« Reply #329 on: December 14, 2012, 09:13:44 AM »

Rewriting my EnemyManager in better, cleaner C# and came across a lame pun:

Code:
public Enemy...

YEEEEAAAA BOOOOOIIII. Only 90s hip-hop fans will get it Wink

I posted the same thing on this thread before! :D

I was working on the Enemy class in my game, found this constructor:
Code:
public Enemy()
{ ...
and,



lol, what a nice coincidence. Wink
Logged
Evan Balster
Level 10
*****


I live in this head.


View Profile WWW
« Reply #330 on: December 14, 2012, 11:15:52 AM »

You guys are a  class Act {}
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>
kiddRaddical
Level 0
***

ALT UNIVERSE SEGA SATURN DEV


View Profile WWW
« Reply #331 on: December 14, 2012, 11:50:28 AM »

You guys are a  class Act {}

Code:
while(reading)
   thatPun -= myHealth

...what I am I doing with my life...
Logged

posting (too) regularly on Twitter: @EthanRedd
EthanRedd.com
Dr. Cooldude
Guest
« Reply #332 on: December 14, 2012, 12:10:49 PM »

You guys are a  class Act {}
My constructor was real though.
I promise... Concerned
Logged
Sergi
Level 1
*



View Profile WWW
« Reply #333 on: December 14, 2012, 12:20:50 PM »

You guys are going to like these love letters if you don't know them already. Yes, that's an actual working C program.
Logged

JobLeonard
Level 10
*****



View Profile
« Reply #334 on: December 14, 2012, 02:50:00 PM »

 Lips Sealed

I'm a 90s hip-hop fan. Anyone older than twenty should get this.
Logged
Code_Assassin
Level 5
*****


freedom


View Profile
« Reply #335 on: December 14, 2012, 03:40:55 PM »

snip

socomplicate.
Logged
kiddRaddical
Level 0
***

ALT UNIVERSE SEGA SATURN DEV


View Profile WWW
« Reply #336 on: December 14, 2012, 04:17:47 PM »

You guys are going to like these love letters if you don't know them already. Yes, that's an actual working C program.

That's amazing on so many levels; dare I ask what the output is? ( too lazy to read it for understanding. I hate the whole C family)
Logged

posting (too) regularly on Twitter: @EthanRedd
EthanRedd.com
Sergi
Level 1
*



View Profile WWW
« Reply #337 on: December 14, 2012, 04:23:33 PM »

You guys are going to like these love letters if you don't know them already. Yes, that's an actual working C program.

That's amazing on so many levels; dare I ask what the output is? ( too lazy to read it for understanding. I hate the whole C family)

It's from The International Obfuscated C Code Contest. So you're not supposed to be able to understand it at first sight. Smiley

From the hint file:

Code:
    This is a "Picking the Daisy" simulation.  Now, instead of mangling a 
    daisy, simply run this program with the number of petals desired as
    the argument.
   
    This is a good counter-example to peoples' complaints that C doesn't
    have an "English-like" syntax.
   
    Lint complains about everything - null effect, xxx may be used before
    set, statement not reached, return(e) and return.  Lint dumps core
    on some systems.  My personal favorite lint complaint is
   
    "warning: eroticism unused in function main".
   
    Also obviously, (char)lotte and (char*)lie are incompatible types...

Wizard
Logged

ChevyRay
Level 2
**



View Profile
« Reply #338 on: December 15, 2012, 03:27:58 AM »

Oh god I just added this line of code to FlashPunk 2 and it is 3:30 AM and what am I still doing up Crazy

Code:
public function get down():Boolean
{
return right.down || left.down || down.down || up.down;
}
Logged
Code_Assassin
Level 5
*****


freedom


View Profile
« Reply #339 on: December 15, 2012, 09:42:48 AM »

snip

Swag.
Logged
Pages: 1 ... 15 16 [17] 18 19 ... 27
Print
Jump to:  

Theme orange-lt created by panic