You’ll hear this question pop up and start a debate in tech circles and tech shows (i.e. Silicon Valley) – how do you indent while writing code, tabs or spaces?
There’s valid points for and against each option, but I personally use tabs and not spaces. Spaces can be a nightmare to work with sometimes while writing code, especially in programming languages, such as Python, where the number of spaces/tabs are vital for your code to run correctly.
What side do you stand on?
- Both Interchangeably (I’m a psychopath)
- No Preference
(I’m a psychopath) It depends on the language and quality required
Tabs mess up my Python thingy and spaces takes forever in C.
Tabs tend to format better across editors
Whatever I feel like Or if my editor by default turns tabs into 4 spaces… that happens as well.
1 word about spaces. Yaml.
I hate yaml so very much. Though I appreciate the editor that converts tabs into spaces for it. Can never remember which ones do that though, because I’m always in nano.
Alias sn=‘sudo nano’
Lol, this is on all my machines
It just occurred to me: is there any performance hit (however miniscule it may be) when using space/s vs. tab?
I wouldn’t have thought so… I guess it depends how many spaces you use
Tab width:4. i convert anything to Tab, for me its easier to read on web development.
but legends use space, because “If its hard to code, its must be hard to read.”