I am a TA for an undergraduate CS module at university in the UK and was in charge of marking coursework. The assignment contains three parts: report, code and video presentation. I found that 10 students submitted code that was a bit too similar to some blog posts. I gave the students 0 for the programming assignment, and now they are complaining.

For the first complaint, I made a report containing screen shots of the students submission and the blog post. I also commented on how the assignment could be better, but now there is another student complaining. What if all the others complain too?

This is my first time as a TA and the first time I have to deal with plagiarism. All communication between me and students goes through the lecturer. They complain to him, he passes on the message and replies to them based on what I say.

  • How can I prove plagiarism? Sometimes they change variable names but the implementation as a whole is just too similar. One student even copied the comments word-by-word!
  • How can I help the students improve rather than just say 'you got 0 for plagiarism'?
  • $\begingroup$ Comments are not for extended discussion; this conversation has been moved to chat. $\endgroup$
    – Ben I.
    Commented Feb 8, 2022 at 20:23

9 Answers 9


As a TA you are working for a professor. They are fundamentally responsible for grading. It would have been better had you checked with the prof before assigning grades and getting advice. But what you did is reasonable.

I think you are covered on proof, given that you took screen shots. But it is the prof who will decide on how to handle the complaints. If they behave well they will back you up, though possibly with accommodations. But let the prof decide, with your advice. Don't try to take too much responsibility for the outcome.

Long term, the prof might think about not giving assignments that can be easily plagiarized, but that isn't your responsibility.

As for helping them, they need a good and proper definition of plagiarism and and explanation of why it is wrong, both ethically and pedagogically. They have failed to learn something as well as crossed an ethical line.

A generous person would let them choose between the grade assigned and doing another program/project with the grade for that replacing (or partially replacing) the given grade.

So, you need to bring it to the prof's attention. In some large classes with many TAs there is a "head TA". In that case, bring it to them first as they likely have more experience than yourself.

The complaints, themselves, those already posted and future ones, should be referred upwards also.

  • 2
    $\begingroup$ Thank you for your answer. I already submitted my comments to my supervisor. I'm not sure what will happen next, but I hope the other students don't complain too much. $\endgroup$
    – Marcus
    Commented Feb 2, 2022 at 15:08
  • 8
    $\begingroup$ @Marcus Follow your supervisor's lead, and don't worry too much about the complaints. Run responses by your supervisor before you send them out, and make sure that they are present at all meetings. If a student corners you, tell them that you would be happy to schedule a meeting to discuss it. The only way you can get yourself into hot water here is if you don't follow your supervisor's lead. $\endgroup$
    – Ben I.
    Commented Feb 2, 2022 at 15:15
  • 14
    $\begingroup$ It's worth also noting that plagiarism specifically & usually [everywhere I've been] falls under Academic Misconduct policies. As such it likely has explicit policy based guidelines for proper handling; for example, for my institution, there's an entire flowchart: montana.edu/deanofstudents/academicmisconduct/… . So, @Buffy definitely has the best way to handle this in the future: to pass your suspicions and related documentation/evidence back to the professor to handle at their discretion, rather than assigning a grade yourself based on suspected plagiarism. $\endgroup$
    – taswyn
    Commented Feb 3, 2022 at 0:27
  • 6
    $\begingroup$ At my undergraduate university, a first infraction would result in an automatic 0 for the entire course. $\endgroup$ Commented Feb 3, 2022 at 15:14
  • 1
    $\begingroup$ I am very much surprised that I so frequently see suggestions such as "A generous person would let them choose between the grade assigned and doing another program/project with the grade for that replacing (or partially replacing) the given grade". In my POV, this basically tells students that it's free to cheat - if they don't get caught, they receive a positive grade. If they do get caught, then they can start doing honest work. I feel like this does not value the tutors' time. One may say that students only cheat themselveses while cheating in order to obtain a passing grade, but... $\endgroup$
    – Fureeish
    Commented May 16 at 12:42

While there are an infinity of ways to write code that accomplishes any task, in tasks simple enough for labs, there are usually only two to four reasonable approaches for each step, and certain amounts of fluency in coding practice will tend to bring approaches even further in line.

So, in a lab project that has, say, three essential steps to it, there will be something like eight to sixty-four reasonable approaches to the whole thing. If even one of the steps only has two reasonable approaches, then you'll be down to sixteen reasonable approaches at the maximum. You're well into the territory in which you should see some very similar student responses, even if everyone is doing their own work.

Even with a fairly complex prompt, there will be many students who take roughly the same approach to many portions of it.

The person who copied the comments very obviously plagiarized, and I would pursue that with the professor with confidence. However, I am personally reticent to wield the Plagiarism Hammer unless the proof is pretty incontrovertible for the reasons described above. The video by the students is also evidence of thorough understanding, so you can use that to either strengthen or weaken your suspicions of cheating.

Ultimately, of course, it is for your professor to decide whether to pursue these matters, and I hope that you alerted the professor to the matter right at the start. If you haven't, talk to them right away. They need to know about these issues before a student or parent goes off to a dean to complain about the class.

  • 3
    $\begingroup$ Unless you're talking about something that's only a couple dozen lines of code, exact duplication except for variable names seems very unlikely. The larger the project, the easier it becomes to recognize plagiarism like this. $\endgroup$
    – Barmar
    Commented Feb 3, 2022 at 15:17
  • 2
    $\begingroup$ @Barmar Absolutely agreed. I assumed that they were different since, in my experience, cheaters usually think to change those (often only those!), and because OP didn't mention that they were the same, which would have been a pretty material tell in establishing cheating. $\endgroup$
    – Ben I.
    Commented Feb 3, 2022 at 15:36
  • 5
    $\begingroup$ @Barmar I didn't notice that line. As a crazy aside, one weird variable naming thing I noticed is that students will tend to use whatever variable you use for for loops. If you almost always use k as your iterator, so will they. Same for i, m, etc. I once had an entire class of students use the same iterator as is my habit, and caught a cheater because she used a different iterator that I've never seen anyone use, which led me to a published solution that I wasn't aware of for the problem I'd given. (There's no broader lesson there, just a weird thing that happened to me.) $\endgroup$
    – Ben I.
    Commented Feb 3, 2022 at 17:46
  • 6
    $\begingroup$ @Barmar They weren't. They copied a full, published solution, down to the comments, though they managed to cut off the final two }s, leaving it unable to compile, and they couldn't solve that problem. That specific student was... certainly an outlier. They were one of the causes of my question on this site about whether there are students who can't learn to code. $\endgroup$
    – Ben I.
    Commented Feb 3, 2022 at 18:18
  • 3
    $\begingroup$ @ScottRowe Those kids don't even look at the comments. They've learned that it's not part of the code, and they've become afflicted with Comment Blindness. I know that they're cheating, but I also find it kind of cute 😂 $\endgroup$
    – Ben I.
    Commented Feb 5, 2022 at 20:38

I had had many years of industrial assembler experience before I did my degree, so the assembler module was a cakewalk for me, but a quagmire for my fellow students.

I was prevailed upon to demystify the use of stacks and pointers and suchlike, so I used a spare room one day to explain the concepts. Obviously, I used examples.

For a later assignment, a number of student made submissions using remarkably similar techniques and were individually interviewed by the academics who smelt plagiarism.

Fortunately, when I learns 'em, they stays learned, so they were able to adapt the techniques they used to other scenarios that the academics proposed, proving that they actually knew the subject and weren't mechanically copying.

I'd say that it's up to the academics to conduct any investigation and execute any students or appropriate remedies where the plagiarism is proved. As a TA, my opinion is that your actions should be limited to drawing the attention of the academics to your suspicions.

  • 12
    $\begingroup$ Great answer. Though I think "execute any students" is a bit harsh :-) $\endgroup$ Commented Feb 3, 2022 at 16:37
  • $\begingroup$ @manassehkatz-Moving2Codidact Sounds a bit lenient to me, but I dealt with some rather persistent plagiarists when I was a TA, which may have skewed my perspective. :-) $\endgroup$
    – Ray
    Commented Feb 3, 2022 at 20:33
  • 1
    $\begingroup$ Some of my university courses asked us on assignments to declare any classmates we discussed the assignment with. I guess this gives the instructor advance notice in case some solutions look similar, instead of the instructor needing to discover that from scratch. $\endgroup$
    – Nayuki
    Commented Feb 4, 2022 at 5:23

There is a point where you should award some marks for the code being complete and producing the output. If the code is only part of the assessment and the student was not capable of writing it themselves, then the other elements are likely to be of low quality. It is reasonable to assume that correct code in many cases should look similar, so to award a Zero would mean you are certain that plagiarism or collusion has occurred, in which case you should have no problem defending your assessment.

Most institutions would have a clear policy around plagiarism, if you have such a policy then when there is a dispute or challenge to your assessment on the grounds of plagiarism you need only to remind the students of the policy, that policy should guide you on both how it is detected and what the penalties are.

  • If you do not have a policy on plagiarism, then be sure to establish one, even if it is a preference that might be hard to enforce, make it clear before the assessment task that plagiarism and collusion are not going to be tolerated.

One strategy to discourage plagiarism in programming is to encourage creativity, by requiring students to design their own models and scenarios and even the test harnesses to demonstrate certain techniques. It takes a lot of work, and you can't rely as much on automation for reviews, but even if the students source blocks of logic from SO or each other, if the models they are applying the logic to are unique then they will still have to understand the code to make it work.

You can also complete an assessment over time, or turn submission into more of a folio of work, apart from making it easier to detect plagiarism as the complexity of the assessment content goes up, you can lower the bar in terms of effort required by the student, especially if there is a chance to complete the tasks during class times.

As to how to help the students improve when they are caught out, give them the opportunity to re-submit, but this time give them a different assessment item. With different requirements they can not simply re-write the syntax from the previous submission, they will be forced to think about it even if they are going to apply some or all of the code in the first assessment.

  • A simple trick here is to change the subject or topic of the content. This will actually help you identify if they understand the difference between encapsulating abstract concepts and the business domain concepts.

Whilst facetious, it must be recognised that the point of learning is not to re-invent everything, but that we should continue to evolve and build upon established concepts. This is true for programming as much as other domains. The reality of how programming is applied in commercial contexts is that there is a lot of skill in locating and understanding the correct pattern or solution to apply to a logical problem domain and how to implement it correctly.

  • In layman's terms this is effective use of Cut'n'Paste

A good developer does not re-invent the wheel, they determine how to fit the a standard wheel implementation into their model.

I can't help but share my favourite quote from Eric Lippert:
The notion that programming can be principled — that we proceed by understanding the abstractions afforded by the language, and then match those abstractions to a model of the business domain of the program — is apparently never taught to a great many programmers. Rather, many programmers proceed as though they’re exploring an undiscovered country, and going down paths more or less at random and hoping they end up somewhere good, no matter how twisted the path is that gets them there.

It is true there may be a unique solution to every problem, the construct of institutionalized education is such that many problem statements used in assessments have been used before, so avoiding plagiarism from sites like SO would require your assessment criteria itself to unique. Try assessing Fizz-Buzz in a room of students with no external communications, depending on how you have taught the concepts there is likely to be a strong commonality in the style, layout and logical expressions utilised to produce the result. Programming is very logical, just like mathematics there are right answers and many that are clearly wrong. But the processes used to work out the result will be influenced by the tuition and other experiences of the student, if all their experiences and learning is shared or taught from a common source, then it makes sense that the outcomes would be similar from students across a class or cohort.

Although not very practical, to determine plagiarism, you should be looking for the personal quirks of one student to be reflected in the others, try comparing the mistakes or omissions, as opposed to the correct elements. Or the reverse, that the quirks of the submission are not consistent with any previous work from that same student. If in the other elements the student has demonstrated a genuine understanding of the code, and an ability to recreate it if given ample opportunity, then whilst you can disapprove of it, without stronger grounds or investigation it should be marked according to its content.

  • 3
    $\begingroup$ V good answer. I was thinking of making similar but thought it too scandalous. Copying/non-reinventing is a software-engineering positive. (Modulo licences etc) It's deleterious effects are remote from morality -- student is evil. More of a logistical question : In the face of copying how to evaluate/grade? Once that is recognized the next step is patent : copying represents not failure of student but of system. Dijkstra said it; I've generally followed: One big reason to eschew mainstream omnibus languages is precisely to obviate the cut-paste from stackoverflow bug $\endgroup$
    – Rushi
    Commented Feb 3, 2022 at 4:59
  • 2
    $\begingroup$ I liked the quote in ur profile: Don't reinvent the wheel, realign it! That said the teacher's task is non trivial. Children need to reinvent... Electrical with mechano, buildings with Lego .... They need to step thru Pythagoras' proof even if that doesn't make them Pythagoras. Not invalidating any of above. Just reasserting: To he effective, academics needs to be in a walled garden; not just evaluating but teaching also $\endgroup$
    – Rushi
    Commented Feb 3, 2022 at 5:41
  • 3
    $\begingroup$ It was too hard to escape the irony of learning to NOT copy code, only to find commercially it is practical on a number of levels to copy existing documented code patterns. Realistically understanding how to research APIs and best practices and when to copy code can be a great skill itself. $\endgroup$ Commented Feb 3, 2022 at 6:27
  • 3
    $\begingroup$ @ChrisSchaller I've actually had a senior officer in the company ask me why programmers were writing their own code and not just copying it off the internet. $\endgroup$
    – Dragonel
    Commented Feb 3, 2022 at 16:01

Students cooperate. This should be encouraged. The whole idea of stackexchange.com is cooperation. And it is a very good idea.

The problem is drawing the line between cooperation and plagiarism.

My personal definition in cases like this hinges on the question "Has the student learned the lesson?". Yes means cooperation, no means plagiarism.

So, if you have the manpower to spare, call in each suspect separately and ask them to explain their code.

If they can explain it, they have cooperated. If they can't, they have plagiarized.

Note that this is not a code review. It is a test to see if they understand their own code, and this should be made clear to them.

  • $\begingroup$ Kinda a weird question to ask on SE... +1. Say, "Good job, just like in the real world." ? $\endgroup$
    – Mazura
    Commented Feb 4, 2022 at 4:16
  • $\begingroup$ @stighemmer "If they can explain it, they have cooperated. If they can't, they have plagiarized." Yes! (Ooops! Did I plagiarize your comment? Ah, well) $\endgroup$
    – Clive Long
    Commented Feb 4, 2022 at 13:54

How can I prove plagiarism? Sometimes they change variable names but the implementation as a whole is just too similar. One student even copied the comments word-by-word!

For code, I've found Stanford's MOSS (Measure of Software Similarity) to be an extremely useful tool. It compares submissions based on similarities in the abstract syntax tree rather than at the text level, so it sees right through attempts to hide plagiarism by renaming variables and reordering functions. It also lets you feed it any example or template code you provided the students, so you don't get a bunch of false positives for people who copied a few lines from the lecture slides.

It's designed to detect plagiarism between students, rather than from online sources, but there's nothing stopping you from grabbing some sample code off the web and including it along with the regular submissions.

The output will be a list of assignment pairs, sorted by similarity. You can then click on each pair to see the similar parts highlighted. It is, like all such tools, to be used to get a shortlist of assignments you need to look at more closely, rather than a substitute for for hand-checking. That said, the false positive rate was very low in my experience, and there was usually a big drop in similarity scores where the plagiarized assignments ended and the ones that used similar ideas began.

How can I help the students improve rather than just say 'you got 0 for plagiarism'?

If you want to give them the benefit of the doubt, you can tell them:

  1. "If you use material you got from somewhere else, cite it. It doesn't matter if you rephrase it; if you use someone else's ideas, give them credit. Sometimes an idea is common knowledge and doesn't need to be cited, but you can't go wrong by erring on the side of citing (or by asking the TA or professor)."
  2. "If your submission consists entirely of code you found on the web, and you cite it properly, you won't get a zero for plagiarism. You will get a zero because the assignment was to write code and you didn't do that." (I failed to include this caveat once; you can guess what the results were.)

Having done so, if they still plagiarize, they're beyond help. Failure to know what constitutes plagiarism may be the fault of their grade school teachers who failed to explain it properly. If, knowing the definition, they still do it, it's a failure of ethics. Give them a zero and inform the professor so they can be sent to the academic misconduct board. It's hard not to feel bad if the consequences are severe, but dishonesty is harmful (or even dangerous) in science and engineering. Going easy on the cheater risks harming others. (This assumes that you're certain they plagiarized. Throw the book at them if you can prove it, but keep the standards of proof high enough to eliminate false positives.)


As TA you need to be aware of your end goal. Do you wish to get students punished by the uni for their behavior? They may get suspended or expelled which hurts their education and future prospects.

I would go this route only in cases of blatant and repeated offenses.

I suggest solving the cases internally and turning them into teachable moments.

Invite the suspected students one by one and explain that their solution looks suspiciously similar to a blog post. Ask them to explain the similarity. Of course, initially, all students will deny any wrongdoing. However, you can inquire about the details and ask them to expand their solution on the spot.

One of three things will happen:

  1. Their answers will expose the plagiarism. Punish them as you and your prof see fit.

  2. You will find that students indeed got overly inspired by the solution online, however their understanding of it matches the course objectives. Warn them about copying stuff from the internet and let them go.

There is nothing inherently wrong with using resources online to solve problems. Especially, in a field like CS. The issue is if they do it without much understanding.

  1. Your suspicions will be removed because there are only so many ways to solve the problem.

In either case, update the assignment to minimize the chances that there is a solution online.

  • 1
    $\begingroup$ "Do you to get students punished by the uni for their behavior? They may get suspended or expelled which hurts their education and future prospects." This is not exactly untrue, but it is a twisted way of thinking about it. Who broke the rules in spite of being made very aware of the consequences? There are consequences to actions determined by the institution that the students agreed to when they matriculated. You may choose to have mercy, but you make it sound like the instructor (as a representative of the school) should feel culpable for enforcing the rules. They should not. $\endgroup$
    – Ben I.
    Commented Feb 4, 2022 at 13:23

Can you arrange a class with the Student, Lecturer and you. Let them write one of the program (simplest one) on a piece of paper.

The students who can write it correctly without a code editor are the ones who understands the concept however lazy to write it all over again - we can somehow let them go with a good grade because the purpose of teaching them is complete.

Those students who can't do are the one should get a Zero plus a self guilt that everyone now knows they copied their assignments without knowing a bit how it is done. I am sure they won't repeat the same thing again and you will not have to say them that "You copied the assignments".


What to tell students that plagiarised their programming assignment?

Where I went to school, one would tell the students, "You have now received a grade of F for this course. For this violation of the University's Academic Integrity Policy, you have been given 1.0 sanction points. An accumuation of 1.5 sanction points will result—depending on the circumstances—in your suspension or expulsion from this school."

How can I prove plagiarism?

At my school, the standard is Preponderance of Evidence, which means "evidence...of greater weight...than evidence to the contrary".

So it's your evidence against theirs (and if they're relying on a 1-2% difference in word choices as their evidence, then I pity them).


Not the answer you're looking for? Browse other questions tagged or ask your own question.