Submitted via IRC for TheMightyBuzzard
The annual Stack Overflow developer surveys often include lots of bad news. "People still use PHP," for example, is a recurring and distressing theme. "Perl exists" is another.
But never before has the survey revealed something as devastatingly terrible as the 2017 survey. Using PHP and Perl are matters of taste. Extremely masochistic taste, certainly, but nobody is wrong for using those languages; it's just the programming equivalent of enjoying Adam Sandler movies. But the 2017 survey goes beyond taste; it goes into deep philosophical questions of right and wrong, and it turns out that being wrong pays more than being right.
Developers who use tabs to indent their code, developers who fight for truth and justice and all that is good in the world, those developers have a median salary of $43,750.
But developers who use spaces to indent their code, developers who side with evil and probably spend all day kicking kittens and punching puppies? Their median salary is $59,140.
Source: ArsTechnica
(Score: 2) by KritonK on Monday June 19 2017, @09:58AM
:set sw=2
I hit the spacebar only two times!
When I first learned about indentation, I didn't like how ugly 8-space indentation, created using the tab key, looked. Then I saw someone use two spaces for indentation, liked what I saw, and have been using it ever since.
I remember reading an old paper, possibly in Software Practice and Experience, where they had studied the readability of programs as a function of the size of the indentation. They concluded that programs are most readable when 2 to 4 spaces are used for each level of indentation. From personal experience, I can only agree with this. One space is way too little for the indentation to be discernible, while 8 spaces move the interesting bits of complex code way to the right, making them hard to understand.