Why I Have Given Up on Coding Standards
richardrodger.com
richardrodger.com
My favorite tools (FindBugs, CheckStyle, PMD, JSlint, CppCheck, valgrind, vera++) can all be incorporated into a system I consider invaluable - Sonar (http://www.sonarsource.org/). If you add the SIG MM plugin (Software Improvement Group - Maintainability Model), you should have the tools you need to know how good your code really is.
Of course, whether you strictly follow every recommendation or not is up to you (there are false positives), but at least you have a basis for deciding what your "coding guidelines" should be.
I would much rather work under a standard that was the total opposite of what I am used to, that have none at all...
Next week I expect a blog of 20 pages explaining why you don't document code as it takes too much time typing.
Of course I totaly disagree with the author, but I highly suspect that in a few years time he himself will also agree to disagree.
Standards are whilst not perfect a level of commonality that binds the code so that others can see and use the code, oh and adds other perks like reduces bugs, makes things just easier for others to work on others code. But anybody who just codes by themself not touching others code will equaly have a mentality that standards are wrong. See the problem.
I'd accept an argument against poor, or draconian standards, but actually standards can stop people from doing dumbass stuff or hitting subtle gotchas - esp. useful for junior developers who might not understand the intricacies of static initialisation order or memory alignment in C struct layout...
Things like the two you mentioned are useful as a code standard, but they're also things that junior devs should be learning from senior devs in the process of work anyway. There's no point slavishly following a standard if you're going to never learn from it.
Well, by definition, you've just created a coding standard.
We often just start out using the standard of someone who has thought it through.
Crockford for JS, Microsoft for C# and Google for Java.
If someone raises a complaint, we do consider it but then the onus is on the developer to justify why it should be changed and that means the developer has to have thought out his/her idea, which is what you really want to begin with.
If it's something as trivial as marking members with "_" or "m_" then it will be a non starter due to,as you said, it just doesn't matter as long as your consistent.
"Fourth, good intentions; best practices; professionalism; engineering – the seductions of process. You are chasing the same gold stars you got when you were eight years old. But how is the master craftsman judged? By results, only."
It's true that we love to talk coding standards and development processes because it feels productive. At the end of the day, delivering a working product is true productivity.
I agree that delivering is everything that matters... when you work alone and you won't ever have to maintain your code after release.
Throw in thousands of Correlation does not imply Causation logical fallacies on both sides, and you have one of the most dysfunctional and useless arguments in all of programming literature.
Synopsis: I like Michael Feathers’ comment that having Design Standards is much more valuable than Code Standards, but they need to be reviewed regularly in order to prevent stagnation and much of the same detriments mentioned in the OP.
this meant that the original author of the compilation unit (uh, file) had the freedom to do what he wanted, and other people who made modifications had to conform to the original format.
the results:
1. no fights over coding standards, although we did have plenty of banter
2. it taught people to respect the other people's style if they wanted their own style respected, thereby making everyone complicit and fluent in every style