|
25 | 25 | \begin{abstract}
|
26 | 26 | We have long discussed how pair programming, among several benefits, accelerates knowledge sharing, ensures
|
27 | 27 | collective code ownership, and increases overall developer productivity~\cite{fowler:pairing}.
|
28 |
| - These benefits outweigh the previously assumed decrease in velocity and high cost due to having two people do |
| 28 | + These benefits outweigh the previously assumed decrease in velocity and high cost of having two people do |
29 | 29 | the work of one.
|
30 | 30 | Recently, we have been able to show that pairing does not negatively impact velocity.
|
31 |
| - On the contrary, pairing can improve velocity significantly, even in the short term. |
| 31 | + On the contrary, pairing can improve velocity significantly even in the short term. |
32 | 32 | We complete more features faster by pairing because the code reviews happen in real time rather than
|
33 | 33 | asynchronously.
|
34 | 34 | \end{abstract}
|
|
42 | 42 | Pair programming, or having the two developers work side-by-side on a common problem or set of features, is one form
|
43 | 43 | of this collaboration.
|
44 | 44 |
|
45 |
| - However, once developers have a solid understanding of product domain and technology stack, the question quickly |
46 |
| - becomes: What happens when individuals understand both product domain and technology? |
| 45 | + However, once developers have a solid understanding of product domain and technology stack, the question changes. |
| 46 | + What happens when individuals understand both product domain and technology? |
47 | 47 | Should they still pair?
|
48 | 48 |
|
49 | 49 | The simple answer might be yes, because both domain and technology are constantly changing and there is always more
|
50 | 50 | to learn.
|
51 | 51 | In addition, the benefits of collective ownership alone might lead individuals to continue to pair.
|
52 | 52 |
|
53 | 53 | \begin{displayquote}[\cite{fowler:pairing}][\textit{Birgitta Böckeler and Nina Siessegger}]
|
54 |
| - ``{[Pairing]} increases the chances that anyone on the team feels comfortable changing the code almost anywhere." |
| 54 | + ``{[Pairing]} increases the chances that anyone on the team feels comfortable changing the code almost anywhere.'' |
55 | 55 | \end{displayquote}
|
56 | 56 |
|
57 | 57 | Many organizations attempt to layer on processes to ensure code quality and security, however in practice this
|
58 |
| - creates an increase in feedback cycles that have the opposite effect. |
| 58 | + creates an increase in the length of feedback cycles that has the opposite effect. |
59 | 59 | In fact, research has found that lightweight change approval processes are the best way to ensure stability in a
|
60 | 60 | software product.
|
61 | 61 |
|
|
65 | 65 | In short, approval by an external body (such as a manager or CAB) simply doesn't work to increase the stability of
|
66 | 66 | production systems, measured by the time to restore service and change fail rate.
|
67 | 67 | However, it certainly slows things down.
|
68 |
| - It is, in fact, worse than having no change approval process at all." |
| 68 | + It is, in fact, worse than having no change approval process at all.'' |
69 | 69 | \end{displayquote}
|
70 | 70 |
|
71 | 71 | In effect, pair programming promotes this concept of lightweight change approval process with fast feedback cycles.
|
72 |
| - This alone would be an argument to continue to pair, however we have recently discovered that the impact is most |
73 |
| - effected by how easy the work is to parallelize. |
| 72 | + This alone would be an argument to continue to pair, however we have recently discovered that the largest impact |
| 73 | + comes from the ability to work fast with fewer parallel workstreams. |
74 | 74 |
|
75 | 75 |
|
76 | 76 | \section{Discussion}\label{sec:discussion}
|
|
79 | 79 |
|
80 | 80 | Consider a typical 8-hour day, and assume that we have two features: $F1$, which takes four hours to complete, and
|
81 | 81 | $F2$, which takes three hours to complete.
|
82 |
| - As is common, these features must be completed sequentially (starting feature two is dependent on completing feature |
83 |
| - one successfully). |
| 82 | + As is common, these features must be completed sequentially ($F1$ must be successfully completed before starting |
| 83 | + work on $F2$). |
84 | 84 |
|
85 | 85 | \subsubsection{Pairing}\label{subsubsec:serial-pairing}
|
86 | 86 |
|
|
182 | 182 | \hline
|
183 | 183 | Phil & \cellcolor{blue!10}$F1$ & \cellcolor{blue!10}$F1$ & \cellcolor{blue!10}$F1$ & \cellcolor{blue!10}$F1$ & & \cellcolor{red!10}Review $F2$ & \cellcolor{blue!10}Rework $F1$ & \cellcolor{red!10}Review $F2$ & \\
|
184 | 184 | \hline
|
185 |
| - Gerry & \cellcolor{red!10}$F2$ & \cellcolor{red!10}$F2$ & \cellcolor{red!10}$F2$ & \cellcolor{red!10}$F2$ & & \cellcolor{blue!10}Review $F1$ & \cellcolor{red!10}Rework $F2$ & \cellcolor{blue!10}Review $F1$ & \\ |
| 185 | + Gerry & \cellcolor{red!10}$F2$ & \cellcolor{red!10}$F2$ & \cellcolor{red!10}$F2$ & & & \cellcolor{blue!10}Review $F1$ & \cellcolor{red!10}Rework $F2$ & \cellcolor{blue!10}Review $F1$ & \\ |
186 | 186 | \hline
|
187 | 187 | \end{tabular}
|
188 | 188 | \caption{A typical day soloing}
|
|
206 | 206 | This includes both the risks associated with non-parallelizable features and the risks of imperfect communication
|
207 | 207 | and coordination.
|
208 | 208 |
|
209 |
| - To go fast with soloing with pull-requests you constantly need one stream of work for every developer. |
| 209 | + To go fast soloing with pull-requests you constantly need one stream of work for every developer. |
210 | 210 | Based on the past few decades of building software for startups and enterprise companies, we are unable to name a
|
211 | 211 | single product that has had absolutely no dependencies between features.
|
212 | 212 |
|
|
251 | 251 | This occurs when the code is merged into the mainline branch.
|
252 | 252 |
|
253 | 253 | \begin{definition}
|
254 |
| - A user story is \textit{finished} once the code is merged into the mainline branch. |
| 254 | + A user story is \textit{finished} once the code is integrated into the mainline branch. |
255 | 255 | \end{definition}
|
256 | 256 |
|
257 | 257 | \subsubsection{Pair Programming}\label{subsubsec:pairing}
|
|
266 | 266 | committing to the mainline branch once the code is complete.
|
267 | 267 | \end{definition}
|
268 | 268 |
|
269 |
| - As code review happens in real time, the code written for a story is ready to merge into the mainline as soon as it |
270 |
| - is complete. |
| 269 | + As code review happens in real time, the code written for a story is ready to integrate into the mainline as soon as |
| 270 | + it is complete. |
271 | 271 |
|
272 | 272 | \begin{lemma}
|
273 | 273 | \label{lemma:pair}
|
|
288 | 288 | \begin{definition}
|
289 | 289 | In the \textit{pull request workflow} each developer works individually and submits the code for each user story
|
290 | 290 | asynchronous review by others through pull requests.
|
291 |
| - Another developer reviews thoroughly reviews the pull request and suggests changes. |
| 291 | + Another developer thoroughly reviews the pull request and suggests changes. |
292 | 292 | The author reviews these changes, updates the pull request, and merges the code into the mainline branch.
|
293 | 293 | \end{definition}
|
294 | 294 |
|
|
313 | 313 | A \textit{backlog} is an ordered collection of user stories.
|
314 | 314 | \end{definition}
|
315 | 315 |
|
316 |
| - A backlog is an ordered collection of stories. |
317 | 316 | In any non-trivial project there are dependencies between stories that prevent one story from being started until
|
318 | 317 | another story has been completed.
|
319 | 318 |
|
|
348 | 347 |
|
349 | 348 | \begin{lemma}
|
350 | 349 | \label{lemma:parallel}
|
351 |
| - A team of $2n$ developers with a backlog with more than $2n$ workstreams has an average daily velocity of $4n$, |
| 350 | + A team of $2n$ developers with a backlog parallelizable into at least $2n$ workstreams has an average daily velocity of $4n$, |
352 | 351 | regardless of working model (assuming an 8-hour day).
|
353 | 352 | \end{lemma}
|
354 | 353 | \begin{proof}
|
|
360 | 359 | The power of pairing is the ability for a team to work quickly on a backlog, even when parallelization is limited.
|
361 | 360 |
|
362 | 361 | \begin{theorem}
|
363 |
| - A well-functioning team of developers working as pairs is as fast or faster than a team of developers using pull |
364 |
| - requests. |
| 362 | + A well-functioning team of developers working as pairs is as fast or faster than a team of solo developers using |
| 363 | + pull requests. |
365 | 364 | \end{theorem}
|
366 | 365 | \begin{proof}
|
367 |
| - Suppose a team of $2n$ developers has a backlog that is parallelizable into $m > 0$ workstreams. |
| 366 | + Suppose a team of $2n$ developers has a backlog that is parallelizable into $m$ workstreams. |
368 | 367 | We will examine three different cases for the size $m$, and show that the team's velocity working in pairs is at
|
369 | 368 | least as fast as the team's velocity using pull requests.
|
370 | 369 |
|
|
0 commit comments