Your software developer works in our premises in India

Programmers who use spaces have higher salaries than those who use tabs

Programmers who use spaces have higher salaries than those who use tabs


Spaces Vs. Tabs. There is an internal holy war waged among programmers. Should programmers indent their code with the help of spaces or tabs? Is there a clear answer for this? Also, who earns more? Programmers who uses spaces or programmers using tabs? Learn all about this and more in this article.

Introduction

Indentation is a very important feature in the world of programming. Some programmers follow it diligently, and yet some others are quite reluctant. Indentation is a style that indents blocks of code to signify a program structure. Bad indentations can make the program go haywire and difficult to control. The reason why many programmers neglect to do indenting would because of time constraints. Proper indentations make code easier to Read, Understand, Modify and Maintain.

One of the major benefits of proper indentation would be ease of use. You can instantly see which code to target rather than having to read each line, and understand which is the start of the block, and which is the end. And believe it or not, there are many situations during which you will have to refer to the codes:

  • While understanding the codes
  • While adding new codes to the existing program
  • While updating codes
  • During code debugging

An analysis done by Stack Overflow brought to light an observation that says Spaces are more preferred by the programming world than Tabs. Programmers who use spaces earn more too.

Ever year, Stack Overflow does a survey on the salaries earned by programmers. In 2017, the survey was about which programmers earn more salary – tab users or spaces users. Stack Overflow’s data scientist David Robinson crunched the collected data and reached the conclusion that “space” programmers earned 9% more than “tab” programmers, irrespective of their experience level.

About 28,657 people participated in the survey, and provided an answer to which format they preferred. These were all professional developers (not students or freshers) and about 12,426 of them provided information on their salary as well. Out of the professionals in the group, 40.7% use tabs, 41.8% use spaces and the rest use both. Actually, experience doesn’t count, because the data collected by Stack Overflow supports this observation. Computer programmers who use spaces are paid £12,000 more than the other group.

And of course, this also depends on the computer language used. For languages like Python, indentation is so very important, whereas in Ruby, you use it to make the code structure easier.

If you are using handwritten codes into working software then using either of the two indentation could have an effect. There is a separate program called interpreter or complier to handle this program.

Developers arraign their coding editor to work with either of these two or both to show the relationship between the different elements. Things can get very bad when the editor sees tabs when he expects to work with tabs and vice versa. The interpreter or compiler may crash in such situations.

So is this the same in every country? Developers in low GDP-per- capita countries are likely to use tabs, and they earn low wages when compared to the other.

If you look at the report submitted in Stack Overflow, you can see that in United States, United Kingdom, Canada, Canada, Germany and India, the number of developers who uses spaces is considerably higher. The effect could be small in Europe, but the difference is much bigger in India. But is that the only factor behind this? May not be true, because it depends on the developer and the indentation they prefer to use. DevOps developers prefer to use spaces, while mobile developers tend to gravitate towards tabs.

Hence you can say that a number of factors do affect the salary parameter:

  • Whether they are using tabs and spaces
  • Country where the work is done
  • The language used and the developer’s work nature
  • Years of developer experience
  • The company size
  • Their level of knowledge, including formal education
  • Whether they do it professionally or as hobby
  • Their contribution to open source, if any.

The results were observed as a detailed study of these factors, and the same comes up when it is tested within every sub developer group or country. You can also check this by collecting the data from here.

The supporting argument for tabs says that’d developers can configure their editor to whichever tab width they are comfortable with. However, when you are using it, you need to add the tab width (you are coding width) to the coding guidelines. Some developers uses spaces because it is self- describing, and they don’t want their code to look differently based on editor settings. Codes must be easy to read, so the reader can set the width to their preferred value.

But you can also think of it in this way – Use spaces for aligning multi line code in places where width matters. And use tabs for indentation so developers can send their own preferred width.

Conclusion

The fact that spaces score more than tabs could be a bit surprising for many. But if you crunch the data and look at all the factors they’ve used in the dataset, the results are obvious. You can also download the raw data, and examine it for yourself.

However, the argument for the two continues, and there are very strong supporters for both. For example, a group of developers might support spaces saying a tab could have several number of columns depending on the environment, but for space there is only one column.

And a tab supporter might say it is meant specifically for indentation, giving the developers a number of preferences for indentation size, and helping the developer to see the code changes, without actually changing the code. However, developers feel that the most popular way of indenting Python is with spaces, and the other method is the only second most popular way.

Interesting Articles:
Detailed differences explained by stackoverflow
Space programmers vs Tab programmers

Picture source: Flickr.com / Berliner


The author: Reema Oamkumar is engaged as a thought leader at www.Software-Developer-India.com which is a part of the YUHIRO Group. YUHIRO is a German-Indian enterprise which provides programmers to IT companies, agencies and IT departments.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Address

Software Developer India
YUHIRO Technologies Pvt. Ltd.
Thattil Complex, Kuriachira
Thrissur, Kerala - 680006, India
Phone: +91 9846861166
www.software-developer-india.com
info@software-developer-india.com

Software Developer India

We work closely with you, to understand your requirements and subsequently hire and provide you with the right software developer. We will ensure that your software project stays on track and business value is created.