24

Consider this question: C++ templates: return value by type

I have provided an answer which is "why does it go wrong". I intended to edit it to add "how to fix it", only to discover that someone else had already written that answer.

I copy and pasted their code into my answer (with the prefix "shamelessly stolen from πάντα ῥεῖ"). Somebody promptly rolled back my update. I could reinstate it, but that feels like an edit war, so my question is:

"What is the best way of handling the case where two answers contain parts of the ideal, and they need to be combined?"

10
  • 8
    Well, all in all the existing answers handle all of the aspects to consider. Why do you think they'll actually need to be combined/merged? Commented Jan 27, 2016 at 18:00
  • 15
    I don't have an answer to your actual question, but to prevent this in the future: Perhaps don't post the answer until you've written everything you intend to into the answer. AKA, don't post an incomplete answer even if you "intend to edit" quickly.
    – Kendra
    Commented Jan 27, 2016 at 18:01
  • Reminds me of this question that popped up yesterday. At least gives you a reason for the rollback.
    – Mike Cluck
    Commented Jan 27, 2016 at 18:15
  • 1
    Indeed...you don't get extra points for speed.
    – Paulie_D
    Commented Jan 27, 2016 at 18:30
  • 1
    Worth noting: when doing something like this (even with external sources) you ought to use the quote markup (since that's what you are doing). This also makes ti clearer which part of the content isn't yours. Moreover, keep in mind that you have to attribute contents, so you'd have to add a link to the actual answer if you copy that(or a part of it) into your own.
    – Bakuriu
    Commented Jan 28, 2016 at 13:14
  • 20
    @Paulie_D actually you do. After the (in)famous five minutes window many questions won't receive any other attention (unless they popup in hot questions). If you wish to write a long thoughtful answer before giving a quick shot you risk you will not receive any point (=vote). It's not equally true for all tags, of course. Commented Jan 28, 2016 at 13:16
  • 1
    @Kendra: So when you see the "a new answer has been posted" notification while writing, and load it, and it has exactly the content you thought of - would you still write it out yourself, in your own words, and post it too? Duplicating work doesn't really help anybody, especially on trivial questions.
    – Bergi
    Commented Jan 28, 2016 at 18:46
  • 1
    I have been subject to someone lifting my answer (and others) and putting it into theirs. It's really annoying when you have taken time to investigate and they take the credit with a Ctrl+C,Ctrl+V. Definitely agree with Alexei Levenkov and Becuzz
    – JJJCoder
    Commented Jan 29, 2016 at 10:38
  • I've got a similar issue, I post an answer, another person help me, so just made a link to the helper. Commented Jan 29, 2016 at 11:08
  • @Bergi (A little late on replying, sorry.) This happens to me on occasion on Meta, and no, I don't. If my answer adds literally nothing new to the question after another answer has been posted, I don't bother to post it. If I feel my answer has more detail or such, then yes, I do, but that's not that common.
    – Kendra
    Commented Feb 2, 2016 at 17:06

3 Answers 3

34

If your goal to improve accepted answer (because it sticks to top) consider linking instead of copy-paste. Something like "this post covers YYYY aspect, for debugging look at {link} answer, for alternative approaches - XXXXX {link}, ZZZZ {link}".

This way you avoid all "copy-paste is bad idea" discussions and give future visitors clear picture what is/is not covered in particular post and whether reading past accepted answer is required.

3
  • Right. Community wiki (not enough strands in this case), or link to answer seems to be the best solutions. Thanks all. Commented Jan 28, 2016 at 6:33
  • Is this something you would do in the comments, or in an edit to the answer? Does it work "automagically" like linking questions by including a link in the comments to the question?
    – Sean
    Commented Feb 2, 2017 at 19:42
  • @Sean - there is no magic. If it is your answer (as in case of OP) - definitely I'd recommend editing in links into post. If it someone else answer - comment, in rare cases where author of the post does not respond to comments (i.e. gone from site) and information is critical (i.e. other answer explains drawbacks) - edit link into the question. If planning to change highly voted/visited post - consider first asking on Meta with "specific-question" tag. Commented Feb 2, 2017 at 21:28
13

First, striving for a better answer that covers everything isn't bad at all. It should be encouraged. However, both you and the other answer covered what was going on and why it was happening. The other answer just took it a step farther and showed how to fix it. By copying (even with attribution) it just feels like bad form, especially when the other answer already had everything covered. And that feeling of bad form is just going to rile some people up.

If you see a question where there are bits and pieces of a complete answer scattered around, please pull them all into one superior answer. Use the ideas someone else came up with, but use your own words (and code) to explain. Alternatively, if one answer already has most of it, consider a comment to the answerer asking them to edit in something that is missing.

If editing/commenting on an existing answer would just be too much, consider making a community wiki answer. Attribute everything you take to the appropriate people. Then you get a complete answer without anyone feeling like you stole someone else's work to make your answer better.

2
  • 2
    Indeed, I am 100% sure that I read advice from this site or one of its founders that explicitly encouraged incorporating material from other answers, if and only if it will make your answer a better one. The point being, every answer should strive to be The One Best Answer to the question. That was years ago. I do not know if that advice is still posted anywhere. This site has changed its policies and its documentation many times. But I think the spirit of striving for a single best possible answer is still applicable. Good call on community wiki where "diplomatically sensitive".
    – John Y
    Commented Jan 28, 2016 at 14:29
  • I disagree with this suggestion firstly because the great majority of users of SO will not understand what is going on. I come across answers every day which are duplicates of older answers all of the time. Users need to taught not to duplicate info. This approach, particularly the community wiki approach, is certainly a power user function. Secondly, I would argue it is clutter. If this combined answer was always at the top (which it is not), then one could more easily find this great combined answer. However, by definition, combined answers are newer and are going to be lower voted.
    – demongolem
    Commented Dec 29, 2016 at 20:10
6

"What is the best way of handling the case where two answers contain parts of the ideal, and they need to be combined?"

I don't think it's necessary to combine/merge answers to "The one superior answer that catches everything". Just leave everything as is.

Questions can have more than one answer and that's appreciated. The more answers are there for different aspects of the question, these are more likely to be helpful for future researchers on the topic.

If you're after an accept from the OP, that's considered one of the least aspects of giving any value for future research. In fact there's a number of Meta SO questions (Accepted Answer Vs Voted Answers, Deemphasise the accept mark if there's an answer the community strongly prefers?, Why are negative score accepted answers still at the top?, aso.) asking for the significance of an accepted answer.

See a sample of a popular c++ canonical question, where this goes to some extend. Would you really consider combining all of these answers into a single lengthy one a good idea?

21
  • 3
    If you're after an accept from the OP, that's considered one of the least aspects of giving any value for future research I don't like that part of your answer...
    – Just Do It
    Commented Jan 27, 2016 at 18:39
  • @JustDoIt Elaborate why please. In fact the accept is a minor point regarding overall value. There are tons of questions on Meta, that want to have the community accepting a higher voted answer as the accepted one. Commented Jan 27, 2016 at 18:43
  • 1
    Cause we always seem to assume the intent of OP (i.e. wants accepted answer, wants most upvoted post, wants more reputation) Why can't we all just give the benefit of the doubt and assume good faith? Could've OP find a better way to give you credit? sure but that doesn't necessarily mean he stole the answer just cause he wants to obtain something for himself.
    – Just Do It
    Commented Jan 27, 2016 at 18:46
  • @JustDoIt "Cause we always seem to assume the intent of OP ..." No, that's a blatant misconception about the sites goals. Stack Overflow isn't a personal help-desk, but meant as a Q&A repository that helps everyone in research. Commented Jan 27, 2016 at 19:03
  • 3
    Exactly, and yet you couldn't assume that what OP wanted is maybe a complete answer? maybe why have 2 answer when we could have one that covers everything? you gave an example but you can't compare this question against a cannon, participation and view numbers have an abysmal difference. Picture this, how would you feel if everyone starts to assume "Oh πάντα ῥεῖ doesn't want to lose his accepted answer, he would have to remove his answer meaning he would lose rep" that's not a good thing to assume(not to consider wrong) considering how long you've been here and how much you apport on
    – Just Do It
    Commented Jan 27, 2016 at 19:12
  • this site. When you say things like "If you're after an accept from the OP" you already seem biased about (meta)OP's intentions. But if you check out his profile, you can also see he's been around for quite some time too. So he knows how the site works. And I really really doubt you can get over 2k rep by breaking the rules. Hope I could get my point across.
    – Just Do It
    Commented Jan 27, 2016 at 19:14
  • @JustDoIt Why do you think I'm actually eager about my answer is the accepted one? I don't care at least, and I'm absolutely not biased that way. I appreciate the other users answers and even upvoted these. I don't get your points actually. Commented Jan 27, 2016 at 19:19
  • I do not think that, I clearly said Picture this meaning an hypothetical situation. And I'm not saying you are biased, but the way you word it makes it seem like you are.
    – Just Do It
    Commented Jan 27, 2016 at 19:22
  • @JustDoIt That's going to get a silly and useless discussion, regarding assumptions made from your side. Commented Jan 27, 2016 at 19:26
  • 3
    @JustDoIt The particular sentence you're focused on is also not a full given: If you're after... As in I don't know if you are, but to cover all points, if this is the case... I see nothing wrong with adding a conditional there, and it is most certainly not an assertion of an assumption. It's just an extra case with extra information. You're assuming πάντα ῥεῖ is making assumptions that the OP of the question is not acting in good faith.
    – Kendra
    Commented Jan 27, 2016 at 19:27
  • But what's the point of even bringing it up in the answer then? @Kendra
    – Just Do It
    Commented Jan 27, 2016 at 19:27
  • @JustDoIt To cover all points. Make the answer as complete and informational as possible.
    – Kendra
    Commented Jan 27, 2016 at 19:28
  • I fail to see how it adds information to the answer, but fine @Kendra
    – Just Do It
    Commented Jan 27, 2016 at 19:29
  • 3
    I meant it as a compliment :/ @πάνταῥεῖ
    – Just Do It
    Commented Jan 27, 2016 at 19:36
  • 1
    @JustDoIt "I meant it as a compliment" Thanks then :-). I didn't get your comment as such at 1st look maybe. Commented Jan 27, 2016 at 19:40

You must log in to answer this question.

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