37

When I was reviewing "Suggested Edits", I came across an edit where someone had pasted the code from the Fiddle OP had added into the original question. I skipped it because I was unsure what to do.

What would be the correct way of handling this? Approve, Reject?

7
  • 15
    Yes, the question itself should contain the code and not only a link to another site like jsfiddle or pastebin. But I guess I would have rejected (and edited) this particular case due to the sloppy job of the editor. The indentation is horrific.
    – Tom
    Commented Feb 24, 2017 at 13:28
  • 2
    Self containt post are the best so the idea is great. I would have accept andreindent it my self. Commented Feb 24, 2017 at 14:44
  • 3
    I agree with @PierreLebon. "Improve Edit" fixing the formatting. The original editor had the right intentions in putting the code in the question, but the formatting needed some help to make it more readable
    – CDspace
    Commented Feb 24, 2017 at 15:38
  • 12
    I'm amazed at how few people use the Tidy button in Stack Snippets. It fixes the format for you! In one click! Click it! Commented Feb 24, 2017 at 15:43
  • Very clear. Next time I will approve the edit (after fixing the indentation of course) instead of skipping it. Thanks.
    – VDWWD
    Commented Feb 24, 2017 at 15:50
  • 6
    @MikeMcCaughan there is a tidy button?...
    – Jordan.J.D
    Commented Feb 24, 2017 at 18:52
  • Why did you accept Bakuriu answer? The formulation of his arguments are completely wrong. When a user creates a SO account they agree to the site's terms. The terms include questions, answers and code are CC-BY-SA. OP's option is not ask on Stack Overflow. Otherwise code accompanies the question per site rules.
    – jww
    Commented Oct 16, 2018 at 0:59

2 Answers 2

45

What the editor did is wrong, because it copied content they did not own into a question which is under CC-BY-SA. This could make other people think they are legally using the code, even though they do not actually have a valid license. The OP specifically did not put the code in their post, and did not provide an explicit license in their jsFiddle (jsFiddle does not impose any kind of license, which means there is no license, unless explicitly stated, and all the copyright rights remain to the sole author of the snippet).

So: reject these edits. However, you should also:

  • Comment on the question noticing the OP that the post is incomplete and they should add a StackSnippet.
  • Vote to close the question as lacking an MCVE.
  • Possibly downvote the question.
10
  • 1
    Should we revert the changes in that case?
    – Cœur
    Commented Feb 25, 2017 at 10:23
  • 6
    @Cœur Well, I wouldn't, simply because in 99.9% of the cases the OP doesn't actually care for such matters, moreover the history of the post will keep containing the offending code so if the OP really wants the code removed he'll have to file a DMCA request to remove the entire page. I'd just @notify the editor that what they did is wrong.
    – Bakuriu
    Commented Feb 25, 2017 at 10:55
  • @Bakuriu: You're mostly right, but takedown doesn't require removal of the entire page, it's possible for the developers to scrub a single revision from the history.
    – Ben Voigt
    Commented Feb 25, 2017 at 18:00
  • 3
    Wait, what? If a question is unclear because it wasn't included in the question we should not edit it because... what? There's so much absurdity in meta...
    – Braiam
    Commented Feb 25, 2017 at 18:17
  • 13
    @Braiam Blame lawyers.
    – Nic
    Commented Feb 25, 2017 at 21:45
  • 3
    For people wondering, Pastebin content is CC-BY-SA, so unlike jsFiddle, it's fine to reuse Pastebin given that you attribute the author.
    – Cœur
    Commented Mar 5, 2017 at 13:15
  • 2
    @Cœur - Is attribution really necessary when the bin & question authors are the same person? All content in a post is already assumed to be by the post's author unless otherwise stated. Wouldn't it be redundant to point out that the OP's code belongs to them?
    – BSMP
    Commented Mar 5, 2017 at 16:39
  • @BSMP It was included in the post by someone else, so I think attribution of Pastebin content would be ambiguous without otherwise stated: but author(s) can be written in the edit description, that's enough for CC-BY-SA.
    – Cœur
    Commented Mar 6, 2017 at 1:18
  • "This could theoretically allow other people to legally use code that the OP specifically did not want to allow" - That's not how Stack Overflow works. When OP agrees to site terms then questions, answers and code is covered under CC-BY-SA. The content was always part of the question. OP's option is to not ask on Stack Overflow if he/she does not agree to terms.
    – jww
    Commented Oct 16, 2018 at 0:53
  • 5
    @jww No you are wrong. In this particular instance the code Was not hosted on StackOverflow. An editor put it in against the choice of the OP. StackOverflow license only covers the text on SO, not the things that you link to. I'm not saying that using a jsfiddle is right, in fact I'm against them. However copying the content from the fiddle to the question without author permission is not okay. It's the author that should do that, otherwise the question should be closed/deleted for lack of code.
    – Bakuriu
    Commented Oct 16, 2018 at 6:23
0

If the author has a minimal reproducible version of what is his issue, then the outside resource link isn't necessary. If the MCVE included in the question doesn't illustrate the problem yet the one in the outside resource does, including the code from the outside resource is warranted, otherwise close it as lacking MCVE.

The later option is obviously more costly for the community so it should be avoided. It can be simply edited into the question, in all the years of SO, I haven't heard of a single case of someone complaining that its code was included in the question so others can answer it... never.

1
  • Oddly enough, it just happened here: meta.stackoverflow.com/questions/344869/… I've seen other users refuse to add the necessary code themselves but that might be the first time I've seen them actually edit it back out if someone else added.
    – BSMP
    Commented Mar 5, 2017 at 16:32

You must log in to answer this question.

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