134

When is it okay to post two answers to one question?

1

6 Answers 6

107

When you have two distinct answers, it's better to post two different answers than to put them both into one answer.

Some questions will be multiple-answer types directly, like in Meta topics where aspects of features are wanted as feedback. This allows the ones the community feels are the best/correct to float to the top.

Some computer languages have a lot of flexibility in how to solve any one problem, so by listing them both as separate answers (if very distinct) they can both be voted on by the community, and this will allow the better answer to float to the top. It also allows the comment threads to be more focused on each answer.

If you put two very different answers in one, then one could be a great answer, and one could be a terrible way to do things, but the upvotes (or downvotes) on the good (or bad) answer will drag the other along with it to the top (or bottom).

25
  • 20
    only if they are radically and totally different answers, and even then I am not sure I agree. Commented Oct 8, 2009 at 22:36
  • 38
    Out of curiosity, Jeff, if you don't agree with answering a question twice, why does Stack Overflow let you? Commented Oct 8, 2009 at 22:38
  • 3
    All of the multiple answers I've given to questions have been for non-specific questions on SO, though on SU I've given distinct 'tips' or 'shortcuts' as different answers. I can see though with some languages having multiple ways of doing it, putting both answers in so the community can vote on which is the 'best-practice' way of doing things. Commented Oct 8, 2009 at 22:42
  • 3
    chris, you have to click through a special confirmation dialog to add a second answer. Does that answer your question? Commented Oct 8, 2009 at 22:52
  • 44
    @Jeff - Not really. It means you admit that there may be a valid reason for someone to answer a question twice, which counteracts your argument here that you don't think there is a valid reason to answer a question twice. Commented Oct 9, 2009 at 5:38
  • 5
    @JohnDibling, it's better because they will both get separate voting, so the better answer will float to the top. Commented Jun 5, 2013 at 17:40
  • 1
    I've only done this once, and on SU. Compare answer 1 to answer 2 (which was written first). Commented Jun 6, 2013 at 0:19
  • 2
    @John Kugelman, this Meta works for all sites, some of which allow those. Commented Dec 4, 2013 at 20:10
  • 2
    Here's another neat example: JohnB's two answers on this graphic design question How do I make an incomplete circle stroke for a donut chart? - two good, very different techniques, offering different types of flexibility Commented May 20, 2014 at 9:21
  • 2
    @LanceRoberts not only is it good to post separate answers for voting purposes, but also for commenting.
    – Dennis
    Commented Jun 7, 2014 at 20:01
  • 3
    Do you think this answer is still good advice? I'm a little concerned about the way it seems to endorse poll questions (which we often close) as well as the degree to which it encourages splitting up answers on non-SO sites. I'm a mod on cooking, where it's pretty common for there to be a couple aspects of a question, and more than one good idea, and I feel like if people interpret "distinct answers" pretty literally, we'd end up with way too many answers and way too little organization.
    – Cascabel
    Commented Jan 11, 2015 at 19:24
  • 1
    I agree with your answer, and it's true that poll questions invite such answers. But it seems that new users read into it more than it's saying, namely that poll questions are welcome (and should be answered with multiple answers). Could you please indicate in some way that this is not the case and that in current policy, poll questions should not be answered at all? I'd edit it myself, but I don't want to make radical edits to your post. This won't make your answer any less valid, as there are other cases where multiple answers are still welcome.
    – rumtscho
    Commented Jan 11, 2015 at 19:53
  • 1
    @Jefromi, edited out polls, but I would think that on cooking questions you'd have a lot of different techniques to do one thing, and you'd want those in separate answers. Being simplistic something like stew or baste or fry. That way people could vote on which technique they thought was the proper way to do things. Commented Jan 12, 2015 at 17:04
  • 1
    @LanceRoberts I see. I can tell you pretty confidently that in general we definitely don't want multiple answers on cooking. Yes, there are often a lot of facets or different ideas, but they're also often all connected, so it doesn't really make sense to split them up. It's much more useful to readers to have things presented in context in a well-organized way. It's also often true that the multiple parts of an answer aren't better or worse than each other, but simply different and all useful.
    – Cascabel
    Commented Jan 12, 2015 at 18:46
  • 1
    Let's say you 2 distinct solutions, and you write 2 answers. Then since technology changes, and we change, you can't recommend one of them any more, even though it already has reputation. Ordinarily in such cases you should edit your answer. But when you have two answers there is the risk that they'll become similar to one another.
    – Ben Carp
    Commented Jul 6, 2019 at 13:53
30

I have already had a couple of "real" (e.g. not a poll or fluff or humor) questions where I answered with 2 or even 3 solutions, explaining the reasons to pick each one. And i'm a relative newbie on SO (only 4k rep).

One place where this situation is especially likely to come true is Perl (aka ThereIsMoreThanOneWayToDoIt language).

While I usually squeeze all my ideas into a single post in such situations, I greatly appreciate the ability to NOT put them in one basket, so to speak - e.g. when I feel that posting one of the answers is education and adds to the site's useful content, yet the other one is "more deserving" (e.g. cuter/more elegant) and you don't want the up/down votes from one to affect the other.

0
9

When they offer different approaches to the problem?¨

Sometimes one answer may be directly related with the problem the user is asking.

Other answer may be something that you suggest as an alternative.

For instance, "How do I shoot my self in the foot with C++"

1st answer ... .First you do #define if while etc. etc

2nd answer ... Why use C++, you can use ( this, and that, and the other )

There always can be two answer for the same question ( specially when is vague )

5
  • 5
    Why not just roll the alternatives into the same question and punctuate with subheadings?
    – random
    Commented Oct 8, 2009 at 22:38
  • 2
    @random - s/question/answer/; Commented Oct 8, 2009 at 22:41
  • 11
    so they can be voted on, so the best 'answers' will float to the top, not have one be voted on and drag the other with it. Commented Oct 8, 2009 at 22:43
  • 1
    @random: That's what I do most of the times. An answer and a complement/alternatives/workarounds. But when the answers are totally different, better is to post them separated. The first answer my solve directly the problem ( how to shoot your self in the foot ) the other may go either deeper, or in another direction or simply point something that on your experience is not what the user asked but what he needs ( like NOT shooting him self on the foot, when he can shoot someone else's foot in first place? )
    – OscarRyz
    Commented Oct 8, 2009 at 22:49
  • @Lutz - Question/Answer slip crappy crappy. Darn it all to Beck.
    – random
    Commented Oct 8, 2009 at 23:08
3

I can't think of a good reason for doing that, except for polls, which are not welcome (except occasionally on meta sites).

If you have two solutions to the same problem, post them in a single answer. Explain when you would use this solution and when you would use that solution. This is better than two separate answers that don't address when to use each solution. For example: “If you have version 1, do <this>. If you have version 2, you can use <this simpler solution> instead.”

2
  • 2
    I don't think it is possible to post only one answer when latter involves a lot of instructions. E.g. I have four answers posted to your question here and I honestly don't think I could post them as one or may be two without confusing the reader.
    – 286110
    Commented Aug 30, 2017 at 0:52
  • @Firelord I actually found your multiple answers, with some of them referencing others, a bit confusing. It would have been better to present a single answer with an introduction that summarizes each method and how you'd choose between them, and then a section for each method. Commented Aug 30, 2017 at 9:14
3

Even though there are multiple ways to reach certain goals (I am thinking specifically of some programming questions using Python, SQL,...), I prefer to post only one answer per post.

However, in my answers, frequently, I share multiple of ways to achieve those goals using various methods. One can even amplify the answer later on.

Will leave below the structure that I tend to use for those questions:


Intro (Optional)

  • Option 1 - some info on the option
  • Option 2 - some info on the option
  • ...

Option 1

[Add content]


Option 2

[Add content]


Notes: (Optional)

  • Note 1
  • Note 2
  • ...
-8

If it is possible for a question to have two valid answers from the same person, the odds are high that it's a bad question.

(in other words, it's a poll question.)

In general there should be one answer per person per question; if you need to amplify your answer, edit it!

11
  • 28
    Jeff - I fear I must point out a counter-example for you. In 2 words: "Perl" questions. I can frequently think of 5 different ways of answering a given question before even getting my breakfast, to paraphrase from Alice.
    – DVK
    Commented Oct 9, 2009 at 2:56
  • 1
    P.S. However, I agree that, with some exceptions, the practice of posting multiple answers is Not A Good Thing, and therefore highly approve of SO's solution (allow but add extra hoops to do so).
    – DVK
    Commented Oct 9, 2009 at 2:58
  • Sux - I just lamented that about Sinan's answer no longer than 3 hrs ago
    – DVK
    Commented Oct 9, 2009 at 6:15
  • 29
    Why does it matter whether the two answers are from the same person? Who cares? Commented Aug 16, 2013 at 3:09
  • 2
    @DVK if all 5 solutions are equally good and sufficiently brief, I think it makes more sense to post them all in a single comprehensive, definitive answer.
    – rob
    Commented Jul 1, 2015 at 17:22
  • 7
    @rob - because the collective wisdome very well might decide that 1 is outstanding and "best", 2 are good, 1 is meh, and 1 is really really bad. They need a way to differentiate
    – DVK
    Commented Jul 1, 2015 at 17:25
  • 1
    @rob - also see comment from Lance Roberts Oct 8 '09 at 22:43 on another answer here
    – DVK
    Commented Jul 1, 2015 at 17:26
  • 2
    @DVK I disagree. If part of an answer is really great, you'll almost certainly get at least one upvoted comment patting you on the back for that solution. If part of an answer is actually bad (as opposed to not good), the community should tell you why in the comments so you can remove it or note in your answer that it is not recommended. Perhaps if each answer is very long or if the site demands one solution per answer, it makes sense to post them separately. Otherwise you're just trying to turn the question into a poll or popularity contest.
    – rob
    Commented Jul 1, 2015 at 18:07
  • 6
    @rob - the goal isn't to get votes. It's to differentiate good from bad approaches
    – DVK
    Commented Jul 1, 2015 at 18:36
  • 2
    @DVK I didn't say anything about increasing your upvotes by splitting up multiple solutions into separate answers, but I do think some people will try to game the system in that way. As I said, when someone points out that one of your approaches is especially good or bad via a comment, you can edit your answer accordingly to differentiate good from bad. It isn't necessary to split them into physically separate answers. Presumably if you're knowledgeable enough to provide a really great solution, you won't intentionally include a horrible solution without stating that it's a horrible solution.
    – rob
    Commented Jul 1, 2015 at 19:08
  • @rob Sure, but what happens if someone who isn't very knowledgeable about the topic finds that upvoted, multiple-answers-in-one post? How can they know which solution is (deemed) best? I.e. how do the votes distribute among the different solutions? Assuming some expert will always come by and "correct" any bad solutions and "elevate" the best solution in that post via comments before anyone less knowledgeable sees the post seems like wishful thinking.
    – Anakhand
    Commented Jun 24, 2020 at 8:37

You must log in to answer this question.

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