I don't think it is fair. Say you work very hard on your program, to get a 9. While you go to the toilet, I steal your code and submit it. I get a 4 for doing nothing, you get a 4 after a lot of successful work. If this happens the day before the deadline and I had nothing, I would have handed in nothing, and thus get a 0. So there is a clear benefit in cheating: I get more marks than even if I pull an all nighter and put together a crappy code that barely holds together.
I guess the reason to punish everybody equally is multiple:
- Discourage from people lending code to classmates.
- It is much easier than to try to figure out what happened and who is the original author.
But, the way I see it, there are a few objections
- There are still situations where a cheater may benefit from this scheme (half good is better than nothing); a cheater is being awarded points for doing exactly nothing.
- The original author may be innocent. The code could have been stolen. It is unfair to blindly punish without, at least, inquiring in the matter.
- Serial cheaters may get away with it and still get enough points to pass.
Edit:
What if the homework is given voluntarely? Consider the case where there are weekly assignments, with a high work load. Part of the point is for students to work and get efficient in problem solving. But, if instead of solving all of them, we share the work, change it here and there, perhaps they will not notice, I still work half of it, and maybe I get full recognition; maybe only half.
Now, say a given week you only had time to do half of them. Gambling is beneficial: if you go the ethical way, you get half the marks. If you cheat, you can either get half the marks, or get away with it if you are skilled or the grader is low on coffee.