[Tabs vs Spaces] What is the proper and popular indentation character for programming?

[Tabs vs Spaces] What is the proper and popular indentation character for programming?

Coding standard or coding convention is very important for programmers and QAs to understand logic easily and source code should be easy to read. Most people asks which is the proper or popular indentation character Tabs or Spaces. Since Stack Overflow and GitHub analyzed which is the proper or popular, let's look into the results.




Stack Overflow Developer Survey Results 2017

Stack Overflow asked developers which indentation character they use.

42.9% of approximately 39,000 developers use Tabs and approximately 37.8% use Spaces. 19.3% use both as follows.
Stack Overflow Developer Survey Results 2017


GitHub analyzed source code commits

GitHub analyzed commits per programming languages, so let's look at each. We will see difference results from the Stack Overflow's.

JavaScript developers use Tabs or Spaces? 80.64% of JavaScript developers use space character.
Popular Coding Convention on Github (JavaScript)

Java developers use Tabs or Spaces?

66.466% of Java developers use space character.
Popular Coding Convention on Github (Java)

Python developers use Tabs or Spaces?

94.866% of Python developers use space character.
Popular Coding Convention on Github (Python)

Scala developers use Tabs or Spaces?

96.835% of Scala developers use space character.
Popular Coding Convention on Github (Scala)


Ruby developers use Tabs or Spaces?

95.563% of Ruby developers use space character.
Popular Coding Convention on Github (Ruby)

C# developers use Tabs or Spaces?

82.172% of C# developers use space character.
Popular Coding Convention on Github (C#)

PHP developers use Tabs or Spaces?

70.729% of PHP developers use space character.
Popular Coding Convention on Github (PHP)


As a result of that, Stack Overflow (Engineer QA site) says most people use Tabs, but people in GutHub who develop open source software use Spaces.

There are so many conversation about which indentation character is popular or better, but Spaces might be better since big companies such as Google and Microsoft use GitHub and use Spaces.