6

So many questions would be better with code and so many new users seem to know know how to use the snippets feature and even if they do seem to not understand how to write one.

That got me wondering if SO should suggest snippets, based on the tags or a dropdown menu or something.

I can see that's easier said than done but for at least the topics I cover there would arguably be a good template or relatively small set of templates that would hopefully give the user an idea of how to present their question.

Another idea is to add something to the tag page like "recommended MCVE templates for [tag]". I don't know how many users would find that page, maybe add a link in the question form itself ("See tag snippet template recommendations"). Maybe the snippets themselves could just be a link to a question for that tag like "What's a good MVCE template for React?" and users leave answers with templates that get voted and commented on.

Just an idea as it would be nice to be able to help users ask better questions.

4
  • 16
    Can you imagine MCVEs that would serve as useful templates for the tags you are an expert on? Personally, I can't. MCVEs are too specific. They are not easy to build, and are an important part of troubleshooting any issue.
    – yivi
    Commented Apr 25, 2019 at 10:57
  • 2
    Suspect if there was a way to generate MCVE's semi-automatically there'd be a way to answer the question semi-automatically. Would be great but I can't see that happening personally...
    – Mena
    Commented Apr 25, 2019 at 11:15
  • Related: Could we add a tag-specific MCVE page? Commented Apr 25, 2019 at 12:07
  • @yivi Some time ago some of us did exactly that for pyspark dataframe tags, and it seems that the thread has been well-received (despite the slightly inaccurate title): How to make good reproducible Apache Spark examples; I have seen some similar efforts around, but I agree that this stuff is not easily standardized
    – desertnaut
    Commented Apr 26, 2019 at 7:31

2 Answers 2

6

No. Because we don't want questions with MCVEs.

Yes, really.

SO is not meant to be a Mechanical Turk free debugging site for "programmers" who don't have basic debugging skills or who can't be bothered to do debugging themselves. In the past we could close those kinds of questions with specific close reasons: "lacks minimal understanding" or a question that would benefit only the asker. But apparently those close reasons were "misused". The close reason that demands an MCVE is actually a trick. If you can create an MCVE, you have essentially debugged the program yourself, or you have transformed the problem into a useful question about why an API has particular unexpected behaviour. In the first case you no longer have a question. In the latter case the MCVE is not the important part of the question; It is better expressed as a code snippet and natural language question about the API.

1
  • Although I disagree with some details, I regret to say that the spirit of your answer rings true indeed...
    – desertnaut
    Commented Apr 26, 2019 at 7:44
0

Creating a per tag (there are a lot of tags) default template for use with examples seems to not only be an extraordinary amount of work for an already overburdened team, but also not guaranteed to produce meaningful results.

The people capable of creating posts with code are already providing enough (for the most part) which meets the requirements for reproduction or being answerable.

Those who generally cannot figure out how to present their code in a meaningful way would more than likely also not know how to format their code to match the template produced (how much php ends up in the html portion of current StackSnippets?)

I think it is an interesting idea, and focusing on question quality is a good endeavor, but I just don't think that this would really have the intended impact that you would be satisfied with.

2
  • I wasn't suggesting the team do it. I was suggesting it was a community thing. I even gave a suggestion of using the Q&A and voting system. I can imagine people making questions, maybe only with a certain score, "What are some good example snippets for X" and adding some tag/flag only people with that score can add. Then anyone, or maybe only anyone with a high enough score for that tag can add examples as answers. People can comment, vote, just like a normal Q&A.
    – user128511
    Commented Apr 26, 2019 at 20:37
  • @gman - You mean, like this? meta.stackoverflow.com/q/366424/1026459
    – Travis J
    Commented Apr 26, 2019 at 20:40

You must log in to answer this question.