Presentation Open Access

Writing Clean Scientific Software

Murphy, Nicholas A.

JSON-LD ( Export

  "inLanguage": {
    "alternateName": "eng", 
    "@type": "Language", 
    "name": "English"
  "description": "<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>", 
  "license": "", 
  "creator": [
      "affiliation": "Center for Astrophysics | Harvard & Smithsonian", 
      "@id": "", 
      "@type": "Person", 
      "name": "Murphy, Nicholas A."
  "hasPart": [
      "@id": "", 
      "@type": "CreativeWork"
  "datePublished": "2020-06-29", 
  "url": "", 
  "version": "1", 
  "keywords": [
    "Research software engineering", 
    "Clean coding"
  "@context": "", 
  "identifier": "", 
  "@id": "", 
  "@type": "PresentationDigitalDocument", 
  "name": "Writing Clean Scientific Software"
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


Cite as