5

I've been using SO for a fair while now and only just learned today about how to make Stack Snippets. My initial impression was that code entered into a message/post would automatically become a snippet. I was wrong, but I couldn't understand why my code wasn't becoming a snippet. It was only after searching the internet today that I discovered it's something you need to do manually.

There needs to be a way of showing new users how to use this functionality. It's very confusing and frustrating having no prompting. If there was prompting I did not notice it.

16
  • Related: meta.stackoverflow.com/questions/386147/…
    – Kaiido
    Commented Aug 8, 2019 at 4:44
  • 5
    Stack-Snippets are only relevant to some tags (web-front related generally). This prompt might actually be noise for someone that is asking about say haskell.
    – Kaiido
    Commented Aug 8, 2019 at 4:46
  • 2
    Worse than noise. I've seen people use them for languages that aren't supported and get the wrong syntax highlighting and extra buttons. If we add a notification, we could make it exclusive to questions only using supported language tags.
    – Erik A
    Commented Aug 8, 2019 at 5:31
  • @Kaiido Perhaps there could be a way of prompting the user after they've entered valid code as a code block? Commented Aug 8, 2019 at 6:12
  • 1
    Yes it could be added only on questions that have some tags like [css] [html] or [javascript]. However, I still feel the "Guided Mode" would be a better place for such an introduction.
    – Kaiido
    Commented Aug 8, 2019 at 6:14
  • @Kaiido I must have skipped "Guided Mode" because I have no idea what that is. Commented Aug 8, 2019 at 6:17
  • When you are about to compose a question, there is a link at the top "Use guided mode". I think most new users are presented with this mode now, but I'm not sure.
    – Kaiido
    Commented Aug 8, 2019 at 6:28
  • 1
    @Kaiido every user < 111 reputation gets the Ask Question Wizard: meta.stackoverflow.com/questions/381671/…
    – rene
    Commented Aug 8, 2019 at 6:37
  • There is an faq on how to create a snippet. Whenever someone posts code that is runnable or posts a jsfiddle, you can add a comment pointing them to this post: I've been told to create a “runnable” example with “Stack Snippets”, how do I do that?
    – adiga
    Commented Aug 8, 2019 at 6:51
  • Having something become a snippet when it isn't a language that's actually snippetable is annoying to no end. Especially since there is 0 chance I would ever run a snippet (just a virus waiting to happen). I do not want more accidental snippets appearing in the tags I answer. Commented Aug 8, 2019 at 16:57
  • @GabeSechan It wouldn't have to automatically become a snippet. I was suggesting that new users be made better aware of this functionality. Commented Aug 8, 2019 at 17:11
  • @JossClassey To those of us who don't write Javascript, the snippet function is a negative to the site, not something we really want increased use of. Especially by new users who won't realize that the feature won't work on their question. Really combined with that and the security implications I'd rather see snippets die. Commented Aug 8, 2019 at 17:15
  • @gabeSechan wich security implications? Commented Aug 8, 2019 at 23:15
  • 1
    @GabeSechan Stack Snippets are safe; they run in very sandboxed iframes. Pretty sure the worst thing they could do is continually consume CPU, which is easily fixed by reloading the tab the snippet is on. As someone who continually browses Javascript questions and runs any snippet whose problem (or solution) I'm interested in seeing, I've never encountered a problem. The inappropriate use of Stack Snippets on questions not related to frontend is the (significant) problem. Commented Aug 9, 2019 at 6:35
  • 1
    @CertainPerformance I'm sure they try to make it safe. But I don't want, and will not accept the additional threat vector, and I think its a bad idea for anyone else to. You're welcome to your own opinions on that. Commented Aug 9, 2019 at 12:54

0

You must log in to answer this question.