I like tabs for indentation and no special alignment. There's no need to align stuff if you keep your methods trim and refactor things that feel like they need to be next-line aligned.
Agreed on the alignment thing. Why would I spend time hitting the space bar over and over again just because I renamed a variable and now the equals signs all "need" to be five more spaces out? Keep your code orderly, to a fault even, but aesthetics has no place in code formatting.
I took a data scientist certification course where they recommended 8 spaces to discourage excessive nesting....dumbest thing I ever heard. Lost all credibility in my opinion.
Now, some people will claim that having 8-character indentations makes the code move too far to the right, and makes it hard to read on a 80-character terminal screen. The answer to that is that if you need more than 3 levels of indentation, you're screwed anyway, and should fix your program.
In short, 8-char indents make things easier to read, and have the added benefit of warning you when you're nesting your functions too deep. Heed that warning.
8 is just too much for me, but that is what is nice today, edit your own highlighting, indents, everything...set up your own auto format and minify it or run it through your teams build when you are ready to commit....I knew a guy who would keep everything at the same level I shit you not....he could never explain his code, poor bastard, fortunately I escaped that "think tank".
To each their own, have a beer on me. Cheers to whatever coding religion you follow...
7
u/Asmor Mar 27 '15
My company's all tabs (yay!), even for alignment (d'oh) and tab width is 8 (wtf)
Personally, I like tabs for indentation and spaces for alignment.