Is this about whether you set your editor to convert tabs to spaces? (which is obviously tidier due to inconsistent treatment of tabs) Or do some people actually use the space bar to indent code? (which is obviously insane)
Definitely the former. Anyone who indents there code by slapping the space bar repeatedly is a monster and should have their hands cut off.
Developers who use spaces make more money than those who use tabs
171–180 of 690 posts
Re: Developers who use spaces make more money than those who use tabs
#172Earlier quoted context omitted.
Where does using vim to insert four Spaces everytime I press tab leave me?
Yea, I'm honestly surprised this is a thing still. I've not thought about the tab vs spaces "war" in years; because of Vim. I just hit Tab and whatever the pre-defined standard is, be it tabs or spaces and space count, is used. Visually I can have it display in my editor of choice (Kakoune at the moment) however I want. I guess I'm just saying, I would have thought the most common answer to this question would be: Wh…
Re: Developers who use spaces make more money than those who use tabs
#173Earlier quoted context omitted.
I do find properly aligned code easier to read in general, I'm not willing to give that up. The crux of the issue is poor tooling. Aligning correctly is a pain because most editors suck terribly at it. For instance neither emacs nor vim align correctly when using tabs by default (they use as many tabs as they can and then pad using spaces, instead of indenting only with tabs and aligning only with spaces). If they di…
Yeah; the correct answer to a good codestyle is good tooling; high quality automated tooling. Things like gofmt and prettier are excellent. yapf and clang-format are also pretty good, but need a lot of set up. But I never found a single editor that handles spaces correctly. I currently use vscode with vim bindings and whenever I deal with a space-indented codebase I want to tear my hair out: I inconsistently have to…
Re: Developers who use spaces make more money than those who use tabs
#174Re: Developers who use spaces make more money than those who use tabs
#175Re: Developers who use spaces make more money than those who use tabs
#176People who use spaces are just better than those who use tabs.
Re: Developers who use spaces make more money than those who use tabs
#177Pretty simple: you use spaces because you're aware that there is more than one IDE/editor in this world and who knows what your code will get opened with tomorrow. This means you consider consequences beyond "but it works on my machine" so you're a better programmer. Ergo, higher salary.
Almost everyone I know who uses spaces or tabs does so because that's either the default on their IDE, or for their language. So this holier-than-thou argument holds less water than the sun. On the other hand, I find 2-space-indented code unreadable; in fact, 4-space wide indentation is the only size I find to be readable. I know plenty of people for whom that isn't the case. Using tabs lets the reader set the indent…
Re: Developers who use spaces make more money than those who use tabs
#178These people have a particular gusto in constantly one-upping each other with the latest good practice; the one that adopts the highest number of good practices wins. Their constant talk of the latest fad and push for the "right ways" of doing things usually puts them in positions where they end up evaluating and hiring new developers (I got interviewed just the other day by somebody that didn't ask me to design or structure any code, but rather if I use == or ===).
Some of these are actually excellent developers nonetheless; others will drive entire teams into rewriting a perfectly working application into a completely useless mess of a thousand microservices. Endeavour that will end up in their CV anyway, helping them to find another excellently paid job once it's time to migrate.
Re: Developers who use spaces make more money than those who use tabs
#179Re: Developers who use spaces make more money than those who use tabs
#180Earlier quoted context omitted.
I think there's probably some truth to considering existing norms and thinking ahead, but find it unlikely to be the main confounder. How do tabs fail to work in other editors/IDEs?
They might be configured differently, and you usually can't align stuff properly using just tabs, you have to use a space or three somewhere. Also, you never know if it's spaces, tabs or a combination of them in existing code - which you may have not written yourself. So in the long run, the indentation WILL get fucked up and you WILL miss something when fixing a bug in code that you or someone else wrote 6 months ag…
Um... I always know because I always set my IDEs to show those characters. You don't?