60

Some users (probably mostly new users) tend to use the "code snippet" tool for code in languages that aren't supported by Stack Snippets.

Would it not make sense to disable the code snippets if the , , or tags are not present in the question or at least show a warning?

You have used the "code snippet" feature which is supposed to be used for HTML/CSS/JavaScript only. Should this be replaced with a normal code block?

Yes/No

13
  • 13
    What about HTML/CSS questions?
    – Joe
    Nov 9, 2014 at 18:11
  • 1
    I'm not very familiar with javascript or html/css. It can rephrased to cover the tags that make sense (I don't know which).
    – assylias
    Nov 9, 2014 at 18:24
  • 16
    Yes! Please just don't allow it; way too many "Runnable" C# snippets that just add noise to the code block. Nov 10, 2014 at 22:56
  • 1
    Agree! Not to mention those who don't know the difference between java and javascript...
    – Andrew T.
    Nov 11, 2014 at 5:39
  • 2
    Regarding title -What about javascript libraries such as jquery, backbone, underscor etc..? So If I'm asking a question very specific to a particular library looking for an expert in it, Is it mandatory that I tag it javascript as well..? A warning is good idea in case if HTML|CSS|JavaScript tags are missing, but automatic conversion is not in my opinion...
    – T J
    Nov 11, 2014 at 5:56
  • 1
    @TJ Yes, it is mandatory that you also add the javascript tag. If a question is about programming in one language that language must appear in the tags, together with any other related framework. The only question where this wouldn't be required would be only question about the library but not programming with that library (and most of those are off topic anyway).
    – Bakuriu
    Nov 11, 2014 at 7:33
  • 3
    @Bakuriu Is that requirement documented anywhere? If I tagged a question with JQuery isn't is implicit that it's going to be about Javascript? The people who don't realize that is probably the same people I would not want answering my question in the first place.
    – ivarni
    Nov 11, 2014 at 8:00
  • @Bakuriu Someone already made the point. Adding to that, If I tag my question jQuery alone, that means I'm looking for jQuery experts and a solution using jQuery only (that means other js frameworks and huge piles of js code is not welcome) . I don't want to tag more generic tags and end up with answers like Here's a cool solution using underscore, or using mootools you can do this or I did this using pure javascript!! See my huge pile of code!. If there is a javascript tag I can't even flag those as NAA
    – T J
    Nov 11, 2014 at 8:46
  • Related: meta.stackoverflow.com/questions/274636/…
    – nhahtdh
    Nov 11, 2014 at 10:29
  • But jQuery can also be used from compile-to-javascript languages, such as Coffeescript. That's why there should always be a JS tag on JS questions.
    – Kroltan
    Nov 11, 2014 at 10:35
  • 1
    @TJ I fail to see how that is relevant. If you are interested on jquery solutions just add the jquery tag too and be explicit about that. Note that pure javascript solution can be useful to other people, so you can simply ignore them and/or downvote them if you feel like it. However not adding the javascript tag could have significant side effects (e.g. it's a question that's been asked 1000 times, but now dupe hammer cannot be used by javascript gold badgers even though it is a question about javascript. This is very relevant when you replace jquery with something much less popular)
    – Bakuriu
    Nov 11, 2014 at 11:49
  • Would it be reasonable to use stack snippets in cases where someone might not be interested in the JavaScript code itself, but an applet scribbled out in a few lines of JavaScript could help illuminate a question or answer? If stack snippets wouldn't be the best approach, what would be better? External site links can go bad, after all.
    – supercat
    Nov 24, 2014 at 22:23
  • 1
    related: Abusing the Code Snippet for wrong languages
    – Bergi
    May 18, 2015 at 4:07

0

You must log in to answer this question.

Browse other questions tagged .