User: Password:
Subscribe / Log in / New account

Consistent coding style

Consistent coding style

Posted Mar 3, 2008 3:48 UTC (Mon) by jzbiciak (subscriber, #5246)
In reply to: Consistent coding style by giraffedata
Parent article: Merging drivers early

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
coarse grain.

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.

(Log in to post comments)

Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds