1.9 GOOD PROGRAMMING PRACTICES (NAMING CONVENTIONS, DOCUMENTATION, INDENTATION).

  • A good programming practice includes use of function and variables relevant to task, well placed indentation, commenting code for convenience of the reader and overall presentation of the program. This makes the program code readable and understandable to all which in turns makes debugging and error solving easier. Also, proper coding style makes us easy in documentation and updation.

  • Practice of coding style varies with organizations, operating systems and language of coding itself.
  • Following coding elements may be defined under coding guidelines or good programming practices:

  • Naming conventions: This section defines how to name functions, variables, constants and global variables.

  • Indenting: This is the space at the beginning of line, usually 2-8 white-space or single tab.

  • White-space: It is generally omitted at the end of line.

  • Operators: Defines the rule of writing mathematical, logical or assignment operators.

  • Control structures: Defines rule of writing control structures if-else, case-switch, while and for in nested fashion.

  • Line length: Defines how many characters should be there in one line.

  • Functions: Defines how functions should be declared.

  • Variables: Defines what data types should be used.

  • Comments: This is one of the important components, as comments are to describe what actually code does and other descriptions. This helps in creating documents for other developers.

  • Documentation: Documentation is the art of writing the information down. Documentation works as a key tool for software designers, developers and test teams to carry out their respective tasks.

0 Comments:

Post a Comment