Developers Who Use Spaces Make More Money Than Developers Who Use Tabs.
June 15, 2017 11:50 AM   Subscribe

"So… this is certainly a surprising result, one that I didn’t expect to find when I started exploring the data. And it is impressively robust even when controlling for many confounding factors. As an exercise I tried controlling for many other confounding factors within the survey data beyond those mentioned here, but it was difficult to make the effect shrink and basically impossible to make it disappear."
posted by jenkinsEar (115 comments total) 17 users marked this as a favorite
 
This seems like a good place to ask. Knowing next to nothing about computerland could someone please explain what it means when you say:

coder vs.
programmer vs.
developer vs.
some other words in the same hemisphere.

thankyou
posted by Pembquist at 12:04 PM on June 15, 2017 [1 favorite]


One secret trick to make more money:
:%s/\t/    /
posted by miguelcervantes at 12:05 PM on June 15, 2017 [45 favorites]


@Pembquist: this question is best answered here. Via.
posted by ethansr at 12:10 PM on June 15, 2017 [5 favorites]


One secret trick to make more money:
:%s/\t/    /


HERESY. Below is the correct formula:

:%s/\t/  /
posted by grumpybear69 at 12:18 PM on June 15, 2017 [7 favorites]


Why waste all those characters!??

:ret
posted by paper chromatographologist at 12:18 PM on June 15, 2017


Fortunately open-minded developers have many more whitespace options. Why use boring old SPACE or TAB when there's MONGOLIAN VOWEL SEPARATOR
posted by oulipian at 12:19 PM on June 15, 2017 [20 favorites]


/checks that my copy of Pycharm is set to use spaces instead of tabs.

should I be relieved I already use spaces? Could I have gotten 8% more money if I'd switched from tabs to spaces?
posted by signal at 12:20 PM on June 15, 2017


coder vs.
programmer vs.
developer vs.
some other words in the same hemisphere.


Coder is less formal, if your business card says Coder your employer is trying to be hip.

Programmer and Developer are interchangeable. Programmer is the oldest of the three, might be an age signifier to call yourself that. Developer has some marketing spin on it (also developers developers, google monkey boy).
posted by Dr Dracator at 12:21 PM on June 15, 2017


@Pembquist, there's *absolutely* no official difference, as pretty much anyone can use any of the terms to describe that they write source code of some form. There is, however, an informal ranking that has developed over time:

Coder is typically seen as being informal while Programmer is more often used in a business setting, but both tell you little about the scope of responsibilities and instead just that the person exists in that job field.

Scope of responsibilities typically follows the following: Developer < Engineer < Architect. Except for Database people, who usually just use Database Administrator.

Seniority/skill typically follows the following: Entry Level < Junior < Mid-Level (or no term) < Senior < Principal/Lead.

One thing you'll find, though, is that while corporate job titles will often follow those rules, outside of that it's a free-for-all. Everyone who has ever taken a CS class will have a LinkedIn profile saying "Senior [X]," which is what makes technical interviews so damn critical.
posted by mystyk at 12:25 PM on June 15, 2017 [1 favorite]


But do they use 2, 4 or (shutter) 8 spaces?
posted by octothorpe at 12:26 PM on June 15, 2017


Also my theory on the survey result is that "developers who use tabs" includes the people who do not realize their IDE does tab expansion, therefore selecting for lack of clue.
posted by Dr Dracator at 12:27 PM on June 15, 2017 [10 favorites]


I use tabs because they look nicer than spaces when you print them out.
posted by pipeski at 12:31 PM on June 15, 2017 [3 favorites]


coder vs.

In the medical field there is a job that takes hand written information and assigns codes in the format needed for insurance companies.

programmer vs.

Many(er some? a few?) small movie theaters employ an independent expert that makes up the film programs.

developer vs.

The often quite wealthy folks we love to hate that finance the development of new skyscrapers or mixed use malls.

In the software development niche the three terms in addition to "software engineer" "software specialist" along with a wacky variety of in house corporate HR terms all basically indicate a person who's job is to write computer instructions. (C, C++, C#, Fortran, Python, Java, Ruby, Haskel, Lisp, Awk, Cobol, and, or Perl, among other possibilities)
posted by sammyo at 12:31 PM on June 15, 2017 [4 favorites]


:%s/\t/ /

(puts on flame-proof underpants)

Nah, it's M-x replace-regexp
posted by It's Never Lurgi at 12:32 PM on June 15, 2017 [16 favorites]


Awk made the list but not javascript?
posted by The Gaffer at 12:33 PM on June 15, 2017


But do they use 2, 4 or (shutter) 8 spaces?

How about 3? That's what NIST's WSQ encoder/decoder code uses. My jaw had to be reset after I saw that.
posted by hyperbolic at 12:34 PM on June 15, 2017 [1 favorite]


Dr Dracator: "Programmer and Developer are interchangeable. Programmer is the oldest of the three, might be an age signifier to call yourself that. Developer has some marketing spin on it (also developers developers, google monkey boy)."

Not "interchangeable" per se. Programmer to me has a connotation of focusing on a particular aspect of software development, which has a corresponding patronizing effect on the person it describes. Like calling a car mechanic a tire changer, eg. But ultimately, call people the title they use is the safest here. And use "software developer" (or engineer) as a generic, IMO.
posted by TypographicalError at 12:35 PM on June 15, 2017


MONGOLIAN VOWEL SEPARATOR

excuse me mods how do i change my mefi name
posted by Quindar Beep at 12:38 PM on June 15, 2017 [27 favorites]


Using "Software Engineer" makes the profesional engineering societies rather cranky.
posted by bonehead at 12:38 PM on June 15, 2017 [3 favorites]


I have come to hate the term "software engineer," only because the students I advise think that it means that they should go to engineering school if they want to be software developers. And in fact, at my institution you should go to the engineering school if you are interested in hardware, but you should get a CS degree in the liberal arts college if you are interested in software. And good lord is it hard to talk them out of applying to the engineering program, because they want to be a software engineer, so obviously they should be in a program that has engineer in its name.

Sorry. Rant over.
posted by ArbitraryAndCapricious at 12:41 PM on June 15, 2017 [4 favorites]


Using "Software Engineer" makes the profesional engineering societies rather cranky.

I'm really sympathetic to that view, but OTOH Margaret Hamilton.
posted by The Gaffer at 12:45 PM on June 15, 2017 [2 favorites]


Truthfully, I always thought people used "developer" to indicate more of an indie sensibility, where coder/software engineer/programmers skewed more corporate.
posted by Samizdata at 12:45 PM on June 15, 2017


Programmer to me has a connotation of focusing on a particular aspect of software development, which has a corresponding patronizing effect on the person it describes.

There's many fine shades of meaning though - to me "developer" possibly includes people building computer stuff with tools that I wouldn't consider programming (i.e. $PLATFORM developer, mostly configures/integrates already existing things and writes the occasional script). Programmer definitely means you are writing programs using a general-purpose language.
posted by Dr Dracator at 12:46 PM on June 15, 2017


hate to break it to you oulipian...
[Mongolian Vowel Separator] is no longer classified as space character (i.e. in Zs category) in Unicode 6.3.0, even though it was in previous versions of the standard.
posted by kokaku at 12:47 PM on June 15, 2017 [4 favorites]


I have come to hate the term "software engineer," only because the students I advise think that it means that they should go to engineering school if they want to be software developers.

When I got my CS Bachelor's many moons ago, the CS department was part of the University's College of Engineering. We had an airplane hanging in the atrium of the main building of the CoE, and around the corner was a display of hard drive evolution over the decades. We also had a Computer Engineering department (the hardware side, whereas CS was the software side), which was seemingly always at war with the Electrical Engineering department over resources and which classes were considered to be which department's purview. The line is already blurred, my friend, and has been for some time.
posted by mystyk at 12:47 PM on June 15, 2017 [2 favorites]


Tabs til I die. I also put open curly braces on the same line, double space after periods, and use the oxford comma.
posted by stobor at 12:48 PM on June 15, 2017 [11 favorites]


Programmers who put spaces between "if" and "()" have a 23% happier sex life.
Programmers who use descriptive variable names are 15% less likely to stub their toes.
Programmers who put meaningful comments (other than /* W()()T! Lulz!! */) get 12% better sleep.
posted by Ogre Lawless at 12:48 PM on June 15, 2017 [7 favorites]


This seems like a good place to ask. Knowing next to nothing about computerland could someone please explain what it means when you say:

coder vs.
programmer vs.
developer vs.
some other words in the same hemisphere.


My position is that you could write a graduate-level ethnography paper on this topic and come to no meaningful conclusion. These words mean exactly what the speaker intends them to mean and no more or less. Per other commenters there are sometimes regulatory issues around using the word "engineer" which are sometimes ignored.
posted by GuyZero at 12:50 PM on June 15, 2017 [4 favorites]


It's not all that clear-cut, but to me:

I'd say "coder" can mean anybody who writes code but comes off either casual or... casual in a way that kind of implies low status? It's possible that some people are trying to make it hip-casual instead now, I don't know.

"Programmer" can likewise refer in a very generic way to anybody who codes/programs. I think it's a little out of fashion as a formal job title these days, but occurs?

"Software Engineer" seems to imply someone who designs and builds software for a living with a level of technical sophistication and professionalism. Variations are pretty commonly used as a job title - probably because it seems a little flattering. Some people don't like this one much because, as alluded to above, it is debatable whether most software development is approached as professionally and systematically as "real" engineering.

"Developer" is a fairly popular compromise recently - I guess it's a little less loaded than "engineer" but describes rather specifically the job of "a person who makes software for a living." It seems to be fairly common as a job title and certainly as a self-identification right now.
posted by atoxyl at 12:51 PM on June 15, 2017 [1 favorite]


Also, on the OP, I find it hard to believe that this can possibly control for all other factors. There are definitely all-spaces or all-tab programming environments (although if you write Makefiles for a living, my heart goes out to you). There has got to be a correlation with different programming environments - I find it hard to believe that there's a 50/50 spaces/tabs split for XCode-based developers. All of the tab diehards have got to vi or emacs users. I'm no statistician but I get the vibe the author isn't either.
posted by GuyZero at 12:53 PM on June 15, 2017 [2 favorites]


it is debatable whether most software development is approached as professionally and systematically as "real" engineering.

The question is not one of approach, it's whether the work falls under engineering regulations of your local government and whether you need a) certification or b) if you're legally liable for the results of your work.
posted by GuyZero at 12:55 PM on June 15, 2017 [2 favorites]


First and obvious thought: Do older coders tend to use spaces rather than tabs (as maybe tabs were a later standard)? Do older coders tend to earn more?

It just strikes me immediately that age could be a possible and incredibly-obvious confound if it has a proportional relation to both space usage and salary. One would need to screen it out by comparing coders of the same age who use spaces vs tabs.
posted by czyz at 12:55 PM on June 15, 2017 [1 favorite]


I'm no statistician but I get the vibe the author isn't either.

Well, his PhD is in Quantitative and Computational Biology, so I'd think they covered stats in one of his classes.
posted by jenkinsEar at 12:57 PM on June 15, 2017 [6 favorites]


Real hackers add a git hook to expand/unexpand spaces into tabs and then back again, so you can use the form you like, and the rest of the team can use their form and no one is the wiser.
posted by Xyanthilous P. Harrierstick at 12:59 PM on June 15, 2017 [3 favorites]


First and obvious thought: Do older coders tend to use spaces rather than tabs (as maybe tabs were a later standard)? Do older coders tend to earn more?

The data was compared only for people working currently, and was split into groups by their years of experience. So, it's more that *among* the cohorts of younger, mid-career, and older programmers, one subset of the cohort is consistently earning more than their peers. The problem is that it doesn't account for things like programming language, programming environment, local cost of living, other certifications held, whether the person has a security clearance, and so-on...
posted by mystyk at 1:00 PM on June 15, 2017 [1 favorite]


Well, his PhD is in Quantitative and Computational Biology, so I'd think they covered stats in one of his classes.

Ugh, fine, just because he's a professional "data" "scientist" you assume that he actually knows statistics? Ha!

But seriously, it's a tough conclusion to accept. Mostly because there's no causative factor - if everyone switched to spaces tomorrow no one would get a raise. So there has got to be a third factor out there somewhere.
posted by GuyZero at 1:01 PM on June 15, 2017


for all the vim users, the really correct invocation is :set expandtab.

do not use expandtab. Leave my tabs alone!
posted by namewithoutwords at 1:12 PM on June 15, 2017 [1 favorite]


I don't understand what the article is talking about, fundamentally. I don't think it makes sense to talk about "use spaces" vs "use tabs" in modern IDEs. That's conceptually loaded because it a) ignores discussing the very real abstractions that IDEs provide for formatting code, and b) overrelies on an unpacked term "use" (the loaded intentionality, UI theory implications, etc. versus the more objective, neutral question does your code indentation consist of tabs or spaces). It's exactly this kind of cavalier attitude that drives me up the wall. I think how one formulates the survey question matters a lot.
posted by polymodus at 1:15 PM on June 15, 2017 [2 favorites]


Using "Software Engineer" makes the profesional engineering societies rather cranky.

Don't even bring up "Recording Engineer" unless you want to turn them into a sputtering mess.
posted by bongo_x at 1:18 PM on June 15, 2017 [1 favorite]


I'm assuming the survey was interpreted as "I hit the spacebar" vs "I hit the tab key" since, as you say, the underlying IDE can actually emit whatever characters into the source file it wants depending on how it's set up.
posted by GuyZero at 1:18 PM on June 15, 2017


MONGOLIAN VOWEL SEPARATOR

I BARELY KNOW 'ER
posted by nebulawindphone at 1:18 PM on June 15, 2017 [7 favorites]


Regarding divisive issues, I can usually kinda-sorta understand the opposing argument, even as I disagree with it. But I have never understood the preference for spaces over tabs in programming for indentation. Mid-line tabs (such as aligning variables) are silly and inferior to spaces, but for indentation, tabs seem far superior: One keystroke to create it, one keystroke to eliminate it, and it adapts its width to the coder's preference.

I wonder sometimes if it's just one of those "I play by the rules, and I've decided this is a rule" sort of things. Space cadets.
posted by Hot Pastrami! at 1:19 PM on June 15, 2017 [1 favorite]


My IDE is vim, you insensitive clods.
posted by floppyroofing at 1:21 PM on June 15, 2017 [7 favorites]


How about 3? That's what NIST's WSQ encoder/decoder code uses. My jaw had to be reset after I saw that.

Some people just want to watch the world burn.
posted by It's Never Lurgi at 1:24 PM on June 15, 2017 [3 favorites]


tabs seem far superior

Mods, put down your coffee, flamewar imminent.
posted by sammyo at 1:25 PM on June 15, 2017 [7 favorites]


Obviously if you're running lots of tabs your going to be poorer. Duh.
posted by Kabanos at 1:26 PM on June 15, 2017 [2 favorites]


It also just goes to show that if you want to make the big bucks, don't bother with Python.
posted by bonehead at 1:34 PM on June 15, 2017 [1 favorite]


What about train engineers, though?

That's probably not their official job title in some areas these days.

But lots of people get called "engineers" all the time regardless. Professional engineering societies thankfully stick to people misrepresenting themselves in professional engineering work.
posted by GuyZero at 1:43 PM on June 15, 2017


Shockingly, mouseketeers are still unregulated.
posted by Quindar Beep at 1:45 PM on June 15, 2017 [6 favorites]


Awk made the list but not javascript?

Javascript is stupid.
posted by LuckyMonkey21 at 1:45 PM on June 15, 2017 [8 favorites]


But do they use 2, 4 or (shutter) 8 spaces?

I used to work at a place where, while coming up with a new coding standard, the debate between 2 and 4 spaces got so intense that they decided to go with 3. Like all compromises, it left everyone mad.
posted by redyaky at 1:48 PM on June 15, 2017 [5 favorites]


Using "Software Engineer" makes the professional engineering societies rather cranky.


I actually have a degree in software engineering but if anything, getting that made me even more dubious of the phrase.
posted by octothorpe at 1:52 PM on June 15, 2017 [1 favorite]


I have never understood the preference for spaces over tabs in programming for indentation. Mid-line tabs (such as aligning variables) are silly and inferior to spaces

Yep.

Tabs for indentation, spaces for separation and alignment.
posted by wildblueyonder at 1:52 PM on June 15, 2017


I wonder if this may be related to either the SES of the respondents or their alma mater (for college or university alumni). Those two things, of course, are also correlated. I wonder if this may be the case because there is already some information about how different computer science faculty "families" (students taught by specific faculty members) use different conventions that they "inherit" (are taught) e.g., see the entry for "metasyntactic variable" in the Jargon File. It seems reasonable that programmers who develop "better" social connections in more prestigious colleges and universities would land higher paying jobs.
posted by ElKevbo at 1:53 PM on June 15, 2017 [1 favorite]


I use twenty spaces, same as in town.
posted by Mr. Bad Example at 1:53 PM on June 15, 2017 [4 favorites]


I use six-per-em spaces and my income reflects that decision.
posted by romanb at 1:53 PM on June 15, 2017


I remember two spaces being preferred way back when I was in college, but let's face it -- monitors were a lot smaller then, especially if you were doing so in a unix text editor with fixed rows/columns on a remote machine. And screen resolution was a lot lower, so those spaces were huuuuge. Nowadays my eyes can't even tell the difference between two spaces and no space at all! Tabs!
posted by mikeh at 2:04 PM on June 15, 2017


It also just goes to show that if you want to make the big bucks, don't bother with Python.

FWIW, although Python cares deeply about indentation, it doesn't mind if you use spaces or tabs to do it; it just wants you to be consistent about it.
posted by We had a deal, Kyle at 2:05 PM on June 15, 2017 [3 favorites]


do not use expandtab. Leave my tabs alone!

If we're being finicky about this, I'm pretty sure that expandtab doesn't touch existing tab chars unless you run :retab.

My real plea here, though I have a personal preference for spaces, is just please don't fuck up the existing whitespace scheme in the file and/or project. Exercise some god damned consistency, you poorly housebroken animals.
posted by brennen at 2:29 PM on June 15, 2017 [3 favorites]


Let's not even talk about how twitchy the guys who draw pictures of buildings get when you talk about a software architect.
posted by jrishel at 2:32 PM on June 15, 2017 [3 favorites]


Since I don't care about alignment, ever, and have never understood the desire for it, I think tabs are the way to go. If I ever follow through with writing my own language, I'll make tabs mandatory; any spaces on a line before the first alphanumeric character would be a syntax error.
posted by a snickering nuthatch at 2:33 PM on June 15, 2017 [1 favorite]


Regarding divisive issues, I can usually kinda-sorta understand the opposing argument, even as I disagree with it. But I have never understood the preference for spaces over tabs in programming for indentation.

In a perfect world, tabs and spaces could be used in conjunction with one another for differing purposes.

In the real world, in a codebase that is large enough and being touched by enough people (and being run through enough tools), all it takes is a handful of people fucking up and using tabs when they should use spaces and not realizing it because their IDE shows it the same to create major headaches.

So sure: use the tab key on your keyboard. But please, for the love of god, set your IDE to convert tabs to spaces, and have everyone use the same settings.

(This ties into my own self-serving conclusion as to why there's higher pay for those using spaces: people whose experience is working on small teams and small codebases aren't as likely to run into the kinds of issues that make you appreciate why tabs in code should be verboten; people working on larger projects (for larger companies) that have more developers know this pain firsthand, and my experience is that these jobs pay better)
posted by tocts at 2:40 PM on June 15, 2017 [13 favorites]


any spaces on a line before the first alphanumeric character would be a syntax error.

A "C" in columns 1-5 flags the line as a comment and wait don't tell me you're going to use EBCDIC.
posted by GuyZero at 2:41 PM on June 15, 2017 [6 favorites]


It also just goes to show that if you want to make the big bucks, don't bother with Python.

FWIW, although Python cares deeply about indentation, it doesn't mind if you use spaces or tabs to do it; it just wants you to be consistent about it.


Moreover, canonical/community Python style is to use spaces over tabs.

As a professional Python coder programmer developer, I'm happy that my language of choice has apparently made the right financial decision!
posted by cyrusdogstar at 2:42 PM on June 15, 2017 [9 favorites]


Truthfully, I always thought people used "developer" to indicate more of an indie sensibility, where coder/software engineer/programmers skewed more corporate.

Maybe that's what Steve was going for.

Spaces are the way to go, and also
clang-format
or the equivalent for your language on everything. Informal studies show that people who use automated code stylers are happier, more attractive, wealthier, have more mutual orgasms with their sexual partner(s) and are personally singled out by Peter at the Pearly Gates for praise and recognition.
posted by dis_integration at 2:42 PM on June 15, 2017 [3 favorites]


Tabs are a special character to move the print head over. If I find tabs in code, I warn my co-workers/underlings not to use them. After that I replace them with the bell character because I am a monster who wants to get my point across (and don't run scripts to fix tabs at check-in/out).

Regarding braces, the one true way is for them to align vertically. I find it more aesthetically pleasing, but I don't change code, unless it's a mish-mash of styles (pick one style and stay with it!)
posted by combinatorial explosion at 2:42 PM on June 15, 2017 [3 favorites]


clang-format or the equivalent for your language on everything.

And yeah: this. This this this this this.

I don't actually have super strong opinions about how code should be formatted, but I have an absolute conviction that it should be formatted and should be formatted the same by every goddamn person touching it.
posted by tocts at 2:47 PM on June 15, 2017 [3 favorites]


What an idiotic controversy! It's like a searchlight exposing the dogmatic, shallow, bandwagon-following culture of programming.
posted by thelonius at 2:52 PM on June 15, 2017 [1 favorite]


I know most IDEs can insert x spaces per press of [tab], but the last time I tried, none properly deleted the correct number when pressing [del] or [backspace]. And I possibly had problems with selecting multiple lines and [tab] or [shift-tab]ing them.
posted by stobor at 2:54 PM on June 15, 2017


for indentation, tabs seem far superior: One keystroke to create it, one keystroke to eliminate it

And in the darkness bind them!
posted by oulipian at 3:03 PM on June 15, 2017 [10 favorites]


but the last time I tried, none properly deleted the correct number when pressing [del] or [backspace].

Vim is definitely smart enough for this. As are the heavy-weight IDEs from JetBrains, and Xcode, and Atom. Haven't used emacs in a while but I feel like it knows what to do here too.
posted by dis_integration at 3:04 PM on June 15, 2017 [1 favorite]


I use tabs -when I can get away with it - until I am spaced out.
That is the bar tab not the space bar.

As for the real discussion, surely it makes absolutely no difference whatsoever if you are doing the sensible thing and reading the formatted output.
posted by Burn_IT at 3:21 PM on June 15, 2017


What an idiotic controversy! It's like a searchlight exposing the dogmatic, shallow, bandwagon-following culture of programming.

I think the underlying questions are of value from a software engineering point of view, in how it fits into more general issues of programmer productivity, psychology, even sociology, etc., are studied—and you can find scholarly works on programming methodology of which specific UI issues are only one facet of software engineering as a discipline—but I think it is absolutely deplorable that the way going into this controversy was for some blogger make it about salaries as a metric for something, and failing to point out that it's merely one metric. That, plus folklore/anecdata, are separate from emerging research literature such as:

The majority of software is still written using text-based programming languages. With today's large, high-resolution color displays, developers have devised their own "folk design" methodologies to exploit these advances. As software becomes more and more critical to everyday life, supporting developers in rapidly producing and revising code accurately should be a priority. We consider how layout, typefaces, anti-aliasing, syntax highlighting, and semantic highlighting might impact developer efficiency and accuracy.
Understanding the effects of code presentation, PLATEAU 2015 Proceedings of the 6th Workshop on Evaluation and Usability of Programming Languages and Tools.

Once you think to look, it takes a cursory search using Google to find these broad, interesting connections, which are more interesting.
posted by polymodus at 3:34 PM on June 15, 2017 [3 favorites]


What an idiotic controversy! It's like a searchlight exposing the dogmatic, shallow, bandwagon-following culture of programming.

I don't think it's actually a controversy any more than shoes vs sandals is a controversy.

After a couple re-reads, my take is that this is dry data scientist humour.
posted by GuyZero at 3:45 PM on June 15, 2017 [5 favorites]


Re: "coder," I feel like I see this word used most often by laypeople who don't really understand what developers do. I see programmer and software engineer used fairly often, but not as much as developer. My company pretty much defaults on developer. See also, in web development: "front-end developer," "back-end developer," "full-stack developer," "lead dev." "Front-end dev" has a nice ring to it.
posted by limeonaire at 4:03 PM on June 15, 2017




Finding out that Gruber is a condescending tab weenie reinforces most of my opinions of both condescending tab weenies and Gruber.
posted by brennen at 4:15 PM on June 15, 2017 [10 favorites]


I am a non-condescending tab weenie.

People are free to be wrong.
posted by GuyZero at 4:17 PM on June 15, 2017 [2 favorites]


I program in Whitespace.
posted by erniepan at 4:20 PM on June 15, 2017 [3 favorites]


I generally describe myself as a software developer because I used to say programmer and people would get weird about it and ask me what it meant (as if they had a particular definition of "programmer" in mind and wanted to call me out on using it wrong). I have had "engineer" in my title a couple times but I avoid using it myself, because words have meaning and if people got that weird about "programmer" they weren't going to be less weird about "engineer." And I have to say "software developer" because we often socialize with people who are real estate developers or who do "development" at arts organizations (basically shaking down the real estate developers for donations) and those receptions get confusing if people think you do a different sort of development. But anyway.

I prefer tabs in my own code, but when I'm not in control I set my editor to do whatever standard is already established. I mean, I think people who use spaces are monsters, but apparently they're better compensated monsters than tab-preferring, go-along-to-get-along me.
posted by fedward at 4:33 PM on June 15, 2017 [1 favorite]


Tabs are a special character to move the print head over. If I find tabs in code, I warn my co-workers/underlings not to use them.

Ah, so apparently it *is* just one of those "I play by the rules, and I've decided this is a rule" sorts of things. This is a bit like getting upset at a • being used as a separator, because it was invented for bulleted lists. Things evolve, and we ought not cling to the old ways just for the sake of their oldness.
posted by Hot Pastrami! at 4:50 PM on June 15, 2017 [1 favorite]


shoes vs sandals is a controversy

Shoes.
posted by paper chromatographologist at 5:15 PM on June 15, 2017 [2 favorites]


any more than shoes vs sandals is a controversy.

Not among the civilized.
posted by bongo_x at 5:22 PM on June 15, 2017 [1 favorite]


As far as the original article goes, it's a totally self-selecting sample of people who happened to be reading Stack Overflow while they were running the survey and decided to take the time to fill it out, but programmers love to argue about dumb things so there has been a whole wave of think pieces dissecting this fundamentally useless data (for instance).

As far as spaces versus tabs, use spaces. The problem with tabs is that there isn't a universal tab stop setting, and there's no way to tell every editor "this is indented with a tab stop of 4, not the default of 8." Even on github, you have to set this to a number other than 8 on a file-by-file basis, IIRC. Every competent text editor will allow you to use the tab character to indent with spaces or backspace one indentation level at a time. Besides which, many popular or up-and-coming languages use two-space indentation as their default/recommended style (javascript, scala, clojure, swift, etc), making tabs less useful.
posted by whir at 5:24 PM on June 15, 2017 [3 favorites]


Y'all have causality backwards. If you wish to mandate spaces only, developers will insist upon a $17k premium. The market has spoken, and tabs are obviously better 😜
posted by pwnguin at 5:31 PM on June 15, 2017 [5 favorites]


Tabs are a special character to move the print head over. If I find tabs in code, I warn my co-workers/underlings not to use them.

This is the same logic that gets trotted out to justify the use of two spaces after a period (when every teenager knows that two spaces means insert a period and start a new sentence), because typewriters can't properly differentiate interword and intersentace spacings. So that little trick taught in typing classes since the early 20th carries over into several successive generations of technology, its true purpose forgotten by its adherents, but clung to ever more tightly through the late 20th and early 21st periods.

Fortunately the makers of mobile phones have gotten away from such hide-bound conservatism and used the double-space idiom to do something useful.

Frankly, unless you are using Python or something where the differences are syntactic, your efforts are far better spent in getting everyone to use a pretty printer with a standard template before submitting their code.
posted by bonehead at 5:37 PM on June 15, 2017 [4 favorites]


As far as spaces versus tabs, use spaces.

This is 1000% a tooling issue.

Do you throw out all your source code and start from scratch when you move from Intel to ARM?

If a rogue spacer can mess up your source code you've got waaaay too much toil going on in your dev org.
posted by GuyZero at 5:43 PM on June 15, 2017


As far as spaces versus tabs, use spaces. The problem with tabs is that there isn't a universal tab stop setting, and there's no way to tell every editor "this is indented with a tab stop of 4, not the default of 8." Even on github, you have to set this to a number other than 8 on a file-by-file basis, IIRC.

One of the main arguments for tabs is that viewers get to choose their own tab stop.

I'm a "let the editor fake it with spaces" guy though. Mixed would actually be fine if you could be sure people only used each character in the prescribed fashion, but I am (literally) obsessive-compulsive so no.
posted by atoxyl at 6:03 PM on June 15, 2017 [2 favorites]


The companies that insist on spaces have a lower profit margin, though, because they have to spend on all those extra keyboards from spacers going smashsmashsmashsmash on their spacebar (thus shortening the lives of their KB).

I'm just a SQL guy, and I'll stick w/ tabs 'til the end.
posted by Lukenlogs at 6:28 PM on June 15, 2017


code -> reformat code
posted by maxwelton at 6:46 PM on June 15, 2017 [2 favorites]


Isn't it weird that we don't care about confounding content with presentation in our source code? A tab character corresponds to my intended meaning. K spaces, for some value of K, is a choice of presentation and is not relevant to the intended meaning of "indent one level".
posted by a snickering nuthatch at 7:40 PM on June 15, 2017 [5 favorites]


Multiple spaces take more keystrikes than tabs don't they? It sounds like wasted energy to me.

A coder is someone who focuses on HTML and CSS. A programmer to me always says Java or C++ - something highly object oriented. A developer sounds to me like someone who does front end web things including JavaScript. The job title "front end developer" has evolved so much since I began front end dev in 2004. Not only is there a preponderance of JavaScript libraries but much of the "back end" is now handled in the front end.
posted by bendy at 7:42 PM on June 15, 2017


My title is software engineer, but I introduce myself as a "slightly reformed mathematician."
posted by kaibutsu at 7:47 PM on June 15, 2017 [4 favorites]


Multiple spaces take more keystrikes than tabs don't they? It sounds like wasted energy to me.

Nah. Maybe a long long time ago but pretty much every text editor of significance will map TAB to N spaces for you - or permanently replace tabs with spaces or vice versa. Most of them do fancier indentation tricks than that, in fact.

Which, yes, makes this discussion more pointless than ever.
posted by atoxyl at 8:38 PM on June 15, 2017 [4 favorites]


Long ago in the mists of time, when MS-DOS was the OS of choice.... I first learned Turbo Pascal, and rapidly grew to hate tab characters... it wasn't Pascal's fault, it didn't care... it was the gosh darned inconsistency of them... your code got all weird randomly when you renamed a variable or something like that... and you never knew when it would happen.

Spaces just work.... and we've all got gigabytes of space, even on USB sticks, so don't complain about the few extra bytes of space, it's well worth the expenditure. We should banish the tab, along with the BLINK tag in HTML.
posted by MikeWarot at 8:41 PM on June 15, 2017 [1 favorite]


Well, diversification is the key to long-term financial planning, so I make sure to use a healthy mix of both tabs and spaces in my programs.
posted by The Notorious B.F.G. at 8:44 PM on June 15, 2017 [1 favorite]


Google uses spaces, 2 of them, and is so strict about it that people who have worked there habitually use 2 spaces ever after. I propose that the principal thing being measured by this survey is the income delta between people who can pass a Google interview and everybody else.
posted by w0mbat at 9:28 PM on June 15, 2017 [6 favorites]


One of the main arguments for tabs is that viewers get to choose their own tab stop.

That's the thing, though. If you ever need to indent something to, say, the 17th column in order to line up parts of an argument list up with the previous line, with tabs at tab stop 4 you would use 4 tabs and a space. Now if someone viewing your file uses a tabstop of 3, your indentation goes to the 13th column instead and doesn't line up any longer. So you can't indent things in multiple of less than your tab stop if you want to get a consistent display. In some languages this is more important than others, but personally I prefer to have control over it.

I will say that go managed to make a fairly clever end run around this argument by instilling a language culture where every go file is expected to be run through gofmt before being checked in, and so is indented by software, not a human being. gofmt uses tabs, I assume because it's beloved by sysadmin weenies who were once burned by accidentally using spaces in /etc/passwd or a Makefile or something.
posted by whir at 9:47 PM on June 15, 2017 [1 favorite]


How about 3? That's what NIST's WSQ encoder/decoder code uses. My jaw had to be reset after I saw that.

I like to use 3 spaces because it makes inadvertent tabs jump out at me.

Lately, though, I've been preferring tabs, after editing a bunch of column-aligned SQL files in which adjusting the tab stop made keeping everything aligned easy.
posted by clawsoon at 1:20 AM on June 16, 2017


We should banish the tab, along with the BLINK tag in HTML.

Oh, and I also implemented BLINK in Javascript once. It was for a typing game for my daughter, to prompt the next letter to be typed.
posted by clawsoon at 1:23 AM on June 16, 2017


Nah. Maybe a long long time ago but pretty much every text editor of significance will map TAB to N spaces for you

This is precisely why my hardline pro-space view switched to a strong pro-tab view. If everyone uses tabs, individuals working on projects together can choose indent levels that make sense for their display.

Back in the deep mists of time when CPU cycles were still precious, yet memory had expanded enough to make the extra bytes irrelevant but not enough to make heavy weight editors and IDEs practical, spaces had a significant advantage, especially since most terminals were 80x25 at best and were difficult to switch tab spacing to less than 8 characters, and even when it was possible, doing it on the fly usually wasn't. You had the choice of eating up way too much screen real estate for each indent level or using 2-4 spaces.

Nowadays, the tools are such that you can do pretty much whatever the fuck you want and it can be translated. However, tabs to spaces is still somewhat lossy. Most decent editors and IDEs can turn spaces back into tabs, but there is always some risk of error since there are occasionally situations where collapsing multiple spaces into a tab is decidedly incorrect. Since tabs in string literals are escaped, there is no inverse loss involved in expanding tabs if that's your thing. Since editors and tooling will handle both gracefully, it is kinder to your fellow human beings to use tabs. Sadly, programmers generally being the worst sort of Aspergerish geeks means that simple kindness is often seen as a weakness, so people persist with the militant spaceism even though it removes (or at least makes it more difficult) the choice for people to display the code in whatever way makes the most sense for them.

It's much like the modern web in that way. HTML (and CSS, for that matter) were initially designed to allow the user to instruct their browser to display pages in the way that makes the most sense for them and their display. Sadly, web monkeys have been trying to turn the medium more and more into pixel perfect PDF-alike shit. Even modern responsive designs are usually implemented such that the user gets one of a few tightly controlled layouts the web monkey decided was best.

BTW, if something needs to be aligned within a block, tab to the indent level of the given block and space from there. Everybody else still gets to pick their tab stops appropriately and your stuff stays correctly aligned. It isn't rocket science.
posted by wierdo at 1:34 AM on June 16, 2017 [3 favorites]


I was once cited in a performance review for using tabs instead of spaces and using Emacs instead of vi.

I have no regrets.
posted by tommasz at 5:31 AM on June 16, 2017 [4 favorites]


Code is not always viewed in an IDE. Use spaces.
posted by jeffamaphone at 5:53 AM on June 16, 2017 [4 favorites]


Does anyone know if you can get modern IDEs that use actual tab stops (as in the old word processor movable tab position at the top of the page), so I could get my team worrying about indent level and not arguing about tabs vs spaces (spacers are wrong, obvs).
posted by couch at 8:02 AM on June 16, 2017 [1 favorite]


I guess I'm the only one who shudders at "shutter" being used to mean "to shake" when its true definition is "to shut."

4 spaces, tho.
posted by eustacescrubb at 9:06 AM on June 16, 2017 [2 favorites]


couch, you just need to have your lead developer/architect set up editorconfig in your repo which will tell your developers' IDEs what setting to use for tabs or spaces.
posted by eustacescrubb at 9:09 AM on June 16, 2017 [5 favorites]


I guess I'm the only one who shudders at "shutter" being used to mean "to shake" when its true definition is "to shut."

I shuddered when I realized that I'd made that mistake but I was hoping that no one noticed. Blame it on my spending the last three years in photography school.
posted by octothorpe at 9:13 AM on June 16, 2017 [4 favorites]


Code is not always viewed in an IDE. Use spaces.

Is there some viewer out there that completely ignores tabs or displays them as a single space? If not, I fail to see any advantage to spaces. (I think we all agree that mixing tabs and spaces in the same source file is generally madness)
posted by wierdo at 9:39 AM on June 16, 2017


TIL: couch, you just need to have your lead developer/architect set up editorconfig in your repo which will tell your developers' IDEs what setting to use for tabs or spaces.

eustacescrubb, you definitely don't deserve that name.
posted by fedward at 10:05 AM on June 16, 2017


eustacescrubb, nah, that still uses tabs/spaces. I want a tab to move to a specific point across the screen rather than either being converted to, or being the equivalent of a number of spaces. Not seen any way to get eclipse or intelliJ to do it. Should ask in AskMe I guess...
posted by couch at 11:22 AM on June 16, 2017 [1 favorite]


Is there some viewer out there...

cat, e.g.
posted by jeffamaphone at 4:28 PM on June 16, 2017 [1 favorite]


What terminal doesn't display tabs as multiple spaces? cat prints tabs to the terminal, so unless you have quite a bizarre one, you should see some number of spaces.
posted by wierdo at 6:11 PM on June 16, 2017


We should banish the tab, along with the BLINK tag in HTML.

No opinion on BLINK, but we definitely need to keep tab around:

* The tab key is for invoking autocomplete - very useful if you think faster than you type.
* The tab character is for separating data columns in tab-delimited data files. It is well suited for this, as it has no real use as actual data field content and should be stripped out on input anyway.
posted by Dr Dracator at 12:58 PM on June 17, 2017 [1 favorite]


Update to the original subject: Czech statistician and data scientist Evelina Gabasova has dug deeper into the available data to determine more likely sources of the income bias. Some observations, summarized by me:

1. Open source software uses spaces more than tabs, and developers who indicated on the survey that they contributed to OSS preferred spaces.

2. The two major Version Control Systems reported on the survey were Git, a cutting-edge and fearsomely technical Linux product, and Team Foundation Server, a legacy Microsoft team management tool. Developers at Git-using companies made more money than developers at TFS-using corporations (even if the former used tabs and the latter spaces).

3. Among junior developers, space- and tab-users earned about the same -- except for a separate bulge of much higher-earning spacers.

She thinks that 1-3 suggest a difference in types of businesses, where the higher-paying firms tend towards open-source, Git, and modern technologies in general, and hire people with that set of cultural practices. (The survey did not ask about the nature of the companies where respondents worked, so she had to come at it indirectly.)

Also there is some odd data involving salaries, with some respondents claiming to make $3,000/year programming. Gabasova points out that in Central and Eastern Europe, salaries are typically quoted in terms of monthly income, and so a survey participant from that region with poor command of English might miss the significance of "annual" in the question. And given that the "spaces vs. tabs" distinction is one of nuanced semantics -- it does not have to do with whether you use the space or tab key, since everybody uses the tab key but may have their fancy editors/IDEs configured to insert spaces when they do -- this misunderstanding of English could correlate the "tabs" answer with the monthly salary answer.
posted by Harvey Kilobit at 7:08 PM on June 20, 2017 [1 favorite]


The problem with tabs is that there isn't a universal tab stop setting

Rather than being a problem, this the answer to people preferring different indentation settings -- or even individuals finding that it's helpful to change indentation settings depending on the project (and if space-preferring devs haven't ever worked on a project where they decided "Hmmm, it might be nice to compress the indentation level down for a bit of this rather deeply nested bit of code", that runs somewhat counter to the idea that they're programmers who work on maintaining large-codebase large-team projects).

Code is not always viewed in an IDE. Use spaces.

I'm trying to imagine who would spend enough time working with code in any environment where they had absolutely no control over how tabs were displayed. Terminals have tab widths. The browser has CSS tab-size which you can set user styles for (or get a browser extension if that's too much trouble). There isn't a text editor that a programmer should be spending time in that can't set tab width. What other non-IDE environment are we talking about?


I'd also like to point out that both of these arguments run *directly counter* to the "you don't have to type the individual spaces, just set up your tooling to generate spaces when the tab key is pressed!" I recognize that the space advocates making that argument might not also make these arguments, but it's worth pointing out they don't comfortably coexist on the same side of the debate.

In the real world, in a codebase that is large enough and being touched by enough people (and being run through enough tools), all it takes is a handful of people fucking up and using tabs when they should use spaces and not realizing it because their IDE shows it the same to create major headaches.

Can you create or point to an example of when tabs are abused for something that isn't indentation?

I do run into examples all the time where projects are difficult to read because both spaces and tabs got used *for indentation*. Any mixture of the two for indentation will obviously really screw things up, but that's wrong because it's mixing conventions, not wrong because doing tabs is wrong.

And I'm having trouble coming up with many examples in my head of places where I've seen tabs used for non-identation separation/alignment. There's really only one exception and that's off-to-the-right comments, which I'd admit I've seen in the wild and may have even participated in before sorting out tabs vs spaces, but not sure about a "major headache" -- it's annoying if there's running to-the-right commentary that doesn't line up with other running commentary, but it's an aesthetic problem rather than the real headache that unclear indentation can induce about the boundaries of a block.
posted by wildblueyonder at 8:59 AM on June 21, 2017


« Older The Houses that Frank Built   |   Get Out of Cell Jail Free Newer »


This thread has been archived and is closed to new comments