tpoisot / ScientificComputingForTheRestOfUs

Introduction to Scientific Computing 🦊
http://sciencecomputing.org/
Creative Commons Attribution 4.0 International
123 stars 13 forks source link

Mozfest! #11

Closed tpoisot closed 6 years ago

tpoisot commented 6 years ago

During the Mozfest session, we brainstormed two questions. The setting was:

Scientific research is increasingly reliant on software -- the results we publish are as good as the code we write to generate them. But very few researchers are trained as software engineers. What do we teach these people so that they can write code that we all can trust?

  1. How do we know if code can be trusted?
  2. What should we tell new members of a group, lab, team, or teach beginners?

Below are transcripts of the discussions. We used a world-café method, with three groups.

tpoisot commented 6 years ago

Things newcomers should know

  1. Code guidelines
  2. Workflows
  3. Hypotheses
  4. Code review
  5. Validation

pic1

tpoisot commented 6 years ago

Things newcomers should know

pic2

tpoisot commented 6 years ago

How do we know if code can be trusted?

  1. Unit tests
    • one small part of the code
    • basic expectations (type, range)
  2. Smell test
    • does it look right? (outputs)
  3. Did I use the syntax correctly? (scientific analyses)
    • using other people's code
    • linters

pic3

tpoisot commented 6 years ago

Things newcomers should know

  1. Write code that's simple, worry about optimization later
    • What does simple mean? Modular, broken up, don't be clever, readable
  2. Use libraries when you can
    • Which ones can you trust?: pin version, containers
  3. Comment code and make its purpose clear
  4. Get more than one pair of eyes on your code, to make your code better and help with comment / purpose
  5. Use tests as documentation of purpose of code

pic4

tpoisot commented 6 years ago

How do we know if code can be trusted?

pic5

tpoisot commented 6 years ago

How do we know if code can be trusted?

pic6