2
human
8y

Seriously: spaces or tabs?

Comments
  • 2
    Spaces.
  • 1
    Spaces like every good developer! ;)
  • 10
    So far, I never have heard a single argument for spaces that was logical and convincing.
  • 6
    I use the tab button, the IDE takes it from there based on the default settings.
  • 6
    Tabs all the way
  • 6
    Tabs. Most IDEs auto-convert them as necessary. Spaces take too damn long!
  • 6
    Tabs. For the sake of backspace.
  • 0
    map "Tab" key to 4 spaces.. like a boss
  • 5
    tabs! so much easier to sort through especially if you're using arrow keys
  • 1
    And to conclude: the modern way to deal with this issue is to auto format on save with a good formatted/linter (converting to tabs). Advantage: code diff becomes easier; devs can adjust visual tab length to read or edit code with different indentation (sometimes more indent makes structure more visible, sometimes less indent can give you a more compact view). Alignment is overrated, if you need to align stuff to clear things up your code is not clean enough (i.e. 15 var assignments at the beginning of a block that need to be aligned to be easier to understand is a sign of bad code structure)
  • 2
    ask Richard hendricks 😆
  • 2
    TABS BRUH. Ain't got time for rapid-slapping the space bar like some kind of animal 😎
  • 0
    Definitely tabs
  • 0
  • 1
    @pardeike Except maybe the devious plan to use a mechanical keyboard to get your neighbors to move far far away.
  • 1
    @SnowyLoli If I could, I would up vote this twice!
  • 0
    @SnowyLoli you can Ctrl + arrow tho
  • 0
    @dev-nope there are plenty of times where I want to just move 1 tab over to remove un-needed indentation because I cleaned up my code
  • 1
    @SnowyLoli Don't get why ppl put brainpower on indentation at all. Let some plugin/feature autoformat your code and think about the important stuff. If you have indentation problems you probably need to refactor your code #protip
  • 0
    @pardeike I program a tad oddly (probably because I just learned by reading each syntax and what it did) but I never comment so ill use indentation and occasionally blank spaces to help separate my code because if I try to comment and it's like

    "section 2 partB I think??"
  • 0
    So you put meaning into your white space and code structure. Except for adding single empty lines to group stuff I wouldn't do that. Use comments 👊🏼
  • 0
    @pardeike I should for the sake of if my company ever hires another developer. I'd feel sorry for anyone who has to open my files and wonder what the fuck 5 blank lines represents
  • 1
    I recently decided (I am the senior) that everyone in our team is forced to auto format on save. Ppl were skeptical at first, now everyone is happy.
  • 0
    @pardeike for the better. I'm a one man team and have been for the past 4 years at my company.
Add Comment