class: middle, center ## Reproducible Research in Collaboration ### Writing Academic Texts on GitHub Together ### Aaron Peikert, Anabel Büchner & Hannes Diemerling *Don't make yourself too comfortable, you will have to change your seat in a minute.* --- class: middle, center ## ~~Why collaboration?~~ <https://github.com/signup> --- class: center, middle ## Why collaboration? --- Nr. of authors in the last 100 articles in: .pull-left[ **Collabra: Psychology** ] .pull-right[ | 1| 2| 3| 4| 5| 6| 7| 8| 9| 10+| |--:|---:|---:|---:|---:|---:|--:|--:|--:|----:| | 4| 19| 19| 23| 10| 10| 4| 1| 3| 7| ] -- .pull-left[ **Psychological Science** ] .pull-right[ | 1| 2| 3| 4| 5| 6| 7| 8| 9| 10+| |--:|---:|---:|---:|--:|--:|--:|--:|--:|----:| | 9| 20| 23| 22| 7| 9| 3| 1| 2| 4| ] -- .pull-left[ **Nature** ] .pull-right[ | 1| 2| 3| 4| 5| 6| 7| 8| 9| 10+| |---:|--:|--:|--:|--:|--:|--:|--:|--:|----:| | 54| 7| 1| 5| 2| 0| 3| 3| 2| 23| ] --- class: center, middle ## Who could do their research alone? --- class: center, middle ## Who could do their research without a computer? --- class: center, middle # Collaboration is hard --- # Moving Parts * code * data * software * results * text --- # Collaborators * you -- * your future self -- * collaborators * with less expertise * with more expertise, but less time -- * editors * reviewers * readers --- # Contributions * high level feedback * to the text (small) * to the text (extensive) * to the code * to the results * to the data --- # Channels * mail * verbally * comments in a document * changes in a document * changes on a printout * via a submission portal * whats app * ... --- class: center, middle > All happy families are alike; each unhappy family is unhappy in its own way. .right[Leo Tolstoy from Anna Karenina] --- class: middle Happy collaborations: * don't fight with technology, they take advantage of it * don't engage in edit wars, they have clear responsibilities -- This is as much as a **technological** challenge, as a **sociological** one. --- Speaking of technology, why can't we use good old: * Word * Google Docs / Overleaf * Google Collab * Dropbox / Seafile etc. --- # Word .pull-left[ ## Upside * everyone can use it * track changes ] .pull-right[ ## Downside * only one person at any given time * no reproducibility ] --- # Google Doc / Overleaf .pull-left[ ## Upside * everyone can use it * many people * ~~track changes~~ ] .pull-right[ ## Downside * anyone can edit everything, without anyone noticing * no reproducibility ] --- # Google Collab .pull-left[ ## Upside * many people can edit * track changes via GitHub * reproducibility ] .pull-right[ ## Downside * track changes via GitHub ] --- # Dropbox & Co .pull-left[ ## Upside * anyone can use it * reproducibility ] .pull-right[ ## Downside * only one person at any given time * anyone can edit everything, without anyone noticing ] --- # GitHub / GitLab .pull-left[ ## Upside * reproducibility * high level of control * thousands of people can collaborate * any collaboration workflow is possible ] .pull-right[ ## Downside * any collaboration workflow is possible * highly complex ] --- class: center, middle # Collaboration is hard -- # Github is hard -- # Alternatives are hard --- ## What's the first step of every epic collaboration? Find a collaborator! * Form a line by GitHub experience - Left end = novice (never touched GitHub) - Right end = expert (merge conflicts don’t scare me) * Now split the line in half - First half moves left, second half stays - Voilà: pairs! If you realize you don’t want to participate in the workshop, please step out now as otherwise your partner will be left hanging. --- class: center, middle # Learning Goals --- name: github ## Technological/GitHub .pull-left[ 1. repositories 2. forks 3. issues 4. pull requests ] --- ## Sociological 1. everything in one place 2. the issue of trust 3. project and task management 4. distributing work --- template: github .pull-right[ 1. [aaronpeikert/repro-workshop](https://github.com/aaronpeikert/repro-workshop/) 2. in a second 3. 10min on your own 4. 90-150min in a team ] --- # Reproducibility [Research as a software product](https://github.com/aaronpeikert/repro-collab/blob/1e42e2dfc205bb491a31602e6271f9c8e46c325a/presentation.Rmd#L87-L98). --- ## Code of conduct Before we get started, please note that this workshop follows the [Berlin Code of Conduct](https://github.com/aaronpeikert/repro-collab?tab=coc-ov-file#readme). We are here to learn together in a respectful and inclusive space. -- Key principles for today: * Participate authentically and actively * Everyone is learning - questions and mistakes are welcome * Give feedback on code, not people * Help each other out when someone gets stuck --- ## Get Active .left[ 1. aaronpeikert.github.io/repro-collab/self-paced ] <img src="assets/qr_slides.svg" width="30%" style="float:center" /> --- # This workshop is a beta version Provide feedback: https://github.com/aaronpeikert/repro-collab/issues/new --- --- ## What makes an ideal issue? -- The next step is clear. 1. Discussion 2. Decision 2. Implementation --- ## How can issues be used to organize tasks and responsibilities? -- * people can voice their opinion in way that is documented * mentioning via @username to trigger discussion/decision * people can assign themselves or others --- ## How to get/provide feedback via GitHub? -- * pull requests are ideally suited to get/provide feedback * can be integrated into issues * tracking other peoples contribution via PR is possible --- ## What aspects of your workflow are difficult to translate to GitHub? --- ## How much skill is required? -- Either: .pull-left[ **Git Wizard** ] .pull-right[ **Project Organization Wizard** ] -- Or some of both. --- .pull-left[ # Stay Sane ] .pull-right[  ] .footnote[Comic: [xkcd.com/1597](https://xkcd.com/1597/) "Git" by Randall Munroe, licensed under [CC BY-NC 2.5](https://creativecommons.org/licenses/by-nc/2.5/)] --- # Making a diff(erence) * coordinate * make atomic changes * commit often, push less often * use markdown everywhere * when using markdown place each sentence on its own line