Coding PDF
Coding PDF
• Coding is undertaken once the design phase is complete, and the design documents have been
successfully reviewed.
• In the coding phase, every module specified in the design document is coded and unit tested. During
unit testing, each module is tested in isolation from other modules. That is, a module is tested
independently as and when its coding is complete.
• Integration and testing of modules is carried out according to an integration plan. The integration
plan, according to which different modules are integrated together, usually envisages integration of
modules through a number of steps.
• During each integration step, a number of modules are added to the partially integrated system and
the resultant system is tested.
CODING
• The objective of the coding phase is to transform the design of a system into code in a high-
level language, and then to unit test this code.
• The input to the coding phase is the design document produced at the end of the design phase.
• Design documents contain not only the high-level design of the system in the form of a module
structure (e.g., a structure chart), but also the detailed design.
• The detailed design is usually documented in the form of module specifications where the data
structures and algorithms for each module are specified.
• Good software development organizations require their programmers to adhere to some well-
defined and standard style of coding which is called their coding standard.
• The main advantages of adhering to a standard style of coding are the following:
• A coding standard gives a uniform appearance to the codes written by different engineers.
• It facilitates code understanding and code reuse.
• It promotes good programming practices.
• Besides the coding standards, several coding guidelines are also prescribed by software companies.
• But what is the difference between a coding guideline and a coding standard?
• It is mandatory for the programmers to follow the coding standards. Compliance of their
code to coding standards is verified during code inspection. Any code that does not
conform to the coding standards is rejected during code review and the code is reworked
by the concerned programmer.
• In contrast, coding guidelines provide some general suggestions regarding the coding style
to be followed but leave the actual implementation of these guidelines to the discretion of
the individual developers.
Coding Review:
• Code review for a module is undertaken after the module successfully compiles. That is, all the
syntax errors have been eliminated from the module.
• Obviously, it does not target design syntax errors in a program but is designed to detect logical,
algorithmic, and programming errors.
• It has been recognized as an extremely cost-effective strategy for eliminating coding errors and for
producing high quality code.
• The following two types of reviews are carried out on the code of a module:
1. Code inspection:
a. the code is examined for the presence of some common programming errors.
b. this is in contrast to the hand simulation of code execution carried out during code
walkthroughs.
c. The objective is to check for the presence of some common types of errors that
usually creep into code due to programmer mistakes and oversights and to check
whether coding standards have been adhered to
2. Code walkthrough:
a. an informal code analysis technique
b. the objective is to discover the algorithmic and logical errors in the code.