1 of 11

Why invest in Open Source programming skills?

WoCCode Summer 2023 Bootcamp

2 of 11

Good Research is enabled by Good Software Engineering

3 of 11

3Rs: readability, Resilience, and Reuse

  • Readable code is an investment in future you
    • Informative variable name choices
    • Commented code with descriptive docstrings
    • Intuitive structure and order of operation
  • Resilient code that “breaks gracefully”
    • Provide checks with useful error messages
    • Modular design, minimal repetition
    • Testing infrastructure to build confidence and reliability
  • Reusable code
    • Less time spent reinventing / repeating tasks
    • Make it general enough to use in many scenarios

Variable Name

4 of 11

Different Scenarios have Different Practice

Personal Use

  • Data visualization code (e.g., matplotlib style files, color maps, corner plot)
  • Commonly repeated tasks (e.g., github.com/eblur/gastronomy)
  • Can still be made public as a service to others
  • Can still benefit greatly from version control (e.g., Github)
  • Can operate privately or publicly

5 of 11

Different Scenarios have Different Practice

Lab Use (2-20 users)

  • Comments and docstrings need to be clear enough for multiple people to read and learn from
  • Version control and testing ensures reliability for all, allows for multiple contributors and updates
  • Can operate privately or publicly

6 of 11

Different Scenarios have Different Practice

Open Source Community

  • Astropy, numpy, scipy
  • Provides toolkit for other projects
  • Requires full software engineering toolkit (testing, documentation, continuous integration, deployment, community input and governance)
  • To participate: discuss needs, submit an issue, and/or submit a pull request

7 of 11

Not just good for you: Good practice is the Gold Standard

8 of 11

Not just good for you: Good practice is the Gold Standard

9 of 11

How we will get there: Readability and Reuse

  • Python in practice
  • Object Oriented Programming
  • Docstrings
  • Code design

10 of 11

How we will get there: REsilience

  • Version control
  • Code design
  • Code testing
  • Optimization

11 of 11

Your Homework: Decide on a project (aka “Hack”)

Some ideas: https://docs.google.com/document/d/1htz32t6Lfe2wiX4lmEhcrfPnpCUkDcLq0pBztzoyPtc/edit?usp=sharing

Research task that you are already working on? (e.g., visualizing project results, performing a computation)

Project you have always wanted to try? (e.g., design a game, explore a dataset)

Something not too big! (i.e., not a PhD thesis) However, you might set up the code infrastructure to design and test a lengthy problem.

Something that can use thought on design, testing, and optimization.