I don't think it equates to sloppy handwriting. If the code was poorly constructed or if it wasn't documented at all, then fine. But the problem here is the professors, not the codes.
Why tell the students that they can use any language they want if he's going to show bias as to which language they choose? The penalty was because the professor didn't understand a langauge that he said the person could use. How can you say someone can use something and then penalize them because of your lack of familiarity with it? If only languages X, Y and Z are going to get a fair shake, why wasn't that conveyed up front?