Astronomy Computing Today

Best Practices for Scientific Computing

Advertisements

Software is now considered by many as a scientific instrument, and it has assumed the same importance as “telescopes and test tubes.” This is certainly an opinion I share, and one shared by Aruliah et al. in their paper “Best Practices for Scientific Computing.” I think everyone involved in scientific computing ought to read this paper. As well as giving a summary of best practices for scientific computing, it is a rich source of references in the field of computational practices, with more than 60 references in all.

Scientific software is not yet developed, tested and validated with the same care and attention to detail as physical scientific apparatus, and the authors cite a number of examples of how this has caused serious errors in research results, and has led to corrections in published papers and sometimes retractions of papers.

Ten best practices are given. They are based on many years of experience in teaching, studies of computing and software development, and guidelines from open source and commercial projects.  Bear in mind as you read that software should not be written simply to run on computers, but written for humans to read, understand, test and modify.

1. Write programs for people, not computers.

2. Automate repetitive tasks.

3. Use the computer to record history.

4. Make incremental changes.

5. Use version control.

6. Don’t repeat yourself (or others).

7. Plan for mistakes.

8. Optimize software only after it works correctly.

9. Document the design and purpose of code rather
than its mechanics.

10. Conduct code reviews.

Advertisements

Advertisements