Skip to content

This is material to complement the FutureLearn MOOC on "Defensive programming and debugging", as well as for training purposes.

License

Notifications You must be signed in to change notification settings

gjbex/Defensive_programming_and_debugging

Repository files navigation

Defensive programming and debugging.

The text can be conveniently read on the Github pages site for this repository. The material complements that of the FutureLearn MOOC on "Defensive programming and debugging".

This is an online resource for defensive programming and debugging. You will find material on

  • coding best practices
  • error handling
  • defensive programming
  • documenting your code
  • unit and functional testing
  • debuggers (gdb, valgrind)
  • taxonomy of bugs
  • references and further reading

This is mainly aimed at scientific and high performance computing, so examples are given for C, C++ and Fortran. However, the principles are very similar for other programming languages.

Source code

Source code illustrating various kinds of bugs and the use of tools can be found in the source code directory.

Contributions

This is work in progress, and you are welcome to contribute. The material is release under the CC BY 4.0 license.

Acknowledgments

Parts of this material was developed for a MOOC (Massive Open Online Course) developed for PRACE, the European supercomputing organization.

Authors

Contributors

  • Damien Francois: fixing typos