|
I think all of this leads to a few words that my prof in college taught me.
Modularity...
Write code in modules/sections so that nothing is hard coded where possible and that sections of the code can be excluded/replaced/deleted and the program will still function with no other modification.
Documentation....
If your programming out lives you, the next person will need to know what the heck you were doing. reading the code can be confusing, but comments help greatly.
Use of echo...
When troubleshooting your scripts insert echo commands in loops and wherever a decision is made in a forking statement like if/then/else or while/true or in case statements..... this aids in making sure to test all your logic down every path.
|