Hacker News new | ask | show | jobs
by jedberg 333 days ago
Spaces are better, simply because you don't have to worry if another developer is seeing the code different than you.

See, I can do it too. This is why there is an ongoing discussion. Because there is no clear cut answer, just opinions.

At least this article brings some data to the discussion.

2 comments

> another developer is seeing the code different than you.

but that's the whole damn point ... I like substantively indented code, you prefer minimally indented, we should both be happy (and we can be, by using tabs).

You could certainly make that argument. You could also make the argument that all the developers on a project seeing the same view of the code enhances collaboration and team cohesion, especially if your team does pair programming.

This is often why dev teams have more specific style guides that include things would be considered bike-shedding, like how many spaces an indent is.

So are we also going to have team themes, team syntax highlighting colors, team fonts, team dark/light mode, team screen resolution, etc?

Why not bikeshed the bikeshedding?

FWIW, team screen resolution is pretty much already there when the company provides the laptops (+ screens).
People run different UI zoom levels with modern laptops and (especially 4K) screens.
Everyone is diffrent, some people might be visually impared, and having a bigger indent helps them out. The opposite also applies.
It seems that you don't understand what a tab character is ...
Wait, no, if there is an 80 character line limit and you like 4 space tabs but I like 2 space tabs, we’re going to have a problem. My code will exceed the line length on your screen or be forced to wrap prematurely on my screen to suit your preferences.
I'm not at all convinced that an 80 character line limit makes sense on modern equipment.

On punch cards, teletypes, or VGA CRTs? Absolutely. On SVGA CRTs? Probably. On anything modern? No.

Personally I use a 100 character limit. Anything more and the ability to have two editor windows side by side gets impeded upon. The point is, there is a limit.
This if a fallacy. With tabs i can view on indent as 2,4 or even 8 spaces. With spaces i force some preset on the dev, not always a bad thing, bit less flexible.