3. WHAT IS PAIR PROGRAMMING?
• Pair programming is a software
development technique in which
two programmers work together
at one workstation.
• One, the driver, writes code
while the other, the observer or
navigator, reviews each line of
code as it is typed in.
• The two programmers switch
roles frequently.
4.
5. ADVANTAGES OF PAIR PROGRAMMING
• Fewer mistakes and bugs
• Software developers usually work alone, which can cause negative traits like stubbornness and tunnel vision. It’s all too easy to get stuck
when trying to fix a bug based on an incorrect assumption, a hidden typo, or a gap in your knowledge.
• Greater resiliency
• If one person gets hit by a bus, or needs to suddenly depart for some other reason, what will happen to the project? Is there valuable
technical knowledge that would be forever lost (or take a long time to recover) because only one person knows about it?
• Pair programming does much to resolve this concern. At least two people should be familiar with every part of the code base, rather than
information living with only one person. This helps prevent unexpected project slowdowns and delays due to staff turnover.
• Increased code quality
• Sharing best practices between partners leads to better overall code. In particular, having to be accountable to your partner discourages both
members from taking any shortcuts or hacks. Pair programming encourages teams to build robust solutions that won’t create unexpected
bugs later on.
• Faster training
• The partners for pair programming are usually two experts or one expert and one novice. In this latter case, pair programming allows junior
and new team members to pick up information from their more experienced colleagues. This can massively speed up the onboarding
process.
• Improved team morale
• Pair programming gives you someone else to talk to on the project who can empathize with you and help you solve your problems, so that
you aren’t stuck spinning your wheels all day.
6. DISADVANTAGES OF PAIR PROGRAMMING
• Higher costs
• Having two people working on a single initiative may seem like a waste of valuable
resources. Indeed, it’s true that pair programming won’t be able to complete a project in
half the time.
• Still, the greater overhead that pair programming incurs is typically balanced by the higher-
quality code and a more efficient, effective final result. You pay more in costs upfront, but
you can recover your investment over the lifetime of the project, since you’ll spend less
time maintaining the codebase.
• Sustainability
• Pair programming isn’t usually sustainable enough to be practiced all of the time. The ideal
amount of time to spend pair programming seems to be around 2 to 2.5 hours—and don’t
forget to take breaks!
• The good news is that you can take measures to break up the intensity of pair
programming. Try switching to a new project or a new partner throughout the day to help
keep your mind fresh.
7. HW – PAIR PROGRAMMING + PRESENTATIONS
• HW 2.docx on Canvas
• Pseudocode
• Flow Chart
• Comments
• Explanation by each person
8.
9.
10. DISCUSSION
• Why is this important?
• How can this be useful to me?
• How can I use this in my current
job?
• How can I use this in my future
career?
• What will I get out of this?
• How is this used in the real world
Regroup and discuss after…