Please enable JavaScript.
Coggle requires JavaScript to display documents.
Programming Style Guidelines (Commenting (code can be self documenting…
Programming Style Guidelines
Commenting
code can be self documenting,self explanatory
RQA- Findability,Understandability,Maintainability,
Prologue comment, marginalia comments, internal comments, external comments
Role of comment-meta information, presentation and semantics
White Space
present code in two dimensions
Indentation, Vertical positioning Blank Line
RQA- Readibility, Findability
Naming
naming contributes to communicabiity and understandability of SC
hypertextification of source code can reduce semantic ambiguity
RQA- Findability, Understandability, Maintainability, Pronounceability
Input and Output
better to check input for semantic validity. Non negative real number
better to check input for semantic plausibility. The code must stay within limits
RQA-Understandability
Typing
type could either be built in or user defined
implicit type conversion. If test for equality is necessary then error tolerance approach could be used
RQA- Maintainability, Portability, Understandability
Initialization
always initialize variable prior to use
Predictability Issue, Portability Issue
RQA- Readability, Understandability, Maintainability
Assignment
Check incompatible type in assignment.1)Type mismatch 2)Type conversion
RQA- Readability, Understandability
Decision Structure
logical decision structure contribute to good programming style
RQA- Understandability
PEMDAS. Useful to check the boundary condition. All error conditions are taken into account