collaborave*construc’on*...

8
Collabora’ve Construc’on Pair Programming So#ware Quality Quality Audit and Cer’fica’on Master in Computer Engineering Roberto García ([email protected] )

Upload: others

Post on 13-Oct-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Collaborave*Construc’on* Pair*Programming*ocw.udl.cat/enginyeria-i-arquitectura/software-quality/Continguts/5... · Pair*Programming* • Don'tforcepairprogramming of*the*easy*stuff*

Collabora've  Construc'on  Pair  Programming  

So#ware  Quality  Quality  Audit  and  Cer'fica'on  

 Master  in  Computer  Engineering  

   

Roberto  García  ([email protected])        

Page 2: Collaborave*Construc’on* Pair*Programming*ocw.udl.cat/enginyeria-i-arquitectura/software-quality/Continguts/5... · Pair*Programming* • Don'tforcepairprogramming of*the*easy*stuff*

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  

Page 3: Collaborave*Construc’on* Pair*Programming*ocw.udl.cat/enginyeria-i-arquitectura/software-quality/Continguts/5... · Pair*Programming* • Don'tforcepairprogramming of*the*easy*stuff*

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  

Page 4: Collaborave*Construc’on* Pair*Programming*ocw.udl.cat/enginyeria-i-arquitectura/software-quality/Continguts/5... · Pair*Programming* • Don'tforcepairprogramming of*the*easy*stuff*

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)  

Page 5: Collaborave*Construc’on* Pair*Programming*ocw.udl.cat/enginyeria-i-arquitectura/software-quality/Continguts/5... · Pair*Programming* • Don'tforcepairprogramming of*the*easy*stuff*

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  

Page 6: Collaborave*Construc’on* Pair*Programming*ocw.udl.cat/enginyeria-i-arquitectura/software-quality/Continguts/5... · Pair*Programming* • Don'tforcepairprogramming of*the*easy*stuff*

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    

Page 7: Collaborave*Construc’on* Pair*Programming*ocw.udl.cat/enginyeria-i-arquitectura/software-quality/Continguts/5... · Pair*Programming* • Don'tforcepairprogramming of*the*easy*stuff*

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    

Page 8: Collaborave*Construc’on* Pair*Programming*ocw.udl.cat/enginyeria-i-arquitectura/software-quality/Continguts/5... · Pair*Programming* • Don'tforcepairprogramming of*the*easy*stuff*

Exercise  

•  If  you  haven’t  already  done  so,  prac'ce  pair  programming  during  the  development  of  the  mini-­‐project