0% found this document useful (0 votes)
24 views

Coding PDF

1. Coding is undertaken after design is complete, where each module specified in design documents is coded and unit tested independently. 2. Modules are then integrated according to an integration plan, where a number of modules are added to the partially integrated system and tested at each step. 3. Coding standards and guidelines provide uniform coding styles and practices to promote code understanding, reuse, and good programming. Adherence is mandatory for standards but guidelines leave implementation to discretion.

Uploaded by

aj pj
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views

Coding PDF

1. Coding is undertaken after design is complete, where each module specified in design documents is coded and unit tested independently. 2. Modules are then integrated according to an integration plan, where a number of modules are added to the partially integrated system and tested at each step. 3. Coding standards and guidelines provide uniform coding styles and practices to promote code understanding, reuse, and good programming. Adherence is mandatory for standards but guidelines leave implementation to discretion.

Uploaded by

aj pj
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

CODING AND TESTING

• 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 Standards and Guidelines:


• Representative coding standards:
1. Rules for limiting the use of globals: These rules list what types of data can be declared
global and what cannot
2. Standard headers for different modules
3. Naming conventions for global variables, local variables, and constant identifiers
4. Conventions regarding error return values and exception handling mechanisms
• Representative coding guidelines:
1. Do not use a coding style that is too clever or too difficult to understand
2. Avoid obscure side effects: one that is not obvious from a casual examination of the code
and make it difficult to understand a piece of code.
3. Do not use an identifier for multiple purposes
4. Code should be well-documented
5. Length of any function should not exceed 10 source lines
6. Do not use GO TO statements: makes a program unstructured and very difficult to
understand, debug, and maintain

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.

You might also like