NASA C Style Guide [pdf]
homepages.inf.ed.ac.uk
NASA C Style Guide [pdf]
1–10 of 33 posts
Re: NASA C Style Guide [pdf]
#2Re: NASA C Style Guide [pdf]
#3Re: NASA C Style Guide [pdf]
#4Re: NASA C Style Guide [pdf]
#54 space indentation and not tabs. What would Hendricks say?!
Re: NASA C Style Guide [pdf]
#6 if(condition)
{
expression...
}
instead of the obfuscated form: if(condition) {
expression...
}Re: NASA C Style Guide [pdf]
#74 space indentation and not tabs. What would Hendricks say?!
Spaces really only works easily when everyone uses an editor that can convert presses of the tab key into some number of space characters.
The only solution that works easily in all cases is to flatly refuse to collaborate with others.
Re: NASA C Style Guide [pdf]
#8MISRA is another standard that's popular and I've seen a bunch of code developed using this standard.
But the problem with style guides, they have lots of points that are very agreeable, but it is all undone if you don't have clean well designed code. I've seen too much emphasis on conforming to the style guide (often because of contractual agreements on the developed code). But the more important part of making the code clean gets less attention because it is harder to quantify and harder to enforce via static analysis.
however, that doesn't mean it's a bad thing to have, it's just that conformity to a style guide is a very low bar in terms of quality.
Re: NASA C Style Guide [pdf]
#9I see the brace goes on the next line, as it should: if(condition) { expression... } instead of the obfuscated form: if(condition) { expression... }
Re: NASA C Style Guide [pdf]
#10I get that coding standards are a good thing and plain-simply following these will produce "readable" and (possibly) maintainable code, but will that make the code any _better/efficient_ ?
Though this does catch some "gotchas" in C, like the if-if-else and the #define trap, I wonder if the Code Review involves a guy rejecting my patches with the comments, "you have missed out guideline 6.4.3.5 defined in page 54".