Sponsored link Serve your customers, not your servers, with VERIO Linux VPS. Full-access test-drive here. |
CheckpatchCheckpatchPosted Feb 28, 2008 2:21 UTC (Thu) by vomlehn (subscriber, #45588)Parent article: Merging drivers early
A consistent coding style means that you do not have to spend as much cognitive energy on deciding which things are unimportant distinctions. Thus, even though I don't agree with all of the kernel code style guidelines, the kernel code I write adheres to it and I have begun using checkpatch religiously to ensure I get it right. I'm definitely a checkpatch fan.
(Log in to post comments)
here, here! Posted Feb 28, 2008 16:17 UTC (Thu) by sbishop (subscriber, #33061) [Link] I worked as an assistant/tutor in my university's computer science lab. We had two professors who taught the introductory courses, one who enforced a coding style and one who didn't. The other assistants and I often commented on how much easier it was to help the students in the class where a consistent style was enforced.
hear, hear! Posted Feb 28, 2008 16:52 UTC (Thu) by JoeBuck (subscriber, #2330) [Link] The expression is "Hear, hear!", meaning "everybody listen to what this guy said".
Consistent coding style Posted Feb 29, 2008 19:37 UTC (Fri) by giraffedata (subscriber, #1954) [Link] We had two professors who taught the introductory courses, one who enforced a coding style and one who didn't. The other assistants and I often commented on how much easier it was to help the students in the class where a consistent style was enforced. Was it because the style was consistent or because the professor picked a good style? I spent the early part of my software engineering career at a large company that had company-wide coding standards. I was taught, and believed, that it is easier for someone to read code where the indentations are where one expects them, the variable names in the case one is used to, etc. Later, I started working with open source code written by the public at large and found that it's actually trivial to adjust to someone else's style, as long as we're just talking about arbitrary style differences. Adjusting to a bad style, such as using global variables or 500 line subroutines, is obviously another matter.
Consistent coding style Posted Mar 3, 2008 3:48 UTC (Mon) by im14u2c (subscriber, #5246) [Link] 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.
|
Copyright © 2008, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds
Powered by Rackspace Managed Hosting.