Re: What are the best practices? -
03-07-2008
My pet gripe actually applies to the willy-nilly (technical term) application of printf in embedded C environments. The stdio library, and associated others, are rather (read: insanely) large for the severely limited resources of embedded systems. That, and it's useless in most cases (although some systems redirect such output to a serial port). So I guess that turns into: use your selected language as it's supposed to be used. VHDL (for any that have dabbled in it) shouldn't be treated like C, C shouldn't be treated like Java, etc etc etc.
Fairly obvious, I know, but my workplace doesn't always believe in such things as common sense.
Other than that, I'll second things like keeping a constant coding standard, don't let comments outweigh the source code (note that I distinguish between comments as meant to better understand code flow, and "comments" that are really documentation). And if code smells bad, it probably is.
Interestingly enough, I have to create a presentation on embedded programming guidelines for students now.
|