What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 134 Stack Exchange communities.

In many answers I've seen links to JSBin and JSFiddle and found them useful. When asking or answering a question when is it better to put the code directly on the page versus putting a link to the code where it can run?

For example, I wrote some small programs I did to narrow down the cause of a problem and was wondering if I should include the code directly or put them on such a site?

share|improve this question

3 Answers 3

An external play-thing version should only accompany a self-contained question, but can be desirable in circumstances where the output is visual and can be set up as an immediate demonstrable example - whenever people might actually need to run your code to help see and fix the issue, this is better than spending even a few moments opening a text editor, saving, browsing to, etc.

Always include the relevant code in the question, though.

share|improve this answer

My suggestion is to use JSBin or JSFiddle only for generic code which can be helpful to other global users.

JSBin or JSFiddle should be used only for demo purposes, but users should paste the HTML, Javascript and CSS into the question also. That will be helpful for the future (if third party links are broken)

In simple terms:

Never paste client specific code on public sites (Use generic sample code)

share|improve this answer

Please include the code in the question, but feel free to link to JSBin and JSFiddle, since they are, as you point out, handy.

It's important to include the code so we don't need to go offsite and so that we're not dependent on external websites for content.

One option is to put the minimum code necessary to diagnose in the question and link to the full module externally, but make sure the question is self-contained.

share|improve this answer

You must log in to answer this question.

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