collaborave*construc’on*...
TRANSCRIPT
Collabora've Construc'on Pair Programming
So#ware Quality Quality Audit and Cer'fica'on
Master in Computer Engineering
Roberto García ([email protected])
Introduc'on
• Collec8ve ownership applies to all forms of Collabora've Construc'on
• With collec've ownership, all code is owned by the group rather than by individuals – Code can be accessed and modified by various members of the group
• Techniques: – Pair Programming, Formal Inspec8on, Walk-‐Through and Code Reading
Introduc'on
• Benefits: – BeKer code quality – The impact of someone leaving the project is lessened
• Some methodologies, such as Extreme Programming, recommend formally pairing programmers and rota8ng their work assignments over 'me
Pair Programming
• Pair of programmers: – One programmer types in code at the keyboard – The other programmer watches for mistakes and thinks strategically • Whether the code is being wriKen correctly and whether the right code is being wriKen
• Not effec've if pair spends 'me arguing about coding style – Standardize it in the SoSware-‐engineering guidelines (one of the components of the Quality Program)
Pair Programming
• The person without the keyboard should be an ac8ve par8cipant in the programming – Analyzing the code – Thinking ahead to what will be coded next – Evalua'ng the design – Planning how to test the code
Pair Programming
• Don't force pair programming of the easy stuff – Most organiza'ons that have tried pair programming eventually seKle into using pairs for part of their work but not all
• Rotate pairs and work assignments regularly • Encourage pairs to match each other's pace • Don't force people who don't like each other to pair
• Avoid pairing all newbies, at least one of the partners has paired before
• Assign a team leader
Pair Programming Benefits
• It holds up beIer under stress than solo development
• It improves code quality, at the level of the best programmer on the team
• It shortens schedules. Pairs tend to write code faster and with fewer errors
• Plus all the other general benefits of collabora've construc'on, including: – Dissemina'ng corporate culture, mentoring junior programmers and fostering collec've ownership
Exercise
• If you haven’t already done so, prac'ce pair programming during the development of the mini-‐project