Re:The Only Coding Standard You'll Ever Need
by phleet on Friday August 10, 2012 @02:42PM
(#4367562)
I completely agree with you.
I've followed many different coding standards, none of which perfectly match what I use for my own code.
Even if the coding standard was different in every way from what I like, it's still better than me doing it the way I want to and everyone else doing it their own way.
Coding standards are not about choosing the "one true way", but about consistency, just like you say. Whenever I see anything in a codebase that breaks any convention (whether a programming language one, an idiomatic one, a naming convention or anything), I assume it breaks it _for a reason_, and that I need to investigate why.
Having a consistent style also increases the usefulness of automated tools and search/replace.
I've followed many different coding standards, none of which perfectly match what I use for my own code.
Even if the coding standard was different in every way from what I like, it's still better than me doing it the way I want to and everyone else doing it their own way.
Coding standards are not about choosing the "one true way", but about consistency, just like you say. Whenever I see anything in a codebase that breaks any convention (whether a programming language one, an idiomatic one, a naming convention or anything), I assume it breaks it _for a reason_, and that I need to investigate why.
Having a consistent style also increases the usefulness of automated tools and search/replace.