Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411673 Posts in 69399 Topics- by 58452 Members - Latest Member: homina

May 16, 2024, 10:57:34 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 ... 14 15 [16] 17 18 ... 27
Print
Author Topic: Post if you just laughed at your code.  (Read 86768 times)
JobLeonard
Level 10
*****



View Profile
« Reply #300 on: November 17, 2012, 05:00:41 AM »

*
I like how your tired self finds simpler writing that stuff rather than coming up with a decent solution
Well, it was a (kind of) fractal, and nested for-loops aren't that hard to grasp. I still think it's conceptually not that difficult (if incomprehensible when approaching it from the resulting code).
Logged
Evan Balster
Level 10
*****


I live in this head.


View Profile WWW
« Reply #301 on: November 17, 2012, 03:36:15 PM »

Looking through a half-baked prototype I'm redoing for Fuck This Jam

Code:
		float baffle;
Uint32 action;
String entry;

Huh.  Weird variable name.

Code:
	baffle = 0.0f;

It doesn't do anything else.

What was this variable even forHuh?
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>
Code_Assassin
Level 5
*****


freedom


View Profile
« Reply #302 on: November 17, 2012, 03:59:40 PM »

snip

Lol  Giggle
Logged
SuperDisk
Level 2
**



View Profile
« Reply #303 on: November 17, 2012, 04:23:58 PM »

Quote
What was this variable even forHuh?

Baffling you.
Logged
moi
Level 10
*****


DILF SANTA


View Profile WWW
« Reply #304 on: November 17, 2012, 07:24:21 PM »

Quote
What was this variable even forHuh?
scientists
Logged

subsystems   subsystems   subsystems
George Michaels
Level 0
***


I like big butts and I can not lie


View Profile
« Reply #305 on: November 19, 2012, 01:14:43 AM »

Just finishing up the player management code I wrote while drunk last night and found these gems:
Code:
// God I love linked lists <3
Buffer* b = new Buffer(id, first);
first = b;

Code:
// Chuck a hissy fit if there's nothing for baby
if(first == NULL)
throw;
Logged

Yeah, that.
Quarry
Level 10
*****


View Profile
« Reply #306 on: November 19, 2012, 09:25:24 AM »

I think most of the things here are rigged
Logged
0x1A
Level 0
**



View Profile
« Reply #307 on: November 19, 2012, 11:41:37 AM »

I think most of the things here are rigged

Or they're genuine dun goofd
Logged

Segmentation fault (core dumped)
Evan Balster
Level 10
*****


I live in this head.


View Profile WWW
« Reply #308 on: November 19, 2012, 11:45:02 AM »

I think most of the things here are rigged

Except where pointed out, my stuff is all legit.  Comment humor is of course in a class of its own since it's a great way to give one's future self an unexpected giggle.
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>
JMickle
Level 10
*****



View Profile
« Reply #309 on: November 20, 2012, 10:06:30 AM »

Code:
var p:Point;

for (p in v /*lololol*/ ) {

}
shut up, me
Logged

Code_Assassin
Level 5
*****


freedom


View Profile
« Reply #310 on: November 20, 2012, 10:23:17 AM »

Code:
var p:Point;

for (p in v /*lololol*/ ) {

}
shut up, me
Is that what I think it means LOL(pervert).

I see what you did there.
« Last Edit: November 20, 2012, 10:35:03 AM by Code_Assassin » Logged
Evan Balster
Level 10
*****


I live in this head.


View Profile WWW
« Reply #311 on: November 20, 2012, 10:27:03 PM »

Making an audio class that performs some signal analysis.  I have a structure called "Feedback" which sends a waveform's worth of audio data back at a time from the realtime thread --

Code:
Feedback loop;


Bonus nerd points: when I giggled and said "that's going in the thread", my artist roommate knew what I was talking about.
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>
dr.crow
Level 1
*



View Profile
« Reply #312 on: November 24, 2012, 01:58:08 AM »

Went through a snake clone i wrote while i was still in high school. Stumbled upon this:

Code:
void leggtiltoadd(int i)
{
    toadd+=i;
}
             
void leggtilhvistoadd()
{
    if(toadd)
    {
        toadd--;
        lengde++;
    }
}

When I programmed this, I had the amazing idea that programming in Norwegian would be useful because then i would know the difference between my own code and tutorial code.

"legg til" means "add to", so basically my functions are named "addtotoadd" and "addtoiftoadd". So I guess they are kind of palindromes Smiley
Logged
Dr. Cooldude
Guest
« Reply #313 on: November 24, 2012, 02:54:40 AM »

Went through a snake clone i wrote while i was still in high school. Stumbled upon this:

Code:
void leggtiltoadd(int i)
{
    toadd+=i;
}
             
void leggtilhvistoadd()
{
    if(toadd)
    {
        toadd--;
        lengde++;
    }
}

When I programmed this, I had the amazing idea that programming in Norwegian would be useful because then i would know the difference between my own code and tutorial code.

"legg til" means "add to", so basically my functions are named "addtotoadd" and "addtoiftoadd". So I guess they are kind of palindromes Smiley
Heh, I'm danish and I could definitely see something was wrong with the method names, lol
Logged
Evan Balster
Level 10
*****


I live in this head.


View Profile WWW
« Reply #314 on: November 27, 2012, 02:52:54 PM »

The content of a reduntant file, "universe.cpp", which I finally got around to removing, follows...

Code:
//#include <iostream>
//#include "pg_universe.h"


//using namespace std;
//using namespace plaidgadget;


//Alas!  It is a great and lonely place

//The silence pierced only by

//My sighs

|||||| Concerned ||||||
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>
impulse9
Guest
« Reply #315 on: November 27, 2012, 03:36:40 PM »

Code:
this->buffer = buffer->buffer

 Mock Anger
Logged
Dr. Cooldude
Guest
« Reply #316 on: November 27, 2012, 11:38:46 PM »

The content of a reduntant file, "universe.cpp", which I finally got around to removing, follows...

Code:
//#include <iostream>
//#include "pg_universe.h"


//using namespace std;
//using namespace plaidgadget;


//Alas!  It is a great and lonely place

//The silence pierced only by

//My sighs

|||||| Concerned ||||||
That was beautiful.
Logged
JobLeonard
Level 10
*****



View Profile
« Reply #317 on: November 28, 2012, 07:35:27 AM »

Logged
Evan Balster
Level 10
*****


I live in this head.


View Profile WWW
« Reply #318 on: November 28, 2012, 02:23:42 PM »

Continuing to clean out my engine codebase (Whose size surprises me!) and I keep finding little gems.

This one bandaids a link error with boost::filesystem under MSVC++ --

Code:
#if _WIN32
//Template instantiations that are needed to pacify boost::filesystem...
class VisualStudioIsDumb : public std::codecvt<wchar_t, char, int>
{
public:
class MyFacet : public std::locale::facet
{public: static std::locale::id id;};
std::locale loc, loc2;
VisualStudioIsDumb() : loc("C"), loc2(loc, new MyFacet()) {}
};
static VisualStudioIsDumb WhyIsVisualStudioSoDumb;
static std::locale ThisIsAllVerySilly;
std::locale::id VisualStudioIsDumb::MyFacet::id;
#endif
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 #319 on: November 30, 2012, 04:04:47 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
...
Logged

posting (too) regularly on Twitter: @EthanRedd
EthanRedd.com
Pages: 1 ... 14 15 [16] 17 18 ... 27
Print
Jump to:  

Theme orange-lt created by panic