1

I've seen a large number of JSFiddle links with the code also included in the answer (example, https://stackoverflow.com/a/31946170/989920).

This to me is good practice, but is it best practice for SO answers?

Should we be using the snippet feature instead?


I am asking this as I was challenged when I edited a good answer to include a SO snippet and not a JSFiddle link. The quoted comment is below.

I'm not clear if it is required to use the snippet feature rather than an external service - especially if I believe the external service is more appropriate or clearer. If you can provide guidance on this I'll accept your edit - otherwise i'll reject it..

17
  • I think it's better to use an SO snippet if the Q&A is about web technologies. Edited: Ah, I missed that this is about editing someone else's post. I'm not sure how important it is that the runnable version of the code is on SO as long as the code is there.
    – BSMP
    Aug 11, 2015 at 16:00
  • To those downvoting, please tell me why. I can edit the question or delete it. Don't anonymously downvote. Aug 11, 2015 at 16:04
  • I haven't voted but on Meta a down vote is likely to mean disagreement.
    – BSMP
    Aug 11, 2015 at 16:07
  • How can one disagree with a question? I'm just asking what's preferred, if any. Aug 11, 2015 at 16:09
  • Preferred by whom? I think it's pretty obvious that stack snippets should be used on stackoverflow when asking/answering questions. stack snippets are of course useless however in comments.
    – Kevin B
    Aug 11, 2015 at 16:11
  • I thought so too, but I've had a number of people reject my requests for snippets in favour of JSFiddle links. Aug 11, 2015 at 16:13
  • As far as editing someone else's post to use an SO snippet, a mod has said not to to that.
    – BSMP
    Aug 11, 2015 at 16:20
  • Thanks @BSMP. I'll make sure to encourage snippets rather than edit posts to include them. Aug 11, 2015 at 16:21
  • @apaul34208 That's what I was looking for, I did a number of searches and I couldn't find anything. Aug 11, 2015 at 16:29
  • 1
    @evolutionxbox we both posted on same issue at same time. I upvoted yours as I believe we both had a genuine question
    – David
    Aug 11, 2015 at 16:30
  • @DavidAnderton yours actually has an answer. It also is more complete. Aug 11, 2015 at 16:32
  • @BSMP, generally users < 2k should shy away from doing any edits which introduce code into the post because it is likely that they will be rejected. Users > 2k should and probably will edit the code into the post because that is the right thing to do and users generally don't listen. Edit: as long as it is not mass-editing.
    – user4639281
    Aug 11, 2015 at 17:49
  • In the post in the question, the code was already in the question itself, it just wasn't in a snippet.
    – BSMP
    Aug 11, 2015 at 17:51
  • @BSMP it was because I edited it in. Aug 11, 2015 at 17:56
  • Right. I was talking about before you edited it.
    – BSMP
    Aug 11, 2015 at 17:57

0

Browse other questions tagged .