Okay, so this guy copied my code verbatim, 6 minutes after I had posted my answer. And he got the accept. He added a sentence above the code sample, which I neglected to do.

But the fact that he copied the code from my answer is indisputable - it is identical right down to table aliases, whitespace, simplified joins and my trademark semi-colon (I seem to be the only person on earth who adds statement terminators as part of my answers). I realize this is similar to:

What to do when someone posts an exact same answer after your answer?

But this is not the fastest-gun-in-the-west problem. The code is identical, byte-for-byte, and a full six minutes had elapsed. If he wrote code as meticulously as I do, and took over 6 minutes to do it, and didn't notice the "1 new answer" banner in the meantime... that would be quite a remarkable alignment of the stars.

The fact that he got the accept, meh, whatever. I couldn't care less about the rep. I did flag the answer and challenged the user about his copying skills - which he of course denied. "Coincidence" he suggested, even though he also copied content from Connect earlier today and got called out on it.

I do care about plagiarism, littering an answer with useless duplicates, and inadvertently promoting this kind of behavior by letting it stand. I realize my response was not the most mature, but my question is, how should we be dealing with this unacceptable behavior on SO? How do you deal with it when it happens to you?

  • 1
    Well, @CasperOne deleted the offending answer. Thank you. But my question still stands in general even though in this case it was quite obvious and a flag solved the problem.
    – Aaron Bertrand Staff
    Commented Jun 28, 2012 at 13:44
  • I guess flagging it is the only thing to do. Moderators will pick that up. Posting on MSO also helps :-)
    – GUI Junkie
    Commented Jun 28, 2012 at 13:45
  • 9
    Not convinced it's an exact duplicate. He didn't copy my code and adapt it. He just copied my code and presented it as his own. The accepted answer there says "there's nothing wrong with it." I can't imagine that would be the same consensus in this case? Especially since a moderator did delete the answer in question.
    – Aaron Bertrand Staff
    Commented Jun 28, 2012 at 13:48
  • @AaronBertrand accepted answer there is misleading. With no attribution he's in violation of the copyright terms of this site. I guess it does cover that with an addendum though
    – Ben Brocka
    Commented Jun 28, 2012 at 13:55
  • 3
    I see even worse bahavior, like answering a wrong answer and after someone else posts a good answer you take it and change it a bit. Example, example, exmaple. Those cases are very hard to handle, though a lot of people see this behavior, it's hard to proof it.
    – user173320
    Commented Jun 28, 2012 at 14:00
  • @gdoron That's a very good point (but I think it should probably be raised a separate question entirely). The problem I notice in those cases is that the answerer posts something wrong then edits with bits taken from correct answers before the first 5 mins, so the changes are not registered as "edits". That answer then gets all the attention because it was posted before the others. Commented Jun 28, 2012 at 14:05
  • 13
    Yeah I find the grace period can lend itself to some unscrupulous behavior on popular tags. I've often seen an earlier answer be updated within the first 5 minutes and incorporate something mentioned in a later answer (also in its first 5 minutes, obviously). This is a lot harder to detect because you have to be on the page to see the change happen. I actually question the value of the grace period. Once you've hit the answer button, any edits should be tracked.
    – Aaron Bertrand Staff
    Commented Jun 28, 2012 at 14:07
  • @JamesAllardice. You got his drill... :( I flaged him and got a long email from Tim Post saying next time I see it picture the screen and send it to them, (which is almost impossible). It's annyoing and the reponse: "its a coincidence", after he added to his answer my answer after he posted his more than 10 minutes ago is... I don't even know how to call it.
    – user173320
    Commented Jun 28, 2012 at 14:09
  • @AaronBertrand. I suggest you open a new question here on meta about it, you can mention my examples if you wish.
    – user173320
    Commented Jun 28, 2012 at 14:12
  • @gdoron those are very cut-and-dried examples of a consistent pattern of despicable behavior by a single individual; I hope you are flagging these for moderator attention as you find them, because that dude needs a smackdown. Commented Jun 28, 2012 at 14:13
  • @BenBrocka: ...accepted answer there is misleading. With no attribution he's in violation of the copyright terms of this site. That's exactly what my answer over there is stating... Commented Jun 28, 2012 at 14:15
  • 2
    @assylias or the accept. It was half an hour late and the earlier answer had better context around the link.
    – Aaron Bertrand Staff
    Commented Jun 28, 2012 at 14:25
  • 1
    About the accept in that answer. The fact that they are located in Mohali and Chandigarh, a few miles apart, may be relative. And they also have 2 more questions/accepted-answers in the opposite direction. Commented Jun 28, 2012 at 14:33
  • 3
    I have been caught by the copy and paste edits more than once. I do not care about the rep, but I dislike the dishonesty. I especially dislike the denials when someone is called out.
    – Remou
    Commented Jun 28, 2012 at 14:45
  • 1
    As usual here, questions are getting closed for no good reason as dup.
    – user173320
    Commented Jul 1, 2012 at 14:32

3 Answers 3


My thoughts on this. You can do one or two things, besides flagging, which is the obvious:

  • Flag for moderation attention.

  • If this a repeated behaviour, flag for moderation attention including this info and links to previous similar behaviour. I wouldn't expect all mods to be aware of all users with this behaviour. And doing it once, can be addressed with a flag (and the resulting deletion from the mods or other decided action). Doing it repeatedly, deserves more severe actions and mods should know about it.

  • If you only suspect it's a repeated behaviour, flag for moderation attention including the reasons for your suspicion.

  • 2
    Was your answer originally "flag it" and then you modified it within the grace period? :-)
    – Aaron Bertrand Staff
    Commented Jun 28, 2012 at 17:03
  • 1
    You can do one or two things, besides flagging… 1) flag it, 2) flag it, 3) flag it
    – M. Justin
    Commented Mar 10, 2021 at 1:12

Flag for moderator attention and ignore it further. Besides what you faced, I've even had stalkers who hijacked my avatar or even copied my entire profile. Just flag it, they fix it soon enough.

  • I agree, except for the "further ignore" part. Commented Jun 28, 2012 at 15:33
  • @ypercube: they don't deserve the attention they intend to get.
    – user138231
    Commented Jun 28, 2012 at 15:34
  • 4
    "I've even had stalkers who hijacked my avatar or even copied my entire profile" Ironic considering you're a parrot yourself... Commented Jun 28, 2012 at 19:12

One thing that I think is being lost here is that you gave a Code Only answer and the SCITE answer took your code and added some text to describe the answer...

Nothing to do much you have where condition and you just have to put it after joins like the following code

This is marginal but what if it the answer had been ...

When you do a LEFT JOIN the filters from the ON clause are only applied to the the rows table on right side even if you reference the table on the left. If you need the filters to be applied on the left you need to use a WHERE.

This is why [Aaron's](Link to Aaron's answer) code below works


Would you have felt differently about the answer? Would you have then modified your answer to add a description? And most importantly where is the line.

With the attribution this can be argued as acceptable behavior and in some cases may be valuable to future readers. Could it have been done first with a comment? Yes, but comments really aren't a good place for valuable content and not always effective.

As it stands all we've done is

  • Taught someone to reformat their code if they're going to copy/paste to cheat
  • Ignore people who call them cheaters.
  • Given people a meta post to link to when they suspect someone of cheating rightly or wrongly. This could be a problem in bike shed questions where you'll see many similar answers given at the same time. Or as ypercube put it This is a clear-cut case but it could be used by others to argue in not so clear situation

Instead of accusing someone of cheating, which would hurt the innocent, and mean absolutely nothing to a dishonest person person who was guilty, I would explain without accusation that...

  1. ... since part of the content was essentially the same and the time difference was > 1 minute there is the appearance of impropriety.

  2. ... if they don't add anything useful its better that they delete their answer.

  3. ... if they do add something they should acknowledge the prior answer by name and preferably a link.

  • 7
    I would have felt differently but only about the attribution. The answer was just a correction to a code example. If the person felt that it warranted further documentation (I do not), they could have left a comment rather than copying my answer verbatim and slapping a half-coherent sentence on top of it.
    – Aaron Bertrand Staff
    Commented Jun 28, 2012 at 16:55
  • 5
    Or edit your answer to include the explanation
    – Chris
    Commented Jun 28, 2012 at 18:21
  • 1
    In this case, the evidence of copy-pasting was ovwewhelming. The two questions have identical code, byte per byte. Even the spacing and the extra (invisible) spaces at the right are identical. The chance that 2 people come with equivalent (SQL) code is not small. But to come with 10 identical lines of code is about the same as a monkey typing Shakespeare. Commented Jun 28, 2012 at 21:06
  • @ypercube you missed my point. All we've done is make a better cheater Commented Jun 28, 2012 at 21:14
  • @ypercube ... it also gives credence to the person who gave this answer to complain about this answer. Do you really want to suppress "forked answers"? Do you really want to an upticks in complaints of this sort? Commented Jun 28, 2012 at 21:28
  • You have missed my point, too. The example you have has a time difference of only 1 minute and it's only 2 or 4 lines. Aaron's has 6 mins difference and 10 lines of code. And the codes are identical. Your (example's) 2 answers differ by a whole new line of code ` exit(1); // or some other appropriate behavior ` and a ` {` that has been moved to line 2. Commented Jun 28, 2012 at 22:54
  • And I see that we may have helped someone to become a better cheater. Or we have proved to him that we know that this is cheating and we know that he knows that this is cheating. So, he may think of dropping this behaviour, also because he has clearly lost more rep that what he (temporarily) gained. Commented Jun 28, 2012 at 22:57
  • @ypercube I think we're actually in agreement. Aaron's answer was ripped off without attribution, and Stefan's wasn't. But Stefan might argue that he was and use this post to validate that argument. Remember the entirety of Stephan's code was indeed copied. Commented Jun 28, 2012 at 23:31
  • 1
    Yes, I (think I) see what you mean now. "This is a clear-cut case but it could be used by others to argue in not so clear situations." Commented Jun 28, 2012 at 23:53
  • @ypercube yes exactly. I updated my answer to include your phrasing but I'm not sure if you actually agree with the statement. If you want please feel free to remover the comment the post. Commented Jun 29, 2012 at 20:03

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