Science in the Sands

Mathematics and computation from the shores of the Red Sea

Step 7 - Automate the tests

Welcome to step 7 in your training as a scientific Python code ninja: test automation. Tests are extremely useful, as long as you run them. Unfortunately, a common pattern in many projects is this:

Tests are written and run by the person who wrote them. Others, and even the test-writer at a futu… Read more

Step 6 - Keep track of issues

Welcome to step 6 in your training as a scientific Python code ninja: issue tracking. Look at you! You’ve got your nice code with some docstrings and tests, and you’re humming along analyzing data, simulating widgets, and whatnot. In the middle of it all, you realize that your regression analysis… Read more

Step 5 - write tests

This is step 5 in your journey toward rock-solid scientific Python code: write tests. Tests? Ugh. I hear you. Writing tests is not an inherently fun process. However, the alternative is debugging, staring at code and thinking real hard about what could be wrong, and more debugging. I’ll take writ… Read more

Step 4 - write docstrings

including examples!

This is step 4 in your journey toward rock-solid scientific Python code. Steps 1-3 were language-agnostic, but now I’m going to assume you’re using Python. The Python language has a built-in feature for documenting functions, classes, and modules; it is the docstring. A docstring for a very simpl… Read more

Older Posts

David I. Ketcheson
I am an associate professor of applied mathematics at King Abdullah University of Science and Technology (KAUST), where I lead the Numerical Mathematics Group.

My research involves analysis and development of numerical methods for integration of ordinary and partial differential equations, as well as the implementation of such methods in open source, accessible, high performance software and its application to understanding behavior of nonlinear waves in heterogeneous materials.

  • Office: 4202 Al-Khawarizmi Building
  • Email & online networks: linked from icons below.
feed Subscribe

Find me on the social web: