11

Stack Overflow now supports Snippets for a while now.

Yet ever so often, I stumble across new questions that use JSFiddle, people answering with JSFiddle links.

I guess it hard to unlearn some habits. It's even worse by commenters asking the original poster to setup a JSFiddle example.

I think the quality of questions and answers could be improved a lot by using the Snippets, yet it seems many people still don't know about them.

So I thought: Why not promote them more?

One way to do is that if users are using the , , tags, inform them that they could set up a Snippet.

It seems you are asking about JavaScript, HTML and CSS related question, you may setup a Snippet to improve your question.

And I really would like to see an info box popping up when a user dumps a JSFiddle link -- or other external source hosting services -- in a question/answer, that one could setup a Snippet as well with link to documentation.

It seems you are referencing an external site to get a working example of your HTML, CSS, JavaScript question. Be advised that you can setup an example directly by setting up a Snippet.

What do you think?

5
  • Can it be that I am on the wrong meta?
    – k0pernikus
    Oct 22, 2015 at 14:38
  • 1
    This actually might be better suited on SO Meta because it's only really applicable to SO (although snippets are on other sites as well...). Not sure - might want to wait for somebody else to comment :) Oct 22, 2015 at 16:18
  • @ᔕᖺᘎᕊ: What other sites support Stack Snippets? Oct 22, 2015 at 20:40
  • @NathanTuggy I only know of Meta (here) and Puzzling but I'm sure there are more! Oct 22, 2015 at 20:54
  • 2
    @NathanTuggy On what sites are Stack Snippets enabled? :) (I meant Programming Puzzling btw!) Oct 22, 2015 at 21:03

1 Answer 1

8

The problem with snippets is that they are still not as good as JSFiddle.

Don't get me wrong: Snippets are a great way to embed code, a long awaited for feature, no more dead JSFiddle links. BUT with JSFiddle, it is extremely easy to fiddle around with code -- this is useful for answerers in particular who are looking at faulty code.

There are already feature-requests around, like Is there an easier way to mess (fiddle) with someone's code snippet? (on SO Meta) to make Snippets better and 'equivalent' to JSFiddle.

What I do when I answer SO questions (which isn't very often!) is copy the OP's code to JSFiddle, because it is easier to see what's happening, to me... I then copy back to Stack Snippets if I remember.

Also, right now, it seems quite a few new users use Snippets for non JS/HTML/CSS questions -- using it as a substitute for a code block, so if we do promote Stack Snippets more, we need to make sure it is very clear what languages to use the Snippets for!

1
  • 1
    I have a userscript to copy snippets to CodePen, for the same reasons.
    – Paul Roub
    Nov 25, 2015 at 16:59

You must log in to answer this question.

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