Often my programs are over half comments, but most of those comments are
up at the top.? The code is kept tight so that when I am seriously getting my head into it
I am not distracted by a lot of chatty comments or having to flip through pages and pages.
Or screens and screens, or popping about through different files.?
The comments up top often become a terse skeleton of a manual,?
plus notes for coders that follow.? Can have web references to datasheets
and small excerpts from them.? Occasionally ASCII timing diagrams, perhaps
showing how some GPIO ports talk to a peripheral.? Having all of that in the same file
makes it more likely I'll keep the material in sync with the code.
Much of the coding I have done in the last 20 years has been VHDL.
Can be harder to grok, since there is no central processor finding a path through the code.
All the code executes all the time.? That has contributed to my coding style.
Jerry, KE7ER
toggle quoted message
Show quoted text
On Mon, May 7, 2018 at 05:59 am, Dennis Zabawa wrote:
My advice is? to comment, comment, comment.? Use variable and procedure names that are descriptive.? As Jack said, that clever, little bit of coding you did last week may read like sanskrit? today.??