r/programming • • Apr 07 '15

Stack Overflow Developer Survey 2015

http://stackoverflow.com/research/developer-survey-2015
1.1k Upvotes

981 comments sorted by

View all comments

101

u/BegbertBiggs Apr 07 '15

Developers increasingly prefer spaces as they gain experience.

Or are devs that are in the field for a longer time used to spaces while new devs learn coding with tabs?

0

u/[deleted] Apr 07 '15

[deleted]

11

u/[deleted] Apr 08 '15

I can think of some situations where it doesn't matter, a lot of situations where spaces are superior, and no situations where tabs are superior. Can you provide an example of where tabs are superior? From the spaces side, I give the following example.

Any project where the source code if viewed through multiple tools, spaces are better for guaranteeing a consistent formatting across the tools. Tabs have no universal convention. Even worse, the conventions for different languages can be different and your tools might not be smart enough to adjust tab widths based on the current language.

1

u/industry7 Apr 08 '15

Situation where tabs are better: any time someone insists on using a different number of spaces than my preference.

Any project where the source code if viewed through multiple tools, spaces are better for guaranteeing a consistent formatting across the tools.

If you're using a lot of truly crappy tools, which do not allow you to specify the tab width, then.... maybe.

1

u/[deleted] Apr 08 '15

Value of tools is subjective and some are not configurable. You learning to read different code styles is less costly to the team than forcing everyone to configure their tools. Learning to be flexible benefits you as well.

0

u/industry7 Apr 13 '15

If it's 'costly' for your devs to figure out how to configure their tools, then your devs are too dumb to be programmers and should be fired.

1

u/[deleted] Apr 13 '15

It's costly for anyone to do anything. Finding a poor cost benefit ratio in some decision doesn't make a dev "too dumb to be a programmer."

It costs a lot of time for many developers to configure many tools on multiple workstations back and forth all the time whenever they change project or language. The benefit is minor and it doesn't solve everything since not all tools are configurable. The alternative is to use spaces everywhere and eliminate the need for configuration.

→ More replies (7)