35

I often come across questions where the user has not provided a Minimal, Complete, and Verifiable example. Even after I comment that they should read the relevant section on the Help Center and edit their question accordingly, most users rarely do so.

However, I sometimes feel that a question is particularly interesting and merits further attention. In such cases, I usually try to answer the question as best as I can using a MCVE of my own. But I then notice that immediately after, the same user may often ask another poorly documented question. This can be really frustrating to other users volunteering their time on here.

So my question is:

Is it appropriate to answer poorly-written questions using my own MCVEs? Or does it encourage users to just keep writing sloppy questions without putting any effort?

I would be very interested in hearing your thoughts on this as there is a greater discussion going on Stack Overflow META regarding current users looking not welcoming to new users.

7
  • 15
    My opinion: Stop answering at the point where you have to guess if what you answer is actually ops problem. If you know (at least with a very high chance) what the problem is without seeing ops code, then answer (Although the questions then wasn't in need of a MCVE in first place).
    – BDL
    Commented May 2, 2018 at 13:49
  • 1
    I would go as you said: This is just encouraging peoples not to make any efforts. You want an answer ? Okay, we are here for that, some peoples more for the rep thing, but we are here to help, if you don't want to take a little more of your time to provide enough material in order for us to help you and make the post usefull to future users, then get lost ? Laziness shouldn't be rewarded in anyway and surely not with your own time.
    – N.K
    Commented May 2, 2018 at 13:53
  • 23
    I would say to take the user out of the equation. Is the question answerable, yes or no? If no, dispatch of it. If yes, even if you have to guess at some of the details, go ahead and answer.
    – deceze Mod
    Commented May 2, 2018 at 13:58
  • 3
    If there is one thing that meta dwellers are good at, it's building complex confusing rules on top of very simple guidelines :) What deceze says. Question good? Unique? Go for it!
    – Gimby
    Commented May 2, 2018 at 14:01
  • 5
    I like answers that provide a MCVE to demonstrate correctness, independent of any considerations about the nature of the question. I think this is most useful to future readers. Just like a question can, in some cases, be unclear with a MCVE, I believe the same is true for an answer, in some cases. Providing a MCVE usually goes a long way towards eliminating any lack of clarity about what is being suggested or claimed in the answer. Commented May 2, 2018 at 15:20
  • 1
    The "don't edit code" crowd won't like me saying this, but: where the question contains a big ugly wall of code but is asking about a particular bug that can be reproduced in a few lines, the most useful thing you can do is often to edit the question to completely replace the asker's code with a carefully crafted MCVE of your own. Don't do this if it'll invalidate existing answers or fundamentally change the question being asked, but otherwise, go for it - future readers shouldn't have to wade through dozens (or occasionally hundreds) of lines of irrelevant code to get to an answer.
    – Mark Amery
    Commented May 3, 2018 at 17:52
  • @deceze "If yes, even if you have to guess at some of the details, go ahead and answer" if you have to guess thing the question is not answerable. So your conclusion is strange.
    – Stargateur
    Commented May 5, 2018 at 6:30

6 Answers 6

29

Is it appropriate to answer poorly-written questions using my own MCVEs?

Here's the thing, poorly-written does not necessarily mean close-worthy or unanswerable. So let's clarify a few things. If the question should be closed, please do not answer it. These are the reasons to close a question, per the close vote dialog:

  • Duplicate
  • Off-topic (I've condensed some of the subcategories)
    • Not suited for Stack Overflow / should be on another site instead
    • A debugging question without an MCVE
    • A recommendation question
    • Cannot be reproduced or caused by the kind of typo that would be unhelpful for future users
  • Unclear what you're asking
  • Too broad
  • Primarily opinion-based

If the question is poorly-written but also answerable and should not be closed, just fix it with an edit. Then you can answer the question. Feel free to use a MCVE structure in your answer if that's your preferred format. I'd just caution that there is a large correlation between being "poorly-written" and being close-worthy. But if you can understand the underlying question, edit it and answer it.

2
  • That's all well and good if we have enough reputation to edit the question. How about if we haven't earned that much rep yet?
    – Zephyr
    Commented Jun 14, 2018 at 3:41
  • 2
    You can still suggest an edit. That will even get you +2 reputation for your efforts when it's approved.
    – ryanyuyu
    Commented Jun 14, 2018 at 12:39
5

Here's my opinion: Please continue to be as useful as you possibly can.

There seem to be a lot of people who agree with your thought that it only encourages "low quality" questions. I'm pretty sure I've been downvoted for supplying an answer to what would be described as a low quality question. But I'll keep on doing it and I'll write my own MCVEs if I have the time and I believe it will help explain things.

I believe being helpful in this way serves a useful purpose (apart from just being generous). It puts more potentially useful content out there. Who cares if that particular user refuses to improve their question writing efforts? The solution that has been posted remains (or, at least, should).

I've lost count of the number of times I've researched a problem hoping for an answer. I'll Google whatever relevant terms I can think of and open a bunch of links (quite often favouring SO). Sometimes I read the question in those links. Sometimes I immediately see an answer with code that I recognise as a potential solution for the issue I'm dealing with. In those cases, I couldn't care less how well-formatted the original question was or if the questioner provided their own MCVE. I got the answer I needed from an answerer. I'm happy, I upvote, and I move on.

Where would I be if that brilliant answer that someone was obviously very capable of giving was locked up behind a "no, you must show effort first"?

9
  • If we neglect the quality and we start answer all kind of questions we will simply decrease the quality of the site. People need to understand that SO is not a forum or a discussion website, it's a website that deals with "programming issue" and not "code this for me, I am waiting" ... You need to take a look to tutorial websites, forum, documentation, etc and when you find absolutely nothing you come to SO. Commented May 2, 2018 at 14:45
  • 15
    @Temani We want good content. We don't judge the content based on what we think the laziness level of the OP is. If it's an answerable question, it's answerable. The problem with most lazy content is that it's not answerable for various reasons (unclear, too broad etc.). "OP lazy" in itself is not a criterion.
    – deceze Mod
    Commented May 2, 2018 at 14:53
  • 2
    @Temani I agree with the first part of your comment... to a degree. By all means keep off-topic clutter out. But coming to SO as a last resort? Really? No. SO is my first choice (via Google). We're not even talking about responding to questions where documentation might be more appropriate (e.g. "What does FuncFromWellKnownLibrary() do?"). We're talking about responding to (specifically with your own MCVE) questions that have not provided their own MCVE. Commented May 2, 2018 at 14:56
  • @deceze "OP lazy" in itself is not a criterion --> I know and we may have very good question without MVCE and within only 2 lines and it's a legit question but we both know how many questions we got saying "how to do this?, how this works?, how can I achieve this?" and the OP clearly doens't even try to google his question so this kind of laziness is a criterion for bad question Commented May 2, 2018 at 15:07
  • 4
    "how to do this" is often closable as "Too Broad" @TemaniAfif
    – ryanyuyu
    Commented May 2, 2018 at 15:08
  • @TemaniAfif bad question != closeworthy/unanswerable all the time. That's what deceze is getting at. If the question is closeworthy, as ryanyuyu's answer below says, close it and don't answer it. But if it's just a low quality question that otherwise is on-topic and shouldn't be closed... There's no issue answering it. (Though if you can edit it to be higher quality, that's even better.)
    – Kendra
    Commented May 2, 2018 at 15:09
  • @Temani While some may technically be "bad questions", what I am suggesting is that an answer to that "bad question" may be incredibly helpful to someone else who needs that answer. And you'll probably never really know just how many non-askers are helped. Commented May 2, 2018 at 15:12
  • @ryanyuyu I have to disagree with you there, there's probably thousands of useful and open "how do I" questions on this site. Also, FWIW I personally far prefer "how do I" questions when searching over "please debug my code" because some APIs (cough winapi) have a terrible lack of sample code, and at this point in my career I know how to debug stuff, I just want a couple lines to start my research with a quick test code snippet. I agree that there are some very useless "how do I" questions, but there are a lot of good uses for them too.
    – jrh
    Commented May 3, 2018 at 16:21
  • "Where would I be if that brilliant answer that someone was obviously very capable of giving was locked up behind a 'no, you must show effort first'?" Ultimately, eventually, in a world without a place like Stack Overflow where you can find such brilliant answers. There really is a bigger picture here to consider. Remember why SE exists, why it was created, and what the differences were from other sites that led to its success and usefulness. Commented May 3, 2018 at 16:30
5

Remember, most people search SO for the pearls, not the sand. If the question isn't great, but it's not a dupe or a no-effort homework dump, and it's sufficiently clear that you can write a good answer, then go for it!

Sometimes you will need to verify via comments that you do understand the question correctly. There's not much point in writing a good answer to the wrong question. ;) In some cases, especially if the OP isn't a native English speaker, you may like to make a few edits to the question to make it clearer and more useful for future readers. Ideally, one guides the OP to do that themself via comments, but sometimes that can be hard to do effectively due to a language barrier, and some newbies have difficulties navigating the SO editor in order to format their posts correctly.

FWIW, almost all code I post in my SO answers is a self-contained runnable example, complete with output. That demonstrates that my answer does actually do what it purports to do. And that makes it easier for voters to decide if they like my answer. ;) Of course, it's not always practical to do that, but I encourage all answerers to do it when it is practical.

4

Absolutely. Furthermore, I've even answered in a question that already had some answers, in order to provide a MCVE as an example.

There are some questions which don't show any kind of research effort, but are the most proper for MCVE, even if they don't fit Stack Overflow rules. But they happen to act as a FAQ and they are useful for people Googleing them. That would, in some way, fill the gap that the buried documentation section tried to fill, from my point of view.

3

If the user will write a MCVE it forces them to think about the problem. It builds problem solving skills. Often they are not even asking the correct question. By writing the MCVE for them it not only does not encourage them to write better questions but it does not build their problem solving skills.

If the problem is will defined I am more likely to write a MCVE. Or I may just provide what I think is the answer without actually testing.

2

Sure, you should provide an MCVE if the OP fails to do so, but only when the question is not terribly low quality, and it's not off-topic - Even more if you think it's a good, interesting question.
I do that kind of thing on a regular basis.

However, When you post your answer with the MCVE, be sure to let the OP know that it's their responsibility to provide an MCVE in a polite way.

I usually do this on SQL related questions - so here is my usual template for these answers:

Explanation
Sample data
Sql statement(s)
Results
(sometimes) link to an online demo

Whenever I post sample data, it looks like this:

First, Create and populate sample table (Please save us this step in your future questions):

Create table X .... rest of the create and populate code here.

Most of the times I get a comment from the OP (especially if my answer was correct, even more often when they actually accept it) that they will keep that in mind and post proper sample data in their future questions.

You must log in to answer this question.