This column is a follow-on to two articles I wrote a few months ago: Which coding standard is best for embedded software? and What’s the best C/C++ course for someone like me?
In the coding standard column, I mentioned the Embedded C Coding Standard by Michael Barr of the Barr Group. As I said in that column: “At only 88 pages, this isn't a large tome, but as far as I'm concerned it's worth its weight in gold.”
Well, shortly after penning those columns I joined Mike Barr's Embedded C/C++ Coding Standards group on LinkedIn. This group is for discussion specifically about making embedded systems safer, more reliable, and more secure by following one or more C or C++ coding rules.
As the “About This Group” description says:
One of the biggest potential benefits of coding standards has been too long overlooked: Adopting a coding standard can help keep bugs out! Here we discuss bug-killing coding standard rules for embedded C and C++ code, including those from MISRA and CERT for safe and secure systems.
This is a really interesting assemblage of folks (I see a lot of speakers from the Embedded Systems Conference in the 300+ and counting membership). Every few days I receive an email about a new topic and I bounce over to peruse and ponder the “back-and-forth” discussions between the experts.
Recent topics include the following:
- Should commas be used in variable declarations?
- Should ‘break’ statements ever be allowed?
- Should a function have just one ‘return’ statement?
- Should ‘while (condition)’ statements be allowed?
It's really interesting to see these points being debated in the specific context of embedded systems. Sad to relate, I find I'm often swayed one way and then the other by the opposing arguments, but at least I'm becoming more aware of the things I don't know and the potential implications of using certain statements and constructs in my code.
If you have an interest in this sort of thing, I think it would be well worth your time to join this group. If you are just starting out in this area, then the folks in this group are a great bunch to know. Alternatively, if you are an expert, then it would be wonderful if the rest of us could bask in the glow of your experience and expertise.