3. Objective of Software Coding
• Transform Design of a system into code.
• And then to test this code.
• Programmers should adhere well defined.
standards for coding called coding standards.
3
4. Why Coding Standards and Guidelines?
• They are required for:
Software maintainability
To Add features to software
Clean coding
Error free/ Very few errors in the code.
Easy debugging
4
5. Coding Guidelines
• Coding Guidelines are rules about how to write
code so that it will be:
• Consistent
• Robust
• Easily Understood
5
6. Coding Standards
• Coding standards are coding guidelines, which
are acceptable to the entity(e.g. Software
Company) that is paying the coder for writing
that code.
• Gives uniform appearance to the codes.
• It enhances code understanding.
• It encourages good programming practices.
6
7. Representative Coding Standards
• Limiting the use of global data type
• Contents of the headers preceding codes for
different modules
• Naming conventions for global variables, local
variables, and constant identifiers
• Error return conventions and exception handling
mechanisms
7
8. Google’s Java coding standards
• No wildcard imports.
• Overloads appear sequentially.
• 2 spaces indentation.
• Braces are used even when the body is empty or
contains a single statement.
• Column limit can be 80 or 100 characters.
• No C-style array declarations.
• The default statement in switch statements are
required.
9. Code Review
• Code review for a model is carried out after
the module is successfully compiled and the
all the syntax errors have been eliminated.
• Normally, two types of reviews are carried out
on the code of a module
• Code walkthrough
• Code Inspection
10. Code Review
• Code walkthrough
• To discover the algorithm and logical errors.
• Code Inspection
• The aim of code inspection is to discover some
common types of errors caused due to oversight
and improper programming.
11. Software Documentation
• Software Documentation is written text
accompanying software
• It’s varies from people to people depending on
their role.
• It is very useful aspect of Software
engineering.
12. Software Documentation
• Software Documentation includes:
• Requirements
• Architecture/ Design
• Technical – Documentation of code/Algo.
• Manuals for End-User.
• Marketing – Demands and analysis.