??? 01/18/11 10:56 Read: times |
#180681 - Good code for teaching Responding to: ???'s previous message |
I would suggest that gold standard code needs to follow two rules.
Firstly, it needs to follow an agreed coding standard, by which I mean more than just MISRA. A style guide should be followed. Secondly, every statement effectively needs a paragraph of comments to explain what it does and why the alternative 'bad' alternatives are 'bad'. As we are on 8052.com, the examples should not be structured for full portability as a code library but should at least be portable across compilers and vanilla processors. |