Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[BBC] Programmers who use spaces 'paid more'

1 view
Skip to first unread message

Mr. Man-wai Chang

unread,
Jun 18, 2017, 9:45:18 AM6/18/17
to

Computer programmers who use spaces as part of their coding earn $15,370
(£12,000) more per year than those who use tabs, a survey of developers
has revealed.

Full story: <http://www.bbc.com/news/technology-40302410>

The survey found the salary difference stretched across different
languages, countries and experience levels.

The debate over whether it is better to use spaces or tabs to indent
code has raged among programmers for years.

Indents act like paragraph markers and help define how programs work.

The result was "surprising," said David Robinson, data scientist at
Stack Overflow which carried out the survey of 12,400 developers.

'Pepsi or Coke question'

... more ....

Whether tabs or spaces were used could have an impact, he said, when
hand-written code was turned into working software. This process is
handled by a separate program called an interpreter or compiler. Some of
these can crash if they encounter something, such as a tab, when they
were only expecting spaces.

Professional developers typically set up their coding editor to use
either tabs or spaces to show the relationships between functional
elements, he said. Code can get harder to read if viewed in an editor
expecting tabs and getting spaces or vice versa.

--
@~@ Remain silent! Drink, Blink, Stretch! Live long and prosper!!
/ v \ Simplicity is Beauty!
/( _ )\ May the Force and farces be with you!
^ ^ (x86_64 Ubuntu 9.10) Linux 2.6.39.3
不借貸! 不詐騙! 不援交! 不打交! 不打劫! 不自殺! 請考慮綜援 (CSSA):
http://www.swd.gov.hk/tc/index/site_pubsvc/page_socsecu/sub_addressesa

Per Sandberg

unread,
Jun 18, 2017, 4:13:47 PM6/18/17
to
This makes perfect sense !

But this is the same class of statistics that tells you that milk is
causing accidents since the number of children in injured in car
accidents in an area is direct proportional to the consumption of milk
in the same area.

J. Clarke

unread,
Jun 18, 2017, 7:03:54 PM6/18/17
to
In article <_9B1B.213777$gM7....@fx44.am4>, per.s.s...@bahnhof.se
says...
>
> This makes perfect sense !
>
> But this is the same class of statistics that tells you that milk is
> causing accidents since the number of children in injured in car
> accidents in an area is direct proportional to the consumption of milk
> in the same area.

OK, so tell us what is the third factor that results in programmers who use
spaces being paid more than programmers who use tabs.

Lew Pitcher

unread,
Jun 18, 2017, 8:22:49 PM6/18/17
to
What third factor?
Remember, correlation is not causation. You'd be surprised at how often
people forget that. You can often take two random, real-world variables and
find some sort of correlation between them; that doesn't mean that there is
any causative factor between those variables values - random is random.

As for "programmers who use spaces get paid more than programmers who use
tabs", here are a few more for you

- there is a direct, linear correlation between
{US spending on science, space and technology}
and
{suicides by hanging, strangulation and suffocation}.
- there is a direct, linear correlation between
{the number of people who drowned by falling into a pool}
and
{films that Nicholas Cage appeared in}

http://www.tylervigen.com/spurious-correlations


--
Lew Pitcher
"In Skills, We Trust"
PGP public key available upon request


Chris M. Thomasson

unread,
Jun 18, 2017, 9:19:27 PM6/18/17
to
On 6/18/2017 6:45 AM, Mr. Man-wai Chang wrote:
>
> Computer programmers who use spaces as part of their coding earn $15,370
> (£12,000) more per year than those who use tabs, a survey of developers
> has revealed.
>
> Full story: <http://www.bbc.com/news/technology-40302410>
>
> The survey found the salary difference stretched across different
> languages, countries and experience levels.
>
> The debate over whether it is better to use spaces or tabs to indent
> code has raged among programmers for years.
>
> Indents act like paragraph markers and help define how programs work.
>
> The result was "surprising," said David Robinson, data scientist at
> Stack Overflow which carried out the survey of 12,400 developers.
>
> 'Pepsi or Coke question'
>
> ... more ....
>
> Whether tabs or spaces were used could have an impact, he said, when
> hand-written code was turned into working software. This process is
> handled by a separate program called an interpreter or compiler. Some of
> these can crash if they encounter something, such as a tab, when they
> were only expecting spaces.
>
> Professional developers typically set up their coding editor to use
> either tabs or spaces to show the relationships between functional
> elements, he said. Code can get harder to read if viewed in an editor
> expecting tabs and getting spaces or vice versa.
>

What about setting up the single press of the tab key to insert n
spaces? ;^)

J. Clarke

unread,
Jun 18, 2017, 10:23:18 PM6/18/17
to
In article <oi78k3$hb4$1...@dont-email.me>, inv...@invalid.invalid says...
That's what he said.

However generally speaking an editor that is set up to insert tabs has no
problem _displaying_ code that was indented with spaces.


Pascal J. Bourguignon

unread,
Jun 19, 2017, 1:50:41 AM6/19/17
to
IQ

Higher IQ makes you use spaces instead of tabs.
Higher IQ also makes you get paid more.



--
__Pascal J. Bourguignon
http://www.informatimago.com

Mr. Man-wai Chang

unread,
Jun 19, 2017, 6:46:58 AM6/19/17
to
On 19/6/2017 4:13 AM, Per Sandberg wrote:
> This makes perfect sense !
>
> But this is the same class of statistics that tells you that milk is
> causing accidents since the number of children in injured in car
> accidents in an area is direct proportional to the consumption of milk
> in the same area.

Personally speaking, hard spaces is better than tabs (white spaces). You
never how other programmers set up their tab width.

Mr. Man-wai Chang

unread,
Jun 19, 2017, 6:47:32 AM6/19/17
to
On 19/6/2017 9:19 AM, Chris M. Thomasson wrote:
>
> What about setting up the single press of the tab key to insert n
> spaces? ;^)

It's called a keyboard macro, well-known in the world computer gaming
keyboards and mouses. :)

AnthonyL

unread,
Jun 19, 2017, 7:24:42 AM6/19/17
to
On Mon, 19 Jun 2017 18:47:31 +0800, "Mr. Man-wai Chang"
<toylet...@gmail.com> wrote:

>On 19/6/2017 9:19 AM, Chris M. Thomasson wrote:
>>
>> What about setting up the single press of the tab key to insert n
>> spaces? ;^)
>
>It's called a keyboard macro, well-known in the world computer gaming
>keyboards and mouses. :)
>

I seem to recall it being a standard option in the editor our
programmers used, something like "Fill tabs with spaces y/N"


--
AnthonyL

Mr. Man-wai Chang

unread,
Jun 19, 2017, 8:26:48 AM6/19/17
to
On 19/6/2017 7:24 PM, AnthonyL wrote:
>>
>> It's called a keyboard macro, well-known in the world computer gaming
>> keyboards and mouses. :)
>
> I seem to recall it being a standard option in the editor our
> programmers used, something like "Fill tabs with spaces y/N"

The old way.

JJ

unread,
Jun 19, 2017, 9:53:47 AM6/19/17
to
On Sun, 18 Jun 2017 21:45:16 +0800, Mr. Man-wai Chang wrote:

> Computer programmers who use spaces as part of their coding earn $15,370
> (£12,000) more per year than those who use tabs, a survey of developers
> has revealed.
>
> Full story: <http://www.bbc.com/news/technology-40302410>
>
> The survey found the salary difference stretched across different
> languages, countries and experience levels.
>
> The debate over whether it is better to use spaces or tabs to indent
> code has raged among programmers for years.
>
> Indents act like paragraph markers and help define how programs work.
>
> The result was "surprising," said David Robinson, data scientist at
> Stack Overflow which carried out the survey of 12,400 developers.
>
> 'Pepsi or Coke question'
>
> .... more ....
>
> Whether tabs or spaces were used could have an impact, he said, when
> hand-written code was turned into working software. This process is
> handled by a separate program called an interpreter or compiler. Some of
> these can crash if they encounter something, such as a tab, when they
> were only expecting spaces.
>
> Professional developers typically set up their coding editor to use
> either tabs or spaces to show the relationships between functional
> elements, he said. Code can get harder to read if viewed in an editor
> expecting tabs and getting spaces or vice versa.

Tab characters are annoying. They messes the cursor's column position when
it's being moved up/down and through the middle of the non existing space
which was generated by the tab character.

Mr. Man-wai Chang

unread,
Jun 19, 2017, 10:27:18 AM6/19/17
to
On 19/6/2017 9:53 PM, JJ wrote:
>
> Tab characters are annoying. They messes the cursor's column position when
> it's being moved up/down and through the middle of the non existing space
> which was generated by the tab character.

I think that depends on the editor you were using. Or is it a Window$
Win32 objects behavior? I frankly don't know.

Mr. Man-wai Chang

unread,
Jun 19, 2017, 10:28:17 AM6/19/17
to
On 19/6/2017 1:50 PM, Pascal J. Bourguignon wrote:
>>
>> OK, so tell us what is the third factor that results in programmers who use
>> spaces being paid more than programmers who use tabs.
>
> IQ

Why not spy activities? The sole purpose of the news story was to attack
real programmers? ;)

Chris M. Thomasson

unread,
Jun 19, 2017, 3:42:18 PM6/19/17
to
For some reason I was thinking of the following video clip from the
Silicon Valley series on HBO:

https://youtu.be/SsoOG6ZeyUI

This person actually presses the damn space key n times, where n is the
number of spaces. WOW!

;^)

J. Clarke

unread,
Jun 19, 2017, 10:19:51 PM6/19/17
to
In article <oi997u$efv$2...@dont-email.me>, inv...@invalid.invalid says...
If the series is all like that I'm glad I never watched it. There's
something _wrong_ with that boy.


Snit

unread,
Jun 19, 2017, 11:00:35 PM6/19/17
to
On 6/18/17, 4:03 PM, in article
MPG.33b0d0e32...@news.eternal-september.org, "J. Clarke"
Could be programmers of certain ages or from different sources of education
learn one or the other method.

--
Personal attacks from those who troll show their own insecurity. They cannot
use reason to show the message to be wrong so they try to feel somehow
superior by attacking the messenger.

They cling to their attacks and ignore the message time and time again.

<https://youtu.be/H4NW-Cqh308>

Chris M. Thomasson

unread,
Jun 20, 2017, 2:44:53 PM6/20/17
to
Lol! The character might be suffering from a bit of Asperger's syndrome.

Pascal J. Bourguignon

unread,
Jun 21, 2017, 12:48:27 PM6/21/17
to
"Mr. Man-wai Chang" <toylet...@gmail.com> writes:

> Computer programmers who use spaces as part of their coding earn
> $15,370 (£12,000) more per year than those who use tabs, a survey of
> developers has revealed.
>
> Full story: <http://www.bbc.com/news/technology-40302410>

It is said that line prefixes in the form of: TAB* SPC{0,tw-1}
are the best of both world.

This is false.

First, you would need an editor to enforce it.

But it doesn't even solve the first problem of TAB, that their width
varies depending on tools and devices.

The problem is that the sequence of spaces must be of a length less than
the TAB width. So if you start with tw₀ and have sequences of SPC of
length tw₀-1, and you read/process the file on another system using
tw₁<tw₀, then you will get wrong indentations.

Furthermore, when you allow TAB in source files, you may also use them
to align columns of code, eg. to align variable names in one column, and
types in another column. And for those TAB in the middle of the lines,
the above rule is helpless, and again, you will get wrong indentations
in other environments, but also IN THE SAME ENVIRONMENT, where the TAB
width is kept constant, as soon as you use a different FONT, notably
when you use non-proportional fonts.

I know that it may seem heritic to use non-proportional fonts for code,
but the reality is that it can work very well, as long as you solve in
the IDE those problems of indentation, both prefix and inside a line.

And, it means the editor will have to compute the layout all the time,
from the parse tree.

Which leads me to the conclusion that the origin of a lot of problems is
the fact that we save "source" files that are used as-is both for
human presentation/edition and for machine processing (compiling). I
would propose the alternative to save the programs eg. in the form of an
abstract syntactic tree (let's say lisp S-expressions), and each time it
is loaded in an IDE/editor, it would be unparsed into the specific
syntactic and layout/indenting preferences of the programmer; and when
saved, the programmer specific syntax would be parsed, and the
S-expression syntactic tree would be saved to the file. Machine
processing can use directly these S-expression forms.

Mr. Man-wai Chang

unread,
Jun 21, 2017, 12:53:00 PM6/21/17
to
On 22/6/2017 12:48 AM, Pascal J. Bourguignon wrote:
> Which leads me to the conclusion that the origin of a lot of problems is
> the fact that we save "source" files that are used as-is both for
> human presentation/edition and for machine processing (compiling). I
> would propose the alternative to save the programs eg. in the form of an
> abstract syntactic tree (let's say lisp S-expressions), and each time it
> is loaded in an IDE/editor, it would be unparsed into the specific
> syntactic and layout/indenting preferences of the programmer; and when
> saved, the programmer specific syntax would be parsed, and the
> S-expression syntactic tree would be saved to the file. Machine
> processing can use directly these S-expression forms.

Basically, a code beautifier. But some programming languages' CR and LF
mean something. In the case of COBOL, the first few columns have meanings.

Which makes me believe hard, true SPACE is a simple and better solution.
Anyway....
0 new messages