You are on page 1of 11

What is pair

programming?
Pair programming is an Agile software development technique
originating from Extreme programming (XP) in which two developers
team together on one computer. The two people work together to design,
code and test user stories. Ideally, the two people would be equally
skilled and would each have equal time at the keyboard.
INTRODUCTION
• Pair programming is a collaborative effort that involves a lot of communication.
The idea is to have the driver and navigator communicate, discuss approaches and
solve issues that might be difficult for a single developer to detect.
• A common implementation of pair programming calls the programmer at the
keyboard the driver, while the other is called the navigator. The navigator focuses
on the overall direction of the programming. The collaboration between
developers can be done in person or remotely.
HOW DOES PAIR
PROGRAMMING
WORK?
• Pair programming requires two developers, one workstation, one keyboard
and a mouse. The pairings can be assigned or self-assigned.

• Pair programming uses the four eyes principle, which ensures two sets of eyes
review the code that is being produced, even when there is a division of labor.
While the driver writes the code, the navigator checks the code being written.
The driver focuses on the specifics of coding, while the navigator checks the
work, code quality and provides direction.
BENIFITS OF PAIR PROGRAMMING

Fewer coding mistakes Reduced effort to coordinate


Another programmer is looking over Developers will get used to collaborating and
the driver's code, which can help coordinating their efforts.
reduce mistakes and improve the
quality of the code.

nowledge is spread among the pairs Increased resiliency

Pair programming helps developers understand


Junior developers can pick up more skills from each part of a codebase, meaning the environment
senior developers. And those unfamiliar with a will not be dependent on a single person for
process can be paired with someone who knows repairs if something breaks.
more about the process.
PAIR PROGRAMMING STYLES
TEST DRIVEN
DEVELOPMENT
DEFINITION
Test Driven Development is the process in which test cases are written before
the code that validates those cases. It depends on repetition of a very short
development cycle. Test driven Development is a technique in which
automated Unit test are used to drive the design and free decoupling of
dependencies
steps in TDD
• Add a test – Write a test case that describe the function
completely. In order to make the test cases the developer
must understand the features and requirements using user
stories and use cases.
• Run all the test cases and make sure that the new test case
fails.
• Write the code that passes the test case
Run the test cases
• Refactor code – This is done to remove duplication of code.
• Repeat the above mentioned steps again and again
BENIFITS OF TDD
• Unit test provides constant feedback about the functions.
• Quality of design increases which further helps in proper
maintenance.
• Test driven development act as a safety net against the bugs.
• TDD ensures that your application actually meets
requirements defined for it.
• TDD have very short development lifecycle.
ADVANTAGES

• MORE MODULAR DESIGN


• EASIER TO MAINTAIN
• EASIER TO REFACTOR
• HIGH TEST COVERAGE
• TESTS DOCUMENT THE
CODE
• LESS DEBUGGING
DISADVANTAGES

• TESTS GOT TO BE MAINTAINED


WHEN REQUIREMENTS CHANGE
• ALL THE MEMBERS OF A TEAM GOT
TO DO IT
• SLOW PROCESS

You might also like