12.02 Coding Standards
-
Modularity
- code should be modular in nature
- each major function in a software module
- module should not only contain structure but also process data
- Should increase code reuse and productivity
-
Clarity
- produced code should be clear for any person who reads the code
- naming conventions should be used for clarity
- should contain sufficient documentation inside code blocks
- should contain ample whitespaces
-
Reliability
- Reliability of source code can be increased by using Standard Practices during software contruction
- This can be achieved by designing the product with future enhancement in mind
- Generally during enhancements the existing structure is not able to take load of additional SC and thus becomes shaky
- It is better to restructure if the software design is limited than to write bad code on top of it
-
Safety
- Safety is a concern as software products are used in industries where human lives could be in danger
- In these industries the software product must operate correctly and have chances of error close to zero
- industries like medicine , healthcare and road safety need foolproof software to ensure human lives are not in danger and saved
- Software hence should be built with safety harnesses
-
Simplicity
- The SC should be simple without any unnecessary complex logic
- if same function can be achieved by simply logic then that should be used
- this can be done by adopting best practices
- for instance: OOPS concepts like abstraction and incapsulation add simplicity
- similarly product should be broken down into meaningful simple parts
-
Maintainability
- maintainence costs more than 70% of all software costs, including software development implementation and maintainence
- code should be written in a way that is easily maintainable during production itself
- this will make it easy to fix defects during maintainence