-13

I did some research before asking this question, but in case I missed a guideline or Meta post that deals with this issue, please point me in the right direction. As elaborated further down, I've found posts to deal with the topic, however the solutions to those issues seem deprecated.

Problem

I'm majorly dissatisfied with the way users on SO are using external code hosters such as jsfiddle or Codepen. Due to the nature of the network, this isn't even an isolated problem, but spreads by people trying to be helpful and adhering to the guideline to include all necessary components in the answer by suggesting to post a jsfiddle link, posting an answer in that form, or by abstraction upvoting answers that primarily consist of a jsfiddle link.

I've even found some posts on Meta that appear to deal with collaboration links by blacklisting them. I understand that this kind of link has an especially short life span (at least regarding the orginal content), but I fail to see why that should be different with regular links. As proposed by another answer, collaboration links aren't more or less permanent than any other link on the web (I believe this to be true, while I don't agree with the conclusion that answer draws from this insight).

There of course is the Links to jsfiddle.net must be accompanied by code. message, however that's easily circumvented by marking just any part of the post as code. Furthermore, assuming external code hoster links are fine when any code is included in the same post seems very prone to errors to me - I wouldn't need a link to an external site if my answer contained everything to answer the question; and if it did, the link would be redundant.

Other than the common ground that snippets are preferable to external code hosters because of persistance, the issue for me personally is that my local security settings prevent me from viewing anything on jsfiddle specifically. This is a factor that I rarely see discussed, up to the point where I believe to be the only one having this problem.

When I do see argument in favor of external code hosters, it mostly seems to stem from habit, convenience (the ability to "fiddle" with the code), or lazyness (if someone worked on the solution in an external tool anyway, it's easier to link it than to copy it over).

Personally, I believe stack snippets to be superior for use within the SO network in all regards for the aforementioned reasons, as well as a few others that are less significant. All supposed benefits from jsfiddle links don't counterweight the severe short- and long-term disadvantages. There may be corner cases for which this doesn't apply, but according to my observations, an amount very close to 100% fall in the categories described in the previous paragraph.

Suggestions

I see multiple solutions that could tackle the issue:

  • changing the guidelines to disallow those links and always use a SO snippet in their stead. Show a message with a link to that guideline page upon including a jsfiddle link in a question or answer.
  • actually blacklisting all links to external code hosters, also showing the explanatory message

My preferred solution would be the first one, as it doesn't just enforce a certain rule, but teaches users why that rule is important, while not preventing anyone from using those links in the possibly existing corner cases.

9
  • 3
    TL;DR: My security settings prevent me from using jsFiddle, so everyone should stop using it as well. Meh. Oct 11, 2016 at 8:52
  • 1
    @FrédéricHamidi: While that's only one of multiple points (and one I labelled to be one that I haven't observed to concern anyone else besides), you make that specific portion sound like it's a non-issue, which I believe it isn't. Oct 11, 2016 at 9:13
  • 4
    That was tongue-in-cheek, but I do believe your security settings are indeed a non-issue for the rest of us -- you could change them, or live without jsFiddle, but using that as an argument to advocate against anyone else using it seems... wrong to me. Oct 11, 2016 at 9:15
  • 1
    @FrédéricHamidi: The way I see it, SO's rules try to promote accessibility, and whether a link is broken or shows me a blank page because it's creator didn't account for the fact that not everyone has default browser settings doesn't functionally make a difference. I'm not trying to convince anyone of my methods, nor am I saying that web page should be blacklisted because I personally can't access it - I'm saying it should be discussed whether it should be discouraged from being used because not everyone can access it, but also because of a variety of other reasons I've given. Oct 11, 2016 at 9:22
  • 5
    JSFiddle links are a very useful addition - answerers can play around with the code to test a potential answer. Questions that contain only a JSFiddle link already get downvoted and closed.
    – Pekka
    Oct 11, 2016 at 9:24
  • 1
    @Pekka웃: I fail to see how that doesn't apply to SO snippets as well - you can copy a snippet to your answer (that, if you should not find a solution, do not have to submit), then edit it to your liking, run it, then insert it to your answer eventually. This is more or less exactly the functionality that external code hosters provide, minus the ability to perma-link them on their own. Am I missing something here? Oct 11, 2016 at 9:33
  • the issue for me personally is that my local security settings prevent me from viewing anything on jsfiddle specifically I'm pretty sure you wouldn't posted this suggestion if you could use jsfiddle on your network. This is something you need to solve with your IT
    – Alon Eitan
    Oct 11, 2016 at 9:45
  • 2
    @AlonEitan: I can use Codepen just fine, and I'm still opting against using it. My reasons for disapproval are functional, not based on personal dissatisfaction with my access to the internet, as elaborated on further up in the comments. However, I very personally disapprove of your (and other's) method of computing a question. Oct 11, 2016 at 10:06
  • 3
    @TheThirdMan you’re right that Stack snippets provide basically the same functionality, but JSFiddle beats it in convenience of use - follow the link, change code, done. No need to start an answer, copy & paste what could potentially be lots of code, etc. (I don’t disagree you have a point here, though - Stack snippets were developed specifically to encourage code to stay on the site. It just seems wrong to force people to use them.)
    – Pekka
    Oct 11, 2016 at 11:52

1 Answer 1

7

External code hosting sites have their benefits, so they're here to stay. As long as a question or answer contains enough relevant code, a link to such a site to demonstrate the code or varieties thereof does no harm.

If instead a post does not contain enough code to ask a proper question or give a proper answer, there are existing tools at your disposal: downvote and closevote as "Off-topic: must include code".

3
  • 1
    Apparently, this is the network where downvotes are used to express opinions, so thanks for being the one person putting their opinion in words. Oct 11, 2016 at 9:17
  • 1
    Yes, that's exactly how Meta works. :) You're welcome.
    – CodeCaster
    Oct 11, 2016 at 9:18
  • 11
    @TheThirdMan to elaborate: that’s by design how Meta works. Downvotes here are used (among other things) to express disagreement with the suggestion made, even when the suggestion is perfectly fine quality-wise.
    – Pekka
    Oct 11, 2016 at 9:25

You must log in to answer this question.

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