Tabs, 2 space, 4 space, 8 space, 9.5 spaces...
I get asked why I use Tabs. I am very fussy when it comes to code layout. Preferences for indentation, use of brackets etc are all very important. But I also like to leave people choices.
There are lots of arguments on using spaces vs tabs and how many to use. I am not really going to get into them, but I did want to give an example of what should and should not be set.
These rules are good:
- Any naming standard is better than no standard.
- There is no "one true" standard, we all have our preferences
- If there is standard already in place, use it. Don't create another standard or muddy the existing standards.
What font size should you use. Well 9 point. Everyone should use 9 point. This is of course not true. Firstly, everyone should use the font and size to suit them. And secondly screens size change, available space and point size change (depending on what you use for calibration).
So you should give the user the choice of font, background colour, colour syntax highlighting etc.
I believe the same things for spacing of indentations.
Use Tab, configure Spacing
So I use tab. Then I set tab to 4 spaces on my normal computer. And then when another developer in my team prefers 2 spaces there is no down side.