The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #6 (permalink)  
Old 03-26-2005
Kelam_Magnus's Avatar
Kelam_Magnus Kelam_Magnus is offline Forum Advisor  
Registered User
  
 

Join Date: Aug 2001
Location: DFW McKinney, TX,
Posts: 1,069
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.