Linked Questions

11 votes
0 answers
153 views

Can something be done about users using code snippets in place of code highlighting? [duplicate]

Without fail, every day I come across questions where the person has posted non-runnable code (e.g. CSS only, PHP only, ...), but instead of using the code formatting options of indenting or back ...
j08691's user avatar
  • 207k
2 votes
0 answers
185 views

Please restrict the use of stack-snippets [duplicate]

The question that triggered this request is Android - get data detail listview using asynctask in fragment and service using codeigneter. In the question, stack-snippets were applied to nearly ...
jww's user avatar
  • 101k
3 votes
0 answers
75 views

Lots of bogus "begin snippet" need to be edited out because of unrelated languages [duplicate]

Recently I've noticed a lot of code snippets that have something like this: <! -- begin snippet: js hide: false --> <! -- language: lang-html --> <! -- end snippet --> Where the ...
o11c's user avatar
  • 15.8k
1 vote
0 answers
35 views

Rename or label StackSnippet editor widget to discourage non-JavaScript use? [duplicate]

At present, it's common to see new users leveraging StackSnippets for non-JavaScript code -- Python, golang, and the like -- where they provide no benefit over standard code-section functionality, but ...
Charles Duffy's user avatar
794 votes
53 answers
23k views

Feedback requested: Runnable code snippets in questions and answers

Today we're proposing a new feature to the Stack Overflow community: Stack Snippets. What do Stack Snippets do? Stack Snippets make code blocks runnable. Here's an example: alert("You can even do ...
Haney's user avatar
  • 34.4k
190 votes
18 answers
4k views

Feedback Requested: Code Editor and Stack Snippets

You probably all know about Stack Snippets (a.k.a. "JavaScript/HTML/CSS Snippets"), which we introduced almost a year ago. You probably also know that Stack Snippets are routinely misused for ...
Thomas Orozco's user avatar
50 votes
3 answers
1k views

"JavaScript snippet"? But I use it for HTML and CSS as well!

Following on from various Meta posts about code snippets being misused (like this one and this other one), a few days ago the Code Snippet WYSIWYG button's title was changed from "Code snippet" to "...
James Donnelly's user avatar
64 votes
5 answers
978 views

Misunderstanding how the "make code sample" button works

It seems that some people don't understand how the "make code sample" button {} works. I encounter posts like this all the time: The problem appears to be that they first click {}, and then ...
Jonathon Reinhart's user avatar
52 votes
3 answers
1k views

Stack Snippets and non-runnable code

Since the introduction of Stack Snippets, I've noticed them showing up frequently with non-runnable code. (I spend most of my time on the google-apps-script tag, which is a server-side js variant. I ...
Mogsdad's user avatar
  • 45.6k
129 votes
1 answer
1k views

Should it be more obvious that stack snippets are only meant for HTML/CSS/JS?

Sometimes I see questions like one, two and three where a user unfamiliar with stack snippets pastes their C or C++ code into the stack snippet box. Now admittedly this doesn't happen very often, but ...
user avatar
20 votes
1 answer
2k views

Is this 'Run code snippet' with payload an attempt to infect SO users' machines with a virus?

Just wondering if there's a risk to a user's machine by clicking "Run Snippet" in questions like this one I'm suspicious because on the face of it the question doesn't look like it needs to ...
Caius Jard's user avatar
26 votes
1 answer
484 views

Force preview of stack snippets

This question, among many, many, others, attempts to run PHP code in a stack snippet. I propose that the stack snippets are each previewed in a dialog box after the user clicks Post Your Question. ...
Mooseman's user avatar
  • 18.9k
102 votes
1 answer
2k views

Code snippets are a pest

I find it extremely cumbersome that code snippets add lots of buttons and borders and make it much harder to read through questions. I answer a lot of question in angular2, and in a lot of questions ...
Günter Zöchbauer's user avatar
1 vote
2 answers
456 views

Why is it so hard to add code? [duplicate]

I always struggle for like 10min trying to add code to my question.. I either have to paste it all in, then go and manually add spaces, or I use Ctrl+K and paste it in one line at a time. Is this ...
Kossi's user avatar
  • 87
-6 votes
1 answer
555 views

Is there a better name for Stack Snippets?

You'll all be aware of the following posts no doubt: Feedback requested: Runnable code snippets in questions and answers Stack Snippets Sandbox - Try It Out Here! I'm not a massive fan of the name ...
Tanner's user avatar
  • 22.6k

15 30 50 per page