I’m currently pursuing a Masters degree in Computer Science. I’m a little over halfway through the program so I’ve had exposure to several different classes. To date I’ve not seen a class which required programming where I got a sense that the code I handed in was ever looked at by a TA or a professor. Asking around, this does not appear to be an atypical experience. Some schools have quality standards for the code written by their students but many do not. If it compiles and accomplishes the task, that is sufficient for a good grade.
I totally understand why this happens. The teacher/student ratio is low. Looking at code is difficult and time consuming. Often the professors want to let the students work in their own choice of language. In that case, trying to stay on top of Ruby, C#, Java, C++, Perl, Lisp, Haskell, etc. is probably too much to ask. This begs the question though of whether it is a good practice.
If you need code to do something simple (as most assignments do) and only the outward behavior matters, hacking it together will suffice. Why bother freeing memory or checking error conditions? Why bother commenting the code? Why even validate your inputs? These are all things that are absolute musts in the industry. If you write code that doesn’t handle errors, leaks like a sieve, and is hard to maintain, you’ll be looking for work quickly.
After 4 years of programming like this, one gets into some pretty bad habits without some checks on quality. Wouldn’t it be better if we had something akin to code reviews for code which was handed in?