21 ms·
Developers who use spaces make more money than those who use tabs
- raquo 9y agoI would like to see a similar analysis for gif vs jif pronounciation. We need to settle this.
- midnitewarrior 9y agoI throw peanut butter at people who get it wrong.
- krapp 9y agoGIF - Graphics Interchange Format. Hard G. for graphics. Not "jif." The matter is settled. Anyone who dissents gets sent to the camps.
- tripzilch 9y agoI'm Dutch. We say "gif" with the hard Dutch "g" (yea I'm sure I'm speaking for all of us, shut up). The point is that, unlike the English "dzj" (jif) or "gh" sounds, you can pronounce a Dutch hard "g" for as long as you want to. And therefore make it louder. And therefore we will win this argument: ggggggggggggggggggggggggggggggif!
- guilhas 9y agoI prefer tabs, but use spaces. We use VisualStudio which has spaces by default, so the company just adopted as standard.
- rubayeet 9y agoSome men just want to watch the world burn.
- delinka 9y agoI suppose, then, that this pre-commit hook I have for tabs <-> spaces conversion is borderline fraud.
- 11thEarlOfMar 9y agoI so wanted to post an ad for a Blood Boy in this month's Who Is Hiring.
- idlemind 9y agoWhat's going on with the salary disparity between US ($100k) and UK ($50k)?
- pcurve 9y agoI know nobody wants to hear this, but developers in the U.S. are overpaid compared to their peers in the rest of the world. We should count our blessings.
- MichaelGG 9y agoI'm sure employers would love to hear that. Why do they pay so much?
- richardknop 9y agoIn UK best developers work as contractors and make on par with US peers. This is not accounted for in most data as they look at permanent job salaries in UK which are very low.
- linkmotif 9y agoJust asked myself, "It's not April 1st, is it?"
- howscrewedami 9y agocorrelation != causation
- oblio 9y agoOf course you'd say that, you tab user!
- omginternets 9y agoSpoken like a space-using degenerate. (J.k.: spaces FTW)
- icebraining 9y agoWhich is exactly what the article says.
- deleted 9y ago[deleted]
- wlesieutre 9y ago> The model estimated that using spaces instead of tabs leads to a 8.6% higher salary (confidence interval (6%, 10.4%), p-value < 10^-10). (By predicting the logarithm of the salary, we were able to estimate the % change each factor contributed to a salary rather than the dollar amount). Put another way, using spaces instead of tabs was worth as much as an extra 2.4 years of experience. Maybe I'm not up on my statistics lingo, but saying "using spaces instead of tabs leads to a higher salary" sounds much more causal than "using spaces instead of tabs is correlated with a higher salary." If they're going to say something leads to something else, I don't see how that one's justified over the reverse: "having a higher salary leads to using spaces." Isn't that's just as valid a conclusion from the data?
- icebraining 9y agoYes, the word "leads" was an unfortunate choice.
- 9y ago
- samblr 9y agoIn your editor, select option to convert tabs to spaces - you turn rich even using tab(key)!
- coldcode 9y agoI needed a good laugh this morning. But of course this is pretty bogus relationship. People who drive Teslas make more money than those who drive Gremlins.
- Cacti 9y agoYou get paid by the keypress?!
- creepydata 9y agoWho is manually entering spaces rather than instructing your editor to do it for you?
- tripzilch 9y ago... but what is pressing the space bar if not instructing the editor to insert a space for you?
- simias 9y agoBut there's an actual causation here (you need more money to buy a Tesla). Use of tabs and salary don't seem to have any relation one way or an other. My personal guess would be that using spaces is a practical decision and might be more popular towards older, more experienced devs (who are therefore better paid). On paper tabs sounds better, they're "configurable", you should indent with tabs and align with spaces, yada yada and everything is good in the world. In practice however it becomes a big mess real quick unless you only work on projects with very good and perfectionist developers who understand when they should indent and when they should align and how they should configure their editors to do the right thing. See for instance the linux kernel codebase, it looks like arse if you don't use 8-space tabs and the coding style even tells you to use that value (it shouldn't really matter if tabs were used "right", except maybe for 80-column limits). So why even bother with tabs in this situation? Do we really care that much about wasting a few bytes? Therefore I gave up on tabs a long time ago and tell everybody to just use spaces in all the projects I maintain.
- midnitewarrior 9y agoI use spaces. Who do I contact for my check?
- flipp3r 9y agoJetbrains product users make more money? ;^)
- treehau5 9y agoHow else do you think they can afford to pay for the licenses?
- douche 9y agoThe full toolbox is less than a dollar a day - it's not like we're talking about really expensive licensing. They're not RedGate.
- Avshalom 9y agofun fact RedGate's website sends "GNU Terry Pratchett"
- pc86 9y agoThe $89 a year is not exactly breaking the bank.
- clavalle 9y agoThe time savings alone probably paid for itself in two days of use.
- deleted 9y ago[deleted]
- andrewSC 9y agoWell that settles that! We finally have proof that spaces are superior to tabs... ;)
- lvoudour 9y ago>Developers who use spaces make more money than those who use tabs Sure, but how many spaces? grabs popcorn
- MrCrbll 9y agoWhere does using vim to insert four Spaces everytime I press tab leave me?
- Clubber 9y agoA brilliant automation solution!
- thehardsphere 9y agoThat's spaces. Or at least that's what I answered when I took this survey and I do the same thing in vim and all other IDEs.
- foota 9y agoCorrect
- notheguyouthink 9y agoYea, I'm honestly surprised this is a thing still. I've not thought about the tab vs spaces "war" in years; because of Vim. I just hit Tab and whatever the pre-defined standard is, be it tabs or spaces and space count, is used. Visually I can have it display in my editor of choice (Kakoune at the moment) however I want. I guess I'm just saying, I would have thought the most common answer to this question would be: Whatever my employer / language standards dictate.
- jpfed 9y agoThis by itself disproves the Just World hypothesis.
- Cerium 9y agoOf course professionals get paid more, but I'm surprised there are so many tab users out there! Time to add a new interview question.
- UncleSam 9y agoI believe the correct answer to that interview question would be "Follow the code style as established by the company, or keep it consistent within existing projects."
- Cerium 9y agoAgreed. People who follow the style guide probably earn more than either spaces or tabs.
- coldtea 9y agoNothing makes those going for spaces more "professionals". Just oldsters cargo culting old kludges into the 21st century.
- ebbv 9y agoOf course they do because they are pig headed ignoramuses who are insist on getting their way in spite of all evidence that they're wrong. So of course they are good at getting raises. ;)
- paulsutter 9y agoIs this about whether you set your editor to convert tabs to spaces? (which is obviously tidier due to inconsistent treatment of tabs) Or do some people actually use the space bar to indent code? (which is obviously insane)
- neurotrace 9y agoDefinitely the former. Anyone who indents there code by slapping the space bar repeatedly is a monster and should have their hands cut off.
- paulsutter 9y agoThen this survey is surely measuring awareness of how editors work. Most code editors substitute spaces by default.
- timhwang21 9y agoWell, of course. Only companies with fuck-you money can afford the extra bytes spaces take up versus tabs, so it follows logically that they'd pay their developers more.
- astrodust 9y agoThe eight spaces companies are clearly flying high and the place to be if you're looking for mad bank.
- bacongobbler 9y agopoor ruby devs and their two-space indentation rules.
- lrusnac 9y agoyeah, just because in 2017 storing source code is the most expensive thing for a company. but really, the storage is almost free nowadays...
- okreallywtf 9y agoSeems unfair to downvote you just for misunderstanding, that was sarcasm friend.
- dmix 9y agoIt's pretty much an unwritten rule that a sarcastic joke on the internet with sufficient exposure will get a response by someone who didn't get it. Using /s really kills the fun (and whole point) of using sarcasm so it's a trade off to accept these comments will happen. I'm impartial to downvoting as to reply literally doesn't usually add to the conversation, which is generally the point of downvoting. Losing karma shouldn't hurt your feelings.
- shangxiao 9y agoKnown as Poe's Law [1] [1] https://en.wikipedia.org/wiki/Poe%27s_law https://en.wikipedia.org/wiki/Poe%27s_law
- kutkloon7 9y ago"The model estimated that using spaces instead of tabs leads to a 8.6% higher salary". So the model actually predicts causality, instead of correlation? That's amazing. I'll start using spaces instead of tabs today and I will ask for a 8.6% raise. According to this model, I should get it!
- Clubber 9y agoJoin a basketball team, you'll be taller too!
- rectang 9y agoAs a spaces user, I have to acknowledge that I get irritated when I open a document with tabs and the formatting is messed up thanks to tab setting mismatches. Is it possible that tab-aversive people making hiring decisions act on their aversions (consciously or unconsciously), while tab-friendly hiring managers do not?
- kutkloon7 9y agoCan you explain that? I can't see how different tab settings would mess up formatting. Unless you use tabs to match the position of things over two different lines (which is abusing tabs), or mix spaces and tabs, tabs should work fine.
- nf05papsjfVbc 9y agoIt is usually frowned upon when people's excuse is "You are holding it wrong".
- kutkloon7 9y ago?
- jmkni 9y agoIf I'm using an IDE that handles whitespace and indentation am I using spaces or tabs? If a tree falls in the forest, etc
- jmnicolas 9y agoMaybe it's an age thing : older devs tend to prefer spaces and are usually more paid than young devs.
- thehardsphere 9y agoThey explicitly rejected this explanation after controlling for years of experience.
- tpolm 9y agoage != years of experience
- thehardsphere 9y agoThat statement is correct, yet the commenter mentioned two variables who are caused by years of experience and are only correlated with age.
- kozak 9y agoInteresting how multiple people presumed that older devs prefer spaces, which seems like the opposite to me. Tabs are a thing of the past, people used to use them a lot, and now they are relatively rarely used.
- IanDrake 9y agoOlder people use spaces. Older people make more money because they are further along in their career. Thus it only appears spaces make more than tabs, when it's really about age. Just a guess.
- barrkel 9y agoThe graph has experience as its y axis.
- thehardsphere 9y agoThis is the third time I've noticed that people didn’t read the article closely enough to note that this explanation was explicitly rejected after the author controlled for years of experience and the effect was still present.
- dkhenry 9y agoGood thing things like YAML have now trained me to only use spaces. Also for those looking to make a quick buck, emacs has `c-x h m-x untabify` enjoy
- DonHopkins 9y agoWhat if you control for the size of the space bar and the size of the tab key?
- amcca029 9y agoalso rubber dome vs switch vs topre
- omginternets 9y agoFirst thought: perhaps languages that officially recommend spaces (e.g. Python) predict higher salaries compared to those that recommend tabs (e.g. Go)?
- jwilk 9y agoThey did control for the programming language.
- watwut 9y agoPossible explanation: Tab vs space is likely to be correlated with technology (C vs Java vs JavaScript) and different technologies pay differently.
- apapli 9y agoI thought that too, but further down the article it seemed that wasn't the case. I'd like to see the split of age vs tabs and spaces. I'm with a few other people that may say experienced programmers prefer spaces as it causes them less formatting issues over time when working in larger teams or on differing IDEs - and experience pays more.
- TekMol 9y agoThis does not mean that changing from tabs to spaces will increase ones income. I would expect there simply is a confounding factor that the author did not look at. Maybe the info is not in the data. I can imagine that the space/tab choice is related to the "upbringing" of the developer. Maybe which language or editor they used first in their life. Or maybe it's related to culture. For example when using IRC, tabs are usually not used to communicate. Maybe that impacts the general choice of tabs/spaces. Or maybe more sophisticated users tend to exchange the tab key for something else: https://xkcd.com/1806 https://xkcd.com/1806
- fixermark 9y agoThe first place I would look is size of dataset and correlation effects from multiple self-reporters working for the same company. Big companies tend to pay more in the software industry. Big companies also tend to have standardized on tabs or spaces internally to simplify the problem of merging code across developer teams. So if you find out that, hypothetically, Amazon, Microsoft, Google, and Facebook have all standardized internally on spaces, that alone could account for the data.
- mjburgess 9y agoYes, eg. many languages have spaces conventions formalized and those languages may pay more to develop in.
- sudhirj 9y agoThis is already accounted for in the article, the data seems to indicate this even in the same language, and consistently does so across all languages.
- data_hope 9y agoThe effect in the data (unless it isn't random fluctuation. At the moment I'd go with the assumtion that it is a genuine correlation, as the effect is present over all subgroups), might (1) not be monocausal, i.e. a combination of contributing factors like development experience, age of IDEs/tooling, etc. might play a role as well as other aspects. (2) a cause might not be "explained away" because the control variable was considered. Let me elaborate The years of experience variable might be taken to explain away the effect of experience, and then conclude that tabs vs. spaces must be due to another effect than years of experience. But chances are, that "years of experience" and "tabs vs. spaces" are just correlated to a common, causal property (like "programming proficiency" or however you want to call it). Both "years of experience" and "tabs vs. spaces" are then just incomplete reflections of the underlying cause, both rendering the effect of the underlying cause incompletely. What I am trying to say is: Its complicated, probably you won't be able to find the one true cause for the effect in the data. If this were physics, one could come up with a predictive theory to put this to the test. In social studies, we just cannot control the parameters well enough. If you are interested in reading more on this, "Causality" by Judea Pearl is a good (but exhausting read).
- sroussey 9y agoI'd rather see the results for those that don't participate in SO surveys: those making $200-500k.
- johnsonjo 9y agoThis may or may not be true, but just FYI the salaries were an optional part of the survey so those people may have chosen not to give their salary for some reason or another.
- creepydata 9y agoI think the implementation is that those who are high earner don't have time/desire to participate in SO surveys, not that they are unlikely to state their income in SO surveys.
- SurrealSoul 9y agoFile > Preferences > User Settings > Tabs place two spaces
- jelder 9y agoI've been using prettier.js in my JS projects for a few months and honestly I can't imagine going back to formatting my own code. It would be like making all of my own clothes or something. Who has time for that? The Go community was on to something with gofmt (even if they did decide on tabs).
- tombert 9y agoI tend to agree, but aren't most of the new hot languages whitespace sensitive? Are there formatters for those kinds of languages?
- IshKebab 9y agoNo, whitespace-sensitive languages are still generally the exception (except newlines). In fact I can't think of a new language that is vaguely popular and whitespace sensitive since Python. I guess there is YAML but that isn't a programming language and is also a bit mental.
- tombert 9y agoHaskell is (slowly)growing in popularity, and F# is whitespace sensitive, and these are (for better or worse), the only languages I touch nowadays. I suppose that maybe none of the really popular languages follow this though...my bad.
- jelder 9y agoOk, here's a question I've been wanting to ask someone steeped in syntactic-whitespace languages. Do you find that two developers typing the same code will format it the same way? How much would an auto-formatter change in your team's code?
- tombert 9y agoThere has been a bit of friction on that very point...Now we just agree on "four spaces all over the place". I know for a fact that an auto-formatter like `gofmt` or something would have avoided at least one argument, so it would probably would make the code better in some respects. That said, I like the whitespace. I like that it forces you to think about how the code is formatted and it tends to make the code a lot less verbose.
- oscarjd74 9y agoDevelopers who use spaces are more likely to lie and boast about their salary.
- piker 9y agoCould it be that a few large, well-compensating employers are shifting the result? (E.g., https://google.github.io/styleguide/cppguide.html#Spaces_vs._Tabs https://google.github.io/styleguide/cppguide.html#Spaces_vs....)
- CydeWeys 9y agoCould well be. I know that Google for sure requires spaces, and some cursory Googling leads me to the believe that Facebook does as well. Does anyone have information on Amazon, Microsoft, Apple, etc.? Of course, if all of the top companies are requiring spaces, then there's probably a reason for that, and its impact on salary data is thus meaningful, not just a spurious correlation.
- _IsThisRealLife 9y agoWhen I was working in Windows about 5 years ago they required spaces.
- Profragile 9y ago>I know that Google for sure requires spaces How do you know this? If this is the case, why did they make go fmt to use tabs?
- saagarjha 9y agoDon't work there, but I know that Apple tends to use spaces for their public-facing code–I'd expect that their internal code does too.
- CydeWeys 9y agoIt's sounding like all the top tech companies use space-based indentation. Our style guide makes some pretty convincing arguments as to why it's better. It sounds like good developers are either more likely to (a) work at top companies or (b) search out information on best practices for handling indentation. Mediocre developers probably just use whatever, which ends up being tabs a lot of the time.
- Clubber 9y agoDevelopers who use the space bar aren't real automaters. :)
- nottorp 9y agoPretty simple: you use spaces because you're aware that there is more than one IDE/editor in this world and who knows what your code will get opened with tomorrow. This means you consider consequences beyond "but it works on my machine" so you're a better programmer. Ergo, higher salary.
- sambe 9y agoI think there's probably some truth to considering existing norms and thinking ahead, but find it unlikely to be the main confounder. How do tabs fail to work in other editors/IDEs?
- peterbonney 9y agoTabs fail when my IDE is set to convert tabs to spaces and yours isn't.
- seren 9y agoAdditionnaly diff/merge tool tend to be inconsistent. So it looks good on your editor, but when I am doing your code review, alignement is totally broken. In theory, it should be easy enough to ask people to have consistent settings across all tools, but it is a bit like herding cats. Sadly most people do not even realize it could look differently without their settings. (I could ignore whitespaces when doing reviews but this is an open invitation to break everything)
- creepydata 9y agoSeriously? When you start on a project you configure your IDE to match the project's conventions. If you are in a mentoring role you instruct your jr developers to do the same, first thing, before writing any code. This has never been an issue at any place I ever worked. If a PM can't get their developers to do something as simple as that then you have larger organization problems than code formatted weirdly. As well as totally incompetent developers.
- moomin 9y agoRemind me what Facebook and Google use :)
- Aaargh20318 9y agoTabs vs. spaces. 2 vs. 4 spaces. It's an endless discussion. We finally compromised and we're using 3 tabs.
- peterbonney 9y agoIf we would all just agree to set our tab width to 1 space then we could live in harmony...
- alejohausner 9y agoThat's a major problem solved. Now all that's left to do is peace in the middle East.
- merpnderp 9y agoYou sir/ma'am win the internet today.
- fcanas 9y agoA possibility I haven't seen mentioned is that the style guide of their employer, together with a few employers who pay out-sized salaries (Google, Amazon, Facebook...) could account for the difference.
- wott 9y agoYes, the only reason to use spaces is because you are forced to because you work in an organisation that had to force this rule because it employs too many morons who cannot make the difference between indentation and alignment. * Large organisation -> pays more. * Organisation that has power to enforce coding style rules -> pays more. * Morons -> they are paid more.
- kalleboo 9y agoAm I alone in not even knowing what I use? I use the formatting standard that my IDE enforces.
- TekMol 9y agoInteresting. Let us know more about your stack and environment. Which language, os, editor do you use?
- TorKlingberg 9y agoUse the arrow keys to move around a bit. Does it move once space at a time or jump?
- fao_ 9y agoThis depends on how the editor works with spaces. it could have a special rule for '^\s*'
- rdeboo 9y agoIt's good that their data science team keeps tabs on these important matters.
- johnsonjo 9y agoI feel the analysis left no space for discussion.
- tombert 9y agoI use spaces because literally every single time I've tried to propose tabs I get yelled at by someone... I generally prefer tabs, but I prefer having coworkers that don't complain more.
- austenallred 9y agoAlmost 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.
- lliamander 9y agoIt's not really prejudice if those 'tabbies' are just inferior, is it?
- beaconstudios 9y agoI can't believe that in 2017 I'm reading comments containing blatant spacial prejudice on Hacker News of all places.
- austenallred 9y agoI 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.
- clarkmoody 9y agoEspousing notions of whitespace power. Get that trash out of here.
- lliamander 9y agoMore like get those tabby cats out of here.
- zensavona 9y agoHacker News should be a Safe Space.
- vbezhenar 9y agoBut how many spaces for indentation yields more profit? That's the next question.
- delegate 9y agoMight also be that the space people, being irritatingly pedantic also include bonuses and/or stock compensation , while the tab people, always lazy and all over the place, just barfed the first number that came to mind. The answer, as always, is: lisp with parinfer - makes the whole debate irrelevant.
- known 9y agoPython?
- aetherspawn 9y agoAnd here I was, thinking the title meant browser tabs vs OSX Spaces.
- matt_lo 9y agoyou weren't the only one :P
- emodendroket 9y agoWell that settles it.
- dingo_bat 9y agoOn a somewhat related note, if I had to ask a Genie for a wish, I'd ask him to magically convert all tabs in all codebases to spaces and make git forget the commit.
- IshKebab 9y agoApart from the fact that you are doing it the wrong way around, that would actually be a really useful git command. I.e. you fix the whitespace in your files, then rewrite history as if it was always that way. Then you don't get git blame showing you whitespace-only commits. (Yes I know there is an option to ignore whitespace in git blame, but it isn't on by default so it is useless everywhere except the command line.)
- redm 9y agoThe reason I use tabs is pretty simple. It's faster to move around only using the keyboard. It's also faster if I'm changing code that requires reformatting. Finally, when another developer looks at the code, their IDE will render the tabs as whatever its set up for, 2 spaces, 4 spaces, etc. In other words, it adds flexibility. Brace yourself: I use two spaces after the end of sentences too. [1] I am quite the rebel. Modern IDE's (Sublime Text) let you easily convert spaces to tabs (or vice versa) and intention length of existing code. [2] [1] http://www.slate.com/articles/technology/technology/2011/01/space_invaders.html http://www.slate.com/articles/technology/technology/2011/01/... [2] https://css-tricks.com/changing-spaces-tabs-sublime-text/ https://css-tricks.com/changing-spaces-tabs-sublime-text/
- tomsmeding 9y agoDon Knuth seems to agree with you a bit; TeX automatically inserts some extra spacing between the end of a sentence and the beginning of the next one. You don't have to type it yourself though!
- zelos 9y agoThat's why most people stopped inserting the extra spaces themselves, instead allowing the layout engine/word processor etc to do it for them.
- saalweachter 9y agoThen your editor / layout engine has to be smart enough to distinguish between Dr. Smith and the end of a sentence.
- jinglebells 9y ago> Finally, when another developer looks at the code, their IDE will render the tabs as whatever its set up for, 2 spaces, 4 spaces, etc. In other words, it adds flexibility. This is exactly why I use tabs and the reason which appears to never get cited in the holy wars. People who use spaces want to line up their '=' signs, that's fine, but I don't believe it's my position to enforce the amount of whitespace another developer has to use in their editor. It's an accessibility thing, they might have their font size really large because of eyesight problems in which case 8 spaces is going to make reading the code a lot harder. The fact that Python's rule used to be 8 spaces, then got changed to 4 thereby invalidating old code really showed me how shortsighted it is to use a set number of spaces in a whitespace sensitive language.
- mtgx 9y agoUgh, could it be because those who use tabs are from a younger/less experienced/less paid generation that have learned to program with tabs, as opposed to programming veterans who were used to spaces? I don't think the fact that you use spaces automatically makes you a richer programmer.
- weddpros 9y agoDevelopers who use spaces cost more than those who use tabs... Now that's a fact for your next job interview!
- Androider 9y agoIf you're in the JS world check out https://github.com/prettier/prettier https://github.com/prettier/prettier if you haven't. It's used by some big projects like React, Babel, webpack etc. Unlike "traditional" formatters, it parses your code into a syntax tree completely disregarding any original formatting, meaning the output is entirely consistent. It's pretty liberating to devote zero time to manually formatting and can make code reviews more constructive and less superficial. It is what is is, and it's pretty opinionated based on Facebook's code style. Works great for us, enforced with a git hook.
- maxsavin 9y agoPerhaps programmers who use spaces also participate in satanic rituals
- thatwebdude 9y agoOh boy. Editorconfig and I'm done. I sincerely don't care.
- mattmanser 9y agoWhat surprises me most about those graphs is that US developers are paid twice as much as Canadian, UK or German developers.
- my_ghola 9y agoI only use tabs in my Makefiles.
- coffeeaddicted 9y agoMakefiles are the reason I use tabs everywhere. No need to switch mentally - or switch editor settings. But I'm rather poor ... maybe Makefile are the reasons for that? I need that correlation betweenn Makefile writers and income!
- animex 9y agoThey can bill for that extra keypress time. Makes sense. Tab developers deliver projects on-time and under-budget. Space Developers over-charge, deliver late, but make more money. ;-)
- drblast 9y agoThere's an obvious conclusion here we're all dancing around. People who use spaces are just better than those who use tabs.
- Udik 9y agoSomehow it doesn't surprise me that much. Software development is ridden with fads that fastidious, obsessive developers make a point of adopting enthusiastically (they used to call them "best practices" until somebody even more fussy came and suggested to call them just "good practices", because "no practice can be universally best"). These people have a particular gusto in constantly one-upping each other with the latest good practice; the one that adopts the highest number of good practices wins. Their constant talk of the latest fad and push for the "right ways" of doing things usually puts them in positions where they end up evaluating and hiring new developers (I got interviewed just the other day by somebody that didn't ask me to design or structure any code, but rather if I use == or ===). Some of these are actually excellent developers nonetheless; others will drive entire teams into rewriting a perfectly working application into a completely useless mess of a thousand microservices. Endeavour that will end up in their CV anyway, helping them to find another excellently paid job once it's time to migrate.
- Scarbutt 9y agoDevelopers who use spaces are more pragmatic, hence more money.
- TallGuyShort 9y agoAnd Silicon Valley becomes slightly less satirical.
- toast0 9y agoClearly, you have to pay people more to use spaces, free market at work.
- josephagoss 9y agoWhat about using tabs that render as spaces in the IDE?
- valuearb 9y agoMoney isn't everything. Tabs live forever!
- andrewla 9y agoThe most confusing thing about this result is that go shows a high level of space-preferential salary difference. Go programmers who use spaces make ~20k more (at the median) than developers who don't. Only, in Go, you don't have a choice -- gofmt enforces tabs only (with spaces for alignment). So something seems odd there.
- marcus_holmes 9y agoThis! It makes me really suspicious about the data. Are there any highly-paid Go programmers who refuse to use gofmt? That's a serious amount of effort to go to in order to make your code non-standard. Your projects will be criticised and you'll get PR's to correct them for just that reason alone. If there are no highly-paid Go programmers who use spaces, and it seems utterly reasonable to assume that there are not since the language itself enforces tabs, then who exactly are they talking about in the data?
- piker 9y agoWithout doing too much investigation: That would be resolved if (1) participants were allowed to select more than one language and (2) Google is over-represented as an employer of participants who selected Go.
- rcthompson 9y agoI'm pretty sure the spaces-vs-tabs question was not language-specific, which means that the interpretation was more like "in languages that do not enforce a specific style, which do you prefer, tabs or spaces".
- keymone 9y agowow, clojure is really well-paying language
- slowmovintarget 9y agoIt is interesting to see that it is a well-paying language, according to that chart, regardless of whether one uses tabs or spaces. I suspect this has more to do with the sorts of programmers who work with Clojure, though.
- GFischer 9y agoI suspect it's geographic. That happened to Ruby in the past, these languages get traction first in Silicon Valley (highest paid area for software) and then spread out. It's also not very mainstream. Stuff like Java or C# has millions of developers in lower-paying countries that bring their averages down (I'm one of them :) ).
- _Codemonkeyism 9y agoHow much money do developers make who have no clue and do not care the least because they use the auto-layout of their IDE?
- Radle 9y agoI'd assume that tabs vs spaces is a localized argument. Thus in an area/company area and company there's higher salary and spaces are the default.
- GavinAnderegg 9y agoI see a few arguments here which suggest people think tab-users might care less about their code and/or their fellow coder. As someone who slightly prefers tabs and abhors mixing of tabs/spaces, I find this frustrating. I generally prefer tabs because I feel that they're more egalitarian: I like 4-space indentation, but don't want to force that on everyone encountering my code. Similarly, I find 2-space indentation very hard to parse in most languages, so I don't want that affecting me if I can get away with it. While this is possible with spaces and maybe a series of Git hooks, it's trivial with tabs. On the other hand, I always use spaces in languages like Python or Ruby where there are well-codified style standards. I also always show invisible characters on any editor which allows it, and have cleanup scripts to ensure that whitespace is standardized across any non-vendor code in the project. Maybe most tab users don't feel this way? Maybe most aren't as careful/picky as I am? Maybe tabs are more popular with younger devs? But I feel like tabs can offer more interoperability than spaces when many coders are working on the same project when the language/community doesn't strongly specify whitespace.
- leblancfg 9y ago"As someone who slightly prefers tabs" ... "I generally prefer tabs" wat
- GavinAnderegg 9y agoI generally prefer tabs, but I don't use them when writing Python (which is most of my job these days). I'm also not all that hung up about it, so I started with "slightly".
- justin_vanw 9y agoWell assuming correlation implies causation (always safe), enjoy being poor.
- pyre 9y agoSome things are more important than money. Let this tab-idealist enjoy a tab-ful life in the way that they see fit.
- Shorel 9y agoAs I put in another comment: Use and respect .editorconfig files in your projects.
- richardknop 9y agoGolang uses tabs for indentation and Go developer jobs have good salaries but then again this might be an outlier.
- marcus_holmes 9y agothey controlled for language too, and didn't cite Go as an outlier
- jayvanguard 9y agoWhen you're working in a large company with many developers spaces make more sense. Large companies generally pay more. In a perfect world you'd use tabs for semantic indentation and spaces for stylistic indentation but this is too hard to implement in 100+ person teams and also can't be automated via an IDE style sheet.
- kazinator 9y agohttp://www.kylheku.com/cgit/c-snippets/tree/autotab.c http://www.kylheku.com/cgit/c-snippets/tree/autotab.c With this, I instantly conform to how the file is formatted. Is it 3 space indentation, made with a mixture of 8-tabs and spaces? Autotab will figure it out, spit out the Vim params, and you're modifying away without causing spurious diffs in version control. You have to learn to use Ctrl-T for indent and Ctrl-D for deindent in Vim; those obey the shiftwidth and generate indentation according to the shiftwidth, tabsize and expandtab setting.
- teddyh 9y agoI see it’s time to once again present the once-and-for-all solution to this tabs/spaces mess: Elastic Tabstops! http://nickgravgaard.com/elastic-tabstops/ http://nickgravgaard.com/elastic-tabstops/
- iainmerrick 9y agoAmen, brother! Unfortunately, like fair taxes, truly representative democracy, and peace in the middle east, this is probably an idea that's doomed to be forever ahead of its time.
- heisenbit 9y agoWe are suffering from space exhaustion. Experienced older programmers known earning more were able to gobble up spaces way back while they were still cheap and are now enjoying spreading them around. Younger coders on a budget have to be stingy with spaces and are forced to use the poor tab substitute. This leaves the less experience professionals at the mercy of tab expansion by greybeard hackers. Sad.
- winstonewert 9y agoA simple explanation that occours to me: Many of those who answered tabs are actually using an IDE which inserts spaces when they push tab. They believe they are using tabs, because they've never realized that this is going on. People under that misapprehrension are likely to be less skilled. Additionally, if a coder, is in fact, deliberately choosing the use tabs, they are going against the majority opion of coders and almost all style guides. That attitude might be correlated with lesser income.
- lotsoflumens 9y agoOK - now that's out of the way. Let's move on to ASCII vs Unicode ....
- red2awn 9y agoWhat about soft tabs?
- ajnas 9y agoThe correct way to phrase this is "Developers who makes more money uses (or they are forced to use) spaces over tab". Because bigger corps generally set company wide standards on the code indentation and that more often that not prescribes spaces.
- drumttocs8 9y agoWhy didn't he test by age? Age is likely the variable most linked to salary. Older developers didn't use fancy IDEs- just a simple text editor is all you really need.
- RawData 9y agoCome on, we've known this for years. Do we really need a study to tell us that? Hell, the only interview question I've asked new hirees since around 2003 is: "do you indent with spaces or tabs". Really cuts through the BS. It's foolproof! :-p
- deleted 9y ago[deleted]
- yAnonymous 9y agoTabs were the default for a long time, so it can be argued that developers who use spaces make a conscious decision and care about clean code more than tab users who just go along with the default. I'm not arguing tabs vs spaces here, but exploring systems and caring about good organization. If you care about clean code, being orderly and organized probably extends to other areas, too, and that helps you make more money. In my experience, developers who mostly use default settings are often unorganized and easily confused. They also know very little about the systems they are working with, because everything outside their IDE doesn't interest them. I'd also bet that many tab users had to check what they use, because they didn't know or care. tl;dr: Developers who change the settings are more dedicated to their job.
- kbenson 9y agoOf course. That's why I vote spaces in every presidential election.
- madiathomas 9y agoPlot twist: Dev Managers tracks your productivity by number of kepresses you make per day. The more the better.
- _jal 9y agoFor more surprising correlations: http://tylervigen.com/spurious-correlations http://tylervigen.com/spurious-correlations
- alejohausner 9y agoOne of my favorite sites.
- fergie 9y agoVindication.
- anonymousiam 9y agoI believe the tool 'indent' was created in part to end this "holy war". I just checked my system (a relatively new LinuxMint install) and found that 'indent' is not installed by default, but it is in the repo.
- inanutshellus 9y agoIf you use tabs, you work for a small team (or by yourself),. If you use spaces, it's because you're in a "big enough to stop trusting everyone" environment. Case closed! :)
- rcthompson 9y agoThis could be checked if the survey included questions about the number of people in your office/company.
- rcthompson 9y agoIn terms of potential explanatory covariates, I think preferred editor/IDE would be one of the most likely to explain the trend, since different editors will have different defaults. The survey has this information, so someone could test this. It would probably help to group the editors by their default setting. I think you might need a mixed model with editor as a random effect to include both default setting and preferred editor in the same model.
- altern8tif 9y agoI wonder how many man-hours (and by extension, wages) has been spent debating this potentially world-changing issue. The internets giveth, and the internets taketh away.
- deleted 9y ago[deleted]
- austincheney 9y agoHow is this even a thing when there are code beautifiers that do a great job?
- mcs_ 9y agoI have to stop converting spaces with tab in sublime
- Pitarou 9y agoMy apologies to all you tab lovers, but I suspect that preferring spaces is a proxy for experience.
- fahadkhan 9y agoOh no! Someone started the Tabs vs Spaces holy war on HN again.
- inanutshellus 9y ago= Why Grown-Ups Don't Use Tabs = * Joe likes 4-space tabs, I like 2-space tabs, and Jane is old-school with 8-space tabs. * All goes well until someone aligns something visually, like so: void someNiceMethod( [tab][tab][tab][tab][space][space]int myParam...); * Now it aligns perfectly on my machine, looks mostly ok on Joe's machine, and is ON MARS on Jane's machine. Thus one-or-more of three futures happens: * Someone implements a code re-formatter into version control * Someone re-aligns the code, starting the process over again. * Someone calls a meeting and demands we all switch to spaces
- menssen 9y agoThere's actually a solid argument for "tabs for indentation, spaces for alignment", which solves both for preference and vertically aligning stuff: [tab]void someNiceMethod( [tab][space*20]int arg1 [tab]) But it basically requires having some visual indicator of what is a tab, which most people don't like. (edited for line breaks)
- rplnt 9y agoI like how it is in Sublime (2) - it shows whitespace characters on highlight.
- IshKebab 9y agoThat's pretty nice. VSCode has a pretty good option too that shows whitespace except single spaces between non-whitespace characters.
- 0xffff2 9y agoI have visual whitespace turned on in all of my text editors. The massive amount of mixed tabs/spaces and trailing whitespace I find in virtually every document with multiple authors leads me to believe that I'm the only person on the planet who actually cares about whitespace at all.
- mark-r 9y ago
- dlanouette 9y agoI'm going to go reformat all the files in my companies repo and wait for the raise.
- panzer_wyrm 9y agoBut which write better code? If space guys are Baby Metal and tab users Meshuggah this would leave thing inconclusive
- bitwize 9y agoSexy languages, like Python or Node, encourage the use of spaces. Tabs are more often used in languages like C and C++ which are more traditional and pay less despite being more technical.
- BinaryIdiot 9y agoIf one uses an editor which replaces tab key presses with spaces, is one using tabs or spaces or both?
- deleted 9y ago[deleted]
- tripzilch 9y agoThe discussion was never about what keys you personally press to edit your code (nobody cares enough to wage a holy war over), but what other people have to deal with when reading your code.
- jv22222 9y agoThat's the median. I'd be really interested to see if that rings true when only taking the top 10% of earners into account.
- tripzilch 9y agoI'd be much more interested in reading about modal income.
- gthtjtkt 9y agoI don't understand how people can work with spaces. I had to reformat a colleague's query the other day and it was infuriating because all the tabs had somehow been converted to spaces. I had to edit it line by line instead of being able to easily shift entire blocks in either direction. Do Visual Studio and SSMS support the space equivalent of "Select X rows and tab them all at once"? I just tried now and all the code is wiped out, replaced by a single space.
- mcbits 9y agoVisual Studio supports column-based selection using Alt+Shift with up/down arrows or the mouse to select a column, so you can add any number of spaces or any other text on all of the rows at once. I'd assume SSMS is the same, since it's based on VS. But that's still not a good reason to use spaces (especially 2 spaces) and say "FU" to programmers suffering from diplopia.
- kemitche 9y agoMost editors I've used will let you adjust indentation with the tab key in that situation. (The indentation still ends up as spaces, of course) I do this on a daily basis to adjust my indentation in json/yaml files.
- Wheaties466 9y agoMaybe it just means python programmers are paid more /s
- ceocoder 9y agoThat's it. I'm heading back home to get my bag of pitchforks, tar and feathers. See you back at the playground in an hour. I mean how are we to achieve world peace when we still have people using and being awarded for wasting precious bytes.
- JepZ 9y agoWell, pretty biased article. One example: "There were 28,657 survey respondents who provided an answer to tabs versus spaces and who considered themselves a professional developer (as opposed to a student or former programmer). Within this group, 40.7% use tabs and 41.8% use spaces" Without filtering to the 'professional developers', meaning overall, there are more tab users (32% vs. 28%).
- iainmerrick 9y agoIn case people aren't aware of it (I only found it recently), check out EditorConfig: http://editorconfig.org http://editorconfig.org It lets you check in an .editorconfig file that specifies whether your project uses spaces or tabs. And a bunch of editors and IDEs already have built-in support for it! Doesn't solve the holy wars, but it can sure help reduce the friction.
- jasonkostempski 9y agoI want all my characters to be the same width, except one.
- mattpavelle 9y agoPEP 8 specifically recommends using spaces for Python development. And the vast majority of software developers I know follow most of PEP 8 for Python development. https://www.python.org/dev/peps/pep-0008/#tabs-or-spaces https://www.python.org/dev/peps/pep-0008/#tabs-or-spaces I'm not a PHP guy (so I'm not sure about this) but it looks like PHP-FIG suggests it too... http://www.php-fig.org/psr/psr-2/ http://www.php-fig.org/psr/psr-2/ So are we really saying software developers who follow style guides earn more? That doesn't surprise me. Adhering to guidelines is a good way to work well on teams and thus become a more valuable team member.
- gcb0 9y agothe only right answer for "tabs vs space" question is "i put a modeline comment with the project accepted style on all files I touch. And that style guide better say tabs" :)
- greyfox 9y agoDoesnt using spaces to indent code waste a lot of time? I mean sure if you're only indenting once, it takes a few extra key presses to make 1 tab worth of space bar clicks but if your code gets really deep, then you're talking about wasting a lot of time hitting the space bar key per indent PER line...each subsequent line of indented code doubles the amount of space bar clicks... Am i missing something here? this sounds really dumb, as tabs make the most sense, and it appears use less memory as well.
- dbh937 9y agoMost IDEs can map the tab key to insert a certain number of spaces.
- zerocrates 9y agoPretty much any text editor beyond Notepad can, for that matter.
- deleted 9y ago[deleted]
- ajaimk 9y agoDoesn't Go & gofmt pretty much not allow for the use of spaces?
- deleted 9y ago[deleted]
- imron 9y agoOoh, ooh, now compare salaries of vi vs emacs users.
- lisper 9y agoAnd developers who use curly braces make more money than the ones who use parens :-(
- Tomis02 9y agoI think people got it backwards. Brace yourselves. You don't earn less money because you use tabs, but instead you use spaces because you earn more money. When I was working on my own small projects I was using tabs, or tabs combined with spaces, which yielded me not a lot of money. Once I started working for a big corporation, the coding standards mandated by the company meant I could only use spaces, because people couldn't be trusted to use a nice space/tab combination.
- spongeb00b 9y agoYeah, but which programmers are happier.
- nailer 9y agoAs someone who switched preferences: i used to hate tabs Then somebody asked me why. The answer was that Sun Solaris was a crappy operating system which would fail to boot if you used tabs in files like /etc/vfstab. For some odd reason, I carried around a weird bias about tabs rather than regarding Sun as being shitty. I worked somewhere where a bunch of folks preferred four spaces (because they came from Python), others two (because they came from JS). Use tabs, set your preferred tab size, boom, everyone gets along.
- sqeaky 9y agoIn the past ten years I have had 7 different development positions (and a few IT positions), I have never been at a place that used tabs. Ruby, C, C++, php, C#, SQL were the languages used and there positions were scattered across medical, Retail/Wholesale, Government/DoD. That someone with this many different types of experience can have accidentally avoided encountering whole class of people and their code, really puts into perspective how small the experience of any 1 person is.
- minimaxir 9y agoThe difference between the salaries of tab-users vs. space-users in David's report are too close to call, so I added bootstrapped 95% confidence intervals for the aggregate median salaries (which was easy to do since the code was open source): https://twitter.com/minimaxir/status/875386185350168577 https://twitter.com/minimaxir/status/875386185350168577 If the 95% confidence intervals for tabs and the 95% confidence intervals for spaces intersect at a point, there is a possibility for failing to reject the hypothesis that the difference between the two is nonzero at the alpha = 0.05 level. Since there is little overlap in most cases, the original hypothesis holds.
- solotronics 9y agoI reconfigured my linux to insert 4 spaces when I press tab.. am I doing it wrong by using the tab key for spaces?
- andrewfong 9y agoI blame whoever decided to make 8 spaces the default tab width on older systems. Yes, the beauty of tabs is that you can change the defaults and make one tab show up as whatever you want, but most people don't change the defaults. And 8 spaces is just too much more often than not. From the Wikipedia article (https://en.wikipedia.org/wiki/Tab_key https://en.wikipedia.org/wiki/Tab_key): > A common horizontal tab size of eight characters evolved, despite five characters being half an inch and the typical paragraph indentation of the time, because as a power of two it was easier to calculate in binary for the limited digital electronics available. Why someone decided to round up to 8 instead of down to a much more sensible 4 spaces is beyond me.
- minusSeven 9y agoCorrelation is not equal Causation. How in the hell are people taking this seriously? Also there is no reason given in the article to explain why it is so.
- kmicklas 9y agoThe real answer here is, text is a bad data structure.
- Twirrim 9y agoI used to work at a place where a huge argument occurred between staff, fighting over tabs vs spaces. It wasn't mentioned in the company code style. Eventually leadership got annoyed at the amount of time developers were wasting punting code reviews back and forth over this silly nonsense, let alone the loud altercations around the office. Who ever could have guessed that developers would be such an opinionated bunch? So they mandated spaces, and all was peaceful in the office. For about a day. Naively they put something along the lines of "spaces are to be used for indentation" in the code style document, but failed to specify how many spaces. So the new arguments started up amongst the office. 3 spaces or 4? Whoever could have guessed that a number of developers were actually belligerent types who would go out of their way to find something to argue about, and also stubborn? Such a rare trait in developers. So the arguments raged again, and eventually management decided they'd had enough. After all the fuss and grumbling over making an arbitrary decision on the tabs vs spaces debate, they decided this time to be democratic. They scheduled a big all-hands meeting for the developers, and tolerating no interruptions, outlined that a binding vote was going to be taken. The code style document would be updated to reflect the democratic consensus, and also warning that future arguments on any other points would result in verbal warnings, and potentially dismissal. With the software development managers standing at the front each to independently do the count, they asked all developers in favour of 3 spaces to raise their right hand, and all developers in favour of 4 spaces to raise their left. The count started, but soon the managers realised that with all the raised hands, they couldn't see the fours for the threes.
- irrational 9y agoI can't believe I read that all the way to the end. Well played.
- webmaven 9y agoKudos for the pun! A groaner for sure. ;-D BTW, I wonder how many raised both hands...
- guelo 9y agoThe fours for the threes? That's not funny at all. Not much of a payoff for such a long joke.
- gmarx 9y agoBeing honest, I don't know if I use tabs or spaces. My IDE mostly does it when I hit return and I reformat it every so often. Are you guys all programming in vi or notepad or something?
- iLemming 9y agoDevs who use Vim and Emacs make more money than those who use IDEs
- mmariani 9y agoAaa
- daveheq 9y agoSo how much per keypress are companies paying extra just for their developers to indent with spaces?
- pklausler 9y agoHeh, you kids with your spaces and tabs. Real old-schoolers think in terms of columns 1-5 for the label, 6 for the continuation marker, 7-72 for the code, and 73-80 for the change number.
- ianai 9y agoThis sounds like self selection bias. Only 12k of 28k respondents included their income. If you decrease a sample artificially then the resulting statistics are all suspect. (I stopped reading once I saw the attrition rate)
- mnarayan01 9y ago"Indent with tabs, align with spaces" (e.g. [1]) would be my strong preference in a perfect world. In addition to its "ethereal" benefits, some languages which support HEREDOCs have nice "tab ignoring" versions (e.g. <<-). That said, in the imperfect world we live in, I always use spaces. "Indent with tabs, align with spaces" is obviously not rocket science, but its just too opaque unless you have a strong code review process. [1]: https://dmitryfrank.com/articles/indent_with_tabs_align_with_spaces https://dmitryfrank.com/articles/indent_with_tabs_align_with...
- pcunite 9y agoThis is the danger of statistical analysis, where you determine that drinking from lead laden dinnerware means you're a part of high society. Indeed, it does means that.
- vortico 9y agoThis topic is the most tired debate ever. I'd rather talk about politics than indentation styles.
- qb45 9y agoWe need laws to settle this issue once and for all. Even disregarding how boring these Internet disputes are, we can no longer ignore the fact that all these coding style guides, whitespace normalization patches and python bugs caused by mixing tabs with spaces are costing our economy real money in lost engineer productivity and decreased reliability of software products. Programmers of all countries, unite!
- rosstex 9y agoObviously, it's because programmers who use spaces work four times as hard.
- oftenwrong 9y agoI wish editors handled indentation preferences intelligently. I prefer my indentations to appear 2-columns wide. I want to be able to open my editor, have everything appear as if it is 2-column-tab-indented while I work on it, but have it automatically written back to use the original indentation scheme of the file. Obviously there would be some ambiguous cases, which is acceptable. I use vim with vim-sleuth now. If anybody knows how I can achieve what I described above in vim, please tell me how.
- srett 9y agoIt's 2017, that wage gap is outrageous and discriminating! ...but at least with tabs everyone can adjust the gap size to their liking. :>
- Dove 9y agoThat doesn't seem like a mystery to me. The argument in favor of tabs boils down to "tab damage won't happen". The argument in favor of spaces boils down to "tab damage will happen". I know which of those two philosophies I would prefer to have in charge of important things.
- exabrial 9y agoTabs are for people that use soft wrap. Spaces are for people still using 80 column monitors.
- crpatino 9y agoAs long as we are sharing crazy theories... Boring corporations like boring spaces, and have to pay big, boring salaries to get any talent at all. On the other hand, cool code slingers may or may not prefer tabs out of personal idiosyncracies, but as long as all of them get shortchanged by the VCs and/or startup founders...
- tmsldd 9y agoWell, in a team with a bunch of programmers each with their own preferences is kind of tedious to talk and enforce a single formatting standard... So, I just make sure a small script runs #astyle -A2SKnjfUHpk1cn -R .h .cpp before their commits .. and it made my diff look much nicer.. I don't really discuss tabs or spaces anymore.. I never thought that such styling would really matter much ... I wonder how much a developer using a beautifier earns in average.. Anyhow, statistics sometimes brings up some weird conclusions.
- bdamm 9y agoThe number of respondents who included salary is almost half of the overall sample size. So it could just be that developers who use tabs make more and are less likely to hand out their salary.
- jorgeleo 9y agoRepeat after me: Correlation does not imply causation Correlation does not imply causation Correlation does not imply causation
- pasbesoin 9y agoFinally, a clear cut financial answer to this schism! You tabbers are costing me money!
- TACIXAT 9y agoI just like to force my preferences on other people, so I use spaces. You like 8 width tabs? Too bad, you get 4 spaces.
- tripzilch 9y agoExactly. I'd use tabs if I wanted other people to be able to control what my code looks like. Ugh. So I use spaces.
- aiyodev 9y agoAlternative headline: Developers who use spaces more likely to lie about their income
- justforFranz 9y agoWOW! THANKS DEEP LEARNING!
- om2 9y agoIt looks like they didn't correct for multiple comparisons. Given the number of questions on the survey, there was bound to be at least one surprising correlation that looks significant without correction. (Am I wrong? I would hope a Data Scientist would know a basic thing like this, but I don't know R so I can't tell for sure from their code.)
- YZF 9y agoOn IBM mainframe terminals (327X) tabs were used for moving between entry fields. So it is/was basically impossible to use tabs in text for formatting. I'm not even sure if EBCDIC has tabs? I don't really care that much, Go says tabs so whatever. But spaces have the benefit (or drawback to some) of rendering exactly the same way for everyone (assuming fixed width fonts, does anyone code with proportional fonts?). Also I've always got two thumbs on the space bar. And it's much bigger than the tab key. So settled then?
- willand31 9y agoThis is because people who use spaces have to use Stack Overflow more often, so there were more developers who use spaces when SO did their 2017 survey.
- mcculley 9y agoThe tab character, ASCII code 9, should not appear in source code. What happens when you press the tab key to make the proper number of spaces appear is between you and your editor.
- tzury 9y agoSoftware developer must come to a flexible mindset in order to succeed. Use whatever's right for you! And, if you come to a workplace where there are "rules" about that, try to obey them. Never take part in any of those wars of Tabs vs Spaces, VIM vs Emacs vs Sublime vs whatever. Spend time on writing more tests instead!
- Sandman 9y agoWhat I learned from the last chart is that Clojure devs earn the most money regardless of whether they use spaces or tabs. Being an Elixir programmer also pays off nicely but for heaven's sake don't use tabs unless you want to earn only half as much as you could if you used spaces.
- tracker1 9y agopackage.json ... "format": "prettier-eslint --write --trailing-comma es5 --single-quote true \"_src/**/*.js\"", "lint": "eslint \"_src/**/*.js\"", "precommit": "npm run format && npm run lint" ... problem solved...
- eloone 9y agoI just find this thread funny http://machinesaredigging.com/2017/06/15/tab-vs-space-users-storm/ http://machinesaredigging.com/2017/06/15/tab-vs-space-users-...
- Nomentatus 9y agoI'm guessing developers with more relatives on the Autism spectrum prefer spaces to get exactly the look they like, and are better (more picayune) programmers.
- asab 9y agoA metalevel flame war on spaces vs tabs..
- collyw 9y agoPay should be deducted for using tabs! :)
- iamNumber4 9y agoNot the be the voice of reason in a sea of crazy; but this is just stupid. correlation != causation - making an assumption on pay rate vs who uses tabs and who uses spaces makes my brain hurt thinking about what moron approved this article. Set the tab stop to what ever your project/team style guides requires. Tabs to spaces is just plain stupid. Why on earth would you ignore the x09 character, a single character that exists for this exact reason, and replace it with multiple x20 in the file. Just set your tab stop to what you like to look at, be it 2, 4, or 42 characters. By the way the default is 4 characters for most editors/IDE's. vim - :set tabstop=4 vscode - to your settings add the following. "editor.tabSize": 4 Everyone else's comments are moot! Debate over.
- tripzilch 9y ago> Put another way, using spaces instead of tabs was worth as much as an extra 2.4 years of experience. It's because they get more keystrokes in! Depending on your tab/indent settings you might get as much as 4x or even 8x the XP by using spaces.
- tripzilch 9y agoThe real question is, if correlation does not imply causation, then what does?
- tripzilch 9y agoI strictly use spaces for indentation (and alignment never) but I don't hate on tabs, they have a right to live in my code. So I like to sometimes place a sprinkle of 2 or 3 tabs at the end of lines where no one will notice them probably anyway. I think it's the best of both worlds, really.
- tripzilch 9y agoOf course you're gonna make less if you let other people control what your code looks like.
- kaonashi 9y agoAnything more than two spaces is a waste of precious screen real-estate.
- nikolay 9y agoA tab and a space have different semantics. Don't dumb things down, please! In Bash, for example, you need tabs for indented heredocs to avoid redundant leading spaces, which could be problematic in some cases - that's why I always use tabs with Bash.
- z3t4 9y agoCould be those using spaces all live in Silicon Valley.
- tempodox 9y agoI use spaces so I can make more money.