Anybdy remember the 'tabs versus spaces' debate?

Page 1 of 1 [ 15 posts ] 

JustFoundHere
Veteran
Veteran

Joined: 13 Jan 2018
Age: 60
Gender: Male
Posts: 2,140
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,404
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(diagnosed)
RDOS scores - Aspie score 131/200 - neurotypical score 69/200 - very likely Aspie


Fnord
Veteran
Veteran

User avatar

Joined: 6 May 2008
Age: 66
Gender: Male
Posts: 59,750
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.


_________________
 
No love for Hamas, Hezbollah, Iranian Leadership, Islamic Jihad, other Islamic terrorist groups, OR their supporters and sympathizers.


Radish
Veteran
Veteran

User avatar

Joined: 10 May 2022
Age: 64
Gender: Male
Posts: 13,233
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: 36
Posts: 3,201
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;
}


_________________
Behold! we are not bound for ever to the circles of the world, and beyond them is more than memory, Farewell!


CarlM
Veteran
Veteran

User avatar

Joined: 21 Oct 2019
Age: 66
Gender: Male
Posts: 828
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,404
Location: Pennsylvania

13 Nov 2022, 9:03 pm

Um,

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


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


rowan_nichol
Veteran
Veteran

Joined: 28 Jul 2016
Age: 60
Gender: Non-binary
Posts: 769
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: 60
Gender: Male
Posts: 2,140
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: 66
Gender: Male
Posts: 59,750
Location: Stendec

16 Nov 2022, 4:02 am

"Structured" versus "Organic" programming.


_________________
 
No love for Hamas, Hezbollah, Iranian Leadership, Islamic Jihad, other Islamic terrorist groups, OR their supporters and sympathizers.


JustFoundHere
Veteran
Veteran

Joined: 13 Jan 2018
Age: 60
Gender: Male
Posts: 2,140
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: 44
Gender: Male
Posts: 2,968
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?


_________________
Was that really necessary?


Mikah
Veteran
Veteran

User avatar

Joined: 23 Oct 2015
Age: 36
Posts: 3,201
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.


_________________
Behold! we are not bound for ever to the circles of the world, and beyond them is more than memory, Farewell!


r00tb33r
Veteran
Veteran

User avatar

Joined: 28 May 2016
Age: 36
Gender: Male
Posts: 3,778

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.


_________________
Enjoy the silence.


Fnord
Veteran
Veteran

User avatar

Joined: 6 May 2008
Age: 66
Gender: Male
Posts: 59,750
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.


_________________
 
No love for Hamas, Hezbollah, Iranian Leadership, Islamic Jihad, other Islamic terrorist groups, OR their supporters and sympathizers.