It seems to me that there are a lot of interesting questions with non-reproducible examples (I mostly check the questions under ). In most cases there is a comment saying that the OP should provide such an example, but not always followed. Especially when the question is answered, the OP does not seem to care to make the question valuable for others.

My question is: What should one do in such a case? Should I edit those questions, providing a reproducible example, or is it something that the OP has to do. Downvoting could also be a method to pressure the OP.

Example: I commented about that problem and answered this question providing a reproducible example.

Ask the questioner first for a reproducable example or what exactly is the problem before posting an answer? That way you are more sure it will be the answer fitting to the question. –  Trilarion May 22 at 11:10
It does not have to do with understanding the question. There are perfectly well posed questions where all the steps are described. In such cases a small self-contained reproducible example demonstrating the problem is a big help to easily start on answering the question. It also makes it easy for someone having a similar problem to learn from it. –  alko989 May 22 at 11:44
Okay, if there is no room for misunderstanding then post the answer, wait for acceptance of the answer and then correct or add to the question as you like. See also Polishing those pearls: edit the question too (middle of highest voted answer). –  Trilarion May 22 at 12:10

2 Answers 2

up vote 22 down vote accepted

I'd be extremely careful about editing in an example of broken code in a question in this manner, though I applaud the reasoning behind why you might consider doing such a thing.

The main problem is that your example code might not match the actual problem, but just the described one. Often, error messages and debugging results might give the wrong impression, and seeing some code can clarify it.

I can see potential value if a question lacks detail, just describes a problem broadly, but gets a stellar answer that solves the described problem - and the asker has accepted the solution. That does seem to suggest that if you can perfectly produce code that reproduces the problem, it would be helpful to future readers. Your thinking there is excellent, in my opinion. I'm just real leery of doing that kind of edit, though.

I guess I'd just be really careful here, and be ready to get some backlash. Be sure you know what you are doing, but be willing to let it go. Certainly don't get involved in an edit war. Oh, also; you might not want to do this sort of edit until you can do edits without approval; my guess is this kind of edit would have a high rate of being rejected.

Another possible option is to post a stellar question yourself. But of course that leaves the duplicate issue. Perhaps if the original question is lacking, that one could be closed - maybe even as a duplicate of yours. But the issue there is it would sort of seem to 'punish' the user who left the good answer. Then again, they answered a 'bad' question, so maybe they deserve that...

Ugh... this is mostly just random thoughts and opinions!

Really nice answer, thanks! I think, an idea is to leave the OP's example intact and just add a reproducible example below it. –  alko989 May 21 at 13:01
@alko989 Hmm... that can be a possibility, too. Definitely wouldn't remove what information they did provide. –  Andrew Barber May 21 at 13:02

For the reasons as spelled out by @Andrew the risk/reward relationship of the edit option looks highly unattractive to me. You can be sure that, given time, a better version of the same Q will be posted and, if all goes to plan, the two would be merged or the poorer one deleted. The fix is quite likely to happen without your help, though not as quickly.

There are many alternative ways to contribute to SO the time you are prepared to give to such edits, ways that have much less scope for contention and better chances of enduring value. One aspect of I guess I'd just be really careful here is that you might end up spending a much time to enhance one post as would have served to enhance several others. Quantity alone is not the deciding factor but I infer that the posts you are considering are reasonably laid out and understandable (ie you found them interesting rather than incoherent, and at least a few people have felt able to offer answers). Quality also is ‘optimised’ when the most adding a reproducible example can achieve is an extra polish and alternatives offer scope for substantial improvement.

I suggest you try, with extreme care, adding some reproducible examples (or you’ll continue to wonder whether you should have!) but stop doing so – with a clear conscience – as soon as you ‘hit trouble’ (which I suspect would be quite soon!)

You are right about the "time consuming" and the "risk" part. It is just one of the annoying things when I want to answer a question or to test a question/answer. I suppose, if suggesting to the OP to provide a small example is not helping, then there is nothing much to be done in an easy way. I think I will make an attempt when I have the time, especially for (in my opinion) interesting questions. –  alko989 May 22 at 9:59
Yup, this is definitely good info to add. The 'risk' involved is the most important thing to keep in mind. Don't get bent out of shape if people react negatively to those edits. And really, @alko989; your desire to improve the usefulness of the questions for future, potential readers just warms my heart! hehe –  Andrew Barber May 22 at 14:38

You must log in to answer this question.

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