Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411423 Posts in 69363 Topics- by 58416 Members - Latest Member: JamesAGreen

April 18, 2024, 11:02:37 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 ... 24 25 [26] 27
Print
Author Topic: Post if you just laughed at your code.  (Read 86570 times)
Geti
Level 10
*****



View Profile WWW
« Reply #500 on: February 07, 2014, 03:10:52 AM »

Haha, I didn't mean to give you cause for excuses, thanks for taking it so well. Keen to see where you go with your tech.

@Oniworld that's exactly what I said when I got to the end of that line.
Logged

coppolaemilio
Level 0
**



View Profile WWW
« Reply #501 on: February 07, 2014, 03:34:31 PM »

Well the .orange{color:white;} was meant to be "color:orange;" for a word on a title. Later on I decided that white was fitting better so I changed the value but not the class name.

After this my coworker recommend me to read more about http://css-tricks.com/semantic-class-names/ but it is still fun to do some times.
Logged

Sleeping at Evelend
Evan Balster
Level 10
*****


I live in this head.


View Profile WWW
« Reply #502 on: February 09, 2014, 09:41:35 PM »

Code:
	//Possibly read port number
if (c == ':')
{
++i;
start = i;
Uint16 port = 0;
while (true)
{
c = url[i];
if (c == 0 || c == '/') break;
if (c < '0' || c > '9')
{data->failure = "Bad character in port number"; return;}
if (port >= 6554 || (port == 6553 && c > '5'))
{data->failure = "Port number is over 65535"; return;}
port = 10*port + (c-'0');
++i;
}
if (i == start)
{data->failure = "Port number missing after colon"; return;}
if (port == 0)
{data->failure = "Port 0 is illegal--you're going to jail"; return;}
data->port = port;
}
else
{
//Port 80: everyone loves it
data->port = 80;
}

"Port 80: everyone loves it" gave me a giggle this evening.  Also just noticed "you're going to jail" -- a joke about how as a kid it would freak me out when my internet browser said it had performed an "illegal operation".
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>
Julien
Level 2
**


View Profile
« Reply #503 on: February 10, 2014, 06:13:06 AM »

I used to calculate the width and displacement for each particles instead of calculating them once and putting them in an array
      
Quote
batch.draw(AssetMan.debris, p.x, p.y, p.w, p.w);
tmp = (p.w * 1.5f) - p.w;
p.w += tmp;
tmp /= 2f;
p.x -= tmp;
p.y -= tmp;
      
became :
         
Quote
batch.draw(AssetMan.debris, p.x, p.y, widths[p.index], widths[p.index]);
p.x -= halfWidths[p.index];
p.y -= halfWidths[p.index];
Logged

Pineapple
Level 10
*****

~♪


View Profile WWW
« Reply #504 on: April 12, 2014, 12:59:49 PM »

Just spent a while with my nose in a bit of code, trying to write up intelligible javadocs. Some slightly amusing bits made it through, like this one.

Code:
    /** 
     * Removes all values associated with a key. In this case, the node
     * corresponding to the key is not removed. (This probably isn't the method
     * you're looking for, but whatever.)
     * @param key A key.
     * @return whether the node corresponding to the key exists and was expunged
     * of its associated values.
     */
Logged
Geti
Level 10
*****



View Profile WWW
« Reply #505 on: August 12, 2014, 03:43:54 AM »

Code:
this.getShape().SetTileValue_Legacy(); // sorry

The apology is to modders looking to find some nice stuff in the script, from MM. Made me smile that he bothered with the apology.
Logged

Boreal
Level 6
*


Reinventing the wheel


View Profile
« Reply #506 on: August 15, 2014, 02:04:55 PM »

It's not quite as bad as the Love2D extension libraries:

AnAL (Animations And Love)'
SECS (Simple Educative Class System)
HardonCollider
HUMP (Helper Utilities for a Multitude of Problems)
Quickie
Polygamy
COCK (Common Organization of Controls Kit)
Swingers
LUBE
Logged

"In software, the only numbers of significance are 0, 1, and N." - Josh Barczak

magma - Reconstructed Mantle API
Geti
Level 10
*****



View Profile WWW
« Reply #507 on: August 15, 2014, 03:27:03 PM »

Those guys have always known how to party.
Logged

MorleyDev
Level 0
***

"It is not enough for it to just work"


View Profile WWW
« Reply #508 on: August 15, 2014, 03:30:09 PM »

I always get a slight "wtf" chuckle out of the unfortunately named node.js view engine, "vash". Yeah, not gonna touch what that name sounds like a euphemism for...
Logged

JobLeonard
Level 10
*****



View Profile
« Reply #509 on: August 15, 2014, 09:15:28 PM »

The stampede?
Logged
Boreal
Level 6
*


Reinventing the wheel


View Profile
« Reply #510 on: August 21, 2014, 01:25:49 PM »

Code:
; broom broom
(define mum '("Me" "You" "Him"))
; get out me car
(cdr mum)
Logged

"In software, the only numbers of significance are 0, 1, and N." - Josh Barczak

magma - Reconstructed Mantle API
JobLeonard
Level 10
*****



View Profile
« Reply #511 on: August 21, 2014, 03:07:00 PM »

Is that a text game, and if not, what are you using to write games in a LISP?
Logged
oodavid
Level 8
***


Discombobulate!


View Profile WWW
« Reply #512 on: August 21, 2014, 06:27:58 PM »

I always get a slight "wtf" chuckle out of the unfortunately named node.js view engine, "vash". Yeah, not gonna touch what that name sounds like a euphemism for...

In our office we refer to the .js extension as "jizz". Node jizz.
Logged


Button up! - Out on Android and iOS

latest release: 13th March 2015
Belimoth
Level 10
*****


high-heeled cyberbully


View Profile
« Reply #513 on: August 28, 2014, 01:02:38 PM »

Putting a bunch of stuff in a global namespace for convenience.

Code:
Class G
...
Global unit:Unit
...
End

Cheesy
Logged

manabreak
Level 0
***


dManabreak @ Twitter


View Profile
« Reply #514 on: September 06, 2014, 09:20:16 PM »

More than once, I've tried to write
Code:
GL_COLOR_BUFFER_BIT
or
Code:
GL_DEPTH_BUFFER_BIT
, but it has ended up as
Code:
GL_COLOR_BUFFET_BIT | GL_DEPTH_BUFFET_BIT
. Maybe I'm too hungry while coding?
Logged
Sik
Level 10
*****


View Profile WWW
« Reply #515 on: September 07, 2014, 12:49:10 AM »

Probably.

Also doesn't help that the T is right next to the R.
Logged
jojothejojo
Level 0
**


View Profile
« Reply #516 on: September 15, 2014, 10:45:43 AM »

Game = work
Logged

Game I Have Created: Lonely Ball
makerimages
Level 2
**


Makerimages Studios


View Profile WWW
« Reply #517 on: September 17, 2014, 10:46:30 AM »

Code:
.orange{
    color:white;
}

 Cool

Now how do I keep on doing CSS?!?!?
Logged

Makerimages-Its in the pixel
Klaim
Level 10
*****



View Profile WWW
« Reply #518 on: September 21, 2014, 12:19:16 PM »

Code:
void ConnectionRegistry::begin_connection( const RemoteSystemId& network_id )
    {
        auto make_connection = [&]( const RemoteSystemId& network_id ) // TODO: this is bad, make it better
        {
            return ConnectionPtr( new Connection( m_network, network_id ) ) ;
        };
        auto connection = make_connection( network_id );
        m_connection_index[network_id] = connection;
        m_on_connection_begin( connection );
    }


After a good nervous laugh I realized why I did that and had to let it like that until my compiler is fixed....
Logged

Boreal
Level 6
*


Reinventing the wheel


View Profile
« Reply #519 on: September 21, 2014, 12:58:08 PM »

Why not just

Code:
ConnectionPtr connection(new Connection(m_network, network_id));
Logged

"In software, the only numbers of significance are 0, 1, and N." - Josh Barczak

magma - Reconstructed Mantle API
Pages: 1 ... 24 25 [26] 27
Print
Jump to:  

Theme orange-lt created by panic