39

New users usually fail to post an MCVE, despite helpful commentary linking to How to create a Minimal, Complete, and Verifiable example.

I am thinking why.. Could the link be more helpful by providing an example of how not to post your code (e.g. providing only the line your C program crashed), and how you should post your code (e.g. providing a complete laconic C program that reproduces the phenomenon)?

Now of course, how we would generate such an example, that would be generic to all programmers coming from different languages, would be an issue, but let's discuss if an example (assuming that we could avoid a tower of Babel incident) would be helpful in the first place. Jon Skeet proposed to have tabs for common languages, and I think that only users of Gold badges should be allowed to contribute to the corresponding tab.


Personal experience: I think that when I was a new contributor, I was asked about an MCVE, and linked to the help. I don't remember what I understood from that help page (since I was also a new guy in programming, so some terms would have been unknown).

However, after some good users downvoted and closed my questions, I got interested in surveying other questions that would enjoy the help of the community. I could quickly understand which were good questions, and which not, by understanding which provided an MCVE and which not, resulting in me understanding what an MCVE is, in first place. I believe, I learned by bad/good examples.

20
  • 28
    If we do this, I'd quite like to show an example for each of the common languages, possibly in tabs in the same way Google API documentation works.
    – Jon Skeet
    Commented Nov 30, 2018 at 9:39
  • 7
    Oh that's a great advice, and it will solve the how to address all/most of programmers out there. Then, users holding the Gold badge of every language should be able to contribute to the respected language and provide a bad/good example of an MCVE! PS:OK I told loud to myself "Oh my God" in work and everybody looked at me, when I saw @JonSkeet commenting on my question! :O
    – gsamaras
    Commented Nov 30, 2018 at 9:42
  • 9
    Brilliant idea. Note this is similar to what some (mainly data analysis) communities do already, see examples in r, pandas and stata.
    – jpp
    Commented Nov 30, 2018 at 9:48
  • 4
    That pendulum swung quite a while ago already, we now have the opposite problem. Users are well aware that they need to post a snippet to avoid "too broad". closure. I've looked at far too much fake code and [we-need-a-better-editor] meta questions. Usually evident at first, until somebody swoops in and fixes the formatting. I can generally still tell, but think of the children. Explaining why the code is bad is too much work and kinda pointless, best to get it over with and put the snippet in the answer. Commented Nov 30, 2018 at 9:51
  • @jpp Apache Spark also has this, and it helped me a lot. Hans, still, an example might not hurt, and improve things for the so many new users that still don't provide an MCVE...
    – gsamaras
    Commented Nov 30, 2018 at 10:06
  • A lovely example is here. Completely fake, he got just one minor detail wrong to help me notice something was smelly and avoid wasting my free time on it. Commented Nov 30, 2018 at 10:26
  • I don't know C sharp @HansPassant, so I cannot see what you see at a glance, sorry.
    – gsamaras
    Commented Nov 30, 2018 at 10:29
  • The tricky part is that you also need a really useful question to go along with it, an MCVE without a question is just a pile of code and doesn't demonstrate anything.
    – Gimby
    Commented Nov 30, 2018 at 14:21
  • Of course @Gimby, but the questions that have actually a question and not an MCVE than the ones that have it the other way around, are much more, in my experience at least.
    – gsamaras
    Commented Nov 30, 2018 at 14:27
  • This is a great idea but I am not sure a one size fits all example can always be generated. The problem is that different languages have different commands/syntax/conventions. As such, the content must be tailored to specific circumstances. Since enhanced tag wikis will likely never be implemented, posting a Q&A in a tag is the only realistic alternative. Good luck convincing the question purists on here about that.
    – user8682794
    Commented Nov 30, 2018 at 14:38
  • Wouldn't the tab partition solve what you say @PearlySpencer? I mean I gave the C/C++ Gold badge, I could create the bad/good examples there. For another language, the other gold metallists would be able to act accordingly, I hope.
    – gsamaras
    Commented Nov 30, 2018 at 14:42
  • What is tab partition?
    – user8682794
    Commented Nov 30, 2018 at 14:47
  • 1
    If you mean the tag wikis newcomers never read those. Not only that but they are notoriously difficult to revise and by design do not promote collaboration and diverse viewpoints. Also, smaller communities typically do not have trusted users that can readily make changes as required.
    – user8682794
    Commented Nov 30, 2018 at 15:29
  • 2
    @gsamaras One alternative that's likely to get done faster is posting a CW faq-proposed question here on Meta with one answer for each popular answer (the Q can link to each answer directly) showing an example snippet and then that snippet again, but in MCVE form, detailing/describing what was removed and why. Gold badge users could likely coordinate in chat or in comments to get effective examples for each topic, then the comments could be moved/deleted.
    – TylerH
    Commented Nov 30, 2018 at 16:44
  • 5
    Somewhat related: Could we add a tag-specific MCVE page?
    – duplode
    Commented Nov 30, 2018 at 16:45

1 Answer 1

4

I posted this originally on meta 4 years ago and on a few answers since then where I feel questions are related to educating new users... seems applicable here:

The Good, The Bad & The Ugly

TLDR

Give new users and persistent offenders (who write poorly received posts) a tutorial they must complete before they can post, which highlights good and bad posts, along with reasoning as to why they are judged as they are.

The idea behind it is to educate these users about what the community expects to a degree when it comes to posting. The knock on effect is to hopefully reduce the number of bad posts as well as reduce the amount of time experienced user spend explaining the same things over and over again in comments and via voting.

1
  • 1
    @gsamaras If 5 minutes of effort is enough to send them elsewhere... then perhaps they weren't meant to be SO users. The feature request is designed to educate users and get them off to a better start than letting them roam free posting questions without prior knowledge of how things work around here. If a small percentage of the users learnt something and had a better first experience with SO, as opposed to downvotes and negative comments, surely it's worth it?!
    – Tanner
    Commented Dec 11, 2018 at 12:51

You must log in to answer this question.

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