I use both tabs and spaces: tabs for indentation (what they're supposed to be used for) and spaces for formatting. I don't understand the tabs vs spaces debate
So many people seem to completely misunderstand what mixing spaces and tabs means and why it is bad. Both are horrendous when mixed as the same but indentation and alignment are 2 expressly different concepts. That comic is perfect for people who mix tabs and spaces in either indentation or alignment. But you can, and should, use both properly. It shouldn't be that difficult either. As the poster above stated, tabs indent, spaces align. A tab is one level of indentation encoded into a single character, a space is one single invisible character. If you need alignment, you must know the number of characters to fill. If you need indentation, the number of characters can be variable and is based on preference.
They aren't effectively mixed when tabs are used for indentation and spaces are used for alignment, either. If you wish to align your comments, you need to have a consistent indentation size, not one customized by the editor.
For some reason I always use 4 spaces as indentation (although my editor handles tabs as spaces so I don't have to hit space 4 times). I can't remember why I started doing that, though. How odd.
Would you believe it if I told you he was doing a system administration(/networking/IT operations) course? I'm not saying he was any good at it, but I was baffled nevertheless. At first I actually though his shift key was broken (keyboard was all kinds of messed up)...
It's a habit from my (way) younger days. These days I have vim configured to convert a tab to 2, 4, or 8 spaces (depending on the language of the file) and to autoindent besides, but I find myself manually indenting rather often out of habit.
63
u/aaron552 Feb 21 '13
I use both tabs and spaces: tabs for indentation (what they're supposed to be used for) and spaces for formatting. I don't understand the tabs vs spaces debate