10

Today I saw a suggested edit that just added a JSFiddle to the question. I didn't know whether we have have to approve or reject them, so I asked it in chat. Undo replied that I could ask it on Meta, so that's what I do now.

Do we have to approve or reject suggested edits that only add a JSFiddle link?

7

For a question this is very worrisome for me. Posting that in a comment may well be fine, but by editing it into the question this is, more or less, the same as editing code in my mind (which is a big no no for questions, and should be met with a lot of scrutiny in answers). The edits to the code to turn it from an extracted snippet to a complete example may well change some of the semantics, thus leading another reader to believe the problem is due to something that is not in fact representative of the position the OP is in.

By posting a comment it's clear that this is one reader's attempt at replicating the problem, and that there is a possibility of deviations from the OP's actual code. It can still be helpful, but the little bit of skepticism is allowed to remain. If the OP feels it adequately represents their actual situation, they can edit it into the question themselves.

For an answer, I'm somewhat less opposed to the idea, but I would still rather see it as a comment, simply because of the likelihood of some semantic change in the answer. I would only approve the edit if I was comfortable enough in my understanding of the answer to feel that the added link adequately represents the answer, and that it doesn't alter it's semantics in any way.

  • 1
    Why on earth is it worrisome? Your answer doesn't make much sense: obviously the code on Jsfiddle needs to be the code from the question, not some random bypaser's code. And why would a comment be appropriate? This is not a transitory thing, it doesn't belong as a comment. – Gilles Feb 4 '14 at 20:55
  • 1
    @Gilles It's worrisome because it's quite common for a question/answer to contain just a snippet, rather than a fully complete example. Turning that into a complete example is generally going to involve making at least some changes. They may be obvious in most cases, but sometimes they won't be, and sometimes they'll be wrong. As for why it would be a comment, as I said in the answer, it makes it clear that it is one readers attempt at replicating the problem. If it is valid, it can be edited into the post, if it's not, it won't confuse readers to the same degree. – Servy Feb 4 '14 at 21:00
  • @Servy I think the main point here is that it's very situational whether or not the JSFiddle belongs with the question. Obviously we can use our common sense here. It shouldn't be anymore worrisome than the rest of the StackOverflow question answering process... – Mike Feb 4 '14 at 21:08
  • @Mike Well, your answer is effectively saying they should always be approved as you don't really see a case where it should be rejected. That said, I find having a question edited into something that demonstrates a different problem than what the author has to be very worrisome. It has the potentially to greatly hamper the author's ability to have their problem solved. I have no idea how often that happens (probably not too often) but it's still something to be worried about, because the consequences of it are so severe. – Servy Feb 4 '14 at 21:14
  • @Servy how does my answer state that they should always be approved? Did I use an absolute somewhere? I think you might have not read it at all, if that's what you think I said. – Mike Feb 4 '14 at 21:37
  • @Mike To quote your answer, "I don't see why you would reject it?" If you don't see any reason to reject it, it implies that you would always approve it. – Servy Feb 4 '14 at 21:39
  • @Servy I say more than that, although choice of words there could have been better, I do not believe "I don't see why you would reject it" is an absolute, especially when it's paired with another sentence explaining the fringe cases where rejecting the JSFiddle would make sense. – Mike Feb 4 '14 at 21:43
  • @Mike It still implies that "by default" you'd approve them unless there was some compelling reason not to. I don't feel that's a constructive approach to this problem. Unless you have compelling reason to believe it should be approved, you should probably reject it. – Servy Feb 4 '14 at 21:45
  • @Servy that's where we disagree, I don't think that all JSFiddle links are bad, infact they help people jump into the code much quicker. As long as they aren't incorrect examples of the code, then why would you care? I think we come from two different positions, you expect everyone to make mistakes, I expect people to be smart enough to notice a mistake. In the end, the fact that StackOverflow allows for anyone to edit, means that the question can be fixed in any of these cases. JSFiddles aren't something to be feared, nor are they counterproductive, quite the opposite really. – Mike Feb 4 '14 at 21:50
  • @Mike I'm not saying everyone will make mistakes, I'm saying that the problems created from those handful of situations where mistakes are made can be more harmful than the usefulness created by the remainder of the cases. Approving all of the links "by default" is likely to cause a net harm. – Servy Feb 5 '14 at 14:57
3

I don't see why you would reject it? Unless it's something that is really really simple, or something that wouldn't benefit from a concrete example. I really don't think this should be an issue, as long as the people are including the proper JSFiddle Link (a link to an example of either, A: Your problem, without fix, B: Your problem, fixed.)

Of course though, it's your question, ultimately if you feel that it doesn't ADD anything valuable to the discussion, then by all means reject it.

2

This is a bit like a formatting edit. The code is presented in such a way that it can run online. Accept it provided that it's accurate (check that the code uplodaded to Jsfiddle is the code in the question).

You must log in to answer this question.

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