Project managment
Collaborative coding can get messy especially when you want to do something complex. Git/GitHub was designed to make collaboration easier.
2.1 Project Challenges
There are many challenges aspects to building a collaborative coding project
- How to communicate about code changes?
- How to keep record of small details in a complex project?
- How to have longer technical back and forth conversations while maintaining context throughout?
- How to handle project transitions between staff changes?
Below we will use a private repository which cleans and synthesizes research from sensitive line level mortality data. A graduate research assistant wrote code to clean years 1990-2018 then graduate and is handed off to another RA to extend not only data range 1960-2020 but also to start synthesizing research. It is a great case study to show how Git/GitHub can help address the challenges above. It is a private repository so I will just show snippets.
2.2 GitHub Issues to track changes and details
Scenario: @isabelderamos has a question about a specific part of the project.
- How can @isabelderamos communicate this?
- How can collaborators reply in a way which clearly communicates how and why the codebase was updated?
GitHub issues are a feature designed to describe problems, track code changes related to those problems, stay up to date through email notifications, and facilitate efficient communication through feature rich markdown.
Every project can be broken down many smaller problems. GitHub issues is a workflow that allows us to focus, collaborate and document how we solve these small problems. This really helps keep organized in the context a of a large project which could have hundreds of issues and multiple collaborators.
2.2 Branches to manage role transitions
Scenario: @usamabilal is PI. @ran-codes is an RA that wrote code to clean mortality data but is graduating. @isabelderamos is an incoming RA that is tasked with extending the functionality of the existing codebase.
- @usamabilal: mmm how to transition between two RA’s. I hope we can make these new changes without breaking the existing project.
- @isabelderamos 😰 omg… I am kind of new to R. What if I break something?
- @ran-codes: how can I share my code and remain in touch to answer any questions?
✨Git Branches allow you to safely experiment with new ideas in a contained area of your repository.
Git branches allow you to develop features, fix bugs, or safely experiment with new ideas in a contained area of your repository. GitHub allow us to implement branches within the context of issues and commits to smooth document project evolution and allow for smooth transitions between collaborators.
Branches may not be require when working alone. They are particularly useful when entry level RA enter a project to relieve pressure on the RA and protect the project from any regressive code changes.