Masthash

#TabsVsSpaces

Reminder: If you're using spaces instead of tabs in your code, you're enforcing your personal preference in indentation spacing on everyone else.

That's unkind. Don't do that.

#coding #development #programming #BestPractices #TabsVsSpaces #UseTabs

Midgard
3 months ago

The only sane way to do indentation and alignment of programming code:

tabs for indentation,
spaces for alignment.

This is called smart tabs: https://www.emacswiki.org/emacs/SmartTabs

:boost_requested: Spread the word.

#TabsVsSpaces #SmartTabs #tabs

Khalid ⚡
3 months ago

If you’ve ever pasted a code-block-abomination of mixed spaces and tabs, then you’ll be happy to know that #JetBrainsRider has actions to convert all tabs to spaces, and all spaces to tabs. #tabsVsSpaces #coding

JetBrains Rider “To Spaces” action is highlighted in the search everywhere tool window.
JP
5 months ago

I don't know why this part of the PDF has tabs instead of spaces but I'm sure all the programmers will have Opinions about it. #robodebt #TabsVsSpaces

Sukrit Tan
11 months ago

Multiple spaces

VS

A single tab character whose width you can adjust in your editor of choice to be the length you want

Will people plz explain why?

Like I’m legitimately confused why spaces seems to be the default for most people. Surely there’s a reason?

#programming #TabsVsSpaces

@990000@mstdn.social
1 year ago

As a diehard “spaces” kind of person I decided to switch to tabs for accessibility reasons, but it's hard sometimes as you can't just flip a switch and change an entire repository instantly without taking precautions.

Not only that, but after changing the defaults on your code editor, you may have to continue working on other repositories with spaces until those get converted too. Very messy situation.

#TabsVsSpaces #WebDevelopment #Accessibility

Jeff
1 year ago

Just a reminder that tabs are far better for accessibility (#a11y) than spaces.

Not only do they allow people to adjust the indent size to improve readibility, but they are far more compatible with screenreaders and refreshable braille displays.

Modern #coding tools really make all of the other, more trivial differences pretty much moot. So please consider using tabs to ensure that everyone can read and contribute to your project!

#TabsVsSpaces

FiXato (fallback)
4 years ago

@sohkamyung you'd think that debate ended after we stopped using typewriters...
But, that of course reminds me of #TabsVsSpaces.

Matthias Bach
5 years ago

@holger If Black would at least indent by tabs! And yes, I know PEP8 says spaces. But, indenting by spaces is just plain wrong!

#pep8 #black #tabsVsSpaces