5

Inspired by a recent question asking about statistics of a particular part of SO, I'm curious with the usage of stack snippets, both how many questions actually use it and how often they are run.

Are many new questions in the HTML/CSS/JS tags using stack snippets where applicable or are more still using services like JSFiddle?

From what I can tell, it might be possible to get how many questions actually use it using SEDE (starting from this as a base) though would still be curious how often snippets are run.

6
  • 4
    Anecdotally, there are several questions in the C and C++ tags using Stack Snippets. No, I have no idea why.
    – Cody Gray Mod
    Commented Mar 4, 2016 at 7:18
  • Interesting! Checking that SEDE query I linked to (which I didn't even think to use it like that), I see Stack Snippets used on an Actionscript, Elasticsearch, Android and Objective-C questions amongst others. I wonder if people are messing around with the markup itself or are simply pressing the wrong button in the editor?
    – Turnerj
    Commented Mar 4, 2016 at 7:33
  • 2
    Users don't understand when a stack snippet is actually viable, lost track of the number of server-side code questions posted as stack snippets.
    – user692942
    Commented Mar 15, 2016 at 14:59
  • 2
    I have noticed the same thing among newer users @CodyGray. These users believe they should use snippets for all of their code. Commented Mar 15, 2016 at 17:49
  • 1
    @JayBlanchard, to be fair though, the button in the editor doesn't really give away that it shouldn't be used for these other languages, just that it has a title "JavaScript/HTML/CSS snippet". Maybe they naively believe that the button means code in general. It is obvious to probably the majority on Meta, maybe not to all the newbies on SO.
    – Turnerj
    Commented Mar 16, 2016 at 2:23
  • 1
    Very nice recent example of people not understanding the purpose of code snippets: stackoverflow.com/questions/36057585/…. Maybe one could dynamically try to detect the language and if it looks like a stack trace or something that cannot run the website could complain. Commented Mar 17, 2016 at 10:36

1 Answer 1

3

Using the linked SEDE query I played a bit around with it. Link

It's quite slow too, but I found several highly scored / often viewed questions which misuse the snippet tag.

Examples:

... This could go on for a while. I stopped after three examples.

Regarding information about how often snippets are run - I don't think this information is included in the SEDE data.

3
  • I doubt it's even registered how often snippets are run.
    – Cerbrus
    Commented Mar 15, 2016 at 14:23
  • 1
    @Cerbrus, from what I can tell from the source, I think you're right. For me, it would be one of those things I would really want to track though, seeing what the ROI is like on the entire system. (I know the ROI in this case is more complicated than just number of times it is run but still useful to know)
    – Turnerj
    Commented Mar 16, 2016 at 2:18
  • @Turnerj It could be a feature request maybe? Commented Mar 16, 2016 at 8:34

You must log in to answer this question.

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