Presentation Open Access

Writing Clean Scientific Software

Murphy, Nicholas A.


Citation Style Language JSON Export

{
  "publisher": "Zenodo", 
  "DOI": "10.5281/zenodo.3922957", 
  "language": "eng", 
  "title": "Writing Clean Scientific Software", 
  "issued": {
    "date-parts": [
      [
        2020, 
        6, 
        29
      ]
    ]
  }, 
  "abstract": "<p>This presentation discusses strategies for writing clean scientific software.&nbsp; Choosing meaningful variable names improves readability.&nbsp; Functions should be short, do exactly one thing, and have no side effects.&nbsp; High-level big picture code should be separated from low-level implementation details, for example by writing code as a top-down narrative.&nbsp; 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.&nbsp; Well-written tests increase the flexibility of code.&nbsp; This presentation encourages us to think of code as communication.</p>", 
  "author": [
    {
      "family": "Murphy, Nicholas A."
    }
  ], 
  "note": "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.", 
  "version": "1", 
  "type": "speech", 
  "id": "3922957"
}
1,086
365
views
downloads
All versions This version
Views 1,0861,086
Downloads 365365
Data volume 234.7 MB234.7 MB
Unique views 1,0421,042
Unique downloads 342342

Share

Cite as