It’s no secret that i’ve had a job on the side for a number of months now tutoring programming at the local university. I won’t get into the gritty details about the experience (at least not yet), but I want to briefly talk about my experience with catching out students who have cheated in their assignments.
The subject is Visual Basic .NET. I’m not a great VB.NET programmer, in fact i’m not a VB.NET programmer at all, but i’m able to stay one week ahead of the students and generally have an answer to the questions they ask. If I don’t have an answer, I at least offer the consolation of providing them a solution in C# :). The major assessment for this subject is to write a project (based on some given specs) in VB.NET and submit your working binaries + all code in a compressed ZIP file, and we mark it based on some marking scheme.
When the project works, I don’t really need to delve into too much depth when assessing their solution. The fact that it works indicates they’ve understood at least the majority of what was being asked of them and I’m satisfied that it works.
However – when it doesn’t work, my triggers get fired. Why did they submit an assignment which doesn’t work?. I attach a debugger, and start looking at code. Any programmer will understand what i’m about to say…Code, is a lot like a face. You see it once and then in future, although you might have a problem figuring out WHERE you originally saw it, you’ll recognise the same code.
Where am I going with all this? Well firstly – I found one assessment which didn’t work. Attached debugger, saw code, imprinted in brain. 3 DAYS LATER I opened another person’s assignment, assignment didn’t work (hmmm i’ve seen an error like that before….), attached a debugger and saw code (hmmm….I know i’ve seen that code before….). Hopefully now the title of this post makes more sense. So yes, I indeed did find two students who cheated. They used the same code, and made obvious attempts at trying to cover it up….Not terribly clever attempts, mind you…Which then led me to wonder how many others have also done the same thing…And here’s where I talk about my QnD app to check for duplicates.
Some time back, I posted about some technologies I wanted to play around with. This was a good opportunity to start with that and some features of framework 3.5 i’ve been meaning to try out.
The basic idea behind the utility is to search through a folder (and its subfolders) and find files which are identical (or similar). I want it to be modular so that I can write several different algorithms for determining similarity and swap them in/out easily. The first iteration I knocked together in a few hours and sure enough, I found another set of students who had copied their work. The first algorithm used is just a straight file-compare. Nothing fancy, just straight text comparisons. If two students have the same code byte for byte, they would need the excuse of the century to explain how it is not plagiarism.
Although I haven’t added Castle Windsor to it yet, i’ve at least written it in such a way that it will be easy for me to implement. Code is attached below in case you wish to go forth and conquer.