Bitcoin Forum
November 19, 2024, 03:10:39 AM *
News: Check out the artwork 1Dq created to commemorate this forum's 15th anniversary
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Need to vent  (Read 1667 times)
Inaba (OP)
Legendary
*
Offline Offline

Activity: 1260
Merit: 1000



View Profile WWW
April 05, 2012, 02:50:10 PM
 #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.


If you're searching these lines for a point, you've probably missed it.  There was never anything there in the first place.
Kluge
Donator
Legendary
*
Offline Offline

Activity: 1218
Merit: 1015



View Profile
April 05, 2012, 03:01:46 PM
 #2

I like how the first set of code doesn't make me scroll down just to read it.
kokjo
Legendary
*
Offline Offline

Activity: 1050
Merit: 1000

You are WRONG!


View Profile
April 05, 2012, 03:07:43 PM
 #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;
}

"The whole problem with the world is that fools and fanatics are always so certain of themselves and wiser people so full of doubts." -Bertrand Russell
Phinnaeus Gage
Legendary
*
Offline Offline

Activity: 1918
Merit: 1570


Bitcoin: An Idea Worth Spending


View Profile WWW
April 05, 2012, 03:09:48 PM
 #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~
terrytibbs
Hero Member
*****
Offline Offline

Activity: 560
Merit: 501



View Profile
April 05, 2012, 03:10:39 PM
 #5

I use 1TBS.

yogi
Legendary
*
Offline Offline

Activity: 947
Merit: 1042


Hamster ate my bitcoin


View Profile
April 05, 2012, 03:16:17 PM
 #6

Yes, the first one. Nice and compact.

SkRRJyTC
Legendary
*
Offline Offline

Activity: 1008
Merit: 1000


View Profile
April 05, 2012, 03:21:06 PM
 #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.
John (John K.)
Global Troll-buster and
Legendary
*
Offline Offline

Activity: 1288
Merit: 1227


Away on an extended break


View Profile
April 05, 2012, 03:21:26 PM
 #8

I use 1TBS.



Ditto.



*actually I use the 2nd one in my projects.*
rjk
Sr. Member
****
Offline Offline

Activity: 448
Merit: 250


1ngldh


View Profile
April 05, 2012, 04:33:49 PM
 #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.

Mining Rig Extraordinaire - the Trenton BPX6806 18-slot PCIe backplane [PICS] Dead project is dead, all hail the coming of the mighty ASIC!
P_Shep
Legendary
*
Offline Offline

Activity: 1804
Merit: 1230


This is not OK.


View Profile
April 05, 2012, 05:30:52 PM
 #10

I concur.
teflone
Hero Member
*****
Offline Offline

Activity: 770
Merit: 500


You're fat, because you dont have any pics on FB


View Profile
April 05, 2012, 06:23:13 PM
 #11

I like how the first set of code doesn't make me scroll down just to read it.

This

For Canadians by Canadians: Canada's Bitcoin Community - https://www.coinforum.ca/
koin
Legendary
*
Offline Offline

Activity: 873
Merit: 1000


View Profile
April 05, 2012, 06: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.
Phinnaeus Gage
Legendary
*
Offline Offline

Activity: 1918
Merit: 1570


Bitcoin: An Idea Worth Spending


View Profile WWW
April 06, 2012, 02:31:14 AM
 #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~
Nesetalis
Sr. Member
****
Offline Offline

Activity: 420
Merit: 250



View Profile
April 06, 2012, 05: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.

ZOMG Moo!
NothinG
Hero Member
*****
Offline Offline

Activity: 560
Merit: 500



View Profile
April 06, 2012, 05: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;

Xmufa23X
Newbie
*
Offline Offline

Activity: 56
Merit: 0


View Profile
April 06, 2012, 07: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
naypalm
Legendary
*
Offline Offline

Activity: 1272
Merit: 1012


howdy


View Profile WWW
April 06, 2012, 12:03:49 PM
 #17

IDE's are for chumps, VI or notepad ftw  Grin

Kettenmonster
Sr. Member
****
Offline Offline

Activity: 420
Merit: 250


bool eval(bool b){return b ? b==true : b==false;}


View Profile
April 06, 2012, 12:53:26 PM
 #18

Don't use C coding standards even if slightly modified for C++.

The paining (sic!) is done with the QPainter class inside the paintEvent() method.
(source: my internet)
dayfall
Sr. Member
****
Offline Offline

Activity: 312
Merit: 250



View Profile
April 06, 2012, 03:29:43 PM
 #19

I use Allman.  But I absolutely hate using spaces for indention. 
Raoul Duke
aka psy
Legendary
*
Offline Offline

Activity: 1358
Merit: 1002



View Profile
April 06, 2012, 04:09:59 PM
 #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
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!