Discussion:
[BBC] Programmers who use spaces 'paid more'
(too old to reply)
Mr. Man-wai Chang
2017-06-18 13:45:16 UTC
Permalink
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
2017-06-18 20:13:44 UTC
Permalink
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.
Post by Mr. Man-wai Chang
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.
J. Clarke
2017-06-18 23:03:53 UTC
Permalink
In article <_9B1B.213777$***@fx44.am4>, ***@bahnhof.se
says...
Post by Per Sandberg
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
2017-06-19 00:22:51 UTC
Permalink
Post by J. Clarke
says...
Post by Per Sandberg
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.
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
Pascal J. Bourguignon
2017-06-19 05:50:19 UTC
Permalink
Post by J. Clarke
says...
Post by Per Sandberg
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.
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
2017-06-19 14:28:16 UTC
Permalink
Post by J. Clarke
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? ;)
--
@~@ 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
Snit
2017-06-20 03:00:30 UTC
Permalink
On 6/18/17, 4:03 PM, in article
Post by J. Clarke
says...
Post by Per Sandberg
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.
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.


Mr. Man-wai Chang
2017-06-19 10:46:58 UTC
Permalink
Post by Per Sandberg
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.
--
@~@ 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
Chris M. Thomasson
2017-06-19 01:19:28 UTC
Permalink
Post by Mr. Man-wai Chang
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
2017-06-19 02:23:18 UTC
Permalink
Post by Chris M. Thomasson
Post by Mr. Man-wai Chang
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? ;^)
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.
Chris M. Thomasson
2017-06-19 19:42:20 UTC
Permalink
Post by J. Clarke
Post by Chris M. Thomasson
Post by Mr. Man-wai Chang
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? ;^)
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.
For some reason I was thinking of the following video clip from the
Silicon Valley series on HBO:



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

;^)
J. Clarke
2017-06-20 02:19:52 UTC
Permalink
Post by Chris M. Thomasson
Post by J. Clarke
Post by Chris M. Thomasson
Post by Mr. Man-wai Chang
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? ;^)
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.
For some reason I was thinking of the following video clip from the
http://youtu.be/SsoOG6ZeyUI
This person actually presses the damn space key n times, where n is the
number of spaces. WOW!
;^)
If the series is all like that I'm glad I never watched it. There's
something _wrong_ with that boy.
Chris M. Thomasson
2017-06-20 18:44:51 UTC
Permalink
Post by J. Clarke
Post by Chris M. Thomasson
Post by J. Clarke
Post by Chris M. Thomasson
Post by Mr. Man-wai Chang
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? ;^)
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.
For some reason I was thinking of the following video clip from the
http://youtu.be/SsoOG6ZeyUI
This person actually presses the damn space key n times, where n is the
number of spaces. WOW!
;^)
If the series is all like that I'm glad I never watched it. There's
something _wrong_ with that boy.
Lol! The character might be suffering from a bit of Asperger's syndrome.
Mr. Man-wai Chang
2017-06-19 10:47:31 UTC
Permalink
Post by Chris M. Thomasson
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. :)
--
@~@ 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
AnthonyL
2017-06-19 11:24:42 UTC
Permalink
On Mon, 19 Jun 2017 18:47:31 +0800, "Mr. Man-wai Chang"
Post by Mr. Man-wai Chang
Post by Chris M. Thomasson
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
2017-06-19 12:26:47 UTC
Permalink
Post by AnthonyL
Post by Mr. Man-wai Chang
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.
--
@~@ 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
JJ
2017-06-19 13:53:22 UTC
Permalink
Post by Mr. Man-wai Chang
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
2017-06-19 14:27:17 UTC
Permalink
Post by JJ
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.
--
@~@ 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
Anton Shepelev
2017-06-20 21:51:31 UTC
Permalink
Tab characters are annoying. They messes the cur-
sor'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.
There is a standard convention that works 100% of
the time:
Indent with tabs
Align with spaces

Such code will look good regardless of the tab width
used in the editor, so that each programmer may set
up whatever tab width he prefers.
--
() ascii ribbon campaign -- against html e-mail
/\ http://preview.tinyurl.com/qcy6mjc [archived]
Simon Wright
2017-06-21 12:27:48 UTC
Permalink
Post by Mr. Man-wai Chang
The debate over whether it is better to use spaces or tabs to indent
code has raged among programmers for years.
Dead simple: use the TAB key to tell the editor to align the
current/selected lines appropriately; and leave the editor to decide
whether to use tab characters (C-I) to implement the indent or just
spaces.

I agree that you have a problem if your project standards require some
weird setting, but it's still a question of customising the editor.

I bet that 90+% of the Ada programmers who've read this thread are using
GNAT, and if they are using either of the most likely editors (GPS or
Emacs) they'll have this sorted for them without any need for fretting
over it.

Anyone who argues for tabs on the grounds that they save space is
clearly living in 1987 at the latest. If you want to save space, why not
remove all comments?
Pascal J. Bourguignon
2017-06-21 16:48:22 UTC
Permalink
Post by Mr. Man-wai Chang
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.
--
__Pascal J. Bourguignon
http://www.informatimago.com
Mr. Man-wai Chang
2017-06-21 16:52:57 UTC
Permalink
Post by Pascal J. Bourguignon
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....
--
@~@ 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
Loading...