How to deal with student putting their (home)work on github

Give students assignments where their work must address one of their personal interests. For example, instead of having every student program pizza maker, have each student program a machine to make their favorite food. This will make copy-and-paste cheating more difficult. It will also make students more interested and make your grading more interesting.


I think your point 1 is fundamentally at odds with preventing homework sharing/copying. If someone can showcase their work, they can showcase it to their fellow students. Your points 2 and 3 suggest you want to re-use the same assignment over and over when teaching the class again, which makes this conflict even more inevitable. There's no way to allow students to share their work publically with anyone who might want to employ them, while also keeping it secret from their fellow students.

There's nothing you can do to keep everything a student does in your class hidden forever. I think the best solution is to require students to keep their work private during the class (using a Github edu account, Bitbucket, local git repo, whatever), then let them do whatever they want later. That means you will have to make new assignments every time you teach the class, but I think that is good practice anyway.


There are many things to balance here, and the "best" solution is somewhat subjective.

However, in my opinion, the educational benefit of allowing students to learn version control early far outweigh the increased risk of exposing their code to others who would cheat. If your students are planning to go on to work as programmers in industry, being skilled with version control is almost as valuable as being skilled with coding. Programming is not a solitary task these days, after all.

Another thing to consider: at my undergraduate university, there was no department-wide policy on public version control (and I don't remember any professors having such a policy). However, I remember hearing it suggested that posting code on a public GitHub violated the general policy against plagiarism. This sort of ambiguity is bad for everyone. Whatever you decide is the right way to go, I would recommend stating your expectations explicitly with respect to public version control.