4 Replies - 1324 Views - Last Post: 02 March 2014 - 08:31 AM

#1 Lemur  Icon User is offline

  • Pragmatism over Dogma
  • member icon


Reputation: 1439
  • View blog
  • Posts: 3,609
  • Joined: 28-November 09

Is it OK to edit for style on an open source project?

Posted 01 March 2014 - 02:25 PM

http://arstechnica.c...source-project/

An interesting discussion that came via Stack Exchange. Of course the one time I actually reply to one of these things (in part due to annoyance of listening to linter banter) I somehow get a featured comment on the thing and get on Ars.

To quote my reply to it:

Quote

Pragmatism over Dogma, always. Coding style guides are an especially insidious form of evil that draw attention away from architectural concerns towards frivolous nonsense like single/double quoting. Ask yourself: Does it really make a difference?

They can be good up to a point, but the second you treat them with an almost religious fervor, you've gone too far. They're guidelines, suggestions, opinions, NOT facts.

Should they just be ignored then? No, there is merit to using the tools to get a general idea of what needs to be looked at, but no more.

It's a wonder how often junior types confuse opinion for fact.


Is This A Good Question/Topic? 0
  • +

Replies To: Is it OK to edit for style on an open source project?

#2 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 13400
  • View blog
  • Posts: 53,479
  • Joined: 12-June 08

Re: Is it OK to edit for style on an open source project?

Posted 01 March 2014 - 02:55 PM

It's a toss up on the extent of a nits and one person's desire to fix them. I mean if it's an issue of four spaces vs two - well.. for me I would pass. If it's an issue of breaking up a comment to multiple lines to make it more readable - I would act on it. The worst option is someone comes along and changes it back, right? Guides are guides, but are rarely set in stone.
Was This Post Helpful? 0
  • +
  • -

#3 Lemur  Icon User is offline

  • Pragmatism over Dogma
  • member icon


Reputation: 1439
  • View blog
  • Posts: 3,609
  • Joined: 28-November 09

Re: Is it OK to edit for style on an open source project?

Posted 01 March 2014 - 09:06 PM

The thing is that you shouldn't screw with other peoples styles or lack thereof as style is purely opinion based. Some opinions are far more valid than others, and while everyone is entitled to them it doesn't make them right.
Was This Post Helpful? 0
  • +
  • -

#4 Skydiver  Icon User is online

  • Code herder
  • member icon

Reputation: 5828
  • View blog
  • Posts: 19,868
  • Joined: 05-May 12

Re: Is it OK to edit for style on an open source project?

Posted 01 March 2014 - 09:33 PM

Ah... but does the person who approves Pull Requests have the right to reject correctly running code that fixes a major security hole on the basis that he doesn't like the style that the patch was written in?
Was This Post Helpful? 0
  • +
  • -

#5 xclite  Icon User is offline

  • I wrote you an code
  • member icon


Reputation: 1230
  • View blog
  • Posts: 4,016
  • Joined: 12-May 09

Re: Is it OK to edit for style on an open source project?

Posted 02 March 2014 - 08:31 AM

I probably wouldn't touch style and would try to adhere to existing style unless it was egregious OR the project had a styleguide that hadn't been followed: e.g. if the project accepted a pull request that fixed a hole but didn't quite match the style as in Skydriver's scenario, I'd feel less bad about "cleaning" it up.

I agree that going in a changing style is probably a good way to ruffle some feathers.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1