Presentation Open Access

Writing Clean Scientific Software

Murphy, Nicholas A.


JSON Export

{
  "files": [
    {
      "links": {
        "self": "https://zenodo.org/api/files/82e6f7a4-909b-4023-baaa-7bde8d8157df/WritingCleanScientificSoftware.pdf"
      }, 
      "checksum": "md5:4229bff05d7e36bd63e489bf891affa8", 
      "bucket": "82e6f7a4-909b-4023-baaa-7bde8d8157df", 
      "key": "WritingCleanScientificSoftware.pdf", 
      "type": "pdf", 
      "size": 643129
    }
  ], 
  "owners": [
    11994
  ], 
  "doi": "10.5281/zenodo.3922957", 
  "stats": {
    "version_unique_downloads": 187.0, 
    "unique_views": 446.0, 
    "views": 467.0, 
    "version_views": 467.0, 
    "unique_downloads": 187.0, 
    "version_unique_views": 446.0, 
    "volume": 129912058.0, 
    "version_downloads": 202.0, 
    "downloads": 202.0, 
    "version_volume": 129912058.0
  }, 
  "links": {
    "doi": "https://doi.org/10.5281/zenodo.3922957", 
    "conceptdoi": "https://doi.org/10.5281/zenodo.3922956", 
    "bucket": "https://zenodo.org/api/files/82e6f7a4-909b-4023-baaa-7bde8d8157df", 
    "conceptbadge": "https://zenodo.org/badge/doi/10.5281/zenodo.3922956.svg", 
    "html": "https://zenodo.org/record/3922957", 
    "latest_html": "https://zenodo.org/record/3922957", 
    "badge": "https://zenodo.org/badge/doi/10.5281/zenodo.3922957.svg", 
    "latest": "https://zenodo.org/api/records/3922957"
  }, 
  "conceptdoi": "10.5281/zenodo.3922956", 
  "created": "2020-06-29T19:52:11.726174+00:00", 
  "updated": "2020-06-30T02:19:10.985177+00:00", 
  "conceptrecid": "3922956", 
  "revision": 7, 
  "id": 3922957, 
  "metadata": {
    "access_right_category": "success", 
    "doi": "10.5281/zenodo.3922957", 
    "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>", 
    "language": "eng", 
    "title": "Writing Clean Scientific Software", 
    "license": {
      "id": "CC-BY-4.0"
    }, 
    "notes": "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.", 
    "relations": {
      "version": [
        {
          "count": 1, 
          "index": 0, 
          "parent": {
            "pid_type": "recid", 
            "pid_value": "3922956"
          }, 
          "is_last": true, 
          "last_child": {
            "pid_type": "recid", 
            "pid_value": "3922957"
          }
        }
      ]
    }, 
    "communities": [
      {
        "id": "plasmapy"
      }
    ], 
    "version": "1", 
    "references": [
      "Albert, K.; Bouquin, D.; Farber, A.; and Hoover, R. (2019). Copyright Guide for Scientific Software. Zenodo. http://doi.org/10.5281/zenodo.3581326", 
      "Feathers, M. (2004). Working Effectively with Legacy Code.", 
      "Fowler, M. (2011). Eradicating Non-Determinism in Tests. https://martinfowler.com/articles/nonDeterminism.html", 
      "Gamma, E.; Helm, R.; Johnson, R.; and Vlissides, J. (1995). Design Patterns: Elements of Reusable Object-Oriented Software.", 
      "Hicks, S. Code Is Communication. https://steven-j-hicks-speaking.netlify.app/code-is-communication/#1", 
      "Martin, R. C. (2009). Clean Code: A Handbook of Agile Software Craftsmanship.", 
      "Martin, R. C. (2018). Clean Architecture: A Craftsman's Guide to Software Structure and Design.", 
      "McConnell, S. (2004). Code Complete: A practical handbook of software construction, 2nd edition.", 
      "Wilson, G.; Aruliah, D. A.; Brown C. T.; Chue Hong, N. P.; Davis, M.; Guy, R. T. et al. (2014). Best Practices for Scientific Computing, PLoS Biology, 12, e1001745, https://doi.org/10.1371/journal.pbio.1001745", 
      "Wilson, G.; Bryan, J.; Cranston, K.; Kitzes, J.; Nederbragt, L.; Teal, T. K. (2017). Good enough practices in scientific computing. PLoS Computational Biology, 13, e1005510, https://doi.org/10.1371/journal.pcbi.1005510"
    ], 
    "keywords": [
      "Research software engineering", 
      "Clean coding"
    ], 
    "publication_date": "2020-06-29", 
    "creators": [
      {
        "orcid": "0000-0001-6628-8033", 
        "affiliation": "Center for Astrophysics | Harvard & Smithsonian", 
        "name": "Murphy, Nicholas A."
      }
    ], 
    "access_right": "open", 
    "resource_type": {
      "type": "presentation", 
      "title": "Presentation"
    }, 
    "related_identifiers": [
      {
        "scheme": "doi", 
        "identifier": "10.5281/zenodo.3491142", 
        "relation": "hasPart"
      }, 
      {
        "scheme": "doi", 
        "identifier": "10.5281/zenodo.3922956", 
        "relation": "isVersionOf"
      }
    ]
  }
}
467
202
views
downloads
All versions This version
Views 467467
Downloads 202202
Data volume 129.9 MB129.9 MB
Unique views 446446
Unique downloads 187187

Share

Cite as