Search
Coding in Teams

Coding in Teams

Housecleaning

Drawing

Teams

Who still needs one?

GitHub for your team

GitHub set up two locations for your team:

  1. A team area where you can add discussions and extra repos if you want to experiment. The URL is like this: https://github.com/orgs/LeDataSciFi/teams/corona-crushers
  2. The usual repo URL structure for the assignment: https://github.com/LeDataSciFi/semester-project-corona-crushers

The proposal, due Monday

I moved what was here to the project assignment page.

Collaboration as a group

Q: How should you "meet"?

A: It's up to you! Be entrepreneurial and run your group as you all see fit.

  • WhatsApp, groupme, google doc, zoom, skype...
  • How can we work on code at the same time? Crowdsourced from your students
    • Zoom allows for sharing screen, and others can jump in and control
    • Probably best to "give ownership" over parts to different people

Q: How do we code "at the same time"?

The main issue is that two people might make conflicting changes. E.g., Johnny added a line to data.py but Cindy deleted a line from data.py.

A: You have, basically, three approaches, and you might use all three at different points of the project:

  1. Free-for-all approach Everyone works in the "master" branch of the repo all the time. This is what your default instinct might be. It can work, but you will have to fix merge conflicts to update and progress at all.
    • One option is the "one person at a time on one code file at a time".
  2. The "branching" approach. Basically, you create an offshoot of the folder to work on, and when you're done and happy, you create a "pull request" where you ask the main project's owner (your own team, in this case) to pull your branch's changes up to the main repo.
  3. The fork-and-clone approach.
    • You fork the repo (make your own version), clone it to your computer, make changes there, push it up to GitHub, then give a pull request.
    • It's somewhat like branching, but your work is outside the repo completely. I would probably recommend not using this.
    • But if you want to try this, here is a walkthrough.

Feedback request / Discussion Participation

I would love your feedback on how you deal with the asynchronous work problem!

  • Please let me know what issues/problems your group runs into
  • What solutions did you use (were they good or awful?)
  • If your group has an easy time, or finds something that works well, please let me and your classmates know!
  • Submit your experience on this via the discussion board

Because of the shift to remote learning, the participation grade is going to rely heavily on discussions in the issue repo.

  • Questions and issues you ask
  • Answers and discussion you have on classmates' issues is absolutely key
  • Quantity and quality of your posts both matter!
  • Review the instructions for "how to ask for help" before you post your next issue

Recommendations

  1. No matter which of the three approaches, you choose, FOLLOW THESE RULES EVERY SINGLE TIME YOU WORK ON CODE OR DO ANYTHING IN THE FOLDER:

    • BEFORE YOU START A CODING SESSION: Go to GH Desktop and "Fetch/Pull" origin
    • WHEN YOU ARE DONE WITH A SESSION: Clear your code, rerun all, save file, then push to cloud

      It's very important to do these every single time you code on your computer in group projects!

      Why?

      If you forget to fetch/pull before you start (and someone made a change on the github repo since you last synced), or if someone is working at the same time (and pushes a change to the github repo that conflicts with a change you made), you are likely to receive a "Merge Conflict" notification from GH Desktop.

  2. Your most experienced coder might be given "CEO" status over the repo and "leads the way" on pull requests and gives guidance on merge conflicts.

  3. Instead of putting the entire project in one ipynb file, structure the project like the latest assignment:
    • One code file to download each input needed,
    • One code file to parse/transform each input,
    • One "get_all_data" code file that, if executed, would run all files above
    • One code to build the analysis sample, explore it, and analyze it

Branching Demo

  • Open GH Desktop and create a toy repo
  • start new branch "my work"
  • add data/data.txt into folder (to simulate some work you've done)
  • see how GH Desktop sees a change?
  • click to try to switch branch (don't though)
    • it says "leave changes on this branch or bring to master" --> only the branch you're "in" can see/push changes you make
    • cancel
  • commit to branch
  • publish up to GH website
  • view on GH
    • switch branches to see the new files
    • compare: you're able to merge
    • can explain your argument for changes (to convince others to adopt in distributed projects), submit
    • merge, confirm
    • look at master branch - it should have data/data.txt
    • create "cynthia_did_some_work.txt" which says inside: "while i was sleeping"
  • go back to desktop like you're going to work on the project
    • go to master... pulling origin would sync it but dont
    • go to "my work" branch
    • fetch / update from master: this gets the cynthia file, and I can continue
    • push this new file back up to my own branch on GH's servers
    • make a new fake work file
      • publish/push
      • pull request
      • merge into main one more time