25

F*ck, for the sake of Zeus, Odin, Cernunos, and Linus Torvalds... Why the hell is 2 spaces become standard...

Okay, maybe I'm an idiotic non-idiomatic rebellious jerk or something... I don't care, I'm going back to 4 spaces. That 2 spaces things really hurt my eyes, and that f*cking linter keep telling me, "it must be 6 spaces, not 12".

Don't they ever think why we no longer use 1024x768 screen anymore? Wtf with torturing yourself to save that extra 16*n bit for every line in your file where n is count of indented indentation...

Whatever, just wtf...
https://stackoverflow.com/questions...

Comments
  • 12
    Sorry, but I’m sticking to my 4 space tabs.
  • 1
    I actually have a shitty monitor with such a res. I don't understand why it's bad having 2 spaces indent. Does it look shitty on a highres monitor? I personally don't like having 3 indent levels moving my code to the right of the monitor either
  • 2
    If you want to use 2 spaces but think it doesn't look good enough, just configure your editor to make it look bigger.
  • 1
    @plusgut wait... This might be the solution...
  • 3
    @sour I guess it's more like personal preference, For me 2 spaces doesn't give enough sense of "this is indented"
  • 5
    I use 4 spaces. Lately I have been doing a lot of JS lately and whenever I paste some code from internet, I first change all lines to 4 space.... Fck 2 space
  • 0
    @irene sure let's "introduce" another way of indenting, so people have one more option to complain about 😅
  • 5
    4 spaces = duplo
    2 spaces = lego
  • 0
    2 spaces is the standard indentation in occam tho

    yes i love obscure languages
  • 2
    Fuck 2 spaces. Angular CLI also forces you to use 2 spaces if you use the generate command.
    FUCK THIS SHIT.
  • 1
    @gofrendi oh yeah, i understand that, but i don't get the same feeling :)
  • 0
    @sour Yeah kinda have to agree to disagree. Lucky for you because your preference meet the common standard
  • 4
    I still got the same question every time this comes in discussion: why aren't we using the old plain TAB character? This way everybody can have whatever indentation they want since every modern code editor can adjust how much space a TAB char prints on the screen.
  • 2
    @hugh-mungus i was 23s faster than you lol
  • 2
    I do prefer tabs. It's just one key to insert or remove the indentation and do not generate this 2, 3 or 4 spaces as the better way.

    But anyone should work as it's better for them.
  • 2
    @brunofontes yeah, probably this tab should be the new standard instead, so everyone can write/read any code in the most make sense visualization for them
  • 0
    I've come here to bask in the glory of the 'space' camp having a civil war.

    Meanwhile the 'tab' camp can simply configure the size.. between 2... or 4...
  • 0
    I started using 3 space tabs a couple of months ago.
    At first I was disgusted, but after a week I loved it :) And I'm still using it.
  • 0
    @m0fo Space is preferred in professional fields because this way the code will look the same on every machine. For example when you have a fixed line length and continue on the next line at a specific spot, it will look right with spaces. Or if one puts all comments right to the code (all lines are max 80 chars long and all comments start at 82, no matter how long the line actually is), it will always look right with spaces. Tabs with an indentation length different to the one used by the original coder would absolutely destroy this layout and would make it seem like the coder was on drugs. Nevertheless, I prefer tabs with smart indentation, too.
  • 1
    @Forside Bro we have 4k and FHD monitors, we are in 2017. Those were issues when people were using notepad++ as a ‘powerfull code editor’ and Eclipse as the best IDE.
  • 0
    Me: *smiles sheepishly looking as his code with 8 space (in the form of single tab) indents...* ☺️☺️
  • 4
    We should all use the poop emoji as our indentation character - because everyone knows the more indentations you have, the deeper the shit gets.
  • 0
    What about 3 spaces? Perfect tradeoff!
  • 0
    @xorith Exactly. Nested is worse than flat.

    Last time I have argument with a so-called 'profesional programmer' why I prefer 4 spaces (or probably tabs visualized as 4 spaces), rather than that 2 spaces standard, he just simply walk away, saying something like 'ok, keep writing horrible code'.

    No argument, just blindly follow the standard, having faith on it, and worship it...

    That's called 'professional'.

    Surprisingly, this hit my nerve as nothing before. Like, if you are reviewing my code, just focus on function/variable naming, good structure, readability, and performance. Not call me 'noob' for more than 5 times, and the reason is 'obviously'. I'm talking to a coder, not a priest...
Add Comment