Open Source Contributions More Important Than Tabs Vs Spaces For Salary (opensource.com) 164
Jason Baker, a Red Hat data analyst, doesn't believe developers who use spaces make more money than those who use tabs. An anonymous reader quotes Baker's blog post:
After reading the study one data scientist, Evelina Gabasova, performed some additional analysis and came to a slightly different conclusion, which feels a little more precise: "Environments where people use Git and contribute to open source are more associated both with higher salaries and spaces, rather than with tabs." In other words, if you're at a company where you're using version control and committing open source code upstream, you're statistically a little more likely to be a space-user and a higher wage-earner.
Even across all experience levels, contributing to open source still correlates to higher salaries, Gabasova concludes. "My theory is that when diverse people are working on open source projects together without enforced coding style, the possible formatting mess is nudging people towards using spaces simply because the code is consistent for everyone.
"This is just one of the possible theories, I didn't look to see if possibly language communities that use predominantly spaces (like Python or Ruby) are more active in open source."
Even across all experience levels, contributing to open source still correlates to higher salaries, Gabasova concludes. "My theory is that when diverse people are working on open source projects together without enforced coding style, the possible formatting mess is nudging people towards using spaces simply because the code is consistent for everyone.
"This is just one of the possible theories, I didn't look to see if possibly language communities that use predominantly spaces (like Python or Ruby) are more active in open source."
Oh come on! (Score:5, Funny)
Wait, there is no connection between spaces, tabs, and how much I make? But I just spent days going through all my code and replacing and reformatting with spaces. Please don't tell me I have to be worried about curly braces.
Re:Oh come on! (Score:4, Funny)
If it took you days to figure out how to run find(1) and expand(1) (or indent(1) if you wanted to get fancy), then maybe you don't deserve the big bucks!
On the other hand, if you simply have so much code that it took days for your script to run, then you have my sympathy. :)
Re: (Score:2)
Whoosh. Look at the guy's name.
So?
Re: Oh come on! (Score:2)
Re: (Score:3)
People who use spaces instead of tabs are 4 to 8 times less efficiënt.
Re: Oh come on! (Score:3)
The cool thing is in modern IDEs , you press tab, but the machine uses spaces. Also this git thingy can transform that for you automatically.
Re: (Score:3)
Yeah, but when you're deleting those "tabs" you have to hit backspace four times instead of one.
Plus your code is bigger because it's using four+ characters to encode a single tab.
Re: (Score:1)
Yeah, but when you're deleting those "tabs" you have to hit backspace four times instead of one.
I don't, actually. There are editors capable of handling that.
Re: (Score:1)
M-x untabify
Re: (Score:2)
Only if you don't know about ctrl + shift + arrow or ctrl+shift+home or you use an IDE that doesn't have those useful tools. And who cares if code is "bigger" because you have more characters? It's not like the compiler keeps that information resulting in a larger binary.
Re: (Score:2)
control + shift + arrow plus delete is four keypresses. Might as well just hit delete four times. Or use tabs and hit it once!
Re: (Score:2)
True. But I find once I get automatic with key combos that I parse them as one stroke. Four deletes is still four sequential keystrokes. The other option is an IDE which allows find and replace of spaces and tabs.
Java is distributed compiled; JavaScript isn't (Score:2)
It's not like the compiler keeps that information
It's not like all languages encourage distribution of programs in compiled form either. Programs in Lua, Python, and JavaScript traditionally are distributed in source code or minified form, and minification for Python is less strong because of its use of leading whitespace to mark block boundaries.
Re: (Score:2)
No, it can't.
It can convert x number of spaces to tabs (and vice versa) but it really goes only one way: once you converted to spaces you lose the semantic of tabs.
If (assuming 1 tab = 4 spaces) you see 8 spaces there's no easy way to tell if it's 2 levels of indentation or, say, one level and 4 spaces of alignment.
Re: (Score:2)
You are correct. Maybe my statement was a little misleading. Anyway, your IDE can understand that x spaces are one tab. However, it will mess up when you set up the conversion wrongly.
Re: (Score:1)
If their source code contains nothing except indentation.
Who pays for giving people skills to autistics? (Score:2)
I've seen quite capable people shown the door because they had poor people skills
How many of them had Asperger's? Poor people skills are often a symptom of this disability, and it often takes more effort to train otherwise high-functioning autistic workers to improve their people skills. Whose responsibility is it to fund this training? Government or industry?
yay (Score:4)
Score one for correlation vs. causation.
https://xkcd.com/552/ [xkcd.com]
Re: (Score:3)
Heh, I'm amazed that no one suggested that this would be the actual causation way back then.
Oh wait, I did... https://slashdot.org/comments.... [slashdot.org]
Next thing you know... (Score:2)
they're going to tell us that the "one true brace style" has no impact on your income!
Re: (Score:2)
Well I just spent the last couple months learning lisp... so I hope you're wrong.
Here is my thought on spaces/tabs (Score:5, Insightful)
Spaces -> the person who writes the code decides how its indentation looks
Tabs -> the person who reads the code decides how the indentation looks
Sometimes I set tabs to be 4 spaces, sometimes 8, sometimes even 2 spaces. However, if the formatting is all done with spaces I don't get that choice. I find tabs more empowering to me personally and I believe that I use them I empower those who read my code.
Re:Here is my thought on spaces/tabs (Score:5, Informative)
Yeah, and then you try to align something at sub-tab resolution and it's all messed up when you change the tab width.
Re: (Score:2)
Not if you align it correctly it isn't.
You indent with tabs and align with spaces. If your alignment messes up when you change the tab width, you screwed up your aligning.
Re: (Score:2)
Not if you align it correctly it isn't.
You indent with tabs and align with spaces.
So, your answer is "use both, as long as it allows you to keep using tabs". A simpler solution is to just ditch the tabs - they are neither required nor superior.
Re: (Score:2)
I'm not suggesting you use both, I'm pointing out that indentation and alignment are two separate things, and using tabs for indenting doesn't mean to use them for alignment too.
Re: (Score:2)
Tab advocates would claim that if you ditch the tabs, there's no way to programmatically distinguish indentation from alignment without implementing an entire language parser to predict what the indentation ought to be and then subtracting that out to infer alignment.
Re: (Score:3)
Yes, that's a feature. If you're the kind of jerk who tries to align code at sub-tab resolution then you can't, at least in whitespace sensitive languages like Python. If you want to align your pretty comments that way, go ahead and use spaces, because it doesn't make the slightest difference.
Interesting article on pros/cons.. (Score:2, Informative)
Read this a while back, had to go digging for it:
https://opensourcehacker.com/2... [opensourcehacker.com]
P.S. The commentary is more insightful than the article itself.
Re: (Score:3)
Re: (Score:2)
Re: (Score:2)
Of course the comments are more insightful :D
Because that blog post is simply wrong and written by an idiot.
Re: (Score:3)
Re: (Score:3)
You know, if you use a modern editor like emacs or vi you can have it do an "auto indent" on the current line when you press the tab key. There is no reason for that button to be inserting tabs when your build process has banished them. It is your fault. Do better.
Re: (Score:2)
They're more modern than line editors.
Re: (Score:2)
If you were using a typewriter, you'd be right to remove the key so that it can't be pressed, except that in that case tabs would already be spaces so it would be OK.
Just like, when somebody says, "modern flush toilets" you should be able to understand that they're talking about a regular flush toilet, not a wifi toilet. And there is nothing at all implied about their age. They're not claiming to be 200 years old, instead they're pointing out that not having a flush toilet would be archaic.
If you were a nat
Re: (Score:2)
Or make a preprocessor that strips or replaces them.
Re: (Score:2)
Well, on my planet, there are those that are following the appropriate Best Practices including adopting a Style Guide, and those that are not.
The point is, somebody else already chose the correct way for the indentation to look, and everybody on the project does it the same way. And that way is spaces. Except when it isn't. But is usually spaces.
If you're choosing, you're doing it wrong.
Re: (Score:2)
The point is, somebody else already chose the correct way for the indentation to look [...] If you're choosing, you're doing it wrong
Or, you might be working on your own project. I know, it's a bizarre corner case, but it occasionally still happens.
Re: (Score:2)
Right, but in that case the project does not matter at all.
You can also write your diary in a made-up language.
Re: (Score:2)
You can also write your diary in a made-up language.
How did you know that I do that?
Re: (Score:2)
You insensitive clod! I'm an AI. [slashdot.org]
Re: (Score:1)
I guess you never played formatting ping-pong in a shared source control system, where several developers have their own formatting style in their IDE:s and insist on reformatting every file they touch (and sometimes even files they don't otherwise touch). Makes tracing the history (and merging, oh my $DEITY) so much more bothersome for everyone including those who don't play.
Re: As a programmer for over forty years... (Score:4, Funny)
Re: As a programmer for over forty years... (Score:2)
Re: As a programmer for over forty years... (Score:2)
Re: As a programmer for over forty years... (Score:1)
Re: As a programmer for over forty years... (Score:2)
Re: As a programmer for over forty years... (Score:1)
Re: As a programmer for over forty years... (Score:2)
Re: As a programmer for over forty years... (Score:1)
Re: As a programmer for over forty years... (Score:1)
Re: (Score:2)
Bah! Ed, the standard text editor, doesn't need any of that crap. The interface in Ed is so clean that there is no room for ambiguity. Tabs tab, and spaces space, the way they were designed to. As for separating content and presentation, I don't have time to switch between the two. In Ed, the content IS the presentation.
When I log into my Xenix system with my 110 baud teletype, both vi and Emacs are just too damn slow. They print useless messages like, ‘C-h for help’ and ‘“foo
Re: As a programmer for over forty years... (Score:1)
Re: (Score:2)
If your editor isn't formatting for you, get a new editor.
cmd-a, ctrl-i
I don't care which you used, because now it's consistent. The end.
Seriously? (Score:2)
I have no trouble believing that people who submit to Git are more likely to make more money, but parsing it down to whether or not you use tabs or spaces? That seems like too fine a level of granularity.
Of course, I use spaces and submit code to open source projects, so I'm safe.
When you contribute you don't choose style. (Score:3)
Unless you originated the project, the number one rule is consistency. If you do a lot of contributing to open source then you will find a lot of projects with spaces... and regardless of your preference you will stick to that style if you want your code to be merged.
I'm a tab guy, it's just a preference... Yet all of my open source contributions to projects other than my own use spaces.
Spaces vs Tabs a bit anal ;) just saying (Score:2)
It is just what I do, there is not one right way
TBH I see the editor as being much more important. I like an editor which is mostly/all keyboard based.
My 2 cents is I don't know what moron decided someone should ever have to take their hands off the keyboard and use a mouse and lose registration.
I hate mice
Re: (Score:2)
Well, for people using a mouse there is no learning curve because all the normal editing features are in pull-down menus, same as everything else. And of course, when you use that menu it also tells you what the keyboard shortcut is.
The things people say about emacs are hilarious. I've been using it for decades and I'm still waiting to find this mysterious "learning curve." If you're not using it to script your workflow, you won't know about features or know to even want them. I'm just using it to write cod
Tabs are a poor approximation (Score:3)
Tabs descend from the manual typewriter, where they were a poor approximation to properly-formatted columnar layouts. Unfortunately now they join several other forms of white-space (because of Unicode) which are sometimes impossible to distinguish from each other. The safest thing to do is thus to only use space for horizontal spacing. Certainly software should not distinguish white-space characters differently. I'm looking at you, "Make", and yes I've heard the story about it being too late to change because there were already 12 users.
Re: (Score:2)
The problem with asking to make a small change to Make is that there are already twenty-seven thousand make alternatives and none of them just fix the problems. The only thing that is going to work consistently for everybody is make. Changing it is basically impossible at this point. The reason make is important, after all, is largely because of autotools. And that's an even bigger mess than make.
Spaces, yes. Except for Makefiles. But the good news is, sendmail was defeated!!!
Re: (Score:2)
I shared a ski cabin with Eric Allman's sister. Actually, it was sort of the Berkeley and Sun Unix cabin. Everybody but Bill Joy stopped in. So Eric heard from me directly that I didn't like Sendmail.
I changed a number of projects from Autotools (which I am joyous to have left) to cmake. Cmake's language design leaves something to be desired, but it is in general sane, portable, and more capable than make, and you rarely have to look at the makefile (or whatever) it generates.
Re: (Score:2)
I met DJB's parents when they were both working at Brookhaven National Labs, and got to talk with them about DJB! I distinctly remember his mom talking about his insisting on having things his own way.
Re: (Score:2)
The safest thing to do is thus to only use space for horizontal spacing.
You do that, Bruce, and I will continue to operate my projects the way I feel is best, which includes using tabs.
Not implying anything, but what have you coded lately, if anything?
Re: (Score:2)
You're not reading my blog. I have released new Free Software recently, and never stop coding.
Also, isn't this level of taking offense a bit over the top for a tabs vs. spaces argument? One would think we have bigger fish to fry.
Re: (Score:2)
We do have bigger fish to fry, which is why I wonder why you felt it appropriate to weigh in on a tabs vs spaces thread.
Re: (Score:2)
Because I can? I don't, however, get hot under the collar about it.
Re: (Score:2)
OK, did a quick catchup on your blog. Item one is a kernel patch. Tabs. Should I read anything into that? :)
I agree that this discussion is stupid. Just do what you feel is best and try not to preach (except when absolutely necessary...)
Re: (Score:2)
Re: (Score:2)
Tabs on a typewriter let you easily indent to a manually settable, consistent position. They eliminate errors where you're off by a space or two, start typing, then have to get out the corrector tape and fix your crooked column.
Word processors copied that behaviour, with the tab character meaning a user-selectable level of indentation.
The tab character seems like an ideal symbol for an indent in code to me, particularly in whitespace sensitive languages: being off by a full tab is obvious; being off by one
Re: (Score:2)
I get the impression that the spaces vs. tabs thing is largely a *nix problem and stems from the fact there are simply so many shit open source tools out there on those platforms with terrible usability and are that way because that's how it's always been and fuck change.
Whilst *nix dev still seem to be at war over tabs vs. spaces, developers of other platforms seem to have completely gotten over it people on other platforms are happily tabbing away and developing code far more efficiently with far less key
Re: (Score:2)
Most IDEs are actually completely auto formatting the text for you.
You very rarely have to hit tab.
For my personal code I use tab, when I join another team, I let someone export the IDE settings and I import them ... I never actually "check" if they use tabs or spaces, as I have every visual noise deactivated. I don't want/need to see CR/TAB/space as greyish little critters.
Re: (Score:2)
Visual Studio is the obvious one, but most modern IDEs are more than capable of making this a non-issue and letting you write code with minimal keypresses.
The problems seem to sit almost entirely with legacy *nix tools which haven't been updated because the most vocal community members can't cope with change.
Re: (Score:2)
Tabs descend from the manual typewriter, where they were a poor approximation to properly-formatted columnar layouts.
Genetic Fallacy. [yourlogicalfallacyis.com] Opinion discarded.
A Modest Proposal (Score:1)
Everyone should use Windows Notepad as their code editor. Then the tab spacing will be consistent everywhere.
*ducks*
This post is a joke, right? (Score:2)
When using Emacs, the tabs/spaces argument is moot (Score:3)
When using Emacs, the tabs/spaces argument is moot.
When spaces are used, Emacs handles that automatically.
When tabs are used, Emacs also handles that automatically and elegantly.
When both tabs and spaces are used, Emacs also handles that automatically, elegantly, and beautifully.
The world might be a much better place if we all used Emacs.
Studies made by open source stakeholders... (Score:2)
I've been a senior software engineer in a number of companies, small, medium and one of the world's largest companies and I worked with and socialized after work with many of the top positioned and paid software engineers.
Some had home hobby projects, one guy liked woodworking, one rebuilt cars, some did electronic or software projects, a few were open source. Many worked overtime every single day and simply dropped the keyboard after work to go rock climbing, pubbing or spend evenings and weekends with the
Re: (Score:2)
a Red hat analyst might be biased
For what it is worth, I am not a Red Hat analyst or employee, and I am quite certain that open sourcers command higher salaries on average (and are more skilled) than bespoke-only coders.
GCC counts tab as 1 char when reporting error (Score:2)
GCC counts tab as 1 char when reporting errors, which can make it slightly harder to coordinate error messages with exact file position in some cases. That is the only issue I ever run into when using tabs. However, the advantages of tabs far outweigh that little difficultly, so in any project where I set the style, the style is tabs. And incidentally, the style for Linux kernel (the largest of all open source projects) is tabs.
meh (Score:2)
sw=4:ts=8:no expandtab or GTFO
I'd say it's a matter of competence, then (Score:2)
People who contribute to open source projects tend to be the more enthousiastic programmers; they are willing to put in hours in their own time as well. That greater enthousiasm could very wel equate to a higher skill level as well (either through getting more practice, or through getting more constructive criticism, or because only people who are already competent at programming gravitate towards doing it as a hobby as well). And that greater competency translates into higher salary levels.
Well, that makes
Handicapped inaccessible (Score:2)
using spaces simply because the code is consistent for everyone
That's a false assumption.
My father was legally blind. We were sharing code remotely, using spaces, and he could not differentiate the gaps in the same way that I could. Every commit he would change my 2 or 4 spaces to 8 or 16 spaces. Every commit I would change it back, because it was horrible for me. We eventually switched to tabs, and the constant code reformatting stopped because we could each choose how strong that spacing looked for ea
Could be A Seconday Effect, not Causality (Score:2)
I'm late getting in here late and I skipped the first round because I was so late, but most people tend to use tabs in projects that are already using tabs. So, any correlation is more likely related to some other attribute of the code, not the presence of tabs. Here is an "interesting" interpretation to troll with: A lot of the earliest open source software was Unix, which had tabs in it; so, you get paid less if you work on old open source software :-).
Re: (Score:3)
What are the chances you are submitting to open source and having a high salary?
Pretty high - most (all?) of the large tech companies have started, and/or contribute heavily to massive open source projects.
Apple - WebKit, clang, llvm, Swift, BSD, ... ... ... ...
Amazon - Outlier? I don't know of any major open source contributions of Amazon.
Alphabet - Go, WebKit, Android, map reduce,
MS - vscode, WTS, Typescript,
Facebook - redux, React, flow,
If you're working at a large tech company, there's a pretty significant chance you're doing work on open source.
Re: (Score:2)
Now how about the rest of the companies that work with technology and don't?
Ford, VW, Caterpillar, Cummins, Deere, Harley-Davidson, NXP, Boeing, dSpace, etc.
large tech company
Are people going to pretend that since their primary product isn't tech that they aren't using the latest and greatest tech available? We're out there writing code daily and none of it sees the light of day.
Re: (Score:2)
The companies you listed are tech companies, but they aren't large. Their combined market caps are together smaller than the market cap of the smallest company that I listed.
Also, many of these companies use, and contribute to open source software.
Re: (Score:2)
Use != contribute.
I worked for one of the above and, according to our Fortune 500 lawyers, weren't allowed to submit bug reports because it may "give away proprietary IP".
Re: (Score:2)
Not really - if people license their projects under BSD like licenses, that's because they explicitly want to allow people to use it without giving back. There's plenty of people out there who wrote something, and want to say "hey, I made this thing, use it if you like", without any ulterior motive about getting contributions back.
Re: (Score:2)
The 90s called, and they'd like their FUD back.
Re: (Score:2)
why creimer's salary is so low
https://github.com/CDReimer [github.com]
1. I'm not a professional programmer, but you already know that. ...
2. I created that account to access GitHub features.
3. Someday Really Soon(TM) I'll publish my Slashdot comment history scraper Python script to GitHub.
4.
5. "I'm Feeling Lucky: The Confessions of Google Employee Number 59" [amzn.to] by Douglas Edwards is a popular book on Slashdot.
Re: (Score:2)
Maybe he's hiding the good stuff in plain sight?
https://github.com/creimer [github.com]
202 contributions in the last year
Not my account. I don't live in Germany.