3 days ago - The contents of the snippet should be indented below using the tab> key (rather than with spaces). Variables can be defined using the form. Universal Keygen Generator 2018 Cracked For [Mac + Win] Universal Keygen Generator Online lets you create the serial numbers or product keys for many software.you can certainly create a serial key for any version and some other computer software. It’s the ideal software for novices and professionals.
Do you use tabs or spaces for code indentation? This is a bit of a among software developers; one that’s been the subject of many debates and in-jokes.
I use spaces, but I never thought it was particularly important. But today we’re behind the, and some analysis suggests this choice matters more than I expected. Spaces make more money than tabs 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 (with 17.5% using both). Of them, 12,426 also provided their salary. Analyzing the data leads us to an interesting conclusion.
Coders who use spaces for indentation make more money than ones who use tabs, even if they have the same amount of experience: Indeed, the median developer who uses spaces had a salary of $59,140, while the median tabs developer had a salary of $43,750. (Note that all the results were converted into US dollars from each respondent’s currency).
Developers who responded “Both” were generally indistinguishable from ones who answered “Tabs”: I’ll leave them out of many of the remaining analyses. This is an amusing result, but of course it’s not conclusive by itself. When I first discovered this effect, I assumed that it was confounded by a factor such as country or programming language. For example, it’s conceivable that developers in low GDP-per-capita countries could be more likely to use tabs, and therefore such developers tend to have lower salaries on average. We could examine this by considering whether the effect occurs within each country, for several of the countries that had the most survey respondents. The effect is smaller in Europe and especially large in India, but it does appear within each country, suggesting this isn’t the sole confounding factor.
As another hypothesis, often use different indentation (e.g. With more likely to use spaces and mobile developers more likely to use tabs), often because they use different editors and languages. The Developer Survey asked both about what programming languages each respondent uses (Python, Javascript, etc) and what “type” of developer they are (, embedded developer, etc). Did we see the same tabs/spaces gap within each of these groups?
Yes, the effect existed within every subgroup of developers. (This gave a similar result even when filtering for developers only in a specific country, or for ones with a specific range of experience). Note that respondents could select multiple languages, so each of these groups are overlapping to some degree.
I did several other visual examinations of possible confounding factors (such as level of education or company size), and found basically the same results: spaces beat tabs within every group. Now that the is available, I encourage other statisticians to check other confounders themselves. Estimating the effect If we control for all of the factors that we suspect could affect salary, how much effect does the choice of tabs/spaces have? To answer this, I fit a linear regression, predicting salary based on the following factors. Tabs vs spaces. Country.
Years of programming experience. Developer type and language (for the 49 responses with at least 200 “yes” answers). Level of formal education (e.g. Bachelor’s, master’s, doctorate). Whether they contribute to open source.
Whether they program as a hobby. Company size The model estimated that using spaces instead of tabs is associated with an 8.6% higher salary (confidence interval (6%, 10.4%), p-value. Did anyone check the company pay scale v documented coding styles? Anecdotally, larger and/or older companies are more likely to have a documented and enforced coding style, and most of those I’ve seen use spaces. They do this for the obvious reason of consistency (ie: lack of flexibility and variation) which tends to be more important in such places. I think it’s interesting in that personal preference (or so I’ve seen) tends to be tabs. In situations where the coder is considerably less concerned with other coders (ie: self-centered).
I’m wiling to bet (not a lot, though) that those who have changed from one to the other have changed between those environments. Get high paying job at “BigCo”, switch to spaces and drink kool-aid™.
Join a small start-up or do your own coding, switch to tabs and drink too much espresso (“office” being a cafe). Just a thought (and possibly not a good one) based 45 years of ops & dev. With all the different languages I work with, I use spaces because they’re consistent across all editors. Tabs are not. When you open an editor and see a mixture of tabs and spaces, all the code can be out of whack.
Tabbed spacing also wreaks havoc when the editor does code clean-up or comparison for code reviews. Using a specific number of space characters represents consistency and intentionality, which I suspect reveals more about the personality of the person doing the work. Tabs might be faster, but they’re sloppy. You don’t know what tools your other team-mates will use five years down the road when they have to read your code. All professionals know that you cannot write source code that contains tab symbols, because such code will always turn into an unreadable mess whenever exported (for example when posted on SO).
Therefore all professionals tend to know that you configure your text editor to insert spaces upon tab, which tends to be the default setting in almost every IDE out there. Then you can indent by pressing the spacebar or by pressing the tab key and it doesn’t matter. Assuming you know these things, the question “tabs or spaces” doesn’t even make any sense.
Not really, because “no true Scotsman” assumes that the arguments are subjective. “Professional programmer” is a level of skill acquired through experience. Everyone who is experienced have exported code and viewed it in a different editor.
This is not subjective – of course every programmer will eventually end up using different editors. Upon doing so, anyone with eyes will notice that code indented with tabs turns into a horrible mess. This is not subjective, it is a simple fact, since different editors have different tab settings. Upon noticing this, people who indent by using the tab key eventually starts configuring their editors to insert spaces.
Programmers who have interacted with other programmers will know from experience that this is a phase that most programmers go through as part of learning. This leaves us with 3 categories: inexperienced programmers who indent with tab key to insert tab symbols, experienced programmers who indent with tab key to insert spaces, and programmers (no matter level of experience) who indent with spacebar to insert spaces. your IDE/text editor can translate these alignment issues transparently. Spaces always require you to use multiple arrow key presses to move through them. Tabs are a single key press. This isn’t important if you are a vim god I guess though. Or when doing work collaboratively, the last thing you want to be doing is changing the indentation size of spaces (causes chaos with alignment cases), yet tabs let you do this visually without affecting anything else.
Just pointing out that the translation is not quite transparent. There are still differences. I’m not talking about the beginning of the line, though. I’m talking about in the middle of the lines.
For example, aligning assignments or dictionaries into columns, or a related-but-not-abstractable series of function calls or math statements, to make it far easier to just scan down. If people could easily stick to Pluckerpluck’s tabs-for-indentation/spaces-for-alignment way of doing it there wouldn’t be much of an issue. But inevitably, tab-users will use tabs to do those alignments, and that’s when it quickly gets all out of whack. I prefer tabs for a variety of reasons, but there is ONE aspect I dislike which is aligning statements.
Normally I would just say that you should use tabs for indentation, spaces for alignment. The problem is that people suck though and screw this up ALL THE TIME. If people just used tabs for indentations and spaces for alignment it would all work, but alas, that’s not the world we live in. My solution is to newline the stuff I want to align. Took a while to get used to, but I think it’s optimum: if (longComplexThing && otherComplexThing && finalComplexThing) becomes if ( longComplexThing && otherComplexThing && finalComplexThing) Lets me use the glorious tabs but still ensure code compatibility with all the crazy people who can’t follow a set of coding guidelines. This seems like a good hypothesis.
To pick on marketing firms and programmers who work for them, I would have to guess these are the low bar jobs from my experience in working in many different organizations in terms of rigor. The enforcement of structure is much more relaxed and code reviews are practically unheard of compared with a software shops that typically pay more. Code shops tend to use spaces over tabs as it tends to work better in command line editors such as vim and then look good on github as well. Try having tabs on github. No, Americans are more likely to lie about how much they earn.
Cela explique tout. Surveys are notorious for having people answer what they think should be the right answer. That means that a bunch of responses will be conditioned on the fact that Richard from ‘Silicon valley’ uses one or the other (I forget which – I’m a Guilfoyle I do things that matter, so I have no time for trivial nonsense he said, typing a comment on the internet – in my own defense, it’s 12:30 a.m. Here and I am having a glass of wine having almost finished a project report that was due a week ago). People with nothing better to do need false dichotomies so that they can pick a side and belong. It’s been that way since the Blues vs Greens in Byzantium, and probably before.
Anyone who wants to belong to either side of a pointless dichotomy needs to die in a fire. The very recent video “The Post JavaScript Apocolypse” on youtube features Douglas Crockford who says “If you can use one and do without the other, discard the other.”. We cannot do without spaces but we can do without tabs. This clear reasoning removes ambiguity and is a good practice to use this thought in code for all types of things that cause arguments but are not important.
Its possible the slight nudge in one direction or the other may correlate with the small% of people that actually think this way where as it may only be a preference in the vast majority of cases as it is in mine. I’m sure it’s a nice-sounding aphorism, but from a language design standpoint that makes.no sense. With the same reasoning you could eliminate lots of operators and formats from languages, making the remaining operators have more (ambiguous, context-dependent) meanings. This is obviously not a desirable thing.
It’s no different with spaces vs. Tabs — they have different semantic meaning, for different purposes.Could. you use one to replace the other? Sure, but you’d lose the unambiguous semantic meaning, which is a bad thing. I’m a tabs person, mostly because it’s simply the right choice. Firstly, the file size will be smaller. That has to be the preferred choice.
Who would choose to have their files be larger? Secondly, it gives you total flexibility in terms of choosing how big a tab is in your editor. If you’re weird and prefer a tab to indent by 8, then that’s your choice. Those who have incredibly nested logic can use 1 or 2 characters. Personally I always choose 4. The thing is, you choose how you want to see it. If the file is using spaces, you don’t get any choice.
The indentation will look the same always. If you want to ensure that people always see it the same, you simply specify in your coding standards that people should always set their indentation level in their editor to 4. I’d love to hear any real advantages to using spaces, other than the salary increase ?. By column width, I meant the total document width.
(I didn’t write clearly, sorry). If a document has a 100 column max width, and one person uses two space tabs, and another uses four space tabs, and another uses eight, and they all use a 100 character width, then when one person views the work done by another, then the formatting will look wrong. The 8-char equivalent indent will look short on the 2-char equivalent user’s screen, having randomly short line lengths. The 2-char equivalent user’s code will overflow the 100 line length limit on the 8-person view.
Alignments (say, for simple ascii images) are going to be off too. It’s going to lead to a code base that just looks wrong and messy. I don’t think tab/spaces matters for your own code, but if you’re in an environment where many people edit the same code, then using spaces with a fixed indent makes it easier to keep the code clean looking. What you’re saying doesn’t really make sense to me unless you’re talking about in-line alignment; Tabs (actual tabs) are only for indentation, so the width of a tab doesn’t matter.
You wouldn’t align the insides (and technically leading spacing, after indentation) of ASCII art with tabs. It wouldn’t “look wrong” anywhere. Now, yes, you can exceed a column limit but unless you set it to something insane line 10 or 20 that’s hardly an issue (unless you’re the type of person to be totally inflexible about that column limit, which will give you other issues anyway).
Well wouldn’t it also be a pretty douche thing to do to block tabs? And aren’t coding standards supposed to enforce a consistent style (see: )? I prefer tabs (that’s just my world, but I can work with spaces if needed). But what happens when I’m walking through someone else’s code and they use spaces, but for some reason didn’t always use a 4 space indent.
Their code could look messy and take longer to walk through. Or worse yet, consider the developer who doesn’t use indentation at ALL and try to walk through their code to figure out what’s going on (I’ve personally come across both style of coders, my boss falls into the latter group).
Code Standards and Coding Style DOES matter, even if it’s only you working on the code. Stepping off my soapbox now. The main reason is that you quite often can’t see tabs. If you type “foobarbaz”, it may appear as “foobar baz” or “foobar baz” or something in-between, depending on your tab setting.
Thus, it can be impossible to distinguish between words separated with a tab and words separated with a single space. Though, I acknowledge that some modern editors will display a symbol for a tab, which solves that problem. There’s also the problem that, as programmers, we sometimes like to line stuff up. Due to the nature of code, lining things up with one tab setting may look awful in any other tab setting, thus making the code harder to read for some, easier for others. You can make the argument you should never attempt to neatly line up code, but there are sometimes good reasons to do so.
Can you work around all these issues with tabs, or simply live with these edge cases? Yeah, probably. The argument for spaces is that these become non-problems that don’t need to be worked around. It’s One Less Thing to worry about.
The correct answer is tabs for indentation, spaces for alignment, and alignment is generally to be discouraged. The problem with spaces for indentation has exactly the same foundation as people are complaining about for tab width: one developer wants to use 2 spaces per indent level, the next wants to use 4. With spaces this problem is worse than with tabs because you can’t correct for it properly with local settings. You end up with the first indent (from dev A’s revision #1) at column 2 and the second indent (from dev B’s revision #2) at column 6. We can certainly agree that if everyone always uses tabs consistently and everyone always uses the same editor configured in the same way, then tabs will work fine, and even allow people to use different indentation widths. Now, the problem is that those two requirements don’t hold in practice E.g. You need to look at code made by others, and those other people need to edit your code.
Once you have a mixture of tabs and spaces, the code will start looking weird for someone, not necessarily you. My favourite example is when you look at code written by tab fans who configure their tab width to say 4 spaces. It is often the case that the code isn’t actually consistentely formatted with tabs, so with a default 8 space tab that most editors will use (or view source in the browser for that matter), it looks garbled. I’m afraid it’s a real and annoying problem. I used to use tabs myself. I’m aware you probably won’t believe me until you’ve experienced it yourself.
So your argument isn’t about spaces nor tabs, it’s about giving up and using spaces because then you don’t need to worry about it. I mean really, that argument could be applied anywhere where there is any sort of debate on how or what to use — package managers, specific packages, etc. But you can standardize either way, and need to make sure people follow the standard, otherwise you’ll experience breakage no matter which debate it is. Or am I missing something?
To be clear, I.have. experienced this, and not just in the tabs VS spaces scenario. I’m sorry if my opening comment offended you, I was trying to be joking, but I apologize if it came across condescending.
Now, to your question: The thing is, if everyone uses only spaces or only spaces and 8-space tabs, it mostly works everywhere because all editors and viewers understand spaces (well, HTML interpreters ignore them unless in pre tag, but) and many viewers also handle 8-space tabs okayish. Now someone figured out that you can use tabs as a sort of system, just like when tabulating data. The benefit is it enables people to configure their favourite tab width. And some people do that, and THEN we have the problem because suddenly we have non-standard tabs so the file is going to look different to everyone else than the author and people with editors configured like the author. Worse, the code can end up being inconsistent, unnoticed, and then it can garble up completely for other people. The only way to fight that is to start being careful about the tabs.
And right there is the point where the slight benefit of tabs just isn’t worth it compared to the downsides. You seem to think that you can standardize everyone to use tabs. And as long as you can’t, you can’t have custom tab widths without causing trouble for other people, and if you’re going to use 8-space tabs, there really isn’t any benefit at all if you’re using an editor more advanced than notepad. And there are still downsides. My life was simpler when I decided jwz was right and I made my editor not insert 8-space tabs, navigation became much more intuitive.
Now this is an argument, mostly against inserting non-standard spacing in text that other people may have to look at. ? I don’t think my previous comment was an argument, really, I was just explaining what I’ve come to see. The fact that people don’t have the same indentation is irrelevant though, unless you’re using tabs.everywhere. on a line rather than sticking to Tabs for Indentation, Spaces for Alignment (TISA) which seems to be a distinction people would rather just throw out and simplify. Certainly, though, no matter where you stand on it if you’ve got people mixing it up, which you probably always will unless you employ what I’ve stated elsewhere makes the whole debate moot, it’s going to make a mess either way. If you use the tab.key. and it actually inserts 2, 4, or 8 space.characters.
into the code, then you do’t really use tabs, you use spaces. However, if I use actual tab.characters. it doesn’t matter if my editor spaces tabbed content at 2, 4, or 8 spaces, when someone else on the team opens it, his or her editor will show it with his or her preferred amount of space. This is the beauty of tabs. I might like my code super-indented and so my tabs look huge, but someone else might prefer really small indents to take up less horizontal space, and that’s what he or she sees. Additionally, if someone else prefers spaces, he or she can just tell the editor “change every tab to X spaces” (X being whatever number of spaces he or she prefers) whereas if I use 4 spaces and someone else gets my code and prefers 2, they have to first figure out how many spaces I use for each level, and then run some kind of replace to get things to look how they want it, which is more of a pain.
The main advantage of using spaces is that they always display the same way. I know that those who praise tabs use the same exact argument as a disadvantage (or rather the point that tab can be displayed according to ones preference) but this argument is invalid. There is plenty of places in which such a setting cannot be set. Code nowadays is being read end edited in many different ways, not only with an local instance of editor/IDE installed on a developer machine. Let’s take GitHub as example. GitHub has quite narrow, not configurable code view. Tab is displayed as 8 spaces.
This means a lot of code is being ‘soft-wrapped’ and split between lines. Especially inconvenient for side-by-side view of a diff. Yes but readability on a screen that can be resized at will and has in infinite line length ( and also adjust tab spacing automatically) is a very different consideration then readability on a printed page that has a fixed with of 80 characters before it wraps, will be printed in12 pt font and will treat all tabs as representing a specific amount of space and the amount differs on different printing devices etc. Readability is important on both it is just when you have a screen you can adjust at will and software that fixes the tabs so the line up automatically running, tabs aren’t a problem. They become more of a concern on printing devices especially ones that don’t support soft tabs as treat each tab as fixed amount of space. The thing that’s difficult about this explanation is that level of experience tracks pretty consistently. In general, older employees do have a higher salary floor.
However, developers with the same level of experience most likely trained for it around the same time, so they very likely learned the same habits. A 35-year-old with 5 years of experience probably started learning around the same time that a 25-year-old with the same experience did, so they’re more likely to learn the same kinds of habits. I mean it’s possible that some people set aside their development careers for a decade, but I doubt that is a large enough population to explain the results. If age was a primary factor in the pay gap, I would expect that at the very least, the older languages would stand out in the regression chart. I had a coworker who did essentially this. He also had incredibly long (sometimes 80+ characters!!) names for everything (classes, methods, variables.) Here’s a made-up example (C): ProcConnectionHandle ProductNameInstrumentSystem::createNewProcConnectionmaybefromProcConnectionPool( ProcConnectionPool& procconnectionpool, ProcConnectionStatus procconnectionstatusinitial, MyReadWriteMutexLock myreadwritemutexlockforprocconnectionpool, ProcConnectionId procconnectionid, ProcConnectionAddressIpv4 procconnectionaddressipv4, ProcConnectionPortNumber procconnectionportnumber). We just figured it out!!!!
People who respond Spaces are those who were smart enough to realize that ‘Tabs’ doesn’t mean “I use the tab key” but rather “I use the tab character”. ‘Tab’ users is ‘Uses Tab Character’ + ‘Uses Tab Key but Space Character, but doesn’t understand the distinction’. My theory is that ‘Uses Tab Character’ has roughly the same salary as ‘Uses Space Character’ but ‘Uses Tab Key and Space Character, but doesn’t understand the distinction’ makes substantially less as to drag down the average. I took a quick look at the data (30 minutes) and found the following insights regarding Tabs vs. There are three obvious hypotheses about the evolution of a technical practice when an older generation doesn’t agree with a younger generation.
1) Dinosaur: the old way is going to die off when those dinosaurs go extinct 2) Child: the young way is going to die off when those children grow up and go to war 3) Idealist: the issue will be decided through humble give and take and rational tradeoff analyses I tried to frame this in terms of insult throwing. I hit the tab key and it makes spaces appear in Emacs. This is the only true way. /sarcasm See the links on this JWZ trackback. Key quote: “My opinion is that the best way to solve the technical issues is to mandate that the ASCII #9 TAB character never appear in disk files: program your editor to expand TABs to an appropriate number of spaces before writing the lines to disk.”. This is a brilliant study idea, but you should modify your result to only apply to the sampled. This is an observational study, so you can’t claim causation.
Visual analysis of confounding variables isn’t enough to claim causation. That being said, you.could. do some random sampling and randomly assign treatment groups if you raise a bunch of babies, randomly indoctrinating them from age 3 to either tabs or spaces, and tracking their salaries over time (with some mechanism to handle serial effects). Anyway, yeah, what xkcd said. But still, brilliant idea ?. It is my opinion that the title is the opinion.
The data sample is flawed in that his sample was chosen in a way that has a misleading trend that fits the title of the article to make it look like the correlation is the cause, when the statistic says more about his sampling techniques than it does about who gets paid more. For example, only people who knew about this survey or visited a certain site or subset of sites were surveyed. To illustrate: “Just because most people from a certain state might be asshats doesn’t mean that living there makes you that way.” OP, have a frickin snack. Er, what sampling techniques are you referring to, exactly?
The sample is the set of people who took the Stack Overflow survey and answered that question. So obviously a self self-selecting sample, but they did their best to advertise the survey and encourage people to take it, so it’s in no way clear to me that there was a better technique available or that there’s any obvious reason for the sample to over-represent high-earning space users and low-earning tab users. Also, the title is still not an opinion; it’s the conclusion drawn from the (publicly available) data. Here is a simple explanation: Younger programmers who are just getting started (say, with less than 5 years of experience) do not know the value of readable code (and thus use the tab character to push code farther to the right than spaces), and they do not know all the bells and whistles of their IDE or text editor, so they don’t know that the tab key can be mapped to add spaces. More experienced programmers: 1.
Understand the value of compressing more code into horizontal width (for easier reading) AND 2. Read StackoverFlow/Usenet and understand that other experienced programmers use spaces AND 3. Know how to change the settings of their IDE to emit spaces when the tab key is pressed.
Your first point doesn’t make any sense. Tabs don’t really make code less readable since you can configure your editor or IDE to represent tabs with any amount of space (or any number of spaces) you wish. This also makes tabs more versatile, since it’s more difficult taking code with spaces for indentations and modifying it to look how you want (one tab is always equal to one “level” of indentation, whereas different developers use different numbers of spaces for “levels” of indentation). So while anyone who prefers spaces to tabs can take code with tabs and instantly convert it to spaces, or make the tab distance equal to two (or four, or whatever) spaces for readability with a single keypress, someone who prefers two spaces per indent level will have a harder time making code with four spaces per indent level readable to him or her.
I’ve been a developer for 25 years and I use tabs, and I know how to change my editors and IDEs to emit spaces when I press the tab key (and also just to set my tab width so I can use less horizontal space without futzing with spaces), so your second and third points don’t really make sense either. He’s saying that he used to have his tab key insert the tab character. He liked that because you can configure how many spaces your IDE renders a TAB as. If you want tabs to look like 4 spaces, you can set that.
If 2, you can set that as well. The IDE will render the tab how you wish, but it’s still a tab character in the file. He discovered that was a problem in files that mixed tabs and spaces because how your IDE renders tabs might differ from how many spaces someone inserted.
If everybody uses spaces and not tab characters, the file will render the same for everyone. I’m sure the OP uses the tab key to insert his space-character indents. Perhaps we could, instead, convince SO to hire more/better developers instead of wasting money on data scientists who apparently have little enough useful work to do that they have quite a bit of time to waste? And yes, I’m aware that SO have job ads out, so they’re trying to hire developers. Maybe the problem is in the supply chain: too many people being trained as data scientists, and too few as developers (though in fairness, the data scientists I’ve met don’t strike me as people who’d be great developers if they had different training).
Mah gawd you guys, who cares? Its a big company, you don’t complain about random studies that Google does, do you? While some studies may seem pointless, one could argue that all minute studies are pointless given no context, yet here we are talking to each other through the internet, having never met in real life, because of what were arguably at the time an enormous quantity of “pointless studies” done throughout history to sufficiently advance technology to the point that we can do exactly this. If we put this kind of scrutiny on the SO data scientists, imagine what kind of scrutiny we could put on what YOU do all day, such as. Oh, I don’t know, read the “pointless studies” that you’re complaining about, and then comment on replies of comments, perhaps?
As a vi user myself since the early 80s, I’m not really seeing that happening (though I’d be quite interested to be proved wrong). I’ll be the first to admit that Emacs has it all over vim when it comes to power, but I don’t use vim because it’s a powerful editor: I use it because it makes life really easy when doing basic text editing through features such as keeping my fingers on the home row. Everything else happens in another window at a shell prompt. When I want to make editing more efficient, I fix my language or write a new one, which has the added advantage of making reading, as well as editing, more efficient.
When I need to make anything else more efficient, I update my command-line programs. Don’t take this as me trying to dis Emacs or your particular editor/IDE/working method/whatever of choice here.
It’s not that I don’t do that (I think that Textmate is an abomination that should be wiped off the earth with all of it’s users, for example), but I do recognise that what experienced people do in Emacs-land can be just as productive as my way of working. I just want to point out that experienced vim users are using an entire ecosystem of tools, just not vim, do pointing out that vim doesn’t do X doesn’t mean that vim users can’t or don’t do X. There’s no reason everything you do has to be done by you editor. People who respond ‘Spaces’ are those who were able to differentiate between “I use the tab key” and “I use the tab character”. ‘Tabs’ and ‘Both’ users include: 1. Developers who cannot understand the distinction between ‘Uses Tab Character’ and ‘Uses Tab Key but Space Character’ 2.
Developers who cannot extrapolate full solutions from limited information. Developers who understand the distinction but don’t care about consistency.
Developers who don’t/can’t change the IDE default settings. My theory is that ‘Uses Tab Character’ has roughly the same salary as ‘Uses Space Character’ but those who doesn’t understand the distinction make substantially less as to drag down the average for ‘Tabs’ and ‘Both’. Wow, thank you for your cumpliment ? now I feel I am myself relatively young hehehe (I am 30 years old) ok so you are talking about 30 year old IDEs that can’t automatically transform a tab into spaces I guess if I were a programmer back then, I would most likely only use tabs and ask myself why would anybody use spaces instead because you would need to hit the space bar 4 times while the tab does it in one But we are talking about the present and in the present, nobody is required to hit the spacebar 4 times for each indentation level. Even if you are working with such an old language because you can use other editors instead of those IDEs. I’m older, but not quite that much older than you (I deny the existence of the looming 40). Contrary to popular belief, you can learn about obsolete things. ? I suppose I do have an “advantage” in that area because I’m from a rural area.
My high school was teaching us to use computers on green screen terminals in the late 90s. My first year of college, I coded for a Fortran77 compiler, was assigned a 286 frankencomputer for a literary club I joined (as the only technical person in the club, I got saddled with making it work), logged into yet another green screen terminal for submitting projects in, ironically, my C class (The Fortran class was submitted on disk, but was compiled through DOS command line on Windows 95 computers), and got lectures on file space limitations that were prefaced by an explanation of old technology. In most of my classes, there were then-modern IDE options available, but the free versions often weren’t compatible with our archaic compilers. I also worked as an adjunct professor for a while, and as part of the IT staff for a college, and with IT professors from 5 other universities.
The problem is the university’s internal cycles, and how long it takes to get a degree and teach a professor. A study I read while looking into it while arguing with a professor over it is where I’m getting the specific “30 year” figure, so my 30 years is itself almost 20 years out of date. I do still keep in touch with universities, though, and it’s not getting a lot better.
In my state, I suspect it’s going to get worse now that our governor has decided to gut the education system in favor of his ego. As for the present, no one is sitting over your shoulder telling you to change your typing habits. If you picked up the habit of rapidspacing in college, there’s no impetus to change it. I think the survey could have been poorly developed. I didn’t have the chance to answer it, so I can’t really be certain of this, but before asking if people use tabs or spaces, you need to clarify that you are talking about the tab character against 2 or 4 space characters in indentation.
Those in the beginning of their careers might not understand or even know that the IDE can change the tab key output to spaces, which could explain the lower salary. Also, people with longer experience who still don’t get this, might be the kind of people who are not curious enough to enter the IDE configuration and test possibilities.
They tend to only do what they are told. My theory is that creative people tend to earn more and changing the default configurations could have correlation in this data.
It doesn’t matter if it has only been treated as a factor recently. It is treated as a factor in the present and that is what matters for a survey about the present.
In any case, neither of us have answered the survey, which means we can’t really know what they meant by “tabs or spaces”. I just think that a lot more people would use the tab key instead of the space key for indentation and not only 40% and that’s why I think that or they were specifically talking about the character or they didn’t make it clear. Some people must do a lot of their work on a remote server, and use vim, emacs, or similar over the terminal. Others are using less popular languages for which the best working environment is vim or emacs. There may be no IDE, or it may be under developed. Eventually these languages may get high quality IDE support, but until then For other people, they need to pick up a project in a language they’ve not used for many years, make improvements fast, and move on to another project in other language. Sometimes it may be easier and faster for them to use vim/emacs/similar than it is to deal with the unfamiliarity and peculiarities of the IDE which one conventionally uses for that kind of project.
Related – when I first started creating Android apps, I was much faster in vim than I was in eclipse. I forced myself to learn eclipse (and now intelliJ). But even today – even though I’m very familiar w/ android studio, and use the vim plugin, there are still occasionally special cases where its still better for me to switch to true vim. As awesome as android studio is, there are things it just can’t do efficiently, or at all.
Also, you can consider the long term benefit of the time invested mastering various tools. I’ve gotten competent at several IDEs only to have them fall out of favor, such as eclipse. Vim/emacs are always there. Languages and IDEs come in and out of fashion, and sometimes evolve quickly. If you are looking at “lifetime skills” which are empowering for decades mastering vim and/or emacs is well worth the effort.
I’d like to suggest initial coding style education as the compounding variable. Teachers who emphasize good coding style are more likely to emphasize the use of particular spacing (and thus passively suggest using spaces instead of tabs) than teachers who do not emphasize good coding style. Students who had the former teachers will generally have better style, apart from space usage, than students who had the latter teachers. Also, students who had the former teachers are more likely to use spaces than students who had the latter teachers.
Students with better style (regardless of space usage) will earn higher salaries, so a correlation between space usage and salary will appear. Personally, good coding style was a major emphasis in my first computer science (Java) class. We were taught to use four spaces to indent each line.
I started off using spaces, but later switched to tabs. If I need to submit code with spaces, I will write the code with tabs and then Replace All tabs with four (or two or however many) space characters (and increase the file size), or configure my IDE to do this automatically. Other than space usage, I am very persistent on style and will fix the style of code I receive before I read or compile it. Because of my positive style habits, I anticipate that I will be in the “Spaces” category of developers as far as salary goes. Look at hiring habits, though.
Very few companies or even startups use code samples from applicant’s own IDE. Most give practical tests or carelessly don’t check code at all.
Despite some idealism about style consistency, most employers just don’t care as long as it meets certain readability requirements such as using the right casing and not exceeding a threshold in a calculated cyclomatic complexity. You might be right that it is based on the institution, though. Graduates from well recognized universities or those with good placement programs have a better average salary than others, regardless of the quality of the particular program. If we apply this to IT, some particular program in the past could have spread the “spaces” style mistake to well-placed people, resulting in a lot of well-paid coders who don’t know where the tab key is. The position of Go in the language graph raises some questions: +$20k/yr for Go devs who use only spaces!? Code in Go is autoformatted with tabs by convention, and a large majority of open-source golang code is autoformatted with tabs this way.
Either there’s a big underground community of highly-paid go devs secretly writing their code with spaces, or — way more likely in my opinion — the data is off and go devs who should have answered “Both” said “Spaces” because that’s what they prefer or what they use in other languages where there’s actually a choice to be made. I don’t think so. IME, they mandate it because furniture police. They could as easily mandate using tabs exclusively for indent – a style checker can warn of mixes on commit. More often than not, very senior developers prefer tabs, not because it adds any stylistic or technical value, not at all because it saves a few bytes on disk, but simply because it makes sense. In a given editor, a tab has always exactly the same width. It happens to me repeatedly that upon code reorganization the IDE mixes up indentation, and unless I want my whole file reformatted (like all javadoc comments messed up) I need to fix this manually.
What’s more, a wise man once said that it isn’t typing that slows you down, when coding. Using spaces for indentation is simply a dogma that has caught on among enterprise developers. But it doesn’t really have any advantage over using tabs. Of course, mixing tabs and spaces is plain stupid, but if tabs for indent proponents can do the mix, so can spaces for indent proponents do it. Considering the comments here, the two of us may be demonstrating the divide.
It’s not that we “don’t know the difference” as a certain person put it above, it’s that the question is being presented in a way that some of us think you are (like people we know in the workplace) pressing the space key rapidly every time you want to start a new indention level. If it were actually about consistency, tab use and tabstop size would be mandated instead of requiring spaces since you can’t type part of a tab. It isn’t about readability because people configure tabstops how they prefer to read indentation. Take away all the flimsy arguments that don’t actually hold up when you think about them and you’re left with only 1 tradeoff: The benefit of consistently using tab characters is that they adapt to the display preferences of the individual programmer.
The benefit of space characters is that tab characters adapting to the display preferences of the individual programmer suddenly look weird when one idiot presses the space character a bunch of times instead of using tab. If we didn’t have people who actually pressed the space bar multiple times, we would all be using tab characters.
Are you saying to tab/space to match the placement of the brace in the first line? In older styles, I could see that, but now that most are going to names that “self-document”, that’s too deep for tabbing. So we’re not talking across each other, my thinking is: Employee.Address.CreateNewAddress( city, state, zipcode, streetaddressline1, streetaddressline2) If I understood what you were saying about matching the length of non-tab characters in the previous line, you’d run into problems with: Employee.Address.CreateNewAddress( city, state, zipcode, streetaddressline1, streetaddressline2) EDIT: Forgot that I’m on the internet where spaces aren’t rendered.
If you need to break one, then break all. Employee.Address.CreateNewAddress( t city, state, zipcode, t streetaddressline1, t streetaddressline2 ) Yes, that is two more lines, but the indentation is unambiguous. Also non of the lines is even remotely approaching the length limit. So much for my preferred style. For the other option, the additional indentation to match the parenthesis only with spaces.
In front of the spaces all the tabs used on the parent line. So effectively: ttt Employee.Address.CreateNewAddress( city, state, zipcode, ttt streetaddressline1, ttt streetaddressline2) That fits the appearance which many of these “manual space artists” try to achieve, while still correctly behaving with different personal preferences on tab width. Apparently not considering the number of people saying spaces are slower. And it’s not a question of dumb vs smart, it’s a question of knowledge or ignorance of things like tooling and issues surrounding maintaining applications worked on by large teams. Someone who hasn’t worked on a large codebase that has existed through several generations of developers may not care about mixed spacing because they’ve never encountered that pain.
And I would expect people without that experience to not be pulling as high of a salary. How does “people saying spaces are slower” conflict with what I said? People making that comment clearly believe the question has to do with what key is being struck, not what the IDE is producing. And we’re not saying it as a hypothetical “somebody out there might be typing spaces”, but from actual experience of having coworkers who, when they wanted to indent, rapidspaced. The slightly more hollow sound of the spacebar hit hard with the knuckle of a thumb several times in rapid succession is easy to tell apart from normal typing. There are also a lot that I’ve seen over the years who drop their whole hand down and four-finger the spacebar to get their line spacing. I have worked with a codebase that’s older than me.
I’ve also worked with code that had a mixture of spacing and tabbing in an IDE that didn’t convert tabs to spaces, and the only issue was the people who used an inconsistent number of spaces making their part of the code hard to read. If your spacing is consistent (which, frankly, it should be), then you can change between tabs and spaces arbitrarily with no significant effort. Just mass replace t with however many spaces you want and you’re in your space paradise. Just mass replace however many spaces your tabstop is set to with t and you’re in tab paradise. If you’ve got large blocks of inline text in the code that might be affected by tab/space differences, you need to fix that anyway so do it before the mass replace. The problem of arcane legacy code is the changing coding conventions of the past developers, not whether they used spaces or tabs.