Pair Programming :: Conferencia Agile Spain 2014

68
Pair Programming

Transcript of Pair Programming :: Conferencia Agile Spain 2014

Pair  Programming  

Who  am  I?  

                                             @_pedro_torres  |  pedrogustavotorres.com  

                               Pedro  Gustavo  Torres  

An  Agile  Geek!  

2014

A  li@le  bit  of  background  

What  is  Pair  Programming?  

•  code  is  produced  by  two  people  programming:  – on  one  task    – on  one  workstaFon  

•  Two  keyboards  (opFonal)  •  Two  mice  (opFonal)  •  Two  monitors  mirroring  (ideally)  

Driver…  

…navigator  

Change  roles  mulFple  Fmes  a  day  

Change  roles  mulFple  Fmes  a  day  

Change  roles  mulFple  Fmes  a  day  

¡Quiz  Fme!  In  which  scenarios  are  the  developers  properly  pairing?  A   B  

C   D  

Setup  #1  

Setup  #2  

Setup  #3  

Setup  #4  

All  the  Fmes  in  front  of…  

…except  in…  

…and  in!  

Task  C  Task  B  

Task  A  Task  A  

RotaFon  between  pairs  Monday   Wednesday  

Pair  rotaFon  lader  

Rachel  Davies,  Agile  Coaching  

CollecFve  code  ownership…  

…bus  factor…  

…beginners  mind  

Engagement  /  Commitment…  

…valuable  stand-­‐ups…  

…be@er  integraFon  of  new  team  members…  

…limit  WIP…  

…  to  skip  code  reviews?  

Less  bugs…  

…more  fun…  

…less  distracFons…  

…less  interrupFons…  

…less  slacking…  

…and  comfort  zone  wise…  

…bigger  comfort  zone!  

Two  heads  think  be@er  than  one  

Back  in  2000  Cockburn  and  Williams…  

•  for  a  development-­‐Fme  cost  of  about  15%  •  Pair  programming:  –  Improves  design  quality;  – Reduces  defects;  – Reduces  staffing  risk;  – Enhances  technical  skills;  –  Improves  team  communicaFon;  –  It’s  more  enjoyable.  

Cockburn,  Alistair  and  Williams,  Laurie.  The  Costs  and  Benefits  of  Pair  Programming  

In  2008  Begel  and  Nagappan…  

•  64,4%  believed  that  pair  programming  worked  well  for  them  

•  65,4%  felt  that  pair  programming  produced  higher  quality  code  

•  25,4%  believed  that  it’s  not  slower  than  solo  programming  

Begel,  Andrew  and  Nagappan,  Nachiappan.  Pair  Programming:  What’s  in  it  for  Me?  

“Common”  habits…  

…no  music  /  social  “stuff”  

So  is  Pair  Programming  for  everyone?  

It  should  not  be  imposed  

Some  personaliFes  are  exquisite…  

soul  mates  

cvdd  

senior  

newbie  

junior  

…others  are  very  very  exquisite  

grumpy  

rock  star  

badass  

arch  enemy  

Remotely  works?  

Are  esFmaFons  affected?  

What  about  size  or  length  of  tasks?  

Is  it  €xp£n$ive?  

Is  it  only  for  mature  teams?  

Does  it  scale?  

Companies  that  use  it?  

Scholars  and  hands-­‐on  fans?  

Maybe  slow…  

…or  all  in!  

Thank  you  J  

The  whole  is  greater  than  the  sums  of  its  parts  Aristotle