Programmers who use spaces 'paid more'

Started by dawlane, June 16, 2017, 18:21:32

Previous topic - Next topic

Rooster

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.

EdzUp


Steve Elliott

Yep 4 spaces, or it's pretty much pointless and leads to cluttered code.
Win11 64Gb 12th Gen Intel i9 12900K 3.2Ghz Nvidia RTX 3070Ti 8Gb
Win11 16Gb 12th Gen Intel i5 12450H 2Ghz Nvidia RTX 2050 8Gb
Win11  Pro 8Gb Celeron Intel UHD Graphics 600
Win10/Linux Mint 16Gb 4th Gen Intel i5 4570 3.2GHz, Nvidia GeForce GTX 1050 2Gb
macOS 32Gb Apple M2Max
pi5 8Gb
Spectrum Next 2Mb

Xaron

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? ;)

Steve Elliott

#19
Because when you get to any nested code it becomes a mess.

You're saying all large companies make the best decisions every time?
Win11 64Gb 12th Gen Intel i9 12900K 3.2Ghz Nvidia RTX 3070Ti 8Gb
Win11 16Gb 12th Gen Intel i5 12450H 2Ghz Nvidia RTX 2050 8Gb
Win11  Pro 8Gb Celeron Intel UHD Graphics 600
Win10/Linux Mint 16Gb 4th Gen Intel i5 4570 3.2GHz, Nvidia GeForce GTX 1050 2Gb
macOS 32Gb Apple M2Max
pi5 8Gb
Spectrum Next 2Mb

Xaron


Steve Elliott

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!
Win11 64Gb 12th Gen Intel i9 12900K 3.2Ghz Nvidia RTX 3070Ti 8Gb
Win11 16Gb 12th Gen Intel i5 12450H 2Ghz Nvidia RTX 2050 8Gb
Win11  Pro 8Gb Celeron Intel UHD Graphics 600
Win10/Linux Mint 16Gb 4th Gen Intel i5 4570 3.2GHz, Nvidia GeForce GTX 1050 2Gb
macOS 32Gb Apple M2Max
pi5 8Gb
Spectrum Next 2Mb