Explain 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 Code review for a model is carried out after the module is successfully compiled and the all the syntax errors have been eliminated. Code reviews are extremely cost-effective strategies for reduction in coding errors and to produce high quality code. Normally, two types of reviews are carried out on the code of a module. These two types code review techniques are code inspection and code walk through.

Code Walk Through

  • Code walk through is an informal code analysis technique
  • In this technique, after a module has been coded, successfully compiled and all syntax errors eliminated
  • A few members of the development team are given the code few days before the walk through meeting to read and understand code
  • Each member selects some test cases and simulates execution of the code by hand
  • The main objectives of the walk through are to discover the algorithmic and logical errors in the code
  • Even though a code walk through is an informal analysis technique, several guidelines have evolved over the years for making this na├»ve but useful analysis technique more effective

Code Inspection

  • In contrast to code walk through, the aim of code inspection is to discover some common types of errors caused due to oversight and improper programming
  • In other words, during code inspection the code is examined for the presence of certain kinds of errors, in contrast to the hand simulation of code execution done in code walk through
  • For instance, consider the classical error of writing a procedure that modifies a formal parameter while the calling routine calls that procedure with a constant actual parameter
  • It is more likely that such an error will be discovered by looking for these kinds of mistakes in the code, rather than by simply hand simulating execution of the procedure
  • In addition to the commonly made errors, adherence to coding standards is also checked during code inspection
  • Good software development companies collect statistics regarding different types of errors commonly committed by their engineers and identify the type of errors most frequently committed

Leave a Reply