Author

Topic: Need to vent (Read 1667 times)

legendary
Activity: 1358
Merit: 1002
April 06, 2012, 11:09:59 AM
#20
http://www.prettyprinter.de/module.php?name=PrettyPrinter

Now, STFU and use all that anger for something useful, like coding, for instance... Wink

BTW, I have no f*cking idea if the shit I linked to really works. Don't punch me, please! Cheesy
sr. member
Activity: 312
Merit: 250
April 06, 2012, 10:29:43 AM
#19
I use Allman.  But I absolutely hate using spaces for indention. 
sr. member
Activity: 420
Merit: 250
bool eval(bool b){return b ? b==true : b==false;}
legendary
Activity: 1272
Merit: 1012
howdy
April 06, 2012, 07:03:49 AM
#17
IDE's are for chumps, VI or notepad ftw  Grin
newbie
Activity: 56
Merit: 0
April 06, 2012, 02:21:37 AM
#16
I do like the second a bit better. Never noticed that there was Indent Styles in code. But I never do anything much more then some simple Java, .json, .yml, things of that sort.



I would attack that purpose like a manic-depressive fat girl on a giant ham after her internet boyfriend left her for another lithe woodelf in a different guild.
Hahaha
hero member
Activity: 560
Merit: 500
April 06, 2012, 12:29:14 AM
#15


Code:
if(in_array($bits['scheme'].'://',$wgUrlProtocols))$bits['delimiter']='://';elseif(in_array($bits['scheme'].':',$wgUrlProtocols)){$bits['delimiter']=':';if(isset($bits['path'])){$bits['host']=$bits['path'];$bits['path']='';}}else return false;
sr. member
Activity: 420
Merit: 250
April 06, 2012, 12:08:50 AM
#14
I'm with the guys who get auto-formatting :p

but as for readability, both. Depending on what i'm coding on. If i'm on my EeePC, 1TBS all the way.. if I'm on my desktop, then it depends on what I'm doing.
legendary
Activity: 1918
Merit: 1570
Bitcoin: An Idea Worth Spending
April 05, 2012, 09:31:14 PM
#13
Im guessing that the people responding saying they like the first example better have never had to maintain code?

I totally agree with you OP.

On second thought, the second one is the bee's knees when it comes to code.

~Bruno~
legendary
Activity: 873
Merit: 1000
April 05, 2012, 01:32:34 PM
#12
i like when it doesn't matter what indentation and formatting style i use because it gets reformatted to the project's settings when i check it in.
hero member
Activity: 770
Merit: 500
You're fat, because you dont have any pics on FB
April 05, 2012, 01:23:13 PM
#11
I like how the first set of code doesn't make me scroll down just to read it.

This
legendary
Activity: 1795
Merit: 1208
This is not OK.
April 05, 2012, 12:30:52 PM
#10
I concur.
rjk
sr. member
Activity: 448
Merit: 250
1ngldh
April 05, 2012, 11:33:49 AM
#9
I must agree that the second code block is much more readable, but it doesn't really matter if your IDE/notepad supports customizable syntax highlighting.
legendary
Activity: 1288
Merit: 1227
Away on an extended break
April 05, 2012, 10:21:26 AM
#8
I use 1TBS.



Ditto.



*actually I use the 2nd one in my projects.*
legendary
Activity: 1008
Merit: 1000
April 05, 2012, 10:21:06 AM
#7
Im guessing that the people responding saying they like the first example better have never had to maintain code?

I totally agree with you OP.
legendary
Activity: 947
Merit: 1042
Hamster ate my bitcoin
April 05, 2012, 10:16:17 AM
#6
Yes, the first one. Nice and compact.
hero member
Activity: 560
Merit: 501
April 05, 2012, 10:10:39 AM
#5
I use 1TBS.

legendary
Activity: 1918
Merit: 1570
Bitcoin: An Idea Worth Spending
April 05, 2012, 10:09:48 AM
#4
I like how the first set of code doesn't make me scroll down just to read it.

I like the first one, also, for the same exact reasons.

~Bruno~
legendary
Activity: 1050
Merit: 1000
You are WRONG!
April 05, 2012, 10:07:43 AM
#3
U MAR SIR?

Code:
// most of the protocols are followed by ://, but mailto: and sometimes news: not, check for it
if ( in_array( $bits['scheme'] . '://', $wgUrlProtocols ) ) {$bits['delimiter'] = '://';
}
elseif ( in_array( $bits['scheme'] . ':', $wgUrlProtocols ) ) {
$bits['delimiter'] = ':';
// parse_url detects for news: and mailto: the host part of an url as path
// We have to correct this wrong detection
if ( isset( $bits['path'] ) ) {$bits['host'] = $bits['path'];
    $bits['path'] = '';}
    } else {
return false;
}
donator
Activity: 1218
Merit: 1015
April 05, 2012, 10:01:46 AM
#2
I like how the first set of code doesn't make me scroll down just to read it.
legendary
Activity: 1260
Merit: 1000
April 05, 2012, 09:50:10 AM
#1
I need to vent for a minute, because I'm so fucking sick and tired of this when I have to modify someone elses code, or even look upon it.

If you code in 1TBS style, I fucking hate you.  I hate you with every fiber of my being.  I want to know what is wrong in your brain that makes you think that 1TBS is the "proper" or more "acceptable" way to style your code.  Why are you so fucking dense and incapable of simple human comprehension of visual coding styles that you want to subject others to your shitbag, fucked up, illegible coding style?  I fucking hate you.  I FUCKING HATE YOU AND I AM NOT THE ONLY ONE.  If I could reach through the internet and punch you in the face, I would.  I would spend my days punching every single asshole who writes code in 1TBS style in the face... that would be my purpose in life and I would attack that purpose like a manic-depressive fat girl on a giant ham after her internet boyfriend left her for another lithe woodelf in a different guild.  

I would sit, at my chair and spend 23 hours a day, taking only a single hour to sleep and eat and shit throughout a 24 hour day, punching you in the face.  On Christmas and other holidays, I would treat myself and fly around around the world, with a satellite phone hooked up to my laptop on a chartered jet, punching each of you in the face over the internet, just so I could spend more than 24 hours in a single day punching you.  I would have this jet fly with the setting sun, so I am always punching you just when you're sitting down to dinner, I would do this for nearly 48 hours straight, hopped up on Mt. Dew and Red Bull. This is how much I hate you.

On New Years, I would fly to Australia and spend the entire day punching the most egregious offenders of this fucked up indent style, then I would fly to back to the US and DO IT ALL OVER AGAIN ON THE SAME DAY.

Tell me, you 1TBS motherfuckers, tell me why you think your indent style is something even marginally approaching reasonable?  It's fucked up.  It is idiotic.  IT IS COMPLETELY UNREADABLE. Why do you do it?  Do you hate other people?  Are you so antisocial that you can't get it through your head that it makes your code look like complete shit?  Do you not understand that it makes debugging or following your code all but impossible?  Do you think you are in 1970 where every single byte counts?  What is it?  What makes you think it's ok to indent like this?

Code:
        // most of the protocols are followed by ://, but mailto: and sometimes news: not, check for it
        if ( in_array( $bits['scheme'] . '://', $wgUrlProtocols ) ) {
                $bits['delimiter'] = '://';
        } elseif ( in_array( $bits['scheme'] . ':', $wgUrlProtocols ) ) {
                $bits['delimiter'] = ':';
                // parse_url detects for news: and mailto: the host part of an url as path
                // We have to correct this wrong detection
                if ( isset( $bits['path'] ) ) {
                        $bits['host'] = $bits['path'];
                        $bits['path'] = '';
                }
        } else {
                return false;
        }

That is fucking goddamned unreadable.

Pick a readable indent style. Allman makes the most sense:

Code:

        // most of the protocols are followed by ://, but mailto: and sometimes news: not, check for it
        if ( in_array( $bits['scheme'] . '://', $wgUrlProtocols ) )
        {
$bits['delimiter'] = '://';
        }
        elseif ( in_array( $bits['scheme'] . ':', $wgUrlProtocols ) )
        {
                $bits['delimiter'] = ':';
                // parse_url detects for news: and mailto: the host part of an url as path
                // We have to correct this wrong detection
                if ( isset( $bits['path'] ) )
                {
$bits['host'] = $bits['path'];
$bits['path'] = '';
                }
        }
        else
        {
return false;
        }

Look.  Gaze upon it. It's easy to follow.  It's easy on the eyes.  You can quickly see what bits of code belong to what controlling statment.  You can see what opening brace matches with what closing brace.  You can see what else matches with what if.  You can see how many else statements there are.  Seriously.  Look at it.  Now look back at your shitbag 1TBS code and tell me the same thing is true.  You can't, because if you do you are a fucking liar.  You're already an idiot for using 1TBS, don't make yourself a liar, too.

Now, go cry me a fucking river about how Allman takes up more room or some other line of complete bullshit.  It's not about visually compacting your code, it's about MAKING IT FUCKING READABLE.  Your shitbag style may be more compact, but guess what?  WHO THE FUCK CARES?  Nobody.  Not a single fucking person on the planet will ever care how compact your code is.  They care about whether it works.  Then there's the poor fucking bastards that have to maintain it after you've gone off to spread your disease to other projects, and let me tell you, they do NOT FUCKING GIVE A SHIT how compact your code is.  They care about it being readable and sensible.  Your shitty style is neither.  STOP.  JUST STOP.  Take your 1TBS style and stick it so far up your ass that it pops out the top of your head, hopefully taking the part of your brain with it that makes you think 1TBS is an acceptable indentation style.

Fuck you.

Jump to: