News for hackers. Stuff that matters.
Re:Developers who use spaces make more money than those who ... by austenallred on Thursday June 15, 2017 @10:09AM (#14560526)
Almost certainly a result of the spaces cabal and the (often unspoken of) prejudice against tab users. Don't think you make hiring decisions based on tabs vs spaces? Well you're part of the problem, then.

I'm building an app to help you easily email your congressperson and ask them to create legislation requiring space/tab equality. This has to stop. Please consider donating to my Patreon.

Re:Developers who use spaces make more money than those who ... by jdc0589 on Thursday June 15, 2017 @10:48AM (#14560893)
> Don't think you make hiring decisions based on tabs vs spaces?

I actually ask candidates "spaces or tabs?" in every single interview. I don't really care what the response is in regard to the holy war, and it doesn't mean anything on its own, but having SOME thought out response can be a GREAT indicator of how well versed someone is in general.

e.g. I'm going to think way more highly of someone that says "tabs, because then people can set the indentation render size to whatever they prefer in a way that doesn't affect other users" way more than someone who says "whatever my editor sets it to".

Also, fuck spaces. Long live tabs.

Re:Developers who use spaces make more money than those who ... by dmix on Thursday June 15, 2017 @11:23AM (#14561239)
Does spending time considering the implications of spaces vs tabs really indicate competence? To me being over-obsessed with minor details might be either negative or at most neutral value. There are thousands of interesting programming subjects to initiate a conversation to evaluate competency.

At most it's a matter of what tools you use as well as accepted standards in the individual programming language's community.

Re:Developers who use spaces make more money than those who ... by jdc0589 on Thursday June 15, 2017 @11:26AM (#14561261)
> Does spending time considering the implications of spaces vs tabs really indicate competence?

No, it signifies that you have spent enough time programming in a wide variety of platforms and with enough other peers to run in to the issue and understand that it exists.

Re:Developers who use spaces make more money than those who ... by foldr on Thursday June 15, 2017 @12:04PM (#14561627)
It doesn't signify anything. I think you might be giving a bad impression of your company by asking that question. In an interview, you have a limited amount of time to come to a judgment about a candidate. Using that time to ask pointless and borderline flamebait questions is going to be a red flag for a lot of candidates. You are also going to put candidates on edge by making them worry about whether or not they have given the "right" answer to a silly question.
Re:Developers who use spaces make more money than those who ... by davidcbc on Thursday June 15, 2017 @12:45PM (#14562021)
It just signifies that someone has worked with enough pedantic developers that they had to form an opinion on something as insignificant as this, or that this person is pedantic enough to have a strong opinion on it.

I wouldn't consider the first to be a good indicator of someone's skill as a developer, and the second would be a good indicator that it was someone I didn't want to work with, but I'm guessing that's not how you're using it...

Re:Developers who use spaces make more money than those who ... by laythea on Friday June 16, 2017 @07:45AM (#14568110)
I agree. This is ridiculous.
Re:Developers who use spaces make more money than those who ... by edmccard on Thursday June 15, 2017 @03:33PM (#14563662)
> it signifies that you have spent enough time programming in a wide variety of platforms and with enough other peers to run in to the issue and understand that it exists

Or maybe it signifies youthful inexperience?

Of the programmers that I know, the longer they have been programming, and the more varied projects they have worked on, the less they care about tabs v. spaces. Whatever standard the project they're working on uses, that's how they set up their editor for that project, because it's one less thing to have to worry about.

Re:Developers who use spaces make more money than those who ... by learc83 on Thursday June 15, 2017 @11:57PM (#14566582)
>Whatever standard the project they're working on uses, that's how they set up their editor for that project, because it's one less thing to have to worry about.

I think that the OP would consider that a fine answer.

Re:Developers who use spaces make more money than those who ... by zamalek on Friday June 16, 2017 @11:20AM (#14569749)
> Does spending time considering the implications of spaces vs tabs really indicate competence?

Absolutely not. Getting along with the team is a measure of competence. Asking this question can reveal that.

Re:Developers who use spaces make more money than those who ... by pcmaffey on Thursday June 15, 2017 @08:24PM (#14565620)
Exactly. One's ability to allocate their most precious resource is probably the greatest signifier of competence, and vice versa, incompetence.
Re:Developers who use spaces make more money than those who ... by dankohn1 on Thursday June 15, 2017 @03:54PM (#14563837)
My answer would be that any modern software development shop should be using a linter like Rubocop, eslint or gofmt that runs automatically on every commit. It doesn't actually matter what standard a group chooses, but there is real cognitive overhead to trying to understand inconsistently formatted code. And, people shouldn't be the ones criticizing incorrectly formatted code; a GitHub robot should be.
Re:Developers who use spaces make more money than those who ... by infogulch on Thursday June 15, 2017 @04:52PM (#14564255)
Exactly. The impact of any decision has much more significance socially that the sum of all of the individual significance.
Re:Developers who use spaces make more money than those who ... by jamaicahest on Friday June 16, 2017 @03:01AM (#14567128)
The article is taking about average salary, which is a society topic, i.e. social.
Re:Developers who use spaces make more money than those who ... by mcv on Thursday June 15, 2017 @11:17AM (#14561157)
My answer would be: why are you asking me? Shouldn't I be asking you? Do you have coding standards here? Or is it going to be my job to decide on the coding standards?
Re:Developers who use spaces make more money than those who ... by Qwertious on Thursday June 15, 2017 @11:33AM (#14561339)
Coding standards are what everyone compromises/agrees on. The interview question is about your preference.
Re:Developers who use spaces make more money than those who ... by jdc0589 on Thursday June 15, 2017 @11:34AM (#14561352)
and you would have missed the point of the question entirely.

Regardless, thats a pretty unnecessarily aggressive response to an interview question; or maybe I'm just reading it that way.

Re:Developers who use spaces make more money than those who ... by mcv on Friday June 16, 2017 @06:32AM (#14567812)
Or you would be missing the point of the answer.

It's not meant to be aggressive, but to make a point. It's important that everybody uses the same coding style, regardless of personal preference. Spaces are fine, tabs are fine, but mixing them would be absolutely terrible. A programmer's personal preference for one or the other is irrelevant. What matters is that he's willing to adapt to the coding style of the company.

Re:Developers who use spaces make more money than those who ... by khedoros1 on Friday June 16, 2017 @01:53PM (#14571158)
> Spaces are fine, tabs are fine, but mixing them would be absolutely terrible. A programmer's personal preference for one or the other is irrelevant. What matters is that he's willing to adapt to the coding style of the company.

That sounds like a better answer to the question right there. It's the "some though out response" that the interviewer was looking for, willingness to put the team's decisions ahead of your own, and so on.

Re:Developers who use spaces make more money than those who ... by uvatbc on Thursday June 15, 2017 @11:39AM (#14561382)
I don't know who you are, but tabs?? We definitely can't be friends anymore.
Re:Developers who use spaces make more money than those who ... by mikejmoffitt on Thursday June 15, 2017 @03:07PM (#14563439)
This guy gets it.

Tabs for indent, spaces for formatting within. No need to push your tab size standards on the next person to edit your code, and no need to force their editor to retab it to their preference, and back again when it's saved.

"It's the editor's default", or worse, "I never really thought about it" are horrible reasons for doing anything, and hearing something else might be a sign of a pulse.

Re:Developers who use spaces make more money than those who ... by ramses0 on Thursday June 15, 2017 @03:58PM (#14563874)
I also prefer tabs, but always make sure to write spaces to disk. The better you are with your editor, the less you have to worry about whether the original file was using spaces or tabs.

Therefore, writing 100% spaces to disk is the best way to insulate yourself from possible issues of people who _don't_ know what they're doing with spaces, tabs, or their editor.

Re:Developers who use spaces make more money than those who ... by tracker1 on Thursday June 15, 2017 @06:03PM (#14564815)
Plus, when most people are using an editor that doesn't have a per-project settings for the language/format to use, it's really hard. Getting everyone else on a VS solution to change their JS editor to 2 spaces, and disable the auto-format is an exercise in frustration.

That said, the convention for most languages seems to be towards spaces at this point, and I don't care enough to argue anymore as my choice of editor(s) allows me to set it per project at least.

Re:Developers who use spaces make more money than those who ... by raverbashing on Thursday June 15, 2017 @12:28PM (#14561870)
Since space indenters can't have keys matching what's produced by them I wonder what else they remap beyond the tab key, to something else completely unrelated

To me it makes as much sense as replacing dots with commas, but space indenters have gone beyond their delusion now

Re:Developers who use spaces make more money than those who ... by kyle-rb on Thursday June 15, 2017 @01:32PM (#14562449)
Since tab indenters have characters indistinguishable from spaces that are a different width from any other character on the screen I wonder what other bizarre escape codes are in their source

To me it makes as much sense as having invisible characters scattered throughout your code, but tab indenters have gone beyond their delusion now

Re:Developers who use spaces make more money than those who ... by raverbashing on Thursday June 15, 2017 @01:44PM (#14562569)
> Since tab indenters have characters indistinguishable from spaces

Most editors can be made to highlight it

> that are a different width from any other character on the screen

Yes, and? That's its purpose and it can be configured to your preferred value (beyond unicode)

Re:Developers who use spaces make more money than those who ... by cellularmitosis on Thursday June 15, 2017 @11:48PM (#14566541)
The best ones can, but by far, most can't.
Re:Developers who use spaces make more money than those who ... by lmm on Thursday June 15, 2017 @11:30AM (#14561305)
> having SOME thought out response can be a GREAT indicator of how well versed someone is in general.

Did you cross-check this against any other measure? I can see it going both ways - maybe someone who saves their attention for more important matters would be better at producing value than someone who cares about such minutiae.

Re:Developers who use spaces make more money than those who ... by jdc0589 on Thursday June 15, 2017 @11:36AM (#14561363)
yea, thats why I specified "and it doesn't mean anything on its own,"
Re:Developers who use spaces make more money than those who ... by lmm on Thursday June 15, 2017 @11:42AM (#14561421)
So how can it be a great indicator then?
Re:Developers who use spaces make more money than those who ... by jdc0589 on Thursday June 15, 2017 @11:59AM (#14561582)
an indicator is just that, an indicator. It doesn't mean anything on its own, but in the presence of additional information (interview question responses and discussions in this case) it can help paint a better picture. If someone answered this question with "what? I don't know/care", and then knocked more important questions out of the park, then it was obviously a bad indicator and isn't relevant.
Re:Developers who use spaces make more money than those who ... by lmm on Thursday June 15, 2017 @12:22PM (#14561810)
I don't follow. Either their answer means something or it doesn't.
Re:Developers who use spaces make more money than those who ... by khedoros1 on Friday June 16, 2017 @01:58PM (#14571201)
Some answers only mean something in combination with other answers. You're looking at the cloud of data points, not the answer to any single question.
Re:Developers who use spaces make more money than those who ... by Can_Not on Friday June 16, 2017 @09:33AM (#14568728)
Some answers will mean something and other answers will mean nothing.
Re:Developers who use spaces make more money than those who ... by rdiddly on Thursday June 15, 2017 @03:24PM (#14563583)
Correct.
Re:Developers who use spaces make more money than those who ... by problems on Thursday June 15, 2017 @11:00AM (#14561007)
Yeah, it can start some interesting conversations too - I don't care personally and tend to go with whatever autoformat in the editor uses. My view is that formatting code shouldn't be a human's job, adding linebreaks on long lines, spacing things out to exactly line up, etc is just a waste of my time.

That's the computer's job - it should do it based on human readability rules though, clang-format is probably the best example of these rules applied, it uses a TeX-style formatting engine for code.

Re:Developers who use spaces make more money than those who ... by jar3624 on Thursday June 15, 2017 @01:27PM (#14562408)
completely agree with you. and i religiously autoformat my code before i read the code and just before i save the file.

However it still amazes me how the majority of developers i work with either have no opinion on the topic or worse think this is a bad idea. some the reasons I've heard was it makes alot of changes to a file causing alot of diffs with previous version making it harder to figure was was actually changed, or they don't like they way its formatted .

Re:Developers who use spaces make more money than those who ... by rdiddly on Thursday June 15, 2017 @03:23PM (#14563570)
Yep if you're going to convert from tabs to spaces or vice versa, please do a check-in/commit consisting only of that change before making any substantive code changes.
Re:Developers who use spaces make more money than those who ... by tracker1 on Thursday June 15, 2017 @06:07PM (#14564851)
Was going to say the same... nothing wrong with a commit including only format changes... for that matter, add it as a task to the project, commit, run it, commit, then proceed to edit. If you have commit hooks setup, add it as a precommit hook/task.

As long as it's relatively transparent for everyone to be able to use.

Re:Developers who use spaces make more money than those who ... by problems on Thursday June 15, 2017 @02:30PM (#14563059)
I've been following this practice for a while, but never really thought much of mentioning it until I watched an interesting talk the other day:

https://channel9.msdn.com/Events/GoingNative/2013/The-Care-a...

In it, they mention an autoformatter as one of the best tools they gave their developers in terms of productivity gain and it really got me thinking about how this should be versus how it is in practice. There are some really bad autoformatters and some really good ones - find one that works and is configurable to match your standard and I think it really does result in a good productivity improvement.

Re:Developers who use spaces make more money than those who ... by jdc0589 on Thursday June 15, 2017 @03:28PM (#14563619)
completely agree, I'm also the (original) author of https://github.com/jdc0589/JsFormat though, so I'm probably just more sensitive to formatting stuff in general.
Re:Developers who use spaces make more money than those who ... by patrickdavey on Thursday June 15, 2017 @04:54PM (#14564275)
Doesn't that mean you make tools like git blame a whole lot less useful? I'm all for formatting my own code correctly, but I'm not going to nuke git history for a few spaces.
Re:Developers who use spaces make more money than those who ... by problems on Friday June 16, 2017 @08:34AM (#14568322)
Blame is for me at least a fairly infrequently used operation and there's really not much else it breaks unless there are other active branches at the time. I don't find blame information that valuable and would argue that most uses are in fact counterproductive (it's in the name - blame).

You'd only have to do it once, all changes past that point would be good assuming you set it up in your IDE automatically or in your precommit. So if for some reason you needed to go back a long ways and blame something you could always check out back past that initial styling fix and see it.

Re:Developers who use spaces make more money than those who ... by blazespin on Thursday June 15, 2017 @11:06AM (#14561058)
Wow, I am a spaces guy but honestly, didn't care this much. Clearly, I should! I mean, I would have failed that interview question totally. Except, I would have said whatever the team consensus was.
Re:Developers who use spaces make more money than those who ... by jdc0589 on Thursday June 15, 2017 @11:38AM (#14561377)
I don't use it as a question to really be scored as a critical pass/fail. It's intended to potentially start a conversation and maybe give me an idea of someone's experiences.
Re:Developers who use spaces make more money than those who ... by whack on Thursday June 15, 2017 @05:04PM (#14564346)
Is this before or after you ask them how many ping pong balls would fit inside a Boeing 747?
Re:Developers who use spaces make more money than those who ... by tracker1 on Thursday June 15, 2017 @05:58PM (#14564771)
I personally prefer tabs for the reason mentioned above... also, before JS minimizers, it meant less characters in the output. Now, I'll set my editor to whatever is the convention in the team, and/or the greater community (JS is 2 spaces, mostly, C#/VB 4, etc.).

As others have mentioned, having a required auto-linting step helps a lot. But it really depends on your specific needs.

Re:Developers who use spaces make more money than those who ... by inopinatus on Monday June 26, 2017 @06:51PM (#14641078)
Maybe you should allocate scarce interview time to something that matters instead.
Re:Developers who use spaces make more money than those who ... by chx on Thursday June 15, 2017 @07:45PM (#14565441)
My life is easy. https://www.drupal.org/docs/develop/standards/coding-standar... "Use an indent of 2 spaces, with no tabs." Anyone writing custom code with a different coding style than the ecosystem they rely is a fool so that's decided for me.

If my dreams come true I will work with Elixir next. https://github.com/christopheradams/elixir_style_guide#space... "Use two spaces per indentation level. No hard tabs." See, this is why I like Elixir, I do not need to change my spacing habits from Drupal! :D

Re:Developers who use spaces make more money than those who ... by Paul-ish on Thursday June 15, 2017 @12:20PM (#14561773)
> "whatever my editor sets it to".

Whats wrong with this? I just accept the defaults. Whether that is what the current project demands or what the editor defaults to. Why waste my time over these things?

Re:Developers who use spaces make more money than those who ... by OJFord on Thursday June 15, 2017 @12:24PM (#14561828)
> Whats wrong with this? I just accept the defaults. Whether that is what the current project demands or what the editor defaults to.

There's your answer: if letting your editor do whatever and not caring to 'waste time over these things' means you've committed a bunch of code ignorant of the convention respected by the rest of the project, that's not that great.

Re:Developers who use spaces make more money than those who ... by Paul-ish on Thursday June 15, 2017 @12:39PM (#14561954)
I did say "what the current project demands". I did not say "I just push whatever I feel like". Again, I don't see the problem with not caring and just going with what others have picked.
Re:Developers who use spaces make more money than those who ... by OJFord on Thursday June 15, 2017 @07:27PM (#14565346)
Yes, sorry, I meant that you answered your own question when you said that.
Re:Developers who use spaces make more money than those who ... by tracker1 on Thursday June 15, 2017 @06:13PM (#14564898)
Frankly, if over 90% of your peers are using a given editor/ide, odds are they're using the defaults... as trying to get everyone to change the defaults is painful. Having spent years fighting this in some environments, it's far easier to accept.

If your editor supports a common config format (.editorconfig), then use that... if you're all using the same IDE, then best to adapt to the defaults (mostly).

Re:Developers who use spaces make more money than those who ... by Godel_unicode on Thursday June 15, 2017 @06:41PM (#14565073)
There are two very different reasons for this same answer: the don't care vs the don't know. Not caring is fine, not knowing is concerning.
Re:Developers who use spaces make more money than those who ... by tripzilch on Friday June 16, 2017 @06:11AM (#14567739)
ok so don't answer "whatarespaces?", got it.
Re:Developers who use spaces make more money than those who ... by Godel_unicode on Friday June 16, 2017 @12:50PM (#14570502)
I assume from this response that you have never worked with someone who created semi-constant issues because they didn't realize that .vimrc they copied from GitHub was silently turning spaced into tabs whenever they saved a file.

You are a lucky, lucky person.

Re:Developers who use spaces make more money than those who ... by lhorie on Thursday June 15, 2017 @05:33PM (#14564565)
"whatever my editor sets it to" is what I would answer, precisely because I've heard the arguments for both sides to death, and I acknowledge that this holy war exists because both sides' arguments have merits. For me, I expect that my team as a group has a rationale for whatever choice is made in the interest of avoiding pointless bikeshedding, but I expect each individual to be adaptable enough that the choice doesn't actually negatively impact their productivity.

Strong opinions loosely held and all that.

Re:Developers who use spaces make more money than those who ... by thebigspacefuck on Friday June 16, 2017 @09:18AM (#14568599)
What about "whatever you're using"? It probably doesn't seem well thought out, but is there any other answer? Personally I don't care. I use spaces in Python because of pep8 and tabs in PHP or JS depending on whether or not the file is using tabs or spaces already. Sometimes I realize I checked in a file to git with tabs instead of spaces so I go back and run a find and replace to match indentation. Is that so wrong? Shitty question IMO
Re:Developers who use spaces make more money than those who ... by 13of40 on Thursday June 15, 2017 @04:41PM (#14564169)
Is "depends on whether I'm writing the batch file in notepad or wordpad" a valid answer?
Re:Developers who use spaces make more money than those who ... by atmosx on Thursday June 15, 2017 @11:18AM (#14561183)
If I were the candidate I will be giving mean looks while tapping the space bar as fast as possible!

Spaces FtW!

Ps. On a more serious note, the editor (actually the vim plugin) takes care of this.. default is 2 spaces for ruby and 4 for python (PEP8). I like ruby more, the identation too.

Re:Developers who use spaces make more money than those who ... by jdc0589 on Thursday June 15, 2017 @11:51AM (#14561509)
rant: a default unconfigured vim instance is a perfect example of my main issue with all this whitespace crap. Personally, I like tabs, but ultimately, like you mentioned, it doesn't matter with a well set up editor.

HOWEVER, a default unconfigured instance of vim is not capable of editing, for example, a YAML file in a valid manner without the user knowing that they have to manually set the tab character to spaces or mash the spacebar 1000000 times instead of using the tab key. Thats some REALLY horribly UX. It's not VIMs fault, and its not the YAML spec's fault, but it adds up to some bullshit.

Re:Developers who use spaces make more money than those who ... by icc97 on Thursday June 15, 2017 @01:17PM (#14562332)
Does anyone actually use an unconfigured instance of vim for actual development?

I can see for people sshing in, editing a file and getting back out without bothering, but you'd have to be a quite a purist to do all your development in an unconfigured Vim.

You can yank and modify existing lines which will keep your YAML spaces.

For years I never used Vim to develop full time so never invested the time to setup my vimrc file. But now that I use it for development and spent the time to set up my vimrc, it's brilliant to be able to just take the goodness with you.

Re:Developers who use spaces make more money than those who ... by jdc0589 on Thursday June 15, 2017 @03:21PM (#14563554)
> I can see for people sshing in, editing a file and getting back out without bothering, but you'd have to be a quite a purist to do all your development in an unconfigured Vim.

Thats really the only instance. It's more of a "hey, look at this bullshit I'm pointing out from my fundamentalist high horse" argument than a legitimate one.

Re:Developers who use spaces make more money than those who ... by yunocat on Thursday June 15, 2017 @03:43PM (#14563747)
Use nvi instead of vim for precisely this reason - Customization is for emacs.. which I also use when I want to customize things.
Re:Developers who use spaces make more money than those who ... by lliamander on Thursday June 15, 2017 @10:24AM (#14560645)
It's not really prejudice if those 'tabbies' are just inferior, is it?
Re:Developers who use spaces make more money than those who ... by beaconstudios on Thursday June 15, 2017 @10:35AM (#14560754)
I can't believe that in 2017 I'm reading comments containing blatant spacial prejudice on Hacker News of all places.
Re:Developers who use spaces make more money than those who ... by austenallred on Thursday June 15, 2017 @10:39AM (#14560790)
I wish I could say I'm surprised. Hacker News has a known spacial prejudice problem. It's exacerbated by the fact that few people of those who experience spacial preference (please use the proper terminology) feel comfortable here, so many just leave.
Re:Developers who use spaces make more money than those who ... by clarkmoody on Thursday June 15, 2017 @10:39AM (#14560791)
Espousing notions of whitespace power. Get that trash out of here.
Re:Developers who use spaces make more money than those who ... by lliamander on Thursday June 15, 2017 @11:02AM (#14561031)
More like get those tabby cats out of here.
Re:Developers who use spaces make more money than those who ... by rf15 on Thursday June 15, 2017 @11:53AM (#14561529)
And here I was about to say that I can't wait for the spacist shitposts from the alt-tab
Re:Developers who use spaces make more money than those who ... by zensavona on Thursday June 15, 2017 @11:01AM (#14561015)
Hacker News should be a Safe Space.
Re:Developers who use spaces make more money than those who ... by qmarchi on Thursday June 15, 2017 @11:30AM (#14561301)
As someone who uses Tabs, I vote that every location should be a Space Safe Space.

Let's all work hand in hand and follow the style guide! (Which requires the use of tabs, of course)

Re:Developers who use spaces make more money than those who ... by mi100hael on Thursday June 15, 2017 @11:23AM (#14561237)
Safe spaces are exclusionary towards tabs. Ban safe spaces! We need safe tabs!
Re:Developers who use spaces make more money than those who ... by OJFord on Thursday June 15, 2017 @12:25PM (#14561837)
Just one space?
Re:Developers who use spaces make more money than those who ... by ysavir on Thursday June 15, 2017 @12:32PM (#14561896)
It happens with the best of us. Even Thomas Jefferson used spaces when drafting the Declaration of Independence, despite being an outspoken tabs supporter.
Re:Developers who use spaces make more money than those who ... by ptero on Thursday June 15, 2017 @11:10AM (#14561086)
Oh, no! A tab must equate to four spaces (not two, three or eight, only four).

To achieve equality you should propose splitting a tab into four tabparts and equating each tabpart with a space. That's true égalité

Re:Developers who use spaces make more money than those who ... by _puk on Thursday June 15, 2017 @10:49AM (#14560909)
Your time would be better spent implementing ':set list' on classic whiteboards.

That's where your issue lies; subconscious prejudice is happening during the hiring process, you just can't see it.

Re:Developers who use spaces make more money than those who ... by wtf_is_up on Thursday June 15, 2017 @12:13PM (#14561710)
#NotMyIndentation #Resist