7

So, there's this question on SO. The user that posted the question used formatting along the lines of:

javascript('foo = '+function('text').value);//returns 0

javascript('bar'+function('text').value == 1);//returns false

Naturally, a few people (myself included) made edits to improve readability:

javascript('foo = '+ function('text').value     ); // 0
javascript('bar'   + function('text').value == 1); // false

It wasn't long before this edit was rolled back. And back again, etc.

Finally, the OP edited the answer he's gotten into his question, along with his messed up formatting.

Naturally, I flagged the question due to both the rollback war, and with the suggestion to keep the answer out of the question. Eventually a moderator locked the post, commented along the lines of:
"please do not edit in the answer to your question in the question."

Now, the user's right back at it again, reverting the edits, basically being stubborn.

The fact his profile includes the following text doesn't inspire confidence in his willingness to follow procedure:

Disclaimer: exchange sites are fundamentally flawed due to the positive-feedback power-trips people gain by reputation. <...> so if you see something unintuitive/stupid in any of my content then notice it;'s been edited by someone else and keep in mind that intelligence is sometimes second to reputation here.

So, for the real question: What would be the proper way to act, here?

  • Just flag it again?
  • Comment on the post, requesting the user to leave the edits be?
17
  • 74
    "aligning" code (putting excessive whitespace in a middle of the string) is evil; please, don't do this never again Commented May 29, 2014 at 11:41
  • 17
    @Sarge Borsch: do you have a source to back up that statement? Commented May 29, 2014 at 12:02
  • 10
    What is the point of adding white space to lines to strings to get them to line up all pretty?
    – Joe W
    Commented May 29, 2014 at 12:34
  • 19
    @PeterMortensen This makes code unmaintainable. Commented May 29, 2014 at 13:33
  • 16
    @PeterMortensen I don't see that a source is necessary. There's a clear disagreement on what is correct, so one way should not be edited to the other.
    – Travis
    Commented May 29, 2014 at 14:18
  • 14
    @PeterMortensen sure 20 upvotes and counting. 1) thats a minor edit 2) how is that really improving anything in anyway other than purely subjective 3) If you start editing like that in source control people are going to hate you. Commented May 29, 2014 at 18:28
  • 6
    @SargeBorsch To add some spice to the discussion, I would like to add that I program using a variable-width font (Oh the humanity!!). Garamond, to be exact. Vertical alignment does not exist for me (and is evil), except for the start-of-line tabs. When I post here, and use the code block, my code is always funny, because I use com.mycompany.thislibrary.LongAndDescriptiveObjectAndMethodNames that look nice and readable on my font, and become trash on the monospace font. However, I mostly never have to break a line because it easily handles 250 chars in a line.
    – kurast
    Commented May 29, 2014 at 19:29
  • 3
    @kurast Nothing wrong in such practice. In fact, you're awesome. Commented May 29, 2014 at 19:36
  • 6
    I agree that adding unnecessary whitespace is a bit silly in this context, but it is also silly for the OP to roll-back this seemingly harmless edit. You're both at fault of nitpicking, although I want to side more with you after reading the user's website claiming he's "the world's first Web 3.0 Professional Web Designer and OOP PHP Web Developer"... sigh...
    – Matt K
    Commented May 29, 2014 at 19:56
  • 2
    @SargeBorsch I personally do some code aligning myself and there is som research showing how much quicker it is to read, but I certainly do not go behind old code or others and do this. Someone reviewing a checkin will be like, "Oh here are some changes, looks really different, lets see.... nothing is different... just a bunch of WHITE SPACE AAAAARGGHHHHHHH" and a keyboard dies. Additionally, many IDEs auto formatting will blow away that whitespace anytime someone touches that piece of code, making the effort wasted, or someone has to fight the IDE to maintain the whitespace.
    – AaronLS
    Commented May 29, 2014 at 21:15
  • 1
    >"Oh here are some changes, looks really different, lets see.... nothing is different... just a bunch of WHITE SPACE AAAAARGGHHHHHHH" — yeah, this is annoying, especially if it causes a merge conflict. Grrrrrr! Commented May 30, 2014 at 11:00
  • 5
    @SargeBorsch: "Makes code unmaintainable" Who cares? Code excerpts on StackOverflow are all about readability. Answers aren't supposed to be copy+paste ready to drop into someone's source file with no editing needed. Real code files need to abide by style guidelines. Questions and answers need to be readable.
    – Ben Voigt
    Commented May 30, 2014 at 16:54
  • 5
    @kurast AAAAHHHHG!! How... but... WHYI!?!?! Commented May 30, 2014 at 17:16
  • 6
    Aggressive automatic whitespace reformatting in IDEs and version control tools & setups that can't distinguish between whitespace changes and code changes are nasty historic problems. This isn't news or controversial. But editing whitespace on a StackOverflow post for readability is super helpful. It's also a separate issue: StackOverflow integration into the IDE or code versioning is probably not an issue for the user, so we might even consider these entirely distinct problems.
    – Barney
    Commented Jun 1, 2014 at 11:32
  • 3
    @SargeBorsch: the reason I added those whitespaces, was to make it easier to spot the differences between those 4 lines, which was basically what the question was about. In real projects, sure, it's evil, but on SO, it makes the code that much easier to understand, sometimes.
    – Cerbrus
    Commented Jun 2, 2014 at 6:39

6 Answers 6

69

Looking back at the revision history for this particular question, I can understand why the user rolled back revision 3 to revision 1.

The initial text was:

alert('1a = '+id_('post_url').value.indexOf('http:'));//returns 0

The edit pushed by meagar in revisions 2 and 4 was:

alert('1a = '+id_('post_url').value.indexOf('http:'));**//returns 0**

Although meagar certainly had the right intention (I too prefer code formatted with monospace fonts), he didn't get rid of the ** used for the bold formatting in the initial question, thereby making worse. I'm sure it's an oversight, but meagar got that wrong twice (rev 2 and rev 4). The OP seems to have got the message about code formatting in revision 5. This was hardly an "edit war" so far.

Once formatting was used, the OP seemed to prefer his comments to be in bold anyway, thereby mixing code formatting and plain text in between, which might not have been my own choice, but which is fine.

Then, you came along (rev 6) and decided to change the spacing altogether and put the expected return values back in comments. This, I think, is a bit over the top. The question only had four lines, which anyone interested in the question would already have been able to read.

3 minutes after rev 6, the OP decided to add more details in rev 7, which he probably based on his rev 5 (possibly a concurrent edit issue at play, since there were only 3 minutes between your edit and his, so he might have started to type by then).

Subsequently, your rev 8 (rollback to your rev 6) was quite inappropriate, I think, just for the sake of extra spaces and because "The bold "Returns" statements are an eyesore" (quoting your comments in rev 13).

Now I'm wondering who really is stubborn...

8
  • 15
    This whole situation is just one big misunderstanding, between all parties involved :P. To be fair, the original poster did add the answer into the question himself, which was one of the original complaints of Cerberus...but yeah, the whole thing is a giant mess.
    – user456814
    Commented May 28, 2014 at 20:03
  • 1
    I do agree, however, that trying to enforce code formatting for the return statements wasn't really appropriate in this situation, since they were basically comments. Having code formatting for the rest of the code, however, is indeed appropriate.
    – user456814
    Commented May 28, 2014 at 20:20
  • 5
    Looking back at the situation, I agree I was being stubborn myself, too. While this doesn't really answer the "What to do in case of revert wars after mod warnings" question, this answer does "analyze" the situation the best...
    – Cerbrus
    Commented May 28, 2014 at 21:11
  • 7
    Honestly, I think this is why adding a reason next to the roll-back button would make a lot of sense. it should not be as convoluted to explain the motivation behind a roll-back as it currently is :-/ Commented May 29, 2014 at 4:04
  • 3
    @kape123 is it always necessary for people to assume that someone is on a "power trip" when that person does something that they disagree with? Honestly, I thought Robert's comment was appropriate, until I got the full picture that Bruno explained in this answer. I'm sure Robert would agree too. Not only that, but Robert's response was much politer than what you made it out to sound like.
    – user456814
    Commented May 29, 2014 at 14:34
  • 3
    @kape123 Also, like Robert pointed out in the comment, the Help Center itself specifically states that "If you are not comfortable with the idea of your contributions being collaboratively edited by other trusted users, this may not be the site for you." Robert's comment would have been totally appropriate, given the original picture painted by Cerberus of the original poster rejecting edits to format code into code blocks (which turned out to only be true for the first couple of edits).
    – user456814
    Commented May 29, 2014 at 14:42
  • 1
    @Cupcake Just to add that my second flag has been accepted and moderator deleted his comment. I've deleted my comments here regarding that incident as they now have no context. Will also delete this comment later.
    – nikib3ro
    Commented May 30, 2014 at 16:11
  • @kape123 OK, got it.
    – user456814
    Commented May 30, 2014 at 18:49
48

Easy.

The OP can't edit-war with you if you don't edit-war back.

The OP is more invested than you in the question. If you make an edit and he doesn't like it, then don't engage in an edit war with him.


If there's something that absolutely has to be dealt with, then flag the question. The formatting of his question does not qualify, and him making a note about a comment that was posted under his question, probably doesn't really need to be removed either.

Let the OP have the (frankly, not even bad) formatting that he wants. It is him who gets the reputation modifications when his question is voted on, and it's him who needs an answer to it.


You should decide whether to flag, comment, or move on after the first time the OP reverts your edit. If you make edits after that point, YOU are the aggressor in the edit war.

  • The OP posts the original question: no edits have been made, and there is no edit war.
  • You make an edit: Nothing has been reverted, no edit war.
  • The OP reverts your edit: The OP decides that he doesn't want your edit in his post. He gets to make this decision, because he has more ownership of the post than you do. The reason he has more ownership is because he's more invested in the post, and he's the one who's held responsible for the post.
  • You re-make the same edit: You've decided that the OP really doesn't own the post, and you're trying to take ownership of the post away from him/her. To put this in war terms, you're trying to conquer it.
23
  • 1
    The horizontal scroll bar is only visible in the revision history. Because in there, there's less horizontal space available. So, the second part of this answer is irrelevant, and offensive to boot. There's no need to resort to name-calling.
    – Cerbrus
    Commented May 28, 2014 at 14:39
  • 4
    You forgot to include "flag the post again" in the top half of the answer. If an edit war starts, or starts again after a timed lock ends, a mod is the only one who can resolve the issue.
    – Servy
    Commented May 28, 2014 at 14:40
  • 9
    IOW, "the OP can't make their question crappier if you don't improve it in the first place". Not sure if good advice.
    – user703016
    Commented May 28, 2014 at 15:14
  • 10
    Stop making edits? Why don't we stop answering and flagging while we're at it.
    – Cerbrus
    Commented May 28, 2014 at 15:19
  • 6
    @Cerbrus Because answering and flagging are productive. Making edits that are just going to be rolled back are not productive; it's just wasting everyone's time to participate in one.
    – Servy
    Commented May 28, 2014 at 15:24
  • 1
    @Cerbrus yes it does answers his question. The answer is stop editing his post Commented May 28, 2014 at 16:17
  • 4
    @Cerbrus You flag the post, because only a moderator can deal with such a user. You continually re-applying the edits is only making things worse, not better. Flag the posts, stop editing, and let the mod handle it.
    – Servy
    Commented May 28, 2014 at 16:35
  • 2
    I just wanted to express my regret that the use of questionable language in an earlier revision of this answer didn't result in an edit war. I would have appreciated the irony. Missed opportunities...
    – Servy
    Commented May 28, 2014 at 16:37
  • 1
    @Servy, could you add the "You flag the post,..." as an answer? Sam is getting too focused on the fact that I reverted the OP's edits once or twice too much (I can understand that), and frankly, after him resorting to name-calling, I'm not very inclined to accept the answer that's going in depth telling me I did the wrong thing...
    – Cerbrus
    Commented May 28, 2014 at 16:52
  • 3
    @Cerbrus Sam's answer is a great answer, that covers that particular point. I'm not going to post a second, and worse, answer, just because you have a personal problem with Sam for correctly stating that you acted in error. If you don't want to accept his answer, despite it being the correct one, well that's on you; I can't make you.
    – Servy
    Commented May 28, 2014 at 16:56
  • 2
    "You've decided that the OP really doesn't own the post" Isn't that the case though? stackoverflow.com/help/editing "If you are not comfortable with the idea of your contributions being collaboratively edited by other trusted users, this may not be the site for you."
    – N_A
    Commented May 28, 2014 at 18:59
  • 1
    Speaking of wars, I love the +/- war on this answer :D
    – nikib3ro
    Commented May 28, 2014 at 19:20
  • 1
    "Let the op have the (frankly, not even bad) formatting that he wants. It is him who gets the reputation modifications when his question is voted on, and it's him who needs an answer to it." This seems to me to miss the purpose of Stack Overflow. It's not about reputation; it's meant to be a good resource for the world. If other people have the same question, theirs will be closed as duplicates of the first one — because the resource as a whole is what matters. This is why users are empowered to edit everything: so they can make the resource the best it can be.
    – Chuck
    Commented May 28, 2014 at 19:36
  • 2
    @mydogisbox Technically the author does still own the post. They are licencing the community to publish and edit it, but they do still own it, and it does represent their views. Site guidelines also make it clear that for subjective decisions, such as the voice of the text, are decisions to be made by the post author. If the author is vandalizing their own post or otherwise making edits that are in violation of policy (editing an answer into the post qualified, editing the code formatting would not) is something to flag for mod attention, not get into an edit war over.
    – Servy
    Commented May 28, 2014 at 19:36
  • 2
    @Chuck Normally, an editor makes his/her edits, and the OP is fine with it, and life goes on, but in this case there's a content dispute, and there's no way to objectively determine who's right(at least as far as the code formatting goes). We don't want the content of a post to constantly be changing, because it's a nuisance for people who have to read the post. Since the OP is the one who's held responsible for the content in the question, it should be the OP's opinion who takes precedence in content disputes. Commented May 28, 2014 at 20:25
13

I've had this happen a few times.

For instance, I prefer to write CSS in 'BSD' style, like this:

.myClass 
{ 
    color: #CCC; 
    border-color: #CCC;
    display: inline;    
}

as opposed to the conventional 'K&R' style:

.myClass { 
    color: #CCC; 
    border-color: #CCC;
    display: inline;    
}

I've had several posts edited to change my formatting to the latter. I rolled those edits back, and had to do so repeatedly. My formatting is not incorrect. It's not bizarre. It's not hard to read. The difference is almost imperceptible.

This person is not adding any value to the post or to the corpus at large; they're just imposing their arbitrary preferences on others.

Such behavior is at best OCD disguised as civic duty, and should really stop.

I think that if the original poster cares enough to roll it back, that should be treated as a trump card, or go to a higher level of approval criteria.

2
  • I put the opening curly bracket on the next line too unless I've condensed something to a single line, visually it makes more sense; I deal with those kinds of edits as well too. +1.
    – John
    Commented May 29, 2014 at 13:06
  • 2
    Certain languages have standard conventions for formatting. For CSS, the most common convention is K&R style, not BSD. I would definitely edit your CSS to K&R style, though if you rolled it back, then I wouldn't try to enforce it. In some languages, formatting according to a certain convention is even important; for example, I think it was supposed to be possible to get bugs with JavaScript if you don't follow K&R style. However, the situation that Cerberus presented involved formatting code into code blocks, which is definitely desirable, no matter what an original poster may want.
    – user456814
    Commented May 29, 2014 at 14:47
10

Let me try to answer from the perspective of someone who also doesn't like his answers edited, if the edit doesn't add much value.

Obviously, the biggest issue is the "ownership" of the answer. There is an increasing number of people who are patrolling Stack Overflow in search of doing anything on a question or answer just so their picture/name can pop up as with "Edited" title (just take a look at popular questions/answers). When they do really edit the answer in a way that improves it (fix my terrible grammar, embed content from links I've posted, etc.) - great, no problem - everyone's happy.

But when they do something that does almost nothing to improve the answer or do something that can be filed under "subjective", I think whoever wrote that answer should have a right to revert the edit (at least until it transfers over to community ownership). Why? Well, it's his/hers answer - dammit - in most cases like this, for every keystroke of yours, the poster of the question/answer has at least 5-10.

In your specific case - we are talking about something that's highly subjective. From my perspective, you haven't improved readability; I would prefer code that doesn't contain tabs, i.e.:

javascript('foo = '+ function('text').value); // returns 0
javascript('bar'+ function('text').value == 1); // returns false

So, in cases like that my approach would be - if I really think my formatting is better - I would do an edit. If the owner of a question/answer reverts it, and I again think I'm right - I would flag. And if after all that, whoever wrote the question/answer sticks with his original post, I would let it be - I appreciate that he took the time to write that question/answer in the first place and out of that appreciation I would let him have his formatting.

EDIT: Now that I've found the answer, I would say it's a question of bad code rather than formatting preference. The current format is as ugly as the original one. If I could, I would reformat it as:

var post = "http://www.example.com/";

'1a = '+ post.indexOf('http:')      // 0
'1b   '+ post.indexOf('http:') > -1 // false
'2a = '+ post.indexOf('www.')       // 7
'2b   '+ post.indexOf('www.') > -1  // false
5
  • 3
    No one owns the content that they post to Stack Overflow, the community owns it, and anyone may make edits (or suggest edits) if it improves the post. Everything on Stack Exchange is licensed under Creative Commons ShareAlike 3.0. Also, the formatting change wasn't just about tabs, it was formatting the code into code blocks.
    – user456814
    Commented May 28, 2014 at 19:30
  • 13
    @Cupcake That's incorrect. The site doesn't own the content. The person that posted the content does own the content. SE has merely been licensed the right to use that content, specifically the right to distribute/redistribute the content, allow modifications to the content as long as there is attribution. Having those rights is quite far from having ownership.
    – Servy
    Commented May 28, 2014 at 19:39
  • 2
    @Cupcake Yeah, let's get into licenses, nitpicking and formalism when we are dealing with issue tied to common sense. I was not rejecting right of anyone to edit - I was merely saying: respect time someone invested in writing whatever he wrote. And if your edit isn't really that important (and edit we are talking about here is really not important) - then let him have his way. If you really must do, then flag and notify moderators on your way out of question you tried to edit.
    – nikib3ro
    Commented May 28, 2014 at 19:43
  • @kape123 I strongly disagree that this edit wasn't important, but whatever, the moderators have the situation covered.
    – user456814
    Commented May 28, 2014 at 19:47
  • 6
    "There is an increasing number of people who are patrolling Stack Overflow in search of doing anything on a question or answer just so their picture/name can pop up as with "Edited" title" - I think that would be hard to prove either way, tbh. And we need to be careful not to discourage editing - I think we need more editors rather than less, to maintain a reasonable level of content quality.
    – halfer
    Commented May 31, 2014 at 22:08
7

Cerbrus, while I originally did not agree with your edits I actually took the formatting in to consideration.

What the primary issue was the lack of respect for the working answer which not only was rolled back towards the later edits but someone (not sure who) deleted the person's comment and I think also my request for that person to post the answer so I could accept their answer and give them reputation for taking their time to answer the question.

Oddly enough the first lock on the question claimed the answer was too broad, too wordy, etc which was ironic since it merely involved adding a second set of parenthesis and had a lot of application for debugging purposes for other JavaScript methods as well; to put it in other words: the value of the answer was fairly substantial in its wide language-wide application and ease of implementation which frankly would save other people a lot of time and encourage more refined use of the language.

The point of Stack Exchange sites is to answer people's questions. The purpose of editing should be to improve communication so that more people gain value from the question and accepted answer together, that is why "similar questions" appear after people type in the subject as there is a lot of subjectivity. Some posts do require edits, typically of those who do not understand proper terminology, mis-tagging and yes formatting though if the edit has diminished or utterly negated the value of the question then it effectively morphs another person's question in to what might as well be considered spam.

The one positive note I can add here about Stack Exchange as a whole is that down-voting is limited to its impact, trolling happens all the time on the web. The goal of questions is not to be right for the sake of being right though to share working knowledge and wisdom of the topics at hand, the fact that positive contributions outweigh serial down-voting shows that the developers understood that working to help people gain answers is more important than egos. It also helps to deal with people who wander in to questions in which they may not be trolling yet suck up comments that would otherwise be used to work towards an answer for any thread's given OP and those who come upon it seeking solutions to their own problems on any SE site.

A potential positive point to take away from all of this is that editing of questions may need to be less intrusive until the OP has accepted an answer; otherwise the context of questions can be wildly distorted which in my case has been an ongoing issue that reduces the value of SE sites. Nothing starts off as perfect though as programmers many of us work towards that direction of a goal.

5
  • 5
    @kape123 <sigh> guys, insulting people is not-constructive, and it's not a good way to have a conversation. As I've already stated, Robert's polite comment would have been appropriate given the original story of things given by Cerberus, but now that we know the whole story, the comment doesn't apply so well anymore.
    – user456814
    Commented May 29, 2014 at 21:31
  • Also, as Robert pointed out in his own comment, it's an official Stack Overflow statement that if you're not cool with edits in general, then this isn't the site for you. Though as we've learned from Bruno, some of the edits made by others went too far.
    – user456814
    Commented May 29, 2014 at 21:33
  • 1
    Thanks for sharing your perspective on the whole mess ;)
    – nikib3ro
    Commented May 30, 2014 at 16:12
  • Code added to questions should be in preformatting from the start, and will always be added in by third parties if it is not.
    – halfer
    Commented May 31, 2014 at 22:12
  • @John, regarding your profile, it would be great if you would remove all those complaints because you became comfortable with your posts being edited, or (even better), your posts no longer need edits. If you ping me with a few examples of edits you disagreed with, I'll give you my view on them if you want. Broadly, I'd say that if an edit is made by a high-rep user, consider leaving it be. If you believe it is wrong, it can help avoid an edit war by starting a conversation under the question addressed to the editor (using the usual at-prefix).
    – halfer
    Commented May 31, 2014 at 22:22
5

I have pondered this exact issue as I now start reviewing Suggested Edits in the review queue. A few times I have voted to reject a change purely because it was a minor formatting change like this. Of course if it was a spelling mistake being fixed then I would approve it (even a 1-letter edit) as I assume it will help with googling. One of the reject reasons is:

too minor: This edit is too minor, suggested edits should be substantive improvements addressing multiple issues in the post

Some formatting changes are valid (when users seem to just copy + dump) but ones exactly like this question referred to by the OP IMHO are simply the user's preference. One user likes to see no spaces, the other user likes to see the dots line up. This is purely user preference and I would have thought whoever asks the question gets to choose :P

HOWEVER, pretty much every single time I have rejected 1 of these minor formatting edits, I get a message saying the edit has already been approved. Please edit the post. So clearly I am in the minority and have started approving them as harmless :/

1
  • +1 - now when I get to situations like that, I just Skip the edit exactly because of what you mention ;)
    – nikib3ro
    Commented May 29, 2014 at 22:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .