22

Context: Say, I have a programming problem and two solutions in mind. Both solutions do not seem perfect but there may or may not be a better way.

Simply asking which solution is preferrable does not seem like a good idea, as this would attract opinionated answers and basically precludes further solutions. Instead, I can see three alternative ways to approach this. I could ask "how can this problem be solved?" and

  1. post two separate answers with my own solutions. This feels natural, as my own answers would be among others' answers and the better solutions can rise to the top. Future users who face the same problem would immediately see what the community deems the best solutions and what alternatives there are.

  2. include my own solutions in the question as "my attempts so far". This feels less natural because my "attempts" actually solve the problem. Future users would have to sift answers and question for solutions.

Or

  1. post on Code Review instead. However, the particular question I have in mind is of type "how to do X in that programming language?", which feels more like something that may be interesting for future reference than a code review task.

I'm in favor of the first approach as both, self-answering, and posting multiple answers are endorsed. However, I have second thoughts. First, I'm afraid this may seem like I was trying to game for reputation (three posts instead of one). Second, this smells a bit like a fishy workaround to post an opinionated question.

Is it acceptable and advisable to post multiple answers to my own question, as described above?

13
  • 3
    If the solutions you are providing fixes your issue then provide a single answer and make use of the formatting tools to label respectively Solution #1...2...3.
    – Script47
    Commented Oct 12, 2017 at 9:31
  • 14
    @Script47 how can we vote on the best one in that case? What if one is great and the other terrible? Commented Oct 12, 2017 at 9:39
  • 3
    @Script47 this prevents individual up/down voting of the solutions and identifying the one which is better would have to rely on comments.
    – MB-F
    Commented Oct 12, 2017 at 9:39
  • You generally up-vote an answer if it helped you, though there might be many solutions they are all classed as a single answer therefore if 1/3 or 2/3 or 3/3 worked then up-vote, if none worked and you feel disgruntled enough then down-vote or leave a comment.
    – Script47
    Commented Oct 12, 2017 at 9:40
  • 3
    @Script47 Right, but how would that help another reader (or myself) decide which is the great solution?
    – MB-F
    Commented Oct 12, 2017 at 9:42
  • @kazemakase then leave a comment as I mentioned above, make use of the feature. Solution X didn't work for me but solution Y did.. Then the answer can be edited to push the solutions which are helping the most to the top of the post to prevent future users having their time wasted.
    – Script47
    Commented Oct 12, 2017 at 9:43
  • 2
    First approach is good: you're exposing a problem and multiple solutions. I went as far as posting 4 valid answers to my own question stackoverflow.com/questions/46032451/…
    – Cœur
    Commented Oct 12, 2017 at 15:30
  • 1
    I think self-answering with reasonable answers will significantly lower chance of getting alternative solution. If you just want to share answers posting multiple answers is fine as @Cœur demonstrated, but if you really looking for better solution posting it as question as suggested in the answer is better. Commented Oct 12, 2017 at 17:49
  • @AlexeiLevenkov interesting point. This issue apparently touches more subtleties than I thought... Good that I have asked :)
    – MB-F
    Commented Oct 12, 2017 at 18:37
  • 3
    If you go with #1 (self-answering), two different solutions definitely merit two different answers. Anecdotal: for a canonical topic, I posted 5 different self-answers :-)
    – Bergi
    Commented Oct 12, 2017 at 21:20
  • Supporting @AlexeiLevenkov comment, if you provide, either way a set of solution you will be unable to have a third one, and as you said it may attract "opinionated answers". I believe the question or even the description in that case should be improved. 2 different solution are different by definition, so why there are equally valid for you, which needs they both accomplish (do you provide them)? and what are the nice to have things (no leaks, long term maintenance, robustness, performance...). Given those you can ask to the community which one should work better or if a better solution exits Commented Oct 12, 2017 at 22:05
  • 2
    This would have been a better question if you hadn't included your possible answers as options within the question, but had instead included them as self-answers so that we could have voted on our preferred approach. ;)
    – YowE3K
    Commented Oct 14, 2017 at 19:31
  • @YowE3K Agreed :) Unfortunately I had this realization when it was too late...
    – MB-F
    Commented Oct 15, 2017 at 19:06

3 Answers 3

12

Posting self-answered question with single or multiple answers is fine according to SO rules and guidelines as long as question is on-topic and answers actually answer the question as asked.


Assuming the goal as to figure out better solution than you have now:

Do not post self-answered question (whether with single or multiple answers) as it is less likely to achieve your goal. Asking high quality question is very hard and in many cases will lead to downvotes on the question. This is more or less fine if you plan to use that post as canonical duplicate target, but even single downvote will greatly decrease number of people interested to provide an additional answer. Even if question get no downvotes it is still question with existing answers and as such it will be skipped by many users looking to actually answer questions (one needs to provide significantly better answer to get any benefit when adding second/third answer).

Better option would be to figure out what you want to improve and ask question how to do just that and show your existing solutions as a clear demonstration of an effort.

2
  • Posting a self-answer should count as a clear demonstration effort, if there ever was one. You're probably right, though, that some potential answerers will tend to skip questions that already have an answer -- but those will mainly tend to be the "fastest gun in the west" folks looking for easy targets, not the people you (i.e. the OP) want to attract to a question like this. The people you want answering your question will be precisely those willing to take time to provide a better answer than what you already have, even if it's not the first one. Commented Oct 15, 2017 at 8:23
  • Factoring the actual goal of the question into the decision on how to ask it seems obvious in hindsight. However, that's what I have not thought about at all before. So, thank's for the eyes-opener :)
    – MB-F
    Commented Oct 15, 2017 at 19:13
-1

I think what I have more often seen when a single person is able to provide multiple solutions to a problem is that they post them as a single answer (no stats to prove this, just my impression). Multiple answers can certainly also be sometimes seen and I think sometimes it makes more sense - see What is the official etiquette on answering a question twice?. I think it does not matter if the question is your own or somebody else.

There is a query which you can use to find multiple answers on the same question by any particular user. I did this more than once (three times in total it shows) and in all cases I think it was justified, all answers were substantially different. Unfortunately I am not sure how to find the other case, where multiple answers are combined into one.

Another query shows questions with multiple upvoted answers by the same user - I think while it shows many cases are old questions which would never be accepted, many cases are fine - I was surprised how many were there regarding the GUI.

3
  • 3
    I am divided; I agree with the second part of your answer but not with the "more common"-ness of providing all as one... Commented Oct 12, 2017 at 21:21
  • 5
    Ironically this is two opinion statements. I disagree with the first and agree with the second, so it is impossible for me to cast a meaningful vote on this answer, in-turn demonstrating why this method is useless.
    – user4639281
    Commented Oct 12, 2017 at 22:07
  • I have clarified (weakened) my statement about what is more common.
    – Suma
    Commented Oct 13, 2017 at 7:08
-11

I'll try to make a point, so, strictly speaking, that's mine answer:

No, is not acceptable. Your solutions to a problem should not be the answer to your question. In front of 2 existing solution you may ask:

  • For another one, cause your solution has this and that downsides (you should list that aspects)
  • You may ask for an improved solution, cause by a lack of knowledge both seems equal but you don't know about specific problem related with the HW, a specific SDK, or a specific context that you are handling at the best of your capabilities,
  • You may declare all your needs, and what are the things you want to avoid (memory usage? higher download times?), and so asking for an analysis of the existing solution in order to fill the gap in the knowledge you have.

So I believe that the "solutions" should not be the answers, but you have to formulate the question in a way that makes clear what are the extra needs you have, or the the topic/aspects that are not well known to you. A proper formulate question should provide back an answer, that's not an opinion but a filler for a gap in the common knowledge. That makes it a future reference for someone else.

My stimolus: As we are not launching coins here, what makes the choice not a matter of luck? If the answer is an opinable one, that means that the description has some lack. Your proposals should be in the description as well as the description of your gaps the community has to fill. In front of those, I believe, a talk can be made.

My 2 cents, Ste

1
  • 6
    I don't think OP stated that they solutions actually don't solve the problem: "Both solutions do not seem perfect" sound to me like solutions with minor drawbacks... Indeed if solutions are broken it "is not acceptable" to post them as single/separate answers. Commented Oct 13, 2017 at 1:55

You must log in to answer this question.

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