165

In this question I gave a good answer, and the OP was happy with it.

But then he asked me to remove the code from my post, since his instructor did a search for plagiarism. Presumably he was worried that my code would be found, compared to the project and discovered that it was very close to the same.

Given my understanding of the purpose of Stack Overflow, I declined to do so (with an explanation) and ended up changing my variable names (effectively obfuscating my code slightly) to try and help him out without compromising the answer. The discussion of this can be found in the comments.

What is the correct response in this situation? I don't want to cause trouble for the OP (who had clearly put forth some effort of his own) but I also don't want to ruin my answer, or act unethically.

16
  • 57
    If an instructor can't read between the lines and see the initiative of a student self-learning (which is ever so rare in this day and age), they probably shouldn't be an instructor. If I were in the instructor's shoes and found the thread, I would instead ask the student to explain what he/she learned rather than docking for 'plagiarism'. Commented Apr 24, 2014 at 0:16
  • 5
    Very true, @GrantWinney. Commented Apr 24, 2014 at 0:33
  • 131
    It's certainly not your responsibility to change variable names; if they were concerned about it showing up in a search they should change their own variable names! Commented Apr 24, 2014 at 22:43
  • 33
    I had this issue from a slightly different perspective (Transform matrix 2D to 1D). Here, the instructor wanted help creating the question for his class, and then didn't want the solution left available on SO. I declined to remove my solution, or to let them vandalize the question. I ended up with moderatorial support on this. Commented Apr 25, 2014 at 16:41
  • 5
    @JonathanLeffler Interesting, I had never heard of this kind of thing coming from that direction before. Thanks for the example! Commented Apr 25, 2014 at 16:51
  • 2
    Users in general really aught to construct the smallest sub-problem possible that addresses their hang-up. If they don't understand the entire HW problem they should go to the instructor (or a TA) for help. Commented Apr 25, 2014 at 22:01
  • 34
    If he is just copying your answer (without referencing it) and passing it off as his own then it is plaigarism and he should be caught! If this is only a small part of the question/paper (and especially if he references the help) then the instructor shouldn't have a problem with it. Presumably this was a take-home assignment, so you are meant to read stuff and ask questions to find out how to do it? As long as you then understand yourself:) In my opinion either it is plaigarism or he has misunderstood what plaigarism is
    – Adam
    Commented Apr 25, 2014 at 22:09
  • 2
    I just want to mention that, even if you changed your variable names, there are still three other answers that use the original names, so the change turns out to be kinda pointless for the OP trying to hide
    – CDspace
    Commented Apr 25, 2014 at 22:34
  • 2
    @CDspace, I thought of that too, and was kind of surprised that the other answers didn't have similar requests. Hard to think of everything when you are trying to hide I guess. Commented Apr 25, 2014 at 22:36
  • It's probably just that your answer was the one he copied.
    – Schilcote
    Commented Apr 27, 2014 at 22:08
  • 4
    Oh, I should add that the OP deleted his own account, so I guess he really wanted to copy & paste. Commented Apr 27, 2014 at 22:10
  • 3
    I would consider that you changed your variable names for the explicit purpose of helping him to not get caught plagiarizing to be highly unethical. Seriously, how is that ok?! Commented Aug 20, 2014 at 0:01
  • @MGaz I was trying to prevent a misunderstanding. My code was just a small modification of the OPs, and he had clearly (at least to me) invested some effort in his program. Since I wasn't writing the program for him, just helping with a small piece, I thought that it was a good middle ground so that he could utilize the algorithm I presented without getting in trouble. In hindsight, especially given the advice I have received, I probably wouldn't change anything and make him modify my algorithm enough to make it "his". Commented Aug 20, 2014 at 0:21
  • 1
    If the OP would cite the answer it would be no plagiarism.
    – mvw
    Commented Apr 12, 2015 at 15:28
  • At -127 votes, that question is now the third most downvoted question on SO. Great record!
    – dr_
    Commented Oct 30, 2017 at 14:37

5 Answers 5

152

The correct response is to avoid compromising the quality of your answer. An edit that changes variable names without changing the substance of the answer appears okay to me, if you are so inclined to do so.

There have been cases where people have defaced their questions to avoid academic charges of cheating. When such edits are discovered they are reversed. Posts can get locked in extreme cases. I'm not aware of anyone defacing an answer but if this were to happen the response would be the same.

The posts we make on SO are meant to serve the community and not just the individuals who posted them. It's too bad if the OP did not consider the implications of seeking help on SO.


I went and checked the question in the case at hand here and found that the OP indeed defaced their question. I went ahead and rolled back. If you notice this happening on any question that you answer (or any question whatsoever), please do a roll back. If the OP keeps defacing, then flag for moderator attention so that a moderator locks the post or deletes it.

Actually, upon further inspection, it is even worse than I initially thought. This user has systematically removed essential information from their own questions. I've rolled back the whole lot.

7
  • 10
    I hadn't realized that this user edited all of their questions to avoid plagiarism checks. Good catch on that. I sure hope that the investigation is ongoing, even after the assignment is done...
    – Makoto
    Commented Apr 24, 2014 at 0:59
  • Thank you for your feedback. How would you respond to the actual request (besides not doing anything to my actual post, and reverting/flagging if I notice their post was defaced)? Commented Apr 24, 2014 at 1:11
  • 53
    @BradleyDotNET You mean what I'd tell the OP? I'd tell them that they can't come on a public site like SO to ask for help and then hope that the result of asking for such help is going to be erased for their benefit. SO exists for the benefit of the community of users. This trumps personal benefits.
    – Louis
    Commented Apr 24, 2014 at 1:20
  • 1
    Ok, thank you very much! I will definitely keep this in mind in the future. Commented Apr 24, 2014 at 1:21
  • 1
    @Louis that's an argument appealing to the moral reason why. In my view, there's a more important appeal to make: the material he's removing isn't his to remove. Legally, it's Creative Commons licensed. and belongs to Stack Exchange, freely available for all to contribute to. From the TOS: "Stack Exchange reserves the right to ... re-post to the Network any Subscriber Content removed by any Subscriber or former Subscriber". So technically he can take it down, but he can't make it stay down just because it's unpleasant for him.
    – corsiKa
    Commented Apr 25, 2014 at 22:14
  • 7
    @corsiKa: Legally, it's a bit hairier than that. The copyright belongs to whoever created the content. You grant a license to SE (under CC-BY-SA) when you post. But you also can't revoke the license (as long as SE abides by the license terms), so the end result is quite similar. :)
    – cHao
    Commented Apr 27, 2014 at 12:10
  • If that OP's teacher frequents stackoverflow and sees this question at the top of meta today, OP is gonna be expelled. Commented Feb 7, 2016 at 2:05
48

Well...the student is missing the part in that there's a public-facing revision history for every edit, so if the professor/TA/dean were so inclined, they could inspect the question's revision history and get the information that way.

Thus, removing the code from your answer wouldn't do them (or you) any favors.

In the face of that, I would not recommend removing or modifying your code at all. Your answer may be correct with the code provided as a supplement and a guide; if the student elects to copy that wholesale as their own work, then it is only fair that they receive the punishment of plagiarism.

5
  • 1
    If the post was indexed between the time the assignment was turned in and the answer was asked to be edited, then there's a chance. You're probably right; it may not be indexed. I'd counter that point, though - I would not put it past a higher-education institution to sniff out these traces of plagiarism, too - especially if they're serious about it.
    – Makoto
    Commented Apr 24, 2014 at 0:29
  • Thank you for your feedback. How would you respond to the actual request (besides not doing anything to my actual post)? Commented Apr 24, 2014 at 1:06
  • 4
    If I were in your shoes, I'd explain that asking such things on Stack Overflow isn't acceptable, and that merely copying and pasting code and pretending that it's theirs isn't going to get them very far - either in academia or in the work force. I still wouldn't edit the post, even if they requested that I do that.
    – Makoto
    Commented Apr 24, 2014 at 1:14
  • Ok, thank you very much! I will definitely keep this in mind in the future. Commented Apr 24, 2014 at 1:21
  • Makoto has supplied the actual answer here. the concept is pointless, since it's all googleable anyway. So, the rotten cheater who asked to sneakily edit the post, is screwed anyway.
    – Fattie
    Commented Jun 15, 2014 at 9:13
34

The OP has two options:

  • Use your code + attribute it according to Creative Commons BY-SA 3.0.
    (Assuming that giving the code to the instructor is some kind of publication. On top of that, academic ethics/rules probably play a role here, too: even if it’s not a publication, the used source should at least be cited.)

  • Understand your code and reimplement it.

I think it’s pretty bold that the OP 1. seems to use your code, 2. doesn’t want to attribute you, and 3. asks to remove your valid and helpful answer so that this unethical usage goes unnoticed.

I think that an answer should never be changed or even removed to hinder detection of plagiarism/infringement.

22

I think you shouldn't have change a thing.

This is actually a problem on the student side, he should have referenced that question in his report in the first place, at with point they cannot accuse him for plagiarism.

If his homework is all about that question, well I think he shouldn't have asked it in the first place. I put it in the "give a man a fish, he eats for a day; teach a man to fish, he eats for a lifetime" category.

Changing variable name was kind of you, but it is also the first thing everybody does to make it look different, which fails most of the time if his instructor his clever. Although, that could help him not finding your answer, but he may find the question anyway.

2
  • 7
    "If his homework is all about that question, well I think he shouldn't have asked it in the first place". Bingo. The key is learning, not just providing an answer. Commented Apr 25, 2014 at 17:38
  • 1
    I totally agree that he probably shouldn't have asked in the first place. Thanks for your kind response! Commented Apr 25, 2014 at 18:05
6

When this happened to me (deleted good answer to good question), I simply copied the question text and reposted the question and the answer under my own name. I suppose I could have flagged it, but the reposting has the advantage that the original poster cannot then attempt to change it.

0

You must log in to answer this question.

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