If you can read this, either the style sheet didn't load or you have an older browser that doesn't support style sheets. Try clearing your browser cache and refreshing the page.

(IT World)   The optimal coding indentation style? Easy. Tabs that are 84% soft and 3.3 columns wide   (itworld.com) divider line 12
    More: Obvious, line coding, 1TBS  
•       •       •

2069 clicks; posted to Geek » on 06 Mar 2013 at 9:43 AM (1 year ago)   |  Favorite    |   share:  Share on Twitter share via Email Share on Facebook   more»



Voting Results (Smartest)
View Voting Results: Smartest and Funniest


Archived thread
2013-03-06 10:27:24 AM
2 votes:
If you use anything other than hard tabs, fark you.

Hard tabs mean each developer can set tab width to whatever he wants.

Soft tabs mean you get that one dipshiat who insists on 5 spaces instead of 4 and farks up the whole codebase.
2013-03-06 10:10:07 AM
2 votes:
Sometimes
 I use one space
  especially if I know
    my nests are going 8 deep

Otherwise
   I only use a triple space
2013-03-06 10:05:19 AM
2 votes:
Use a formatter.
Apply it before and after all changes and before commits to the repo.
Changes are uniform and indent style is consistent.

/Not loved, consistent
2013-03-06 09:54:02 AM
2 votes:
The optimal coding indentation style is to remember that the compiler doesn't see white-space and just do whatever gives you and your co-workers the easiest time distinguishing loops, functions, relevant blocks, etc.

If you're taking the time to argue about it you're literally wasting more time than you would just staring at your co-worker's code for thirty seconds to get used to it.
2013-03-06 09:47:02 AM
2 votes:
The optimal indentation style is to be flexible and not sweat little stuff so much.
2013-03-06 02:21:22 PM
1 votes:
I don't understand why this is a debate. Are there people still coding in Notepad or something? Is there really a decent editor that can't convert between different styles?

for the record I use hard tabs, 4 spaces in every language I code in. Even in Python where I'm told it's the greatest of all sins.
2013-03-06 11:39:19 AM
1 votes:

Quantum Apostrophe: Jim_Callahan: the compiler doesn't see white-space

[www.python.org image 211x71]


Also

rubyonrails.org
2013-03-06 11:38:41 AM
1 votes:

Jim_Callahan: the compiler doesn't see white-space


www.python.org
2013-03-06 10:31:04 AM
1 votes:

Mayhem of the Black Underclass: Sometimes
 I use one space
  especially if I know
    my nests are going 8 deep

Otherwise
   I only use a triple space


If your nests are going 8 deep, you need to break that out into a function or something. Should be no reason to have anything nested more than 3 or 4 deep, tops.

On the other hand, that was a pretty nice poem!
2013-03-06 10:11:57 AM
1 votes:
I was born a soft tab, two columns man, and I'll die a soft tab, two columns man.

But really, the correct answer is "whatever everyone else on the project is doing."
2013-03-06 10:04:02 AM
1 votes:
I prefer to write my code in a gigantic single line. Screw you, readability! As long as it compiles, it's good!
2013-03-06 09:51:37 AM
1 votes:
Best is to mix up spaces and tabs, and never use the same number of either.
 
Displayed 12 of 12 comments

View Voting Results: Smartest and Funniest

This thread is closed to new comments.

Continue Farking
Submit a Link »






Report