Skip to main content Accessibility help
×
Hostname: page-component-76fb5796d-45l2p Total loading time: 0 Render date: 2024-04-29T17:27:53.760Z Has data issue: false hasContentIssue false

9 - Code Reviews

Published online by Cambridge University Press:  05 July 2012

Arjen Markus
Affiliation:
Deltares, Delft, The Netherlands
Get access

Summary

There is extensive literature on reviewing code and design documents as a means to check that the software is performing as it should and that the implementation is maintainable and understandable. Some development methodologies, such as Extreme Programming [16], prescribe continuous reviews by peers [40]. In all forms, code reviews are about finding defects in the code, but they are not intended to criticize the programmer.

While the procedural (and psychological) aspects of code reviews are widely described, some practical aspects are not. For example, what should you be looking for in the code? It is not enough to check that the code adheres to the programming standard of the project it belongs to. Such a standard may not exist, be incomplete, or be focused on layout, not on questionable constructs that are a liability (see Appendix B).

What do you want to achieve with code reviews? First, you want to verify that the code is doing its job and that the code is of good enough quality:

  1. ■ It is readable by others than the author.

  2. ■ It is maintainable – adding new functionality or correcting bugs should not amount to hard labor.

  3. ■ It is testable – do you understand what goes in and what comes out?

Secondly, the code should be portable. This means it should be possible to build the program and run it on a different operating system, and also with different compilers and versions of that same compiler. Many compilers offer options to check against the language standard.

Type
Chapter
Information
Publisher: Cambridge University Press
Print publication year: 2012

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

Save book to Kindle

To save this book to your Kindle, first ensure coreplatform@cambridge.org is added to your Approved Personal Document E-mail List under your Personal Document Settings on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part of your Kindle email address below. Find out more about saving to your Kindle.

Note you can select to save to either the @free.kindle.com or @kindle.com variations. ‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi. ‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.

Find out more about the Kindle Personal Document Service.

  • Code Reviews
  • Arjen Markus
  • Book: Modern Fortran in Practice
  • Online publication: 05 July 2012
  • Chapter DOI: https://doi.org/10.1017/CBO9781139084796.011
Available formats
×

Save book to Dropbox

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Dropbox.

  • Code Reviews
  • Arjen Markus
  • Book: Modern Fortran in Practice
  • Online publication: 05 July 2012
  • Chapter DOI: https://doi.org/10.1017/CBO9781139084796.011
Available formats
×

Save book to Google Drive

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Google Drive.

  • Code Reviews
  • Arjen Markus
  • Book: Modern Fortran in Practice
  • Online publication: 05 July 2012
  • Chapter DOI: https://doi.org/10.1017/CBO9781139084796.011
Available formats
×