Contributing to
Open Source
John Blischak
Greater Cleveland R Group
2019-08-28
Slide 2
Slide 2 text
About me
Postdoctoral Scholar, Dept. Human Genetics
Reproducibility with R Markdown and Git
See jdblischak.com for more details
Slide 3
Slide 3 text
What is open source software?
Slide 4
Slide 4 text
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
Slide 5
Slide 5 text
“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
Slide 6
Slide 6 text
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
Slide 7
Slide 7 text
R is open source
■ Most CRAN packages are open source. Only 11 specify
the field License_restricts_use
Slide 8
Slide 8 text
It’s already free, so
why contribute?
Slide 9
Slide 9 text
Learning
■ Opportunity to learn directly from experienced
software developers
■ Contributing to something used by others instead of
working on an assigned example project
Slide 10
Slide 10 text
Networking
■ Be a part of a community
■ Meet others with similar interests
Slide 11
Slide 11 text
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
Slide 12
Slide 12 text
Contributing
Slide 13
Slide 13 text
Support other users
■ Answer questions on Stack Overflow or RStudio
Community
■ Write a tutorial or blog post
■ Try to reproduce bug reports
Slide 14
Slide 14 text
Give recognition
■ Cite the software in academic papers and other
official reports
■ Share on social media
Slide 15
Slide 15 text
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
Slide 16
Slide 16 text
Build community
■ Organize and/or attend community events
■ Give a talk at a user group or conference
Slide 17
Slide 17 text
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
Slide 18
Slide 18 text
GitHub is popular for R devs
Slide 19
Slide 19 text
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
Slide 20
Slide 20 text
Fine-grained control of edits
■ Edit code file(s)
■ $ git add
■ $ git commit
■ $ git push
Analogy inspired by Greg Wilson
Slide 21
Slide 21 text
Collaboration via email
Slide 22
Slide 22 text
Collaboration on GitHub
Fork
Pull
Request
Slide 23
Slide 23 text
Connecting to GitHub
Fork
Pull
Request
$ git clone
Your computer
$ git push
Slide 24
Slide 24 text
Example Pull Request
octocat/Spoon-Knife GitHub Help: Fork a repo GitHub Guides: Forking projects
Slide 25
Slide 25 text
How to find projects
■ Search for R repositories: language:R
■ Search Issue labels
– label:help-wanted
– label:good-first-issue
Slide 26
Slide 26 text
Submit your first Pull Request
■ https://github.com/jdblischak/git-for-science
Start small
■ To learn the technical and social aspects of contributing
to a project, start with a small contribution like improving
the documentation
Slide 30
Slide 30 text
https://firstpr.me/
Slide 31
Slide 31 text
No content
Slide 32
Slide 32 text
No content
Slide 33
Slide 33 text
No content
Slide 34
Slide 34 text
No content
Slide 35
Slide 35 text
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
Slide 36
Slide 36 text
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
Slide 37
Slide 37 text
Due diligence
■ Read the README and any FAQs
■ Read the contributing instructions
(CONTRIBUTING.md)
■ Search past discussions in Issue tracker or forum
Slide 38
Slide 38 text
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