Presentation Open Access

Writing Clean Scientific Software

Murphy, Nicholas A.

Dublin Core Export

<?xml version='1.0' encoding='utf-8'?>
<oai_dc:dc xmlns:dc="" xmlns:oai_dc="" xmlns:xsi="" xsi:schemaLocation="">
  <dc:creator>Murphy, Nicholas A.</dc:creator>
  <dc:description>This presentation discusses strategies for writing clean scientific software.  Choosing meaningful variable names improves readability.  Functions should be short, do exactly one thing, and have no side effects.  High-level big picture code should be separated from low-level implementation details, for example by writing code as a top-down narrative.  Because comments often become out-of-date as code evolves, it is preferable to refactor code to improve readability rather than describe how it works.  Well-written tests increase the flexibility of code.  This presentation encourages us to think of code as communication.</dc:description>
  <dc:description>This work was created with support from National Science Foundation (US) grant 1931388 to the Smithsonian Astrophysical Observatory.  A minor portion of this presentation was adapted from the paper entitled "Best Practices for Scientific Computing" by G. Wilson et al., which is available under the Creative Commons Attribution 4.0 International (CC BY 4.0) license.</dc:description>
  <dc:subject>Research software engineering</dc:subject>
  <dc:subject>Clean coding</dc:subject>
  <dc:title>Writing Clean Scientific Software</dc:title>
All versions This version
Views 1,0941,094
Downloads 366366
Data volume 235.4 MB235.4 MB
Unique views 1,0501,050
Unique downloads 343343


Cite as