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.

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'.
–
QixApr 24 '14 at 0:16

71

I don't know @Qix. The question itself is pretty poor actually. The answers, on the other hand, are quite thorough. Just by asking for answerers to remove their code, the OP seemingly implies an intent to do some copy/pasting.
–
Grant WinneyApr 24 '14 at 0:29

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!
–
DithermasterApr 24 '14 at 22:43

23

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.
–
Jonathan LefflerApr 25 '14 at 16:41

3

@JonathanLeffler Interesting, I had never heard of this kind of thing coming from that direction before. Thanks for the example!
–
BradleyDotNETApr 25 '14 at 16:51

1

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.
–
MHHApr 25 '14 at 22:01

27

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
–
AdamApr 25 '14 at 22:09

1

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
–
CDspaceApr 25 '14 at 22:34

1

@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.
–
BradleyDotNETApr 25 '14 at 22:36

It's probably just that your answer was the one he copied.
–
SchilcoteApr 27 '14 at 22:08

1

Oh, I should add that the OP deleted his own account, so I guess he really wanted to copy & paste.
–
pabloxApr 27 '14 at 22:10

1

Wow. I hope he does get caught cheating. Like we need more people running around with CompSci credentials that don't know a damn thing. It dilutes the value of our credentials by having under-qualified people running around in the industry with nominally the same education as we have.
–
Chris BakerMay 22 '14 at 19:06

you know, @BradleyDotNET, I think the bottom line is you really should not have answered the question at all! because it's just such a crap question, and so obviously cut-and-paste / unthinking / "homework -type" question. Surprisingly, even though you put time in to it etc (unfortunately a case of "more fool you...") - I think there's a lot to be said for just totally deleting your answer, and then ideally just erasing from the face of the Earth, all trace of the question. NOT because the idiot asked you to delete it, just because the Q is a horrific shambles.... so, just a thought!
–
Joe BlowJun 26 '14 at 12:09

1

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?!
–
Michael GazondaAug 20 '14 at 0:01

4 Answers
4

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.

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...
–
MakotoApr 24 '14 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)?
–
BradleyDotNETApr 24 '14 at 1:11

45

@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.
–
LouisApr 24 '14 at 1:20

Ok, thank you very much! I will definitely keep this in mind in the future.
–
BradleyDotNETApr 24 '14 at 1:21

15

Good catch. All of his posts occurred over a 1 week period a month ago.. nothing since. For the sake of the entire development community, hopefully he dropped out of class.
–
Grant WinneyApr 24 '14 at 2:56

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.
–
corsiKaApr 25 '14 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. :)
–
cHaoApr 27 '14 at 12:10

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.

Well, the revision history most likely wouldn't turn up in a quick Google search. Completely agree about leaving the code as-is though. Answers on SO are there to benefit the entire community, not cater to a single individual who seems about to copy/paste someone else's code as his own.
–
Grant WinneyApr 24 '14 at 0:27

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.
–
MakotoApr 24 '14 at 0:29

Definitely. I wouldn't be surprised at this point if there are services out there that a university could submit work to, to do the "sniffing" for them. I know when I took classes a few years back, we submitted our papers directly to a third-party service, which would "process" them and forward them to the professor. A couple hours after uploading the paper, you could check back to see a percentage indicating how much of your paper they found elsewhere (the result was always something above 0, due to direct quotes and such).
–
Grant WinneyApr 24 '14 at 0:34

Thank you for your feedback. How would you respond to the actual request (besides not doing anything to my actual post)?
–
BradleyDotNETApr 24 '14 at 1:06

3

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.
–
MakotoApr 24 '14 at 1:14

Ok, thank you very much! I will definitely keep this in mind in the future.
–
BradleyDotNETApr 24 '14 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.
–
Joe BlowJun 15 '14 at 9:13

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.

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.