28
shash13
5y

I had a friend once with this irritating habit.

Comments
  • 9
    Imagine caring how someone indents their code whenever there's not a set coding style 🤡🤡🤡
  • 3
    @Frederick very low effort. At least put the words over the blacked out area ffs lol
  • 2
    @Frederick I'm just a beginner lol
  • 2
    Tabs are better in every aspect though
  • 4
    Why settle for one.
    When you can map your Tab key to 4 space keys.
    You keep your tab, the code keeps its spaces.
    Or for you sick bastards who enjoy 2 spaces for indentation 🙁
  • 1
    @C0D4 And it's impossible to navigate the code with the arrow keys and it's incredibly easy to accidentially screw up and have an uneven amount of spaces. Why would anyone in their right mind use spaces when they have to use an IDE to *pretend* they're tabs
  • 1
    @C0D4 You can change how wide a tab appears without changing the code. You can't do that with spaces.
  • 2
    @kamen You can't vertically align similar code with tabs.
  • 3
    @kamen that's the whole point of using spaces. The indentation is consistent, regardless of the text editor.

    Moot point anyway. It's not like anyone has ever been convinced by such an argument.
  • 0
    @Stuxnet Spaces are less accessible for visually impaired people. It matters if you care about that.
  • 1
    @enigmamachine OP is bitching about a friend's project.

    The chances of them looking at the code probably aren't that high.

    Therefore, he's a fucking clown for caring this much.
  • 0
    @12bitfloat better compression while compared to spaces according to Richard 😂 .if you know , you know
  • 1
    @Commodore That's the whole point of using tabs - default is most of the time four spaces' width, but what if one developer wants two spaces? Do you let him reformat the whole codebase because of that if using spaces? On the other hand, if using tabs, they can just set tab width to 2 and be done with it. Most IDEs and editors support that.

    @Root I agree about vertical alignment; that might be the only downside of tabs I can think of; still, the next tab stop is usually good enough for me.
  • 0
    I'll post this again, even though I'm repeating myself: https://stackoverflow.blog/2017/06/...
  • 1
    I agree and I am completely pro-tab indentation - or more precisely, I see the tabs as designed specifically for the indentation and spaces as suitable for the alignment(in special cases).

    That being said, chances of being the one creating the coding standard in a company are low and one often has to comply with the rules that he does not consider to be the best. The tabs vs spaces usage is an ongoing argument where neither side wants to give up and there will always be developers who prefer spaces.
    Also, according to the stackoverflows survey, the spacers seem to earn more... (duh!)
  • 6
    My common thought when spaces vs tabs is brought up
  • 0
    @josap

    ^ this dude never coded in vim/nano
  • 3
  • 1
    @Commodore well played, I didn't know that was a thing!
  • 1
    @Hazarth vim tried but never really seen any advantage for my use cases. Nano: it's been a long time and I don't miss it
  • 1
    @Hazarth well that basically sums up vim: you don't know. Nobody knows 😅
  • 2
    @josap I do a lot of python for my own projects and I always use nano for that. I don't know what it is, but Its more fun for me. In which case I prefer tabs. You can't even fuck up indentations in python, because if you do, it does something entirely different xD so an auto-indent feature would be counter intuitive anyway. And for this at least, tabs are the fastest, smallest and most cultural thing to use
  • 0
    @Hazarth Tbh it's more fun because IDEs for dynamic languages are bad so they can't help you in a meaningful way anyways
  • 0
    @josap So you let the IDE decide for you what to use?
  • 0
    @kamen I set my preferences once (I guess the last time I did was ~5 years ago thanks to preferences syncing) and I've never manually applied indentation since
  • 0
    Spaces are the superior race!
Add Comment