Facts:
1. GIT and other version control systems handle white space differently
Based on my experience, we came across our projects: GIT and other version control systems to process invisible spaces + TABS differently, and this leads to changes in the lines that were not actually affected. It's easy not to notice when one space + TAB = indent is added inadvertently, the same indent in the IDE, but GIT will matter when merged. This damages your ability to effectively compare changes in source code management , which is really scary. This will never happen if you only have spaces .
2. To neutralize the difference in the environment of co-authors (editor, OS, settings, etc.)
The width of the bookmark (in spaces) depends on your environment (text editor, OS, preferences, etc.), but the width of the space is the same everywhere . The IDE is smart enough to handle white spaces to your personal taste, but the result created for collaboration should be up to standard.
3. Developers using spaces make more money than those using tabs
Using spaces instead of tabs is associated with an 8.6% higher salary . Using spaces instead of tabs is associated with a high pay gap as an additional 2.4-year experience. (source: Qaru 2017 survey survey ).
4. Numerous studies on the importance of coding style
If every employee of your project adheres to the same coding standards, it will be good in the long run, cooperation will be more effective and professional, the same when you reorganize or develop. Studies regarding this:
For example, Ben Schneiderman confirmed this in experimental experiments in the behavior of programmers :
when the program operators were organized in a reasonable manner , experts were able to remember them better than novices. When statements were shuffled, the superiority of experts was diminished.
An old 1984 study by Nightingale and Erlich is cited in Code Complete and supports research from Programming Style Elements :
Our empirical results bring teeth into these rules: It is not just a matter of aesthetics that programs should be written in a particular style. Rather, there is a psychological basis for writing programs in the usual way: programmers have high hopes that other programmers will follow these discourse rules. If the rules are violated , then the utility provided by the expectations that programmers created over time is effectively nullified .
Farside
source share