Is reusing old code for a new assignment considered self plagiarism? How to protect yourself if you consider it to be, and a group partner does not?

What should you do? You should ask the professor politely and without imposing your pre-judgement on whether this is or is not prohibited by the rules of the class. You are not in a position to make this judgement. The only person who can give a definitive ruling is the professor who set the rules.

I recommend an approach like:

My teammate has previously created code that would be very applicable to this project. Can we use that code, or does it count as an external library, and we should instead write it again as an exercise?

While you are waiting for a response, I would recommend proceeding in two ways in parallel:

  1. You implement a new version of the library from scratch, while
  2. Your partner builds upon the existing library.

That way, you get the educational value of building the library, rather than using the pre-existing library, and your partner can push on ahead without either of you being stalled while waiting for the result.


Like qsp, I'm not of the opinion that this is self-plagarism.

Nor do I think it's an 'external library' by any meaningful sense of the word. For that matter, what are you expecting him to really do - he's already written code to do this, even if he wrote it again from scratch, is he not allowed to refer to other things he's done? I constantly look back at old code (I did this in a clever way sometime last year...). Where do you draw the line - are you allowed to look back at your old code if you can't remember something basic, but know you've done it before?

If you want to make the argument that you won't learn anything if it's already done and implemented, I could understand that. The problem is that you've dug in your heels on making this an ethical issue when that's at best questionable, and to be frank, if you used the language you've used about your partner with me, you'd likely poison our working relationship as well.


Your question raises interesting issues of honesty, teamwork and psychology. Let's examine how some of those ideas interact in your situation.

Now, the course instructors have made it clear that we are not allowed to use any external libraries to perform certain classes of algorithms for this project. This students' prior code would fall under this category of prohibited tools, but he claims that it doesn't qualify because he wrote the code himself (so it is not an "external library"). I believe this is hyperbole, but he staunchly disagrees.

Okay, so you and your partner disagree about something; this is not an infrequent occurrence during a collaboration. However, it seems to me that you are approaching this debate from a point of view that assumes that there is some objective truth here, and furthermore feel very strongly that that truth is on your side: your partner's old code logically seems to you to be an external library, and you are having a hard time believing that anyone could honestly think otherwise, unless he is motivated by laziness or self-interest. Well, actually I think that's far from the case; not only is it not obvious to me and to some of the other users here whether old code will count as "external library" or whether reusing it counts as self-plagiarism, but I think even the course professor might not be sure and have to think a bit when asked this question (and I say this as a professor who has some experience being asked unusual questions that I did not expect by my students in connection to my course policies). So, a first piece of advice I would give you is to tone down your rhetoric a bit. Yes, maybe reusing old code is a bad idea and will be seen as dishonest, especially if done without acknowledging it. You are quite reasonable in being concerned about this and worrying about your reputation. You should certainly check this, but before you start throwing around words like "hyperbole", it's a good idea to be a little bit more humble, make fewer assumptions and be more open to the possibility that other very reasonable people may disagree with you about this.

It has gotten to the point where the other student and I cannot see eye to eye on this issue, and I am worried that if he refuses to simply accept that we have to do all the work for this project [...]

I think you need to remember that your partner is a member of your team. You are not his boss and cannot demand that he do things exactly the way you want or accept your way of thinking. Furthermore, this project is not just an exercise in programming, it is also meant to teach you teamwork -- the art of working as a team, which is something that's highly valued by employers, in some cases much more than specific programming or machine learning wizardry. When you talk about him "refusing to simply accept that we have to [do things my way]", and say that you have reached a point where you and your partner are close to being completely unable to work with each other, I see this as a failure to establish effective teamwork. Disagreements will come up in any collaborative project; you are now being tested on your ability to work through them effectively, by talking to your team member, and also by listening to him and being open to hearing and accepting his point of view.

Nobody has answered my question, they've only said, "it's not cheating". [...] that doesn't answer the question of how to handle it if it is cheating. That was my question. Assume it's plagiarism. How do you protect yourself?

Well, if all you want is an answer to your literal question and don't care to hear any additional analysis: if I had a project partner who was a cheater and I couldn't convince him not to cheat, I would not partner with him. I would go to my professor and ask to be partnered with someone else, or to be given a solo project if that's the only practical option, and explain that working with the current partner is ethically untenable for me.

However, if you are willing to consider additional analysis, I will venture to offer my opinion that you are asking the wrong question. Based on my understanding of your situation, I think you are too sure that you are in the right and your partner is in the wrong, and in this case, refusing to partner with him will reflect poorly on you, since it will indicate that you do not have good teamwork skills, which is part of what this project is meant to test and help you develop.

To summarize, the core of your question is actually about a simple matter of how to interpret a course policy that forbids the use of external libraries in a programming project. When professors write their course policies they don't always think of all possible scenarios that could arise, so it is not uncommon for ambiguities to exist. When this happens, the best thing to do is simply to ask the professor (but please ask politely and in a neutral way that does not assume what the correct answer is), then follow their instructions. If you do this, I don't see how your reputation can be hurt.