About 90 minutes
- 20 minutes for video walkthrough of slides
- 15 minutes for Demonstration
- 10 minutes for Group Practice
- 30 minutes for Independent Practice
- "Asking Good Questions" lesson
- "Interpersonal Conflict Resolution" lesson
- "Professionalism" lesson
Pair programming is a very common way to write code and to solve software engineering problems. Pair programming generally produces higher-quality code, meaning fewer bugs and better readability.
Participants will be able to:
- Explain why pair programming is useful
- Show how to drive and navigate
- Demonstrate how to be a good pair partner
- Outline potential challenges
- What pair programming is
- Why pair programming is useful
- How to drive and how to navigate
- How to be a good pair partner
- "I could be doing this so much faster on my own." Sometimes, this is true. But a big drawback to coding on your own is that you're far less likely to catch bugs early on. And, since no one is checking your code, the readability of code you write in isolation may not be as good as the readability of code you wrote with someone else. So while you may be able to write code more quickly when coding on your own, the time it takes to work through bugs on your own usually negates this advantage.
- "Real programmers do not program in pairs." Some companies exclusively use pair programming (Pivotal Labs is one such example). Many companies use pair programming at certain times or in certain situations. Some companies don't practice pair programming at all.
- "I don't know what's going on or what my pair is doing, so I'm just going to sit back and watch them." Pair programming is not pair programming when only one person is doing the work. Speak up and advocate for yourself. Ask questions and stay involved! If you need a break to reset your mind, ask for one.
Two Techtonica staff members will demonstrate an effective, 10-minute pair programming session. Staff will ask apprentices what they noticed and learned from the demonstration.
-
Collaboratively come up with a list of questions to ask your pair partner before you begin a pair programming session together. Write these down for later reference.
-
Collaboratively come up with a list of questions to ask your pair partner when you finish a pair programming session together. Write these down for later reference.
- Techtonica staff will assign pairs. Ask and answer the questions we came up with during the Group Practice. Work with your pair partner on this code challenge using REPL.it:
Write a function called starString that takes in 2 parameters, a string and a character, and returns a string that has an asterix *
in place of every occurrence of the input character in the original input string. For example, an input of "guitar" and "g" would return "*uitar"
and an input of "swimming" and "m" would return swi**ing
.
Raise your hand when you're finished and a Techtonica staff member will come do a code review with you.
If you finish the Independent Practice early, work on this code challenge next:
Write a function called minItem that takes in a list of integers as its only parameter. It should return the smallest integer in the list. For example, an input of [101, 99, 87, 54, 200] should return 54.
Raise your hand when you're finished and a Techtonica staff member will come do a code review with you.
During this lesson's Independent Practice exercise and the days following this lesson, Techtonica staff will observe each pair in 10-minute intervals and provide feedback.