News for hackers. Stuff that matters.
Re:Developers who use spaces make more money than those who ... by problems on Thursday June 15, 2017 @11:00AM (#14561007)
Yeah, it can start some interesting conversations too - I don't care personally and tend to go with whatever autoformat in the editor uses. My view is that formatting code shouldn't be a human's job, adding linebreaks on long lines, spacing things out to exactly line up, etc is just a waste of my time.

That's the computer's job - it should do it based on human readability rules though, clang-format is probably the best example of these rules applied, it uses a TeX-style formatting engine for code.

Re:Developers who use spaces make more money than those who ... by jar3624 on Thursday June 15, 2017 @01:27PM (#14562408)
completely agree with you. and i religiously autoformat my code before i read the code and just before i save the file.

However it still amazes me how the majority of developers i work with either have no opinion on the topic or worse think this is a bad idea. some the reasons I've heard was it makes alot of changes to a file causing alot of diffs with previous version making it harder to figure was was actually changed, or they don't like they way its formatted .

Re:Developers who use spaces make more money than those who ... by rdiddly on Thursday June 15, 2017 @03:23PM (#14563570)
Yep if you're going to convert from tabs to spaces or vice versa, please do a check-in/commit consisting only of that change before making any substantive code changes.
Re:Developers who use spaces make more money than those who ... by tracker1 on Thursday June 15, 2017 @06:07PM (#14564851)
Was going to say the same... nothing wrong with a commit including only format changes... for that matter, add it as a task to the project, commit, run it, commit, then proceed to edit. If you have commit hooks setup, add it as a precommit hook/task.

As long as it's relatively transparent for everyone to be able to use.

Re:Developers who use spaces make more money than those who ... by problems on Thursday June 15, 2017 @02:30PM (#14563059)
I've been following this practice for a while, but never really thought much of mentioning it until I watched an interesting talk the other day:

https://channel9.msdn.com/Events/GoingNative/2013/The-Care-a...

In it, they mention an autoformatter as one of the best tools they gave their developers in terms of productivity gain and it really got me thinking about how this should be versus how it is in practice. There are some really bad autoformatters and some really good ones - find one that works and is configurable to match your standard and I think it really does result in a good productivity improvement.

Re:Developers who use spaces make more money than those who ... by jdc0589 on Thursday June 15, 2017 @03:28PM (#14563619)
completely agree, I'm also the (original) author of https://github.com/jdc0589/JsFormat though, so I'm probably just more sensitive to formatting stuff in general.
Re:Developers who use spaces make more money than those who ... by patrickdavey on Thursday June 15, 2017 @04:54PM (#14564275)
Doesn't that mean you make tools like git blame a whole lot less useful? I'm all for formatting my own code correctly, but I'm not going to nuke git history for a few spaces.
Re:Developers who use spaces make more money than those who ... by problems on Friday June 16, 2017 @08:34AM (#14568322)
Blame is for me at least a fairly infrequently used operation and there's really not much else it breaks unless there are other active branches at the time. I don't find blame information that valuable and would argue that most uses are in fact counterproductive (it's in the name - blame).

You'd only have to do it once, all changes past that point would be good assuming you set it up in your IDE automatically or in your precommit. So if for some reason you needed to go back a long ways and blame something you could always check out back past that initial styling fix and see it.

Re:Developers who use spaces make more money than those who ... by blazespin on Thursday June 15, 2017 @11:06AM (#14561058)
Wow, I am a spaces guy but honestly, didn't care this much. Clearly, I should! I mean, I would have failed that interview question totally. Except, I would have said whatever the team consensus was.
Re:Developers who use spaces make more money than those who ... by jdc0589 on Thursday June 15, 2017 @11:38AM (#14561377)
I don't use it as a question to really be scored as a critical pass/fail. It's intended to potentially start a conversation and maybe give me an idea of someone's experiences.