Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
pardeike2819ySo far, I never have heard a single argument for spaces that was logical and convincing.
-
pardeike2819yAnd 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)
-
aymswick1549yTABS BRUH. Ain't got time for rapid-slapping the space bar like some kind of animal 😎
-
@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
-
pardeike2819y@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
-
@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??" -
pardeike2819ySo 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 👊🏼
-
@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
-
pardeike2819yI 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.
-
@pardeike for the better. I'm a one man team and have been for the past 4 years at my company.
Seriously: spaces or tabs?
undefined
spacesvstabs