29
\$\begingroup\$

Every now and then, we get an answer flag the declares an answer a duplicate of another. So far, I haven't really acted on them – except for leaving a comment if the flagger hadn't done so already – since we don't have an official policy regarding duplicate answers.

This discussion has two parts:

  1. What exactly should count as a duplicate answer?

    So far, we had the discussion Identifying Duplicate Answers which currently suggests using a comment to vote on. That's not really practical; you can't downvote comments.

    There's also Are these answers duplicate?, which discusses whether calling a solution in another language with a system call (or similar) is considered a duplicate. The votes seem to lean towards allowing this, but there is no strong consensus.

  2. What should happen to duplicate answers?

    Duplicate questions are closed, but you can't close an answer. Locking would be the closest equivalent, but that's not really what locks are for.

    I can't think of an option besides deleting and leaving them alone. If we opt for the latter, discussing item 1 is pointless.

\$\endgroup\$
37
\$\begingroup\$

Allow duplicate answers

I think we shouldn't take action against duplicate submissions, even when the code is identical. We should assume good faith: the second submitter almost surely came up with the code on their own. We see on anarchy golf that identical submissions are common among experienced golfers when code is hidden.

We have enough of a FGITW problem where people rush out fast answers to get votes and attention. Allowing only one of a solution makes it more of a race. Moreover, deleting the slower-posted of two identical solutions is frustrating to the poster, who showed just as much skill. This is more likely to be a newer user, who isn't constantly refreshing the question page and needs more time to write and format a submission.

I understand that a dishonest poster could copy another solution and claim they found it independently. I wouldn't expect this to be a problem from what I've seen -- people seem to be gracious in crediting others and selfless in suggesting improvements. I'd reconsider if it became a visible problem.

\$\endgroup\$
  • 2
    \$\begingroup\$ I would suggest that if there is a duplicate(winning) answer, the poster of the challenge would accept the first answer, but upvote the slower answer to show that their answer was just as good. The duplicate might even have a better explanation. I think it is important to assume that all answer are legitimate. Without that, we could never know if an answer is copied or not. \$\endgroup\$ – Dave Jones Dec 7 '16 at 15:50
  • \$\begingroup\$ @xnor what if the code is exactly the same? is it plagiarism at that point? \$\endgroup\$ – tuskiomi Dec 7 '16 at 17:06
  • 4
    \$\begingroup\$ @tuskiomi No, I'd assume it's independent discovery even when the code is exactly the same. \$\endgroup\$ – xnor Dec 7 '16 at 20:55
  • 1
    \$\begingroup\$ What the point of having two identical answers? It just clutters the answer list. \$\endgroup\$ – Mego Dec 8 '16 at 2:03
  • 7
    \$\begingroup\$ @Mego This is a place where I see us as deviating from Q&A standards by being a challenge site. Our "answers" aren't actually answers that are useful to people, but submissions where people show what they accomplished. \$\endgroup\$ – xnor Dec 8 '16 at 19:46
  • 3
    \$\begingroup\$ @tuskiomi I would personally refrain from posting identical code, and have done so when I have come up with identical code. If the code is exactly the same and it's obvious who was first, you are free to downvote. But I would only do that once the second poster has been made aware that their code is duplicate via a comment. \$\endgroup\$ – Level River St Dec 18 '16 at 4:08
  • \$\begingroup\$ It is difficult obtain the same source code of some other without copy... Possible I wrong in the case programmers are not much different (too much strong or follow the same school) \$\endgroup\$ – RosLuP Mar 27 at 13:33
  • \$\begingroup\$ I definitely agree with this answer, but I think that if the markdown of the two answers are identical, it's a lot more likely to be a copy+paste, and that should be treated differently. Especially if the answer text is longer. \$\endgroup\$ – DJMcMayhem Oct 2 at 16:19
-2
\$\begingroup\$

What are duplicate answers?

Well, that's a hard one to answer. There are some obvious cases, but a lot of the time it comes down to a judgement call. You have to ask yourself, "Does this add anything to the site, given that there is already answer X?" If the answer is no, it's probably a duplicate.

Some obvious cases:

  • Exact same code in the exact same language
  • Exact same code in basically the same language (using a trivial derivative or a similar language that only requires minor syntax changes)
  • Using the code from another answer (like int main(){system("cat");return 0;} in C versus cat in bash)

What should we do about duplicate answers?

This question is much easier to answer: flag them for moderator attention so that they can be deleted. They don't add anything of value to the site, given that the answer already exists, and they clutter the answers.

\$\endgroup\$
  • \$\begingroup\$ Some challenges are about founding the shortest approach in each language rather than finding the shortest possible approach. What if one user posts an answer in language A, and another user posts the same solution in language B, where it also works? It doesn't show any effort or programming skill on the part of the second user, but does contribute to the catalog of solutions. Would the proper action be to notify the first user that his solution also works in language B so he can post that as a separate solution and get the rep for it? \$\endgroup\$ – Pavel Dec 6 '16 at 21:16
  • 2
    \$\begingroup\$ @Pavel The proper solution would be to notify the original poster that their answer also works in B, and the original poster can note that in their answer. The goal here is to reduce the number of answers with the same content, not to consolidate them under one user. See: codegolf.stackexchange.com/a/84261/45941 \$\endgroup\$ – Mego Dec 6 '16 at 21:20

You must log in to answer this question.

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