Trampas,

I agree simple is better than cute or complicated.   break up complicated code.  let the compiler do what it can with it to make it more efficient.  Likely not a lot different from the result of doing the 'cute' code.

Scott,

Documentation needs to cover the things that are not obvious.   I always write it to myself to explain it to myself in a few months assuming I completely forgot why I did something the way i did.  I try and leave enough info for me and the next person out of kindness :-)



On 4/23/2022 12:09 PM, Scott Hall via TriEmbed wrote:
Doxygen (https://www.doxygen.nl/index.html) was always my goto tool for code documentation, and help in reverse engineering someone else's code (including my own after a year or more) for altering or updating code.  And it has been around since the mid-1990's.

- sgh

On Sat, Apr 23, 2022 at 11:33 AM Trampas Stern via TriEmbed 
<[email protected]> wrote:

    I have some rules which I follow with code, the number 1 rule is:

    *Code must be understandable by the next person.*

    If you need a tool to explain the code you have failed.  However if you are 
learning C and want to understand the basics then it might be a good learning 
tool.

    Note I have the rule above and strive to meet it, but I often fail. Seems 
the next guy is never as smart as I was, especially when the next guy is me in 
a few days/months.

    Trampas

_______________________________________________
Triangle, NC Embedded Interest Group mailing list

To post message: [email protected]
List info: http://mail.triembed.org/mailman/listinfo/triembed_triembed.org
TriEmbed web site: https://TriEmbed.org
To unsubscribe, click link and send a blank message: 
mailto:[email protected]?subject=unsubscribe
Searchable email archive available at 
https://www.mail-archive.com/[email protected]/

Reply via email to