I'm sure part of it is due to picking a reasonable style. Inexperienced programmers don't
necessarily know what "reasonable" is yet. I wouldn't doubt, though, that a good part of it
comes from the benefits of consistency across a code base.
Part of the reason it's often easy to adjust to a given FOSS project's style is that it's very
likely to be reasonable and consistent across the source base. Once you get accustomed to the
particular style/flavor, it's easy to see through it to the code. The fact that each source
file has the same style helps. Sure you have to switch gears when you come to the project,
but you're not doing it file to file. You're doing it project to project, which is a pretty
In the context of grading coursework, I see both aspects playing a role. You've gotten the
students off on the right path by giving them a (hopefully) reasonable style. Also, since
each assignment should be using the same style, you aren't having to switch gears with every
source file. When you are grading 100 assignments, I'm sure that makes a lot of difference.