Presentation Open Access

Writing Clean Scientific Software

Murphy, Nicholas A.


DataCite XML Export

<?xml version='1.0' encoding='utf-8'?>
<resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://datacite.org/schema/kernel-4" xsi:schemaLocation="http://datacite.org/schema/kernel-4 http://schema.datacite.org/meta/kernel-4.1/metadata.xsd">
  <identifier identifierType="DOI">10.5281/zenodo.3922957</identifier>
  <creators>
    <creator>
      <creatorName>Murphy, Nicholas A.</creatorName>
      <givenName>Nicholas A.</givenName>
      <familyName>Murphy</familyName>
      <nameIdentifier nameIdentifierScheme="ORCID" schemeURI="http://orcid.org/">0000-0001-6628-8033</nameIdentifier>
      <affiliation>Center for Astrophysics | Harvard &amp; Smithsonian</affiliation>
    </creator>
  </creators>
  <titles>
    <title>Writing Clean Scientific Software</title>
  </titles>
  <publisher>Zenodo</publisher>
  <publicationYear>2020</publicationYear>
  <subjects>
    <subject>Research software engineering</subject>
    <subject>Clean coding</subject>
  </subjects>
  <dates>
    <date dateType="Issued">2020-06-29</date>
  </dates>
  <language>en</language>
  <resourceType resourceTypeGeneral="Text">Presentation</resourceType>
  <alternateIdentifiers>
    <alternateIdentifier alternateIdentifierType="url">https://zenodo.org/record/3922957</alternateIdentifier>
  </alternateIdentifiers>
  <relatedIdentifiers>
    <relatedIdentifier relatedIdentifierType="DOI" relationType="HasPart">10.5281/zenodo.3491142</relatedIdentifier>
    <relatedIdentifier relatedIdentifierType="DOI" relationType="IsVersionOf">10.5281/zenodo.3922956</relatedIdentifier>
    <relatedIdentifier relatedIdentifierType="URL" relationType="IsPartOf">https://zenodo.org/communities/plasmapy</relatedIdentifier>
  </relatedIdentifiers>
  <version>1</version>
  <rightsList>
    <rights rightsURI="https://creativecommons.org/licenses/by/4.0/legalcode">Creative Commons Attribution 4.0 International</rights>
    <rights rightsURI="info:eu-repo/semantics/openAccess">Open Access</rights>
  </rightsList>
  <descriptions>
    <description descriptionType="Abstract">&lt;p&gt;This presentation discusses strategies for writing clean scientific software.&amp;nbsp; Choosing meaningful variable names improves readability.&amp;nbsp; Functions should be short, do exactly one thing, and have no side effects.&amp;nbsp; High-level big picture code should be separated from low-level implementation details, for example by writing code as a top-down narrative.&amp;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.&amp;nbsp; Well-written tests increase the flexibility of code.&amp;nbsp; This presentation encourages us to think of code as communication.&lt;/p&gt;</description>
    <description descriptionType="Other">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.</description>
    <description descriptionType="Other">{"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"]}</description>
  </descriptions>
</resource>
1,363
430
views
downloads
All versions This version
Views 1,3631,363
Downloads 430430
Data volume 276.5 MB276.5 MB
Unique views 1,3181,318
Unique downloads 402402

Share

Cite as