Pairing Session 2

Back

Learning Goals

  • Get to know another classmate and collaborate on technical work
  • Identify strengths and opportunities in oneself as a pair programmer
  • Screen share, type in front of others, and communicate technical concepts

Prepare

Before meeting with your partner, reflect on the following:

  • What is one thing you are going to commit to doing, to be a great driver today?
  • What is one thing you are going to commit to doing, to be a great navigator today?
  • What is one thing you really need your partner to do to help you have an effective pairing session?

Be ready to share your answers with your partner.

Set Collaboration Expectations

Spend a few minutes getting to know each other and discussing your answers to the questions in the Prepare section above. This will help set expectations for what you each need and can commit to doing, and is an important habit to build when you start a working relationship. Then, decide who will be the Driver and Navigator for the first challenge and switch roles for the second exercise.

Exercises

Pairing Exercise 1

  • In your Mod 0 directory, create a new directory called pairing_2. Inside of that directory, touch a file called friends. Initialize a Git repository.
  • Define a variable named arrays that stores an Array of 5 Strings with friends names.
  • Write code to print the third element.
  • Write code to print the last element.
  • Write code to print the first element.
  • Run the file in the Terminal to verify your code is working as expected.
  • Create a GitHub repository.
  • Push your work from the local repository to the remote repository.
  • Define another variable that stores an Array of 5 Strings, with names of places to visit.
  • Use one of the Array methods to do something to that new Array - you choose!
  • Run the file in the Terminal to verify your code is working as expected.
  • Push that new work up to the remote repository.


Pairing Exercise 2

  • In your Mod 0 directory, create a new directory called pairing_2. Inside of that directory, touch a file called plants with an appropriate file extension. Initialize a Git repository.
  • You are writing a conditional to determine the likelihood that a plant will thrive based on some variables.
  • Define a variable called gets_sunshine that stores a Boolean value.
  • Define a variable called ounces_of_water that stores an Integer value.
  • When the plant has sunshine and gets at least 10 ounces of water, the plant will thrive. Otherwise, the plant will die. Use an if statement and change the values to print a statement for both outcomes.
  • Run the file in the Terminal to verify your code is working as expected.
  • Create a GitHub repository.
  • Push your work from the local repository to the remote repository.
  • Modify your if statement so that it prints out a different statement if the plants gets sunshine or gets at least 10 ounces of water.
  • Run the file in the Terminal to verify your code is working as expected.
  • Push that new work up to the remote repository.


Reflection

Take a moment to reflect independently after this exercise.

  • What went well?
  • What could be improved?
  • What progress have you made on the areas of growth you identified in your previous paired session?

There is nothing to submit anything after completing this exercise, but take note of your progress and any areas in which you would like to continue growing.







Back