It's extremely common for people to ask and answer questions with no code other than a link to http://jsfiddle.net or similar service. These of course are not appropriate. I have personally been unable to access jsfiddle for hours due to the site being down while browsing Stack Overflow.
In an effort to help educate people on why this is a bad idea and at the same time improve posts on SO, I suggest some measures be put in place to prevent it from happening.
For example, if the question or answer has:
- A link to http://jsfiddle.net/, http://ideone.com/, or any other site in a specified list
(but let's be realisitic, the one that really matters the most is jsfiddle) - No formatted code
...prevent it from being posted, with a message or link explaining why. There may be edge cases where it does make sense, so perhaps we'd need to allow the user to click through the message and post anyways, but at least they will have been warned/educated.
If we need to discuss whether or not "link only, no code" posts are problematic and not appropriate, then so be it - but I think it's obvious and that topic has been well covered. Is there anything we can do to prevent them and encourage people to put their code in their post?
This issue is very specific to jsfiddle, I would like to see something that directly addresses that. If another site becomes the defacto code demo site, then we can cross that bridge when we get to it or look for more general solutions to this ever growing problem. I think that awareness of the issue is key to preventing it, and people don't read the FAQ nearly enough as it is - we need some direct intervention.
According to the owner/creator of jsfiddle, Stack Overflow makes up 30% of all referrals. That's a huge amount. Sure they aren't all "link only" posts, but I want to emphasize how much SO is using jsfiddle in particular to dump their code.
People aren't doing this to harm the site, the usually think they are helping out by making their post easier to read. They need to understand why this is actually a problem, and why relevant code must be posted on the site, not somewhere else. If more people understood, I think the problem would start to go away on it's own - but we'd still need something to deal with newer users who aren't familiar with the rules and goals of SO and Stack Exchange, don't hang out in meta, don't read the FAQ, etc. However, the less examples of jsfiddle-link-only posts there are, the less people will imitate them.
I honestly think that if people understood the problem more, it wouldn't be as much of an issue. This doesn't mean blocking jsfiddle, but preventing posts that rely on links to it. A lot of people are confused about that, and ask me "Since when is jsfiddle not allowed?". It's allowed, but your post should hold up without the link. People need to understand that - a warning message would probably be enough.
I do not feel that this specific issue is "status-completed". I think it's still a major problem that's bound to get worse as the months and years go by.
Here are some examples from the past few hours, as of 2012/10/17 6:45 PM EST:
- D3.js updating spline with new data
- img float:left - margin elements on the right
- Adjust Fontsize depending on div width
- Show/Hide div issue in Jquery
- using .slideDown to toggle a div on or off, also adjusting arrow
- jScrollPane jquery plugin, jspDrag doesn't exceed to end
- yahoo weather change background color by degree
- CSS submenu alignment issue
- Firefox w/ Mouse dragging
- https://stackoverflow.com/a/12943502/398242
- https://stackoverflow.com/a/12943540/398242
- What is the simplest way to turn overflow:visible into a hover-menu?
- Facebook Send button empty flyout
- Multi submenu not working properly in jquery
Here are some more from this morning, 7:30 AM 2012/10/18 (all questions, all within the last couple of hours). I could have easily found a lot more but it was getting boring:
- :after CSS selector position not working
- Like button does not show faces
- jQuery ScrollTo Skips and is Notchy
- Issue in table rows cloned
- duplicate keys on multiple drop down buttons
- Twitter bootstrap 2.1.1 Collapse not animating when Opening a collapsible
- Jquery - floating div
- calculating javascript (simplecart) cart total, adds random decimals to total
- jQuery image fade enlarge top and bottom px
- How to get text-overflow working in tables
- Strip down google map jquery
- Look at this margin bug of First element of Container! And Give proper reason for this
- How to convert jquery code into javascript
- Add jQuery dropdown effect
These were ridiculously easy to find (took me about 3-4 minutes). I don't think the recent change has done very much to help the situatuion. There are literally entire threads on SO that are just passing jsfiddle links back and forth, and it's been like that for a long time - and bound to continue unless something is done to address this specific issue.
[email protected]
. And of course, thanks for what your invaluable work @Oskar.