In-Class Activity Procedure
Follow these instructions closely, step by step.
⚠️ DO NOT SKIP ANY STEPS! ⚠️
Missed steps = chaos and sadness, and possibly no credit for an activity.
Choose your starting driver for this activity
For each activity, one student will start as the driver, and the other student(s) will be the navigator(s). Your work will happen on the first driver’s computer, and both the driver and the navigator will contribute to the activity. Throughout the activity, you may (should!) switch roles regularly.
If one partner has completed the Installfest and the other hasn’t yet, the one who has completed it should be the first driver.
Otherwise, choose the student who has driven least recently or never driven at all to be the starting driver this time.
Starting the assignment: driver’s job
-
Share your device with the navigators(s). The main coding work will be done from the starting driver’s device.
-
Open the GitHub Classroom link for the assignment, which you will find in the instructions for the activity.
-
If this is your first time accepting an assignment:
- You will get a screen asking you to “Join the classroom.”
- Find your name in the list of students, and follow the instructions to associate your GitHub account with your name.
- If you cannot find your name, contact the instructor and then choose “Skip this step.”
-
You will see an “Accept the group assignment” screen that lists existing teams (if there are any), and gives you the chance to join a new one. Create a new group for your team. Your group name should be the section number followed by first names of the students in your group. For example:
02-sally-marvin
-
Click the Accept this assignment button.
-
You should see a confirmation that “Your assignment repository has been created,” or something to that effect. There will be a repository URL that looks something like this:
https://github.com/mac-comp127-s24/assignment_name-your_group_name
Click that link.
-
This will take you to the GitHub page for your personal copy — called a “fork” — of the homework.
-
Click the big Code button.
-
Choose Open with GitHub Desktop from the drop-down menu that appears. (Your computer may ask you if it should allow the link to open the GitHub Desktop application. Allow it.)
-
You should get a Clone a Repository dialog in GitHub Desktop. If you do not, then ask an instructor for help.
-
As always, check the Local Path setting. Make sure that you approve of where GitHub Desktop is going to put the code — and remember that location.
-
Click Clone.
-
If presented with the dialog titled “How are you planning to use this fork?” Select the “ For my own purposes ” option then click Continue.
- Now you have a copy of the homework project on your own computer! Click the Open in Visual Studio Code button.
Starting the assignment: navigator’s job
These steps are for starting navigators only.
Drivers, do not do this part!
-
Wait for the starting driver to create the GitHub classroom’s group (step 4 above).
-
Open the GitHub Classroom link for the assignment, which you will find in the instructions for the activity.
-
_ If this is your first time accepting an assignment: _
- You will get a screen asking you to “Join the classroom.”
- Find your name in the list of students, and follow the instructions to associate your GitHub account with your name.
-
If you cannot find your name, contact the instructor and then choose “Skip this step.”
-
You will see an “Accept the group assignment” screen that lists existing teams. Find your group name (the one your starting driver created) and join that group.
-
Click the Accept this assignment button.
🚨 NEVER SKIP THIS STEP 🚨
If you don’t accept the assignment, the instructor will have no record that you did it and you won’t get any credit for it.
- Do not go any further with this GitHub repository for now! It is a good idea to clone it later for your own personal reference / experiments. However, you should not clone it now. Instead, you are going to collaborate on the starting driver’s machine.
The rules of pairing
You are now pair programming! Here are the rules:
-
Multiple people, one keyboard. When pairing in person, programmers will actually physically hand the keyboard back and forth (i.e. swap being the driver/navigator).
-
There are two roles: driver and navigator. The driver is the person with control of the keyboard. Their job is to think about details. The navigator is the person who is watching. Their job is to stay actively engaged in what the driver is doing while thinking about the big picture.
Driver: “What should the next line of code do? What should I type? What is the syntax to use? What file or line of code has that thing we’re looking for?”
Navigator: “What is our goal? What do the instructions say? Does what we’re doing make sense? Are we getting ourselves lost? Should we be asking for help?”
-
Switch roles often. If you are starting to dictate what to type, you should be the driver. If you are thinking out a big picture that’s coming faster than you can type, you should be the navigator. The appropriate social form is, “May I drive?” or “Would you like to drive?” Then hand the keyboard or laptop over.
Save your work
When you have completed the activity, or when the end of the class / your work session arrives:
-
Have the starting driver open the activity project in GitHub Desktop.
-
In the Changes tab, you will see all the source files you changed. Make sure the checkboxes next to all the files are checked.
-
In the box at the bottom that either says something like “Update Foo.java” or says “Summary (required),” type a short note describing the changes you are committing, e.g. “Activity completed” or “Done with part 2.”
-
Click Commit to main. This saves a snapshot of your work on your computer. Note that it does not copy your work to the cloud, and does not submit your work (yet). Committing only saves a snapshot on your computer.
-
If you committed everything, you should see a big message that says ”No local changes.”
-
Just under that message, click the Push origin button to send your changes to GitHub, i.e. to the cloud. (You can also choose the Repository → Push menu option.)
-
Click the View on GitHub button. Check that you can see your changes. This ensures that the push worked.
⚠️ If it’s not pushed, it’s not turned in. ⚠️
-
Note that you can push as many times as you want. Each time, Git copies your commits to the cloud.
-
Note also that once you have pushed, your partner can see the code on Github
Pull your partner’s work after class
After you’re done with class for the day, if you started out as the navigator, clone the activity repository on your own machine.
Then choose Repository → Pull to make sure you have all the work from the day.
If you don’t see the work you did in class, nag your partner to push! Then pull again.
This gives you your code for handy future reference. It also ensures that you’ve accepted the assignment, so that you can get credit for it.