Yesterday in an informal COSC208 (C and C++ programming) lecture at the University of Canterbury, discussion broke out on how to teach and learn coding Style. Here are my 2 cents;
I believe it's not possible to effectively teach & learn Style with single-developer programs that have a clearly limited life span -- such as all code written for COSC208 and most undergraduate university papers. Once the paper has finished and the grade has been determined, who is going to maintain the student's code? Who is going to read your code? No one. So why would the author/programmer/student bother to make it easy to read or maintain, or care for Style? They would not -- except if the prof mandates it. But as pointed out yesterday, that is very resource-consuming and fails to teach an appreciation for Style.