129

One tutor complains here (the answer is deleted now)

How to solve exception in thread "main", java.lang.ArithmeticException: / by zero?

This post contains solution code to one or more of our homework assignments here at University of [redacted]. It is indexed by Google, which enables students that are currently taking our class to find it and cheat on their assignments.

I don't have enough reputation to report abuse, and I don't know what SO's policy on removing longstanding posts is. It would be great to get this removed, but if not...

As a word of warning to any [redacted] students who have come across this while trying to complete your homework: Posting your code online, viewing any other students code in any form, and (absolutely) using any code you found online in completing your solution is against the course policy.

I know it's tempting, but you know better than that. Delete any code you found online, take another late day, and go to the [redacted] tomorrow. You may lose a couple points, but you keep your integrity. You are going to do the right thing; I have faith in you.

If that doesn't convince you...make sure you are informed:

If you get caught, it is highly likely you will lose all the points on the assignment, and may face repercussions from the University. I know about this solution, and I have programmatic systems that leverage online solutions like these to find misconduct. You think you can get around it by changing comments or variables, or rearranging blocks of code, but you can't. I care about the academic integrity of our program; finding misconduct is my full time job. (Not for other schools. Just [redacted]. Just [redacted]. Just [redacted]). If you are going to cheat, it's pretty much you versus me.

Go to the course website, look up resources like lecture slides, videos, tutorials, sample programs, section handouts, PracticeIt, and then do your own work.

My name is ********* ******; more information about our courses can be found here: [website redacted]

That the evildoers who are using the answers to cheat will be punished. Well, it does definitely not belong on an answer, but...where exactly does it belong and how do I handle this?

  • Should we on principle ignore and remove similar warnings?
  • Should we move it to a non-deletable comment?
  • Should we introduce a "cheat" warning detecting questions like that used in curriculums?)

What should we do?

19
  • 4
    I "believe" the policy is for the professor to file a DMCA request for copyright violation. But don't quote me on that. The professor/school would also need to hold a copyright to either the question or the answer.
    – Mysticial
    Commented May 27, 2015 at 23:26
  • 87
    Seriously though, that question did not look like a straight copy from a homework assignment, proving a copyright violation would be difficult anyways. Total aside, the admonition to "not use code you found on the internet" is somewhat crazy, as a lot of the code we write is basic enough that it would apply to a lot of homework questions, even if they never saw it. Commented May 27, 2015 at 23:40
  • 4
    It does look like this hits them in the pocket book as well. Commented May 27, 2015 at 23:50
  • 59
    I don't see how they can detect copying from the Internet without a lot of false-positives. I have posted an answer that was a few seconds after another answer, but differed at most in identifiers and text wording. I know I didn't see the other answer before posting, and the person writing the other answer could not have copied from me because they posted first. Commented May 28, 2015 at 0:59
  • 18
    @PatriciaShanahan I think the person in question is puffing himself up. Solutions are either so straightforward that the difference is neglible and if they are not, programs are so malleable that programmers can rewrite them a bazillion times. It looks like a paper tiger who is playing bogey-man. Commented May 28, 2015 at 1:19
  • 8
  • 21
    If you are going to cheat, it's pretty much you versus me. Challenge accepted.
    – Atsby
    Commented May 28, 2015 at 8:20
  • 17
    Why redact so much, and then leave the name? Just curious. I've reviewed essays. If you suddenly come across a highly coherent sentence, paragraph or passage in an otherwise basic piece of writing, then you know it has been copied. I think it's the same with programming. You don't find a wonderful gem of a function amongst otherwise scrappy work. A sufficient level of proof for plagiarism is different (I've not done it for programming) but you can then pull up other work by the student and look further. Commented May 28, 2015 at 10:42
  • 57
    Pretty lousy tutor if his students can't work out how to not divide by zero. ;) Commented May 28, 2015 at 11:52
  • 4
    I think also, as part of our daily programmers life is reasonable to seek for help and information online, you can not possibly solve every single problem alone (we are not islands..), but you should do it properly, which I think SO encourage by asking for specific questions and not general open questions of the type "do my work/homework". Also, I don't know how solving a silly exception like that could be ever considered plagiarism.
    – Dzyann
    Commented May 28, 2015 at 12:04
  • 6
    "You should have redacted out the guy's name too" - Why? The person posted it on a public forum.
    – GEOCHET
    Commented May 29, 2015 at 1:04
  • 9
    If we deleted every post that contained the answer to any university's homework problem, there would be almost no posts left on SO.
    – NobodyNada
    Commented May 29, 2015 at 4:25
  • 3
    Get out of this University Commented May 29, 2015 at 8:11
  • 51
    Complaining after 4 years the question was asked? Seriously? Time to change the exam questions. Commented May 29, 2015 at 8:49
  • 4
    I received a copy of this copypasta, and worded a response. github.com/nayuki/Huffman-Coding/issues/1
    – Nayuki
    Commented Jun 4, 2015 at 5:34

7 Answers 7

105

Do not deal with claims to remove copyrighted content by yourself.

The author of the copyrighted content should file a DMCA takedown notice following section 15 of the Stack Exchange Terms of Service in order for it to be removed from the revision history as well.

Reporting Copyright Infringements

If You believe that content residing or accessible on the Network infringes a copyright, please send a notice of copyright infringement containing the following information to the Designated Agent at the address below (all received notices will be posted in full to Chilling Effects Clearinghouse):

  1. Identification of the work or material being infringed.
  2. Identification of the material that is claimed to be infringing, including its location, with sufficient detail so that Stack Exchange is capable of finding and verifying its existence.
  3. Contact information about the notifying party (the Notifying Party), including name, address, telephone number and e-mail address.
  4. A statement that the Notifying Party has a good faith belief that the material is not authorized by the copyright owner, its agent or law.
  5. A statement made under penalty of perjury that the information provided in the notice is accurate and that the Notifying Party is authorized to make the complaint on behalf of the copyright owner.
  6. The Notifying Party's physical or electronic signature.

At some point, the above section about reporting copyright infringements was removed from the Terms of Service. There's a question about that, which also has some additional information regarding the DMCA takedown process: Instructions for reporting copyright infringement have (accidentally) been removed from the site


As for irrelevant complaints, they are Not An Answer and should be flagged as such.


Per Deduplicator's comment, here's how the question should had been dealt with.

13
  • 4
    The question remains how do we should handle warnings of tutors inside Stackoverflow. Commented May 27, 2015 at 23:35
  • 38
    @ThorstenS. Flag it. It's irrelevant noise.
    – Unihedron
    Commented May 27, 2015 at 23:35
  • 9
    @ThorstenS. Delete them if they violate SO/SE rules.
    – Mysticial
    Commented May 27, 2015 at 23:35
  • 13
    @ThorstenS. Give them a link to this answer and flag to delete the non-answer.
    – Dijkgraaf
    Commented May 27, 2015 at 23:37
  • Should we add a comment for the tutor with the link of copyright infringements like the information for "not a answer" etc. ? Commented May 27, 2015 at 23:37
  • 2
    Already did, and yes.
    – Dijkgraaf
    Commented May 27, 2015 at 23:37
  • 78
    If the prof/school doesn't own the copyright to either question or answer and simply wants it removed because it helps people cheat, then they're out of luck.
    – Mysticial
    Commented May 27, 2015 at 23:39
  • 5
    @Unihedron - Why wouldn't it be considered noise in the question itself?
    – BSMP
    Commented May 28, 2015 at 0:20
  • 1
    @BSMP: I think it would be not only considered noise, it would be considered aggressive and punished. You must have a very good reason to edit a question, editing a question for perceived copyright violation is SO/SE rules violation. If he/she uses comments, comments can be deleted. Commented May 28, 2015 at 1:05
  • 15
    There is no DMCA or copyright claim present here. WTF.
    – GEOCHET
    Commented May 28, 2015 at 3:02
  • 16
    @GEOCHET: True. Nor is there any other claim present why we should remove this content, yet Mr. Brand would like us to take the content down. He's hinting it's against the rules, but school rules do not apply here. Therefore, it's not unreasonable to read that as a implicit copyright claim.
    – MSalters
    Commented May 28, 2015 at 7:28
  • 5
    TL;DR not our problem...Maybe he should change his questions once in a while like he's getting paid to do.
    – Liam
    Commented May 28, 2015 at 12:56
  • 8
    "Mr. Brand would like us to take the content down" - Who cares what he wants? He should go find something practical to do with his time and stop worrying about other people's content.
    – GEOCHET
    Commented May 28, 2015 at 16:29
100

If he (that wrote the now-deleted answer most people can't see anymore) doesn't like it, he should work to correct his students and/or coursework. This is not Stack Overflow's problem.

10
  • 39
    +1 I agree, someone else out there might ask the question legitimately and they deserve an answer, after all thats what stackoverflow is for. If a teacher can't keeps their students from cheating that isn't our problem, to be entirely honest I'd don't see why looking up the answer is so bad anyway, once they're out of school that's what they're going to do when they need to figure something out.
    – CJK
    Commented May 28, 2015 at 3:01
  • 10
    @CJK and now we know where help vampires come from? (I get what you're probably trying to say, but honestly, the type of help that could reasonably get you busted by a sane college is precisely the sort of help we don't want to give out to vamps: do my work for me.) Commented May 28, 2015 at 4:23
  • 7
    @CJK Depending on asking someone else or finding the answer on-line whenever you need to "figure something out" is a short-term, self-limiting strategy. What happens when someone following it needs an answer nobody knows, and has not developed the skills to figure things out independently, because when the going got tough, they asked for help? Commented May 28, 2015 at 9:33
  • 5
    I see two very different questions here: "Should a student depend on SO rather than their own work for homework?" and "Should SO enforce non-use by students doing homework?" I think depending on others for doing homework is stupid, as well as being, in many cases, dishonest. That does not mean SO should enforce good learning strategy. Commented May 28, 2015 at 11:29
  • 1
    While I agree that this is not Stack Overflow's problem, your first sentence is impractical advice - there will always be students who try to cheat, and I see no practical way to "correct" (?) your coursework (at least not a way that will work in any case). Commented May 28, 2015 at 12:45
  • @Dukeling: It doesn't say to correct coursework. It says to correct students and/or coursework. What other corrections can be made for cheating students?
    – GEOCHET
    Commented May 28, 2015 at 16:28
  • @GEOCHET It implies correcting coursework, or at least "... (students and/or coursework)" (i.e. "he should work to correct his students and/or he should work to correct his coursework") is the only thing that makes sense to me (linguistically speaking). If not "students", what else would the "and/or" pertain to in your sentence (or, if you'd like, what are you saying should be done with the coursework in your sentence)? Commented May 28, 2015 at 19:22
  • @NathanTuggy I'm not saying we should help people cheat I'm saying that just because a question is similar to a question on a test from some college out there doesn't mean that somebody else "in the real world" won't ever have that problem, and we don't know who asked the question. It might be some college student or it might be a programmer somewhere that ran into that issue. Stackoverflow is here to build a database of questions and answers for programmers, not enforce the rules of a college. Now if it's obvious that it was posted to cheat on a school assignment thats a different story.
    – CJK
    Commented May 28, 2015 at 19:40
  • @CJK: Dukeling's answer explains the cases better, although he and I were basically intending to say about the same thing. Commented May 28, 2015 at 19:43
  • 5
    @PatriciaShanahan I disagree that you limit yourself by looking up the answer to a problem, if you make sure that you understand how and why a piece of code solves a problem instead of just blindly copying and pasting it into a project you can learn quite a bit.
    – CJK
    Commented May 28, 2015 at 19:47
60

I have been teaching programming for a number of years, CS and IT. I think there are basically two situations:

  • When the students work on some kind of project, there is absolutely no reason to complain about them using all the available resources (online or not) to help them to reach their goal. On the contrary: That is how we work in "real life".
  • For "homework" or "practice assignment", it is a different matter. The goal here is to help a student understand something or to focus on some technical difficulty. Of course, blindly copying someone else's code completely misses the point of such an assignment.

Concerning the latter, we already reject the "do-it-for-me" style of questions, and many of us, when identifying a "homework" question, do not post a complete solution, but instead give some hints and take the time to explain what the solution would be. Responsible students will probably greatly benefit from that1. A humble teacher will admit (s)he does not hold the ultimate truth -- and a student might need other sources to fully understand what (s)he was taught2. Cheaters will ... well... continue to cheat. Waving at them, and in the face of the world, some kind of legal threat is pointless: they already know that and choose to ignore it. Our role as a teacher is to educate them to not do that. Maybe this is an utopia. But less than fighting each and every site on the Internet where students might get some "help".


1 I work specifically with people who encounter difficulties in education, so many of my students, especially among the younger, do not use Stack Overflow as it is ... in English -- they are unfortunately addicted to ([much] lower quality) French resources only. Using Stack Overflow would be beneficial for them...

2 Not to mention the fact that confronting several points of view might help the student to develop critical thinking.

16
  • 6
    This is exactly why it may be necessary to mention "this is homework" in a question, and unnecessary to blithely stomp those questions down. (Good example/Bad example.) They require a different kind of answer – a well-thought out one, informing, instructive, or educational; not something like this answer.
    – Jongware
    Commented May 28, 2015 at 8:43
  • Just as a glimpse of hope for you, i've seen more than enough french cs students go by SO, let it be reading or just using it; don't loose faith !
    – Mekap
    Commented May 28, 2015 at 9:08
  • 4
    @Jongware Yes, you are right. I can't understand when I see a decent homework question simply down-voted because of that. Homework questions are allowed. And they need a special attention. But by blindly down-voting them, we basically teach the asker (s)he should have cheated instead of asking openly for help. Commented May 28, 2015 at 9:51
  • 1
    We may have to reevaluate the value of a homework tag...
    – Jongware
    Commented May 28, 2015 at 9:53
  • 3
    @Jongware The pros and cons of meta-tags, esp. homework have been discussed many times. I don't know if using it would add any benefit over simply writing "it is for homework" somewhere in the question. On the other hand, "the system" should maybe identify homework questions to display a notice on top of the page saying something like "Homework question are expressly allowed in SO but deserve a detailed explanations for the OP to make most of it. Please refrain yourself to post only the solution to the problem." Commented May 28, 2015 at 10:05
  • 6
    I love to help people with their homework, OTOH, doing their homework for them isn't actually helping. :)
    – PM 2Ring
    Commented May 28, 2015 at 10:16
  • @PM2Ring: yes, for me it often serves the same purpose as rubber duck debugging. Explaining something in detail forces one to evaluate what s/he actually understands. And when you get slapped for a 'bad' educational answer, you learned something new!
    – Jongware
    Commented May 28, 2015 at 11:51
  • 1
    @Jongware: Totally! I've been participating on programming forums etc for several years, but writing answers on SO has taken it to a whole new level. When you make a minor error of explanation here you (generally) learn about it very quickly. :)
    – PM 2Ring
    Commented May 28, 2015 at 11:59
  • @Jongware: No. Actually, hell no! The fact that it's a school assignment or some such does not in any way supersede our rules of what makes an acceptable/great question respective answer, ever. Commented May 28, 2015 at 14:45
  • @Deduplicator: (hoping you are referring to the homework tag and not to my first comment) The underlying thought is to encourage an educational answer instead of "Try this: (codez)" – as in the last link in my first comment.
    – Jongware
    Commented May 28, 2015 at 15:21
  • 3
    @Jongware: Well, "try this [code blob]" -answers are always low quality answers, though some questions beg for them. Every answer should be educational, giving all neccessary facts and explanations. No difference whether it's a homework-question or not. Commented May 28, 2015 at 15:25
  • 1
    @Deduplicator I agree that all answers should be educational. However when you answer for "homework", as the OP has less experience and more fragile technical knowledge, you have to craft you answer more carefully than you would do in the general case. For example, mentioning "concurrency issues" or "ACID compliance" when answering to a database-related question is probably not enough there. You have to give an example. Thing you would probably not do otherwise. Commented May 28, 2015 at 17:39
  • 1
    This. I also teach programming and I was going to write a very similar answer. My students are forbidden to ask questions about their assignments on any forums, but reading what's already there is permitted.
    – alexis
    Commented May 28, 2015 at 18:27
  • 3
    I should also point out that the question that led to this is from 2011. Change your assignments once in a while, dude.
    – alexis
    Commented May 28, 2015 at 18:29
  • 2
    @alexis I understand not asking questions about small assignments, but what about larger ones? If, say, you are building a basic OpenGL renderer and you have a question about a specific API function, what's wrong with asking it? Learning to do your own research (including asking on SO if it isn't there already) is a valuable skill. If the focus of the course on basic stuff like syntax, fine. But if it's a higher level course, I can't see why you would ban SO questions.
    – DanielST
    Commented May 29, 2015 at 19:19
24

SO has nothing to do with the inner problems of a university professor and their students. A professor may participate as a fellow SO user (say, downvote the question), but should not receive any extra privileges for just being a professor. (And as any other person they can file a copyright infringement notice when there is an infringement.)

SO is a site for answers and solutions. And it has its own policy against "do my homework" answers. It is enough.

Maybe they need to change their homework assignments once in at least five years?

2
  • 13
    THIS is the real answer. It is so much extra work for the professor to come here and whine about posted solutions to exams -- just change the damn question! There is an irritating (to me) sense of entitlement in this professor's attitude toward StackOverflow. Commented May 29, 2015 at 15:40
  • 3
    ... The quickest fix may then be to change the text of examples and the names of variables and functions once a year. At least a student that still manages to find a pre-written answer will deserve a single point for reasearch.
    – Jongware
    Commented May 29, 2015 at 22:32
10

As already noted, you, as a user, shouldn't care about cheaters and flag/downvote/delete complaints about them.

However, let's consider a few types of ways a user can ask a question based on a programming assignment:

  • Posting the assignment description (without code) and asking for help solving the problem.

    Just close it, too broad, probably.

  • Posting his/her entire attempted solution (which doesn't work) (and perhaps the assignment description) and asking why it doesn't work.

    Just close it, Stack Overflow is not a debugging service.

    Even if you can spot the error, it's unlikely to be useful for others, so just close it anyway (or you can try to edit it into a decent question).

  • Posting his/her entire attempted solution (which doesn't work) (and perhaps the assignment description) and asking why it doesn't work, but pointing out the problematic line, the values of relevant variables at that point and anything else that you might need to find the problem without needing to look at the rest of the code.

    This is not quite the ideal way to ask a question, but it's often easy enough to edit it into a decent question (which involves editing out most of the code along with the assignment description).

  • Posting a minimal example based on the attempted solution which reproduces the problem.

    This is exactly the type of question we like, so don't touch it.

If the question contains a copy of the assignment description, this will be really easy to search for, but, more often that not, the question should be either closed or edited to remove the description (among other things, probably) (just to get a good question).

If it doesn't contain a copy of the assignment description, it probably won't be too easy to find online (although there are exceptions).

If it's a good question, it probably doesn't have a complete solution, so, even if it is found, it won't help someone looking for an out-of-the-box solution all that much.

So while we don't directly fight cheaters, our guidelines will often make life hard for them.


In this specific case, I think the second point applies.

1
  • 6
    To amplify your overall point, it's hard to see how the acceptable-to-SO items 3 and 4 constitute "cheating" at all. It's not much different from asking your classmate or TA to talk over your homework with you when you're stuck on one particular bit. In other words, there's no true conflict here: what's okay on SO should be okay ethically for classwork. The problem, then, is getting questions of types 1 and 2 closed quickly enough.
    – jscs
    Commented May 28, 2015 at 19:30
5

I guess Whitaker Brand could be complaining about a copyright violation, i.e., he's implying that a post contains code that was directly copied from code that his university holds the copyright to, or that a question contains text that's directly copied from an assignment in their copyright course material, but I'm not sure if that's actually the case. To me, "This post contains solution code to one or more of our homework assignments here at University of [redacted]." merely implies that the posted code solves a problem that arises in one or more of his university's programming assignments.

If the university's policy prohibits students from using such code, that's a matter between the university and the students, it's not Stack Overflow's problem. If the post Whitaker Brand is complaining about is a good answer, then it belongs here, especially if the question is good too. If he wants to post a warning on such questions or answers in the form of a comment containing a link to a full warning on the university site, then he is certainly free to do so, but such warnings are definitely not appropriate as an answer.

I suppose he's also free to down-vote answers or questions that he feels exist purely to allow his students to cheat, but personally I'd consider that an abuse of the voting system, unless the answer or question deserves a down-vote on its own merits.

I occasionally post answers to questions that are (probably) homework assignments. Generally, in such cases, I prefer to give hints and incomplete code snippets, rather than posting a fully-working program that a student could submit as their own work.

FWIW, we get a lot of questions in the Python tag relating to the GCSE Computing programming tasks (14 - 16 year olds). These aren't merely homework - the score from these assignments goes towards the student's official high school qualification; see General Certificate of Secondary Education for details. When I see such questions I generally post a comment advising that it's a GCSE task, to (hopefully) discourage potential answerers from doing the OP's assignment for them.

3
  • 1
    That's the wrong way to go about it. Either it's an acceptable/good question, in which case it deserves upvotes and good answers, or it's not, in which case it belongs closed/downvoted, depending on which applies. See Dukeling's answer. Commented May 28, 2015 at 14:49
  • 1
    @Deduplicator: As I said in another comment, I'm happy to help people with their homework / assignment, especially if they've written a good question (&/or have responded positively to comments to clarify & clean up their question), but I don't think it's helpful if I actually do the work for them. I even help the GCSE people if they write a good question, OTOH, there have been so many questions on SO about those GCSE tasks that anyone with even minimal Google skills should be able to find plenty of existing answers to help them with those tasks.
    – PM 2Ring
    Commented May 28, 2015 at 15:10
  • 3
    Well, it looked to me like you advocated not really answering the question, for all the future users, to avoid helping the asker sabotage his own learning. Maybe I read too much into it. Commented May 28, 2015 at 15:13
-10

The issue isn't that the asker is cheating, or that the answerers are helping a cheater, but that students (non-members of SO) are copying the asker's code sample. How about strip down the code to the bare minimum? Alternatively, the value of the question is not very high, so maybe consider deleting it, or requiring an account or a reputation threshold to view it (if there's such a system in place).

I once had five students hand in very similar programs. (You can tell by how they made the same mistakes, by the way.) This was a problem I made up myself that semester, so it's not as if I didn't rotate the problems fast enough. It turned out that one of the students posted his code online asking for help, and the others found it.

(I can't believe there are so many here who are against the claimant. Y'all should know the difference between copying code to get something to work and handing in code for credit.)

2
  • 4
    Well, the same mistakes are incredibly suspicious. Two good programmers though can write the same correct, relatively small and straight-forward program without coordination though. BTW: Who should strip what code down? Commented Jan 27, 2016 at 9:46
  • @Deduplicator, I'm saying that the code in the question in question can be trimmed down to the minimum that is required to answer the direct question, or trim down the code so that the answer still makes sense.
    – leewz
    Commented Jan 28, 2016 at 1:01

You must log in to answer this question.

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