20

I just looked at the how-to-ask page, and say this section

If it is possible to create a live example of the problem that you can link to (for example, on http://sqlfiddle.com/ or http://jsbin.com/) then do so - but also include the code in your question itself. Not everyone can access external sites, and the links may break over time.

Should that text also mention StackSnippets? I see it mentions include the code, but (to me) it's not clear that you can embed the snippet, and I feel it could be interpreted as "Dump all the code in the question". Or, has it been excluded in order to keep the page as simple and brief as possible?

1 Answer 1

14

Yes, it should, e.g. something like this:

  • If your question is about HTML, CSS, and/or JavaScript and it's possible to create a live example of the problem using Stack Snippets, then do so
  • Otherwise, if it's possible to create a live example that you can link to (for example, on http://sqlfiddle.com/ or http://ideone.com or http://jsbin.com/) then do so - but also include the code in your question itself. Not everyone can access external sites, and the links may break over time.

I also snuck IDEOne in there (substitute your favorite online polyglot compiler site) since the JSBin example is less important now we have Stack Snippets. (That said, Snippets currently disallow several things that JSBin and jsFiddle don't [like web storage], so sometimes it's still necessary to go off-site.)

4
  • I don't like the "then do so" aspect of the Stack Snippets line. Stack Snippets are also optional. I'd prefer a softer rewording that mentions the feature without making it sound mandatory. Something like If your question is about HTML, CSS, and/or JavaScript, it might be possible to create a live example of the problem using Stack Snippets.
    – ryanyuyu
    Commented Jan 12, 2016 at 15:42
  • @ryanyuyu: I was just copying the text that's there, which is currently "If it is possible to create a live example of the problem that you can link to (for example, on sqlfiddle.com or jsbin.com) then do so - but also..." I do think that wording (actually a fair bit of the wording on that page) is quite stilted, but was proposing a small edit rather than a rewrite. Commented Jan 12, 2016 at 16:18
  • Makes sense. It's just we might at well address everything while we're here.
    – ryanyuyu
    Commented Jan 12, 2016 at 16:24
  • 1
    Yeah, I don't know if getting a small change applied is easier than getting a full rewrite applied... Commented Jan 12, 2016 at 16:39

You must log in to answer this question.

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