Anybdy remember the 'tabs versus spaces' debate?

Page 1 of 1 [ 15 posts ] 

JustFoundHere
Veteran
Veteran

Joined: 13 Jan 2018
Age: 59
Gender: Male
Posts: 1,930
Location: California

12 Nov 2022, 8:31 pm

STORY on the 'tabs versus spaces' debates.

A 2016 episode of the HBO Series 'Silicon Valley' was titled 'Tabs vs. Spaces' - Season 3 Episode 6.

STORY: Inside Silicon Valley’s Spaces And Tabs Debate:
https://www.popsci.com/inside-silicon-v ... bs-debate/



Fenn
Veteran
Veteran

User avatar

Joined: 1 Sep 2014
Gender: Male
Posts: 2,038
Location: Pennsylvania

12 Nov 2022, 9:22 pm

This part of the article was funny:

"At the beginning of this week’s episode Pied Piper hires a few new employees to help build their compression platform, but as they begin to work on scaling up the platform, Gilfoyle (Martin Starr) explains that Richard is adamant about using tabs in code instead of spaces.

We are also introduced to Winnie, who works at Facebook and begins to date Richard: it is a brief romance, though, since she insists on using spaces rather than tabs— a difference that eventually drives them apart."

You know you are a geek when . . .


_________________
ADHD-I(diagnosed) ASD-HF(undiagnosed - maybe)
RDOS scores - Aspie score 131/200 - neurotypical score 69/200 - very likely Aspie


Fnord
Veteran
Veteran

User avatar

Joined: 6 May 2008
Age: 65
Gender: Male
Posts: 57,198
Location: Stendec

13 Nov 2022, 2:40 am

Spaces vs Tabs?  Pfeh.  Kids' stuff.

I almost got fired over my use of the Oxford Comma.


_________________
 
• Veritas Illuminata • Semper Illuminans • Custodiamus Veritas •
• Et Serviunt Qui Non Videntur •


Radish
Veteran
Veteran

User avatar

Joined: 10 May 2022
Age: 63
Gender: Male
Posts: 12,441
Location: UK

13 Nov 2022, 7:37 am

Fnord wrote:
Spaces vs Tabs?  Pfeh.  Kids' stuff.

I almost got fired over my use of the Oxford Comma.


I used to get into trouble for sitting at my desk in a coma. ;-)


_________________
This space intentionally left blank.


Mikah
Veteran
Veteran

User avatar

Joined: 23 Oct 2015
Age: 35
Posts: 2,859
Location: England

13 Nov 2022, 8:39 am

Almost as important and fiercely debated as the "correct" way to use braces:

Code:
functionorcondition {
    statement;
}

or
Code:
functionorcondition
{
    statement;
}


_________________
Children are innocent and love justice, while most of us are wicked and naturally prefer mercy.


CarlM
Veteran
Veteran

User avatar

Joined: 21 Oct 2019
Age: 65
Gender: Male
Posts: 763
Location: Long Island, NY

13 Nov 2022, 8:49 am

There's no debate. Spaces are the way to go :lol:. But I could rant on all day about coding style. At work I had to suppress that urge, since it would certainly remove all doubts about my ASD.


_________________
ND: 123/200, NT: 93/200, Aspie/NT results, AQ: 34
-------------------------------------------------------------
Fight Climate Change Now - Think Globally, Act locally.


Fenn
Veteran
Veteran

User avatar

Joined: 1 Sep 2014
Gender: Male
Posts: 2,038
Location: Pennsylvania

13 Nov 2022, 9:03 pm

Um,

https://stackoverflow.com/questions/231 ... s-and-tabs


_________________
ADHD-I(diagnosed) ASD-HF(undiagnosed - maybe)
RDOS scores - Aspie score 131/200 - neurotypical score 69/200 - very likely Aspie


rowan_nichol
Veteran
Veteran

Joined: 28 Jul 2016
Age: 59
Gender: Non-binary
Posts: 748
Location: England

15 Nov 2022, 6:38 pm

When writing in FORTRAN back in the day, editors which could be set to place seven spaces into the file when the TAB key was pressed were ones greatest friend, allowing either tab plus ones line of code, tab, backspace and + to continue the instruction.



JustFoundHere
Veteran
Veteran

Joined: 13 Jan 2018
Age: 59
Gender: Male
Posts: 1,930
Location: California

15 Nov 2022, 7:22 pm

Mikah wrote:
Almost as important and fiercely debated as the "correct" way to use braces:

Code:
functionorcondition {
    statement;
}

or
Code:
functionorcondition
{
    statement;
}


What are some of the other debated practices in programming?



Fnord
Veteran
Veteran

User avatar

Joined: 6 May 2008
Age: 65
Gender: Male
Posts: 57,198
Location: Stendec

16 Nov 2022, 4:02 am

"Structured" versus "Organic" programming.


_________________
 
• Veritas Illuminata • Semper Illuminans • Custodiamus Veritas •
• Et Serviunt Qui Non Videntur •


JustFoundHere
Veteran
Veteran

Joined: 13 Jan 2018
Age: 59
Gender: Male
Posts: 1,930
Location: California

16 Nov 2022, 3:39 pm

Fnord wrote:
"Structured" versus "Organic" programming.


No info. online on the 'Structured versus Organic Programming' debate. Any further details?



DuckHairback
Veteran
Veteran

User avatar

Joined: 27 Jan 2021
Age: 43
Gender: Male
Posts: 1,146
Location: Dorset

16 Nov 2022, 4:02 pm

I never understood the argument for spaces. Surely just for efficiency a tab is going to be undebatably superior?

Or do compilers parse spaces quicker or something like that?


_________________
Naturally occurring variant. Swollen oafish and wince positive.


Mikah
Veteran
Veteran

User avatar

Joined: 23 Oct 2015
Age: 35
Posts: 2,859
Location: England

16 Nov 2022, 5:10 pm

JustFoundHere wrote:
What are some of the other debated practices in programming?


Topics of so little importance, yet debated with the same ferocity? Dark vs light mode on an IDE comes to mind, can't think of any others off the top of my head. There are other stupid wars, but none quite so pointless as those three.


_________________
Children are innocent and love justice, while most of us are wicked and naturally prefer mercy.


r00tb33r
Veteran
Veteran

User avatar

Joined: 28 May 2016
Age: 35
Gender: Male
Posts: 3,456
Location: Virginia

16 Nov 2022, 10:42 pm

Mikah wrote:
Code:
functionorcondition {
    statement;
}

This is what I prefer, I hate wasting lines on braces, I personally don't use Visual Studio for my personal projects, but have to use it at work. I had to configure a custom formatter to make the above happen.

Gonna annoy some people in the shared git repo, I'm sure.


_________________
Dark humor is 10 children in a dumpster. Morbid humor is a child in 10 dumpsters. :twisted:


Fnord
Veteran
Veteran

User avatar

Joined: 6 May 2008
Age: 65
Gender: Male
Posts: 57,198
Location: Stendec

16 Nov 2022, 11:54 pm

JustFoundHere wrote:
Fnord wrote:
"Structured" versus "Organic" programming.
No info. online on the 'Structured versus Organic Programming' debate. Any further details?
Structured Programming (applies to source code):

• Begin with a flow chart of the main process, detailing each routine, subroutine, decision point, I/O port, interrupt, and "wait" state.

• LOTS of white space; double CRLF between lines.

• LOTS of remarks, explaining each variable, routine/subroutine, procedure, et cetera.

• Pre-defined data in the same area (some say, "At the beginning"; and some say, "At the end".)

• Pre-defined subroutines in the same area (usually after the end of the main process.)

• A "watchdog" that re-initializes the entire process if it gets hung in a loop AND delivers a plain-language description of the fault.

Organic Programming (Applies to source code):

• We do not need any stinking flow charts!  We make programs, not eye-candy!

• We do not need any white space -- a single CRLF between lines of code is all that is necessary.

• If you cannot understand my source code, then maybe you should not be messing with it!

• IF-THEN-ELSE and GOTO are our favorite commands (using BASIC as an obvious example)

• Define everything on the fly.

• If the software locks up, it is the hardware's fault -- or maybe the user!

•••

Structured programming takes longer; but reliability is enhanced ("Did you file your TPS report?").

The idea behind organic programming is "Never enough time or money to do it right; always enough to do it over."

Larger software houses usually embrace structure, while backroom operations usually favor the organic model.


_________________
 
• Veritas Illuminata • Semper Illuminans • Custodiamus Veritas •
• Et Serviunt Qui Non Videntur •