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

9952931e69c37307ab4e1eb41dd14360?s=128

John Blischak

August 28, 2019
Tweet

Transcript

  1. Contributing to Open Source John Blischak Greater Cleveland R Group

    2019-08-28
  2. About me Postdoctoral Scholar, Dept. Human Genetics Reproducibility with R

    Markdown and Git See jdblischak.com for more details
  3. What is open source software?

  4. 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
  5. “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
  6. 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
  7. R is open source ▪ Most CRAN packages are open

    source. Only 11 specify the field License_restricts_use
  8. It’s already free, so why contribute?

  9. Learning ▪ Opportunity to learn directly from experienced software developers

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

    others with similar interests
  11. 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
  12. Contributing

  13. Support other users ▪ Answer questions on Stack Overflow or

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

    other official reports ▪ Share on social media
  15. 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
  16. Build community ▪ Organize and/or attend community events ▪ Give

    a talk at a user group or conference
  17. 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
  18. GitHub is popular for R devs

  19. 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
  20. Fine-grained control of edits ▪ Edit code file(s) ▪ $

     git  add ▪ $  git  commit ▪ $  git  push Analogy inspired by Greg Wilson
  21. Collaboration via email

  22. Collaboration on GitHub Fork Pull Request

  23. Connecting to GitHub Fork Pull Request $  git clone Your

    computer $  git push
  24. Example Pull Request octocat/Spoon-Knife GitHub Help: Fork a repo GitHub

    Guides: Forking projects
  25. How to find projects ▪ Search for R repositories: language:R

    ▪ Search Issue labels – label:help-wanted – label:good-first-issue
  26. Submit your first Pull Request ▪ https://github.com/jdblischak/git-for-science

  27. More advanced topics ▪ Feature branch ▪ Add tests ▪

    Contributor License Agreement (CLA)
  28. Advice

  29. Start small ▪ To learn the technical and social aspects

    of contributing to a project, start with a small contribution like improving the documentation
  30. https://firstpr.me/

  31. None
  32. None
  33. None
  34. None
  35. 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
  36. 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
  37. Due diligence ▪ Read the README and any FAQs ▪

    Read the contributing instructions (CONTRIBUTING.md) ▪ Search past discussions in Issue tracker or forum
  38. 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
  39. Questions?