??? 02/11/11 11:00 Modified: 02/11/11 11:10 Read: times Msg Score: +1 +1 Informative |
#181034 - Setting a Bad Example |
In an old thread (now, unfortunately, locked):
I said:
Oliver Sedlacek said:
Of particular note I'm annoyed by ... Poor coding standards I'm afraid I would tend to agree. :-( Someone made the same comment recently on the STM32 forum; this was my reply I said: ST (like too many others) seem to have totally missed the point and target audience of "sample" or "example" code:
* The Purpose is to inform and explain; * The Target Audience is people who are not familiar with the software and/or the hardware. Clearly, these are not served by terse and/or sparse comments, nor by using any kind of "clever tricks" in the source code. Sample code needs to be exemplary in both the quantity and the quality of its comments, and those comments need to clearly describe each step of the process, and each variable used, and the project settings, etc - as well as giving an overview! "It'd be nice if there were lots of comments to explain what is going on." Not just "nice" - absolutely essential if it is to serve its purpose as example code! "Then again how many people do that?" But "most people" are not writing example code! The specific purpose of example code requires it! https://my.st.com...tviews=333 See: http://www.8052.com/forumchat/read/174319 I just came across this article, where the author gives a similar opinion: Nigel Jones said:
I bought an ... evaluation board ... and started browsing the example code that came with it. To my dismay I discovered a plethora of what I consider to be shoddy coding practices.
http://embeddedgurus.com/stack-ove...le-part-1/ |
Topic | Author | Date |
Setting a Bad Example | 01/01/70 00:00 | |
yeah | 01/01/70 00:00 | |
do not blame the messenger | 01/01/70 00:00 | |
Don't shoot the pianist | 01/01/70 00:00 |