Skip to main content
25 events
when toggle format what by license comment
Dec 11, 2013 at 22:11 comment added JDB @Servy - I agree with you on that. A gentle admonishment would be appropriate. Extended arguing with an editor seems inappropriate. And rolling back a stylistic edit would be, in my opinion, counter-productive in that it could initiate an edit war. Overall, I think it's best to leave a comment for the editor suggesting style-only edits are not encouraged and then let it go. The OP can rollback if they care.
Dec 11, 2013 at 21:57 comment added Servy @JDB I agree that I don't see this happening all that often, and because it's done all that often, it's not a major problem for the site. If we were to start encouraging such edits and make it known that they were appropriate then they'd start being done more often, and it would become a problem.
Dec 11, 2013 at 21:56 comment added JDB @Servy - As I said in a different comment thread, this was a bad example to draw from.
Dec 11, 2013 at 21:53 comment added JDB @Servy I think this thread is about a user who made a minor style edit while also fixing broken code and didn't consider it a big deal when challenged on it. A review of Scott's recent edits shows that all of his other edits were white-space only, to make the code easier to read. This is the only edit (to someone else's post) that I can find where he changed the actual code, and he only inserted a couple pairs of braces. While I don't condone it, I can't say I see it as that big a deal.
Dec 11, 2013 at 17:50 comment added Servy @RichardTingle It's hard to say. Not having been in such a situation. I imagine it would depend a lot on context. If I thought that they were struggling with the SO editor, then yes, I'd probably change it. The big issue with this specific case though is that this is a known point of contention in code style. It's well known that certain people always include braces around if statements, even when unneeded, and others only include them when they are needed, much like whether braces following an if should be on a newline.
Dec 11, 2013 at 17:42 comment added Richard Tingle @Servy I have a feeling you'd change drastically different styles (e.g. if statements indented 2, whiles indended 3, all other statements indented 1) to the usual style
Dec 11, 2013 at 17:42 comment added Servy @JDB What do you think this whole thread is about? And yes, I have seen edit wars break out over this. Not a ton, but more than once before. Granted, I don't see edits like this particularly often. If they were encouraged more I'm sure we'd see more edit wars breaking out.
Dec 11, 2013 at 17:40 comment added JDB @Servy - Perhaps I've not been active for long enough, but I've never seen an editing war break out over a minor style preference. If this has happened, then I suppose that discouraging these kinds of edits makes sense, but otherwise it sounds a bit pedantic.
Dec 11, 2013 at 17:39 comment added Servy @RichardTingle I agree, which is why I wouldn't take code that is readable and change its indentation patterns to be in line with my personal style; I make an exception for code that's indentation is so bad that it makes the code completely unreadable, i.e. when there is no indentation at all. I don't consider omitted brackets here to make the code "completely unreadable".
Dec 11, 2013 at 17:36 comment added Richard Tingle @Servy Indentation is a matter of style
Dec 11, 2013 at 17:35 comment added Servy @JDB You may not see a problem with users editing another person's answer to be in line with their personal coding standards, but I do. I don't see how making an acceptable change at the same time makes such a change appropriate; in my eyes you shouldn't be making such style changes at all.
Dec 11, 2013 at 17:29 comment added Richard Tingle @JDB It is a fair point, I tend to change these things only if I'm changing other things as well (usually a complete lack of indentation)
Dec 11, 2013 at 17:28 comment added JDB @Servy - The difference here is that the code was demonstrably wrong in that it omitted a semi-colon. The user edited it in (to make the code correct) and, in the process, tossed in a couple brackets to make it easier to read and/or maintain. The OP then edited the brackets out, but kept the semi-colon. I don't see the problem in this case. A one-size-fits-all rule is difficult to formulate and enforce.
Dec 11, 2013 at 17:26 comment added ʞunɥdɐpɐɥd @RichardTingle I would. Don't change users code. Propose it in the comment. it is pretty strict yes, but at least it closes the door to people that change that simply because they prefer it that way. Or mistakes and error in the code because we allow "some edits".
Dec 11, 2013 at 17:26 comment added Richard Tingle @ʞunɥdɐpɐɥd p.s. not that it strictly speaking matters but I strongly support the single line braceless if as an acceptable compromise
Dec 11, 2013 at 17:25 comment added Richard Tingle @ʞunɥdɐpɐɥd I'm not sure I'd be able to come up with a rule here and now that would cover all situations
Dec 11, 2013 at 17:23 comment added ʞunɥdɐpɐɥd @RichardTingle My bad. It was. But still. What is the limit ? Can I go on StackOverflow and remove all the var I see and all the SELECT * in SQL queries ? I know the user might think it is bad practice. I dwould understand in a comment explaining that to the user in fact I highly encourage that. But I would like to know what are the limits of these personnal choice edits
Dec 11, 2013 at 17:21 comment added Servy Users shouldn't be making edits to change perfectly appropriate and readable code into code that users their own personal coding standards, because then someone else with a different set of standards will come along and change it again, and someone else change it again, and then someone else change it back, and it'll never end. For something like this it shouldn't matter whether you'd include the braces or not, you shouldn't be editing another post to use your personal preferences over theirs.
Dec 11, 2013 at 17:21 comment added Richard Tingle @TheGrinch Well that is always the thing, which is why I think the OP should ultimately be respected. But it seems silly in the first instance to create a duplicate answer over a matter of style when the answer author may be perfectly happy with the (in the editors mind) more conventional form
Dec 11, 2013 at 17:20 comment added JDB I disagree that there is a clear coding standard in this case, but +1 for giving the OP final say. They get notified of the change. If they feel it's substantially changed the meaning of their code, then let the OP decide. Arguments between two users over style versus disputed "editing rules" (where the changes in question are particularly trivial) is pointless and a waste of time.
Dec 11, 2013 at 17:19 history edited Richard Tingle CC BY-SA 3.0
edited body
Dec 11, 2013 at 17:19 comment added Richard Tingle @ʞunɥdɐpɐɥd Isn't it, even here in version 1 it is in multiline form.
Dec 11, 2013 at 17:17 comment added user102937 What clear coding standard would you be referring to?
Dec 11, 2013 at 17:17 comment added ʞunɥdɐpɐɥd I agree with you but I have two comments. The if wasn't multiline. And what is the limit of such edits ?
Dec 11, 2013 at 17:12 history answered Richard Tingle CC BY-SA 3.0