Sometimes, uncomfortable things happen. One of these is cheating on exams by students. A hard thing to catch is cheating by software plagiarism; this typically occurs when students are given a take-home exam where they are expected to produce a working computer program. It is, of course, easier to copy someone else’s program than writing the whole thing yourself.
Without explaining my motivation right now, I recently wrote my own little plagiarism detection program in python, which is (usually) my programming language of choice. For no good reason at all I named the script plagiarismatic. The bad news is that it is too primitive to really impress anyone – the program simply uses string comparison on lines of programming code. The… Um… Well, the good and bad news, is that the script has nonetheless proven itself to be useful in the near past. If you happen to be interested in either using the program, or helping me develop it, you can visit my repository located at gitorious. The really nice thing about my script is that it consists of one single standalone text file, and runs Fast Enough™ on your local computer. I have sketched some possible ways of improving my script on the gitorious wiki – time will show if that ever happens.
A much better way of detecting software plagiarism than my naive program is the free service Moss maintained by Alex Aiken at Stanford. It is better than my program in every conceivable way save for two: (1) my script is free software, and (2) it runs locally everywhere you can run python (e.g. Windows, Mac, and Linux), so there is no need to upload files to a server and all that hassle.