Pairing Session 3

Back

Learning Goals

  • Get to know another classmate and collaborate on technical work
  • Identify strengths and opportunities in oneself as a pair programmer
  • Become comfortable screen sharing, typing in front of others, and communicating technical concepts
  • Give and recieve peer feedback

Prepare

Before meeting with your partner, reflect on the following:

  • What have you enjoyed about pairing so far?
  • What has been challenging about pairing for you so far?
  • What is one thing you want feedback on from your partner at the end of this session? (It’s recommended you use the “one thing” from Pairing Session 2, or another area you are pushing yourself to grow in!)
  • How do you prefer to give and get feedback for the previous question? (The how being the method of communication - in writing? Over zoom immediately, or over zoom after having time to reflect and prepare? Other?)

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. In addition to discussing those questions, make two important decisions before you begin:

  • Decide if you will share feedback live at the end of this call, or in writing via Slack DMs.
  • Then, decide who will be the Driver and Navigator for the first challenge and switch roles for the second exercise.

Exercises

There are 2 sets of exercises for this pairing session. Please find the one that corresponds to your program before beginning the work.

Note: Some language used in these prompts might be new to you. This is intentional and designed to support you in being flexible while reading documentation and specifications (as that is an essential skill for a developer to have). Use your context clues, make educated guesses with the knowledge you have, and if you are completely unsure “does it mean X or Y?” - do the exercise both ways - x and y - just to cover yourself!

Back End

Pairing Exercise 1: Classes & Objects (Back End)

For this exercise, use a Git workflow.

  • In your Mod 0 directory, create a new directory called pairing_3. Inside of that directory, touch a file called oop_practice. Initialize a Git repository, add the file to the staging area and do your "Initial commit".
  • Write a Class called Person with three attributes: name, age, and language. The name and age atrributes will be dynamic and the language attribute will be "English" by default.
  • Create an object instance and print it using the p command. Run the file in the Terminal to verify your code is working as expected.
  • Use attr_reader to print only the person's name.
  • Define a celebrate_birthday instance method inside the Person class that adds one to the person's age when it is called.
  • Call the celebrate_birthday method on your object instance and print the age attribute (run it in the Terminal) to verify that your method works!
  • Create another object instance. Print the object. Call the celebrate_birthday method twice and print the object again to verify that it works.
  • Run git log. Does your commit history tell the story of your progress on this challenge?


Pairing Exercise 2: Iteration

  • In your Mod 0 directory, create a new directory called pairing_3. Inside of that directory, touch a file called friends. Initialize a Git repository.
  • Define a variable that stores an Array containing 8 Integers between 1 and 100.
  • Write a program that checks each Integer, and prints out only those above 30.
  • 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.
  • Don't modify or delete any of your previous code; write another method that will check each Integer from the original Array, and print out only those under 60.
  • Push that new work up to the remote repository.


Front End

Pairing Exercise 1: Objects (Front End)

For this exercise, use a Git workflow.

  • In your Mod 0 directory, create a new directory called pairing3. Inside of that directory, touch a file called objectLiteralPractice. Initialize a Git repository.
  • Define a variable named person that stores an Object Literal. This Object should have 4 key-value pairs; you choose the key and use appropriate Data Types for the values.
  • Write code to print the entire Object.
  • Write code to print one of the values based on the key.
  • Run the file in the Terminal to verify your code is working as expected.
  • Programmatically add 2 more key-value pairs to the Object.
  • Programmatically print out all the keys.
  • Run the file in the Terminal to verify your code is working as expected.
  • Run git log. Does your commit history tell the story of your progress on this challenge?


Pairing Exercise 2: For Statements

  • In your Mod 0 directory, create a new directory called pairing3. Inside of that directory, touch a file called friends. Initialize a Git repository.
  • Define a variable that stores an Array containing 8 Numbers between 1 and 100.
  • Write a program that checks each Number, and prints out only those above 30.
  • 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.
  • Don't modify or delete any of your previous code; write another method that will check each Number from the original Array, and print out only those under 60.
  • Push that new work up to the remote repository.


Feedback

Based on your discussion at the beginning of this pairing session, discuss feedback now or follow up in a Slack DM after the meeting.

Reflection

Take a moment to reflect independently after this exercise.

  • As you prepare for your final evaluation, take a moment to review the guidelines for the evaluation outlined in the Course Syllabus. In what areas do you feel confident and in what areas might you need to improve before your last pairing session?
  • What is one step you could take to prepare for your next pairing session?
  • What progress have you made on the areas of growth you identified in your previous paired session?

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







Back