DEV Community

Cover image for Spaces vs. Tabs: How to (Apparently) Get Paid More As a Developer
Devs @ 7pace for 7pace

Posted on • Updated on

Spaces vs. Tabs: How to (Apparently) Get Paid More As a Developer

If you’re new to the programming world, you may not know — but will quickly learn about — one of the most popular and heated coding debates: spaces or tabs.

Code is broken up into lines of letters and symbols on a page, which communicates to computers, iPads, smartphones, you name it what to do.

You see, with spaces, you format each line of code using the spacebar. While, with tabs, you aligning it with the tab key. Small mechanical difference, big consequences.

Read on to learn more about the space vs. tabs debate, as well as why programmers who use spaces earn more than their peers who use tabs.

A Glimpse: Spaces vs. Tabs Debate

Pro-spaces programmers argue that using the space bar makes the layout more flexible. However, pro-tabs users rebut saying tabs makes code more readable and aesthetically pleasing.

Which is right? This is a question that is more debatable than a technical one like .NET Core VS. .NET framework.

Despite the readability and aesthetics argument, spaces may be more lucrative than tabs. Here’s why.

1. Relationship Between Spaces and Tabs and Programmer Salaries

A survey reveals that programmers who use spaces have higher salaries than their tab-using buddies. Over 12,000 programmers shared their salaries and what programming format they used (tabs or spaces).

Of the large sample size, programmers that used spaces made an average of 9% more than coders who used tabs. The correlation was seen across the board, despite tab and space programmer’s having the same level of experience.

** What This Means**

It looks like the pro-space side gets a win. But the core debate is far from over (if it will ever be). For one, more studies will need to be done to see if the study’s conclusion holds. And two, correlation doesn’t equal causation.

Meaning, just because there is a relationship between space-using coders having bigger salaries does not mean it’s a given all programmers who use spaces will make more money.

Also, as with any study, there are numerous variables and errors to consider that will have affected the outcome. Long story short, spaces should not be overlooked.

2. More Programming Languages Use Spaces

Another study revealed that, out of the billion files analyzed, more programming languages used spaces than tabs. In fact, C was the only programming language in the study that used tabs.
Alt Text
Being that C is an older language, we have to question if spaces is becoming the coding format used more today. If so, does that have anything to do with space-users programmers earning more money?

There’s a Third Option

Still, what if spaces and tabs debaters called it a truce and joined sides? They can if they consider this third option: coding with tabs and spaces.

That’s right, as Coding Horror points out, programmers would use spaces for the detail alignment and tabs for the primary indentation alignment. It’s a win-win, or is it?

Final Thoughts: The Debate May Never End

So, is spaces the big money maker? There’s too many factors to say. Yes, more programming languages use it and, yes, a study revealed higher salaries for programmers who use it. However, Bill Gates, the most famous coder of all time, prefers tabs, and he has a net worth of around $89.2 billion.

At the same time, Gates’ high income may have more to do with creating the language for MITS Altair, some call the first personal computer, than the actual coding format he used.

What do you think? Do you prefer using spaces or tabs when you code? If programmers had to adopt just one—tabs or spaces—which would you choose?
Be sure to leave a comment with your thoughts :)


7pace Timetracker is the only integrated, professional time management solution for teams using Azure DevOps.

Alt Text

Oldest comments (1)

Collapse
 
deozza profile image
Edenn Touitou

As tabs indentation is not configured the same on all dev machines, repositories and prod servers, I use space indentation for consistency. Tabs indentation are more readable you say ? Ok I indent of 4 spaces to look like a tab-indented line. Best of both worlds