19

I love stack snippets.

It makes it a lot easier to play with the OP's problem and post an answer with a working demo.

I've been seeing a LOT of users STILL requesting for an external demo along the lines of

Could you provide a jsfiddle of what you have so far, so that...

I believe these users are not aware that stack snippet exists. And in most of the cases, the OP is a new user, and by seeing such comments he will probably assume that he has to use the external resource to provide a working demo.

Then he goes to setup an external demo, users like me who prefer stack snippets has to copy code, cdn links etc over to stack snippet... At the moment I usually leave a comment mentioning that there is an builtin code editor.

Can we please show an informative message (blue in color? probably linking to introducing-runnable-javascript-css-and-html-code-snippets/) to the users while requesting for jsfiddle demos and similar in comments..?

This way more users will be aware of it's presence and hopefully start using it.

I haven't thought of the exact content of the message, which I'll leave to the community.


Side note:

I also thought about requesting a reference to stack snippet in the How to create a Minimal, Complete, and Verifiable example help page, but later thought that page is more generic to all technologies rather than HTML,CSS & JS. So it'll be a better idea to display message while requesting for jsfiddle, plnkr etc.

And If I'm not wrong, there exits a mechanism that already scans for these in the body of a question, and there exists a mechanism that scans for stuff like +1 in comments... hopefully it'll be easy to integrate both to trigger the message

8
  • 8
    Yes, this happens a lot. Another big problem with people requesting a JSFiddle is that they'll do this even when no code exists in the question itself. So the OP ends up doing a lot of work that does not prevent their question from being closed. I've also been leaving comments about the local snippets, though many people won't bother if they've already started getting answers.
    – BSMP
    Commented Jan 13, 2016 at 12:20
  • 1
    Since there are stack snippets now, a comment asking for a jsfiddle could probably be flagged as "obsolete" (even though that's not quite the original intent, I think). Commented Jan 13, 2016 at 21:47
  • 2
    Particularly relevant answer from the Related sidebar: Promote Stack Overflow HTML, JS, CSS Stack Snippets. In summary, Stack Snippets are good for some things, but off-site demos often offer better demoing features.
    – ryanyuyu
    Commented Jan 13, 2016 at 21:52
  • 5
    The main reason I might still ask a user (particularly a new user) to include a jsfiddle rather than a snippet is because it's far easier to say "Could you put your code in a jsfiddle?" than "Could you put your code in a snippet? You click 'edit', then in the toolbar above the editable field, it's like the sixth or seventh button... let me check... yeah, it's the seventh button, just after the one that kind of looks like mountains. The one that when you hover it says 'snippet'. Click that, then you can put your code into your question." So I guess the point is that it needs to be clearer. Commented Jan 13, 2016 at 22:24
  • 1
    @iamnotmaynard maybe a magic link [snippet] that leads the user to introducing-runnable-javascript-css-and-html-code-snippets can help with that right..? I guess that's another feature request..! ._.
    – T J
    Commented Jan 14, 2016 at 6:11
  • Here it is meta.stackoverflow.com/q/315235/2333214
    – T J
    Commented Jan 22, 2016 at 8:25
  • 1
    I would love snippets too-if they would work in the Stack Exchange App. In the current version there is no "run" button at all so either I have to open the question in my browser (not sure if it works at all, haven't tried yet ) or to copy it onto a website like jsfiddle to try it out. That's a little bit annoying. With fiddle-links I just have to click on them to open and try out the code in my browser which is not the best way but better than copying code on mobile. So personally I like questions/answers with a fiddle but with an easy way to try code out on mobile I would love them like you.
    – palsch
    Commented Jan 22, 2016 at 13:05
  • One of the thing which we can not do in snippet but in JSFiddle is we can resize the width and height of result and other area like HTML, css etc. I think snippet should also have this feature
    – ketan
    Commented Jan 25, 2016 at 4:17

0

You must log in to answer this question.

Browse other questions tagged .