Coding Standards

PURPOSE OF HAVING CODING STANDARDS :

  1. A coding standard gives a uniform appearance to the codes written by different engineers.

  2. It improves the readability, and maintainability of code and reduces its complexity also.

  3. It helps in code reuse and easy to detect errors also.

  4. It helps increase in efficiency of the programmers.

    LIMITED USAGE OF GOBLE VARIABLES :

This type of rule tells about which type of data can be declared global and the data that can't be.

STANDARD HEADERS FOR DIFFERENT MODULES :

For better understanding and maintenance of the code, the headers of different modules should follow some standard format and information.

  • The class name should follow the pascal casing.

  • The method name should follow the camel casing.

NAME CONVERSION FOR LOCAL VARIABLES AND GOBEL VARIABLES :

  • Local variables should follow camel casing which starts with small letters.

  • Gobel variables should follow pascal casing which starts with capital letters.

  • It is better to avoid digital in variable names.

The name of the function should be written in camel casing.

ADVANTAGES OF CODING STANDARDS :

  • Easy to understand for other programmer actual what the code does .

  • Easy to rewrite the code .