News for hackers. Stuff that matters.
Re:Tabs, spaces and your salary – how is it really? by TekMol on Tuesday June 20, 2017 @12:11PM (#14595803)

    This issue has long been solved programmatically
    and it is a waste of mindspace to deal with it
    any other way.
I beg to differ. Aligning code is an art form. And different people like different styles. Your "whatever" approach is one. And there are many others.
Re:Tabs, spaces and your salary – how is it really? by KGIII on Tuesday June 20, 2017 @01:18PM (#14596463)
I don't really care if you use tabs or spaces. Just please, for the sake of humanity, don't mix them.
Re:Tabs, spaces and your salary – how is it really? by mwfunk on Tuesday June 20, 2017 @01:33PM (#14596606)
Seriously, this is the heart of it. The one thing about Emacs that I just can't forgive is its insistence over the decades on mixing tabs and spaces in its auto-indentation.

Ultimately, the spaces vs. tabs debate really comes down to which policy is less likely to result in mixed tabs/spaces. If people use tabs, it seems inevitable that some spaces will sneak in there as well. If people use spaces, tabs are unlikely to sneak in. Obviously that's a combination of common default editor configs and human behavior, but that's just how it works out in practice.

Re:Tabs, spaces and your salary – how is it really? by marcus_holmes on Tuesday June 20, 2017 @06:30PM (#14599133)
this is my opinion, too. In an ideal world we would all use tabs so that we could all see the indentation level that suits us best. But it's not an ideal world. So we're forced to use spaces and agree on how many spaces to indent with.

Except for Go programmers.

Re:Tabs, spaces and your salary – how is it really? by Sohcahtoa82 on Tuesday June 20, 2017 @05:26PM (#14598764)
Tabs for indentation, spaces for alignment. That's the only acceptable mixing.

It works because it allows everyone to configure their code editor to have tabs be whatever width they want without messing up how it looks for other people.

But it's futile. Unless there's a git hook setup or you're using Python 3 which throws errors when tabs and spaces are both used for indentation, you're gonna end up with source files with both being used.

Re:Tabs, spaces and your salary – how is it really? by aequitas on Tuesday June 20, 2017 @12:37PM (#14596062)
Like programming itself aligning code is not an art form, at least not in where productivity and consistency is required, it's just a means to an end. In my opinion the art is in documenting your code and explaining what your code does (what you intend it to do not how it does it).
Re:Tabs, spaces and your salary – how is it really? by mmrezaie on Tuesday June 20, 2017 @12:35PM (#14596044)
Art or whatever it is subjective to decide which code formatting is better. As long as a single "code format actor" can transform different styles automatically then why one should care. I think most communities are having an agreement on which one they would like to choose and most of the times they chose the best style but doesn't mean one has to limit themselves into those formats anyway. Something like git push --code-style somestyle would be a relaxing.
Re:Tabs, spaces and your salary – how is it really? by Spivak on Tuesday June 20, 2017 @01:06PM (#14596349)
Sure, and writing the rules to feed to your linter and formatter is where the art takes place now.