Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Contributing to open source

Contributing to open source

Are you interested in contributing to open source software projects,
but unsure how to get started? With a focus on the R software
ecosystem, I’ll describe open source software development, provide
motivations for contributing to open source software, give some advice
for getting started in open source, and detail some of the technical
steps for making a contribution.

I gave this talk at the Greater Cleveland R Group on 2019-08-28: https://www.meetup.com/Cleveland-UseR-Group/events/263391227

John Blischak

August 28, 2019
Tweet

More Decks by John Blischak

Other Decks in Programming

Transcript

  1. About me Postdoctoral Scholar, Dept. Human Genetics Reproducibility with R

    Markdown and Git See jdblischak.com for more details
  2. Basics of open source software ▪ Anyone can inspect, modify,

    and redistribute the source code ▪ Anyone can run the software for any purpose ▪ (Optional) Collaborative development ▪ Requires approved open source license
  3. “Free” vs “Open Source” ▪ The Free Software Definition from

    the Free Software Foundation ▪ The Open Source Definition from the Open Source Initiative ▪ ”…nearly all free software is open source, and nearly all open source software is free.” – Richard Stallman
  4. Pros and Cons Pros ▪ Widely available ▪ “given enough

    eyeballs, all bugs are shallow” – Linus’ Law ▪ No vendor lock-in Cons ▪ No instant customer support ▪ Difficulties in long- term maintenance and sustainability
  5. R is open source ▪ Most CRAN packages are open

    source. Only 11 specify the field License_restricts_use
  6. Learning ▪ Opportunity to learn directly from experienced software developers

    ▪ Contributing to something used by others instead of working on an assigned example project
  7. Networking ▪ Be a part of a community ▪ Meet

    others with similar interests
  8. Prioritize your own interests ▪ If you want a specific

    feature or need a particular bug fixed, you are the most motivated to get it done ▪ Can be much quicker than waiting on others to do it for you
  9. Support other users ▪ Answer questions on Stack Overflow or

    RStudio Community ▪ Write a tutorial or blog post ▪ Try to reproduce bug reports
  10. Give recognition ▪ Cite the software in academic papers and

    other official reports ▪ Share on social media
  11. Financial support ▪ Support a project: R Foundation, Foundation for

    Open Access Statistics (FOAS), NumFOCUS ▪ Support a developer: Patreon, Buy me a coffee ▪ Lobby for your company to support open source (Tidelift, Quansight) or purchase enterprise versions of open source products
  12. Writing code or documentation ▪ Requires learning the development tools

    used by the project ▪ Version control software, e.g. Git, Mercurial, SVN ▪ Code hosting platform, e.g. GitHub, R-Forge, Bitbucket, GitLab
  13. What is Git? ▪ Tracks the changes made by each

    contributor (think Word Track Changes) ▪ Logs each change with a unique ID (think ”Version history” in Google Drive) ▪ Requires message
  14. Fine-grained control of edits ▪ Edit code file(s) ▪ $

     git  add ▪ $  git  commit ▪ $  git  push Analogy inspired by Greg Wilson
  15. How to find projects ▪ Search for R repositories: language:R

    ▪ Search Issue labels – label:help-wanted – label:good-first-issue
  16. More advanced topics ▪ Feature branch ▪ Add tests ▪

    Contributor License Agreement (CLA)
  17. Start small ▪ To learn the technical and social aspects

    of contributing to a project, start with a small contribution like improving the documentation
  18. Assume the best in online interactions ▪ Tone of voice

    is hard to decipher for text-based communication ▪ To be safe, first confirm that a project has a Code of Conduct
  19. Compare yourself to past you ▪ Long-time contributors will know

    the reasoning for every quirk in the code base ▪ This can easily inspire Imposter Syndrome ▪ As you continue to participate, remind yourself how much you have personally learned over that time period
  20. Due diligence ▪ Read the README and any FAQs ▪

    Read the contributing instructions (CONTRIBUTING.md) ▪ Search past discussions in Issue tracker or forum
  21. Additional resources ▪ Contributing to Open Source on GitHub for

    beginners by Kent C. Dodds ▪ https://24pullrequests.com/ ▪ Producing Open Source Software by Karl Fogel ▪ How to Contribute to Open Source by Open Source Guides ▪ Your first open source contribution: a step-by-step technical guide by Jen Weber ▪ The Beginner’s Guide to Contributing to Open Source Projects by Andy Lester ▪ The Definitive Guide to Contributing to Open Source by Piotr Gaczkowski