So according to this article (http://www.bbc.co.uk/news/technology-40302410) and blog (https://stackoverflow.blog/2017/06/15/developers-use-spaces-make-money-use-tabs/) if you use spaces instead of tabs you get paid more.
How bizarre.
Formatting counts.....
I wonder if it is related to the system being used. Arcane systems that cant handle tabs might have more highly paid rare specialists.
These articles seem to be worded to give you the impression they want you to have. When I see something which has been "proven" by studies or surveys, I need to look to see just how the surveys are done. Many times I find that questions have been worded to create the wanted answers, or articles leave out small, but important information that could change your perception.
In this instance, we have 28,657 people surveyed. Out of that, 40.7% say they use exclusively tabs, 41.8% use exclusively spaces; However, only 12,426 people also provided salary information. The article does not mention the percentage of space/tab users within that 12,426. This is an important piece of information needed to interpret the results correctly. In an extreme case, if all space users reported their salary, that would be 11,978 people using spaces and reporting salary vs 447 people using tabs and reporting their salary. That is way to large of a difference to make any conclusion about who is highest paid.
Now I doubt that the extreme case above is the reality, but what is the actual division? 75%, 50%? 10%? We don't know and therefore cannot make any valid assumptions as to what is better.
Every company I've worked for had coding guidelines which enforce the usage of tabs. There's a good reason for this.
I'm a "tabber" and I'll stay with tabs (ok, I dont' get paid for coding but the readability is better with tabs IMHO). And I don't believe surveys in general.
Krischan, how can the readability be better? It looks exactly the same. But as soon as you work in teams and you need to use the same. And as some tend to press space sometimes instead of tab there is only one way to ensure that it will always everywhere look the same, no matter which IDE you use... ;)
Ok, perhaps the readability is the same. But one tab is four spaces and it's easier to create or delete them than this huge amount of spaces. A disadvantage is posting sourcecode in a forum, my sources were sometimes messed up using tabs in the old bb.com forum but I never switched over to spaces because of that.
Look here we go already. So a tab is four spaces on your system, but could be 2 or 8 on another one.
I didn't know about using tabs, you lean something new every day.
That's that then. Consider me a space convert.
Now to start applying for a new job!
My works forced coding standards are 2 spaces for indents.
Of course everyone still hits the tab key, but we configure the IDE to convert tabs to 2 spaces :)
Gee, I can just imagine incorporating this into charging clients...
Me : Here is the quote for the project we discussed
Client : < reads through quote >
Client : Hmm, I see there are two possible charges here?. One says if you use tabs it's X amount but if you use spaces you'll charge us 20% more!
Me : Yes, that's correct
Client : Tabs, spaces? What's the difference?, What are the benefits to us?
Me : No difference and no benefits. It a choice like if I paint your walls using up and down strokes or down and up strokes.
Client : USE FUCKING TABS!!!!
I can't believe for one second that a person who uses spaces rather than tabs generally gets paid more money. I would hazard a guess that in the data there are companies that have enforced a certain style that incidentally pay more money which has skewered the result.
everywhere I've worked uses Tabs and systems that have ranged from IBM XT's using DOS to today's stuff.
Quote
My works forced coding standards are 2 spaces for indents.
2?! You might as well not bother indenting at all!
2 is standard in our company as well.
Quote from: Steve Elliott on June 18, 2017, 18:55:44
Quote
My works forced coding standards are 2 spaces for indents.
2?! You might as well not bother indenting at all!
Yeah, it's fifty spaces or don't indent at all. :P
Seriously though, I use two spaces as well.
Quote from: Xaron on June 18, 2017, 19:02:05
2 is standard in our company as well.
I always indent 4
Yep 4 spaces, or it's pretty much pointless and leads to cluttered code.
Why does it lead to cluttered code? :o
I mean obviously some guys have had some deep thinking, there must be a reason to put 2 space indention into a company policy for over 1,000 employees? ;)
Because when you get to any nested code it becomes a mess.
You're saying all large companies make the best decisions every time?
Haha no. Got me. :)
lol it doesn't make things any quicker, because modern systems correctly fill out the 4 spaces with a click of the tab key.
And the more complicated code becomes, the more there is a need for the (usual) standard of 4 spaces. Having just 2 seems to indicate people are making their functions/procedures too wordy, so they are trying to cram everything onto one line!