49

I didn't find a question about this, so, if there is one, please give me the link.

I'm asking a question and someone answers it really quickly (for example, writing 2 lines of code) and it helps me solve my problem, but after five minutes I get another answer, a very well documented answer, pointing to the documentation, different ways to do it etc.

Should I accept the first answer, that I used in my code, or the second one that is more likely to help future users?

4
  • 40
    For once, don't bother about future users. This is your accept mark, choose the answer that helped you the most. Commented Jul 2, 2014 at 13:34
  • 1
    Related: meta.stackoverflow.com/questions/261477/…
    – AstroCB
    Commented Jul 2, 2014 at 20:29
  • I'd accept the better documented one that contains several routes. If both answers directly address your question, but one contains alternative solutions or resources, then that answer is actually giving you two things: the solution to your problem, and validation of the approach you choose by way of demonstrating why other methods are not appropriate for your use case. Commented Jul 4, 2014 at 16:56
  • @user2357112 - If you don't accept answers many folks get on your case. (Though it appears that the accept% figure that used to appear next to your name in a question has been dropped.)
    – Hot Licks
    Commented Jul 5, 2014 at 0:19

4 Answers 4

92

You should accept the answer that helped you the most.

The community will decide - through votes - which is the better answer.

1
  • 13
    The answer which helped you most could change, for example if proven wrong / if you learn more from another answer. No obligation to consider any future changes though, especially you are not obligated to react to nagging for the mark / removal of it. Commented Jul 2, 2014 at 21:28
59

You don’t want to reward people who give fast answers if it means denying better ones. This is known as “the Fastest Gun in the West” problem around here, and there are many postings about it.

Probably the only time one would make an acceptance decision based on time of posting is when there were two truly duplicate answers posted at separate times. I rather wish people would look at existing answers and avoid duplicating them, but that doesn’t always happen.

Also, please remember that you can change your accepted answer whenever you like. If a better answer comes in after you’ve already accepted one that is not as good, you can always change which answer you’ve accepted.

I cannot say for sure without seeing the postings involved, but if it were me, I tend to favor answers that present a complete picture over those that just fire off a quickie. Of course, a long and complicated solution should not be preferred over a simple and elegant one.

5

In the case you specifically mention, if both answers are equally helpful to you in the sense that they both guide you to the same solution, but one is more well written, I would usually accept the more well written answer - but it's really entirely up to you. If one had a simple answer and one was more complex, but the simpler was more specific to your needs, nothing wrong with choosing that one certainly.

However, speed shouldn't be the major criterion, I would say; speed should determine between two otherwise equivalent answers only (if even that). Otherwise, I would consider all answers present at any given time to be equally valid.

3
  • 6
    s/more well/better/g
    – tchrist
    Commented Jul 2, 2014 at 21:37
  • 2
    I consider "well written" a single unit, and thus "more well written" the correct phrase (though perhaps there are better choices than either that are less odd sounding).
    – Joe
    Commented Jul 2, 2014 at 21:39
  • 2
    Surely you mean "more well written" choices, not "better choices" :-)
    – mjs
    Commented Jul 3, 2014 at 20:11
5

Speed should have nothing to do with it.

You must log in to answer this question.

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