    <rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:content="http://purl.org/rss/1.0/modules/content/">
     <channel>
        <title>ACCU  :: A Pair Programming Experience</title>
        <link>https://members.accu.org/index.php/articles/254</link>
        <description>Professionalism in Programming</description>
        <dc:language>en-us</dc:language> 
        <dc:creator>Administrator</dc:creator> 
        <admin:generatorAgent rdf:resource="http://www.xaraya.org" /> 
        <admin:errorReportsTo rdf:resource="mailto:webeditor@accu.org" />
       <sy:updatePeriod>hourly</sy:updatePeriod>
       <sy:updateFrequency>1</sy:updateFrequency>
       <docs>http://backend.userland.com/rss</docs>




<div class="xar-mod-head"><span class="xar-mod-title">Project Management + Overload Journal #65 - Feb 2005</span></div>

<table border="0" cellpadding="1" cellspacing="0">
    <tbody>
    <tr>
        <td valign="top">
            Browse in :
       </td>
       <td valign="top">

                                            <a href="https://members.accu.org/index.php/articles/">All</a>

                     &gt;                         <a href="https://members.accu.org/index.php/articles/c13/">Topics</a>

                     &gt;                         <a href="https://members.accu.org/index.php/articles/c66/">Management</a>
<br />

                                            <a href="https://members.accu.org/index.php/articles/">All</a>

                     &gt;                         <a href="https://members.accu.org/index.php/articles/c76/">Journals</a>

                     &gt;                         <a href="https://members.accu.org/index.php/articles/c78/">Overload</a>

                     &gt;                         <a href="https://members.accu.org/index.php/articles/c147/">65</a>
<br />

                                            <a href="https://members.accu.org/index.php/articles/c66-147/">Any of these categories</a>

                    -                        <a href="https://members.accu.org/index.php/articles/c66+147/">All of these categories</a>
<br />
</td>
   </tr>
   </tbody>
</table>




<div class="xar-error">
   <p>
 <strong>Note:</strong> when you create a new publication type,
the articles module will automatically use the templates
<em>user-display-[publicationtype].xt</em>
and <em>user-summary-[publicationtype].xt</em>.
If those templates do not exist when you try to preview or display a new article,
you'll get this warning :-)  Please place your own templates in themes/<em>yourtheme</em>/modules/articles . The templates will get the extension .xt there. </p>
</div>
<div class="xar-norm xar-standard-box-padding">
   <h1><strong>Title:</strong>&nbsp;A Pair Programming Experience</h1>
<p><strong>Author:</strong>&nbsp;</p>
<p>
<strong>Date:</strong> 12 February 2005 16:35:56 +00:00 or Sat, 12 February 2005 16:35:56 +00:00</p>
<p><strong>Summary:</strong>&nbsp;</p>
<p><strong>Body:</strong>&nbsp;<div class="sect1" lang="en">
<div class="titlepage">
<h2><a name="d0e20" id="d0e20"></a></h2>
</div>
<p>Agile methods and extreme programming have risen to the
forefront of software management and development interest over the
last few years. Two definitions of <span class=
"emphasis"><em>agile</em></span> are: (1) able to move quickly and
easily, and (2) mentally alert. Both definitions rely on the
capabilities of the people within the development process. The
&quot;Agile Manifesto&quot; [<a href="#Manifesto">Manifesto</a>] published in
Software Development in 2001 created a new wave of interest in the
agile philosophy and re-emphasized the importance of people. One of
the points highlighted in the Manifesto is &quot;We value individuals
and interactions over processes and tools.&quot; That does not mean
processes and tools are evil. It implies the individuals and
interactions (people) are of <span class="emphasis"><em>higher
priority</em></span> than processes and tools. Textbooks [<a href=
"#DeMarco">DeMarco</a>, <a href="#Weinberg">Weinberg</a>] have been
written to describe the importance of people in these new software
development approaches that have demonstrated improved productivity
and product quality. &quot;Extreme programming&quot; [<a href=
"#Beck">Beck</a>] is one member covered by the umbrella of agile
methods. &quot;Pair programming&quot; [<a href="#Williams">Williams</a>] is a
major practice [<a href="#Beck2">Beck2</a>] of extreme
programming.</p>
<p>The official definition of pair programming is two programmers
working together, side by side, at one computer collaborating on
the same, analysis, design, implementation and test. In other words
- two programmers, one pencil.</p>
<p>We have all experienced elements of the pair programming concept
in one way or another during our lives. How many times have we been
stuck removing an error from a design or program with no success?
When everything else failed, we went to our neighbour programmer,
the &quot;casual observer&quot;, to see if we could get some assistance.
While explaining our problem, we have a flash of inspiration, and
the problem is quickly solved. How much time did we waste before
asking a neighbour for insight? Can we relate this to pair
programming?</p>
<p>I was introduced to pair programming indirectly as an
undergraduate electrical engineering student in the 1950s. The
class and laboratory workload was such that any free time during
the 4-year program was more wishful thinking than reality. Working
part time made the program even more daunting. Fortunately, two
other EE students in the same academic program were struggling with
different sets of outside commitments. We decided to work together
on homework assignments, lab work and test preparation to lighten
the course load. We successfully maintained that approach through
the entire program in spite of having been conditioned throughout
our lives to perform solitary work. Our educational system does not
condone or encourage teamwork. That education philosophy supports
individual student evaluation, but works against learning. The
teamwork concept became ingrained in my thinking, as well as in my
programming and management research activities.</p>
<p>Later, much later, I was asked to find ways to improve
programmer productivity in a large software organization. The
undergraduate experience led me to propose an experiment in the
application of what we called &quot;two-person programming teams.&quot; The
term pair programming hadn't been coined at that time. The
experiment results are the subject of this case study.</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage">
<h2><a name="d0e56" id="d0e56"></a>Development
Task</h2>
</div>
<div class="sect2" lang="en">
<div class="titlepage">
<h3><a name="d0e59" id="d0e59"></a>Problem</h3>
</div>
<p>A description of the results achieved through the use of pair
programming without knowledge of the project or development task
underlying the experience would be meaningless. The software to be
developed in this project was a multitasking real-time system
executive. The product consisted of six independent components
containing a total of approximately 50,000 source lines of code.
The product contained no reused or COTS [&quot;Commercial,
Off-the-Shelf&quot;] components. FORTRAN was the required software
development language. The real-time executive was to be used to
support the development of a large, complex software system by the
developing organization. The development schedule for the executive
was critical and short.</p>
</div>
<div class="sect2" lang="en">
<div class="titlepage">
<h3><a name="d0e64" id="d0e64"></a>Team
Composition</h3>
</div>
<p>The development team consisted of ten programmers with a wide
range of experience and a manager. I tend to divide managers into
two primary groups: Theory X [<a href="#Hersey">Hersey</a>,
<a href="#McGregor">McGregor</a>] and Theory Y. The manager for
this task was experienced and from the Theory Y group.</p>
<p>The ten programmers assigned to the executive development had
prior experience that ran the gamut from an expert system
programmer to a couple of fresh, young college graduates. None of
these programmers had any experience working in a team environment.
As a collection, I would place them as about average for that
development organization.</p>
<p>The manager grouped the programmers into five teams according to
their experience level. Each team pair was composed of the most
experienced and least experienced programmer of the remaining
group. The first team consisted of the expert system programmer and
a person who had just returned from a six-year leave of absence.
The fifth team consisted of two programmers of near equal
capability and experience. These first and fifth programming teams
were important in the way they impacted the project. I will address
their impacts in the Lessons Learned.</p>
<p>No special changes from normal were made to the development
environment. The facilities were essentially 2-person cubicles. The
programming pairs were co-located in these cubicles. Each cubicle
contained two computer workstations, two desks and a common
worktable. The pair programming approach dictated that the pair
(two programmers, one pencil) uses only one development terminal
located on the common worktable. The second terminal was be used
for documentation, etc. not related to the team's assigned
development.</p>
<p>One programmer of the pair functioned as the &quot;driver&quot; operating
the keyboard and mouse, while the second programmer functioned more
as a &quot;navigator&quot; or &quot;co-pilot.&quot; The navigator reviewed, in
real-time, the information entered by the driver. The roles of the
two programmers were not permanent; frequent role changes occurred
daily. The navigator was not a passive role at any time.</p>
</div>
</div>
<div class="sect1" lang="en">
<div class="titlepage">
<h2><a name="d0e83" id="d0e83"></a>Results</h2>
</div>
<div class="sect2" lang="en">
<div class="titlepage">
<h3><a name="d0e86" id="d0e86"></a>A Priori</h3>
</div>
<p>A productivity and error baseline for the project could not be
directly obtained for the project individuals, but data was
available from past projects that allowed us to project
productivity and error averages for the project. The average
productivity and error rates in most organizations with consistent
management style and processes are near constant and quite
predictable. The baseline productivity was determined to be
approximately 77 source lines per person-month. The error rate for
the development organization was normal for the aerospace industry.
The numerical error rate value is not significant for this
presentation, and will remain unknown.</p>
<p>Formal design walkthroughs and software inspections were not
scheduled for this project. The project would follow a classic
waterfall development approach, which is inconsistent with today's
agile methods. Formal preliminary and critical design reviews, as
well as a final qualification test, were planned. Formal review and
test documentation was reduced to essential information; that is,
all elements necessary to proceed with the development.</p>
</div>
<div class="sect2" lang="en">
<div class="titlepage">
<h3><a name="d0e93" id="d0e93"></a>A Posteriori</h3>
</div>
<p>The productivity achieved in the real-time executive development
was 175 source lines per person-month as shown in Table 1. We hoped
for a productivity gain of anything greater than 0 percent. Any
small gain would have compensated for the two programmers loading
on each task. The 127 percent gain achieved was phenomenal and a
cause for celebration.</p>
<p>The error analysis showed the project had achieved an error rate
that was three orders of magnitude less than normal for the
organization. Integration of the first two components
(approximately 10,000 source lines) was completed with only two
coding errors and one design error. The third component was
integrated with no errors. The remaining three components had more
errors, but the number of errors for these components was
significantly less than normal.</p>
<div class="table"><a name="d0e100" id="d0e100"></a>
<table summary="Pair programming productivity and error rate gains"
border="1" cellspacing="0">
&lt;colgroup&gt;
&lt;col width=&quot;25%&quot;&gt;
&lt;col width=&quot;25%&quot;&gt;
&lt;col width=&quot;25%&quot;&gt;
&lt;col width=&quot;25%&quot;&gt;&lt;/colgroup&gt;
&lt;thead&gt;
<tr>
<th>Topic</th>
<th>Historical</th>
<th>Pair Results</th>
<th>Gain</th>
</tr>
&lt;/thead&gt;
&lt;tbody&gt;
<tr>
<td><span class="bold"><b>Productivity
(lines/person-month)</b></span></td>
<td>77</td>
<td>175</td>
<td>127%</td>
</tr>
<tr>
<td><span class="bold"><b>Error Rate</b></span></td>
<td>-</td>
<td>-</td>
<td>0.001 x normal</td>
</tr>
&lt;/tbody&gt;
</table>
<p class="title c2">Table 1. Pair programming productivity and
error rate gains</p>
</div>
<p>The &quot;continuous walkthrough&quot; assumption was demonstrated to be
very effective, and more than compensated for the lack of formal
walkthroughs. The formal preliminary and critical design reviews,
as well as a final qualification test, were effective in keeping
the five teams coordinated. Few problems were uncovered in the
review and test activities.</p>
<p>After the experiment was completed, the development manager
presented the very positive results to the organization's
management staff. The project managers' reaction to the results was
memorable. They claimed that their senior programmers would quit
before they would team with another programmer. The use of pair
programmers was never implemented in that organization.</p>
</div>
</div>
<div class="sect1" lang="en">
<div class="titlepage">
<h2><a name="d0e139" id="d0e139"></a>Lessons
Learned</h2>
</div>
<p>Several positive and some negative characteristics were observed
during the pair programming experiment. In general the attributes
of the college experience were exhibited here. The positive
attributes, not necessarily in any order, are as follows:</p>
<div class="itemizedlist">
<ul type="disc">
<li>
<p><span class="bold"><b>Brainstorming</b></span> - According to
the programmers, active real-time produced higher quality designs
than would have been achieved working alone. Little time was lost
optimizing code with more than one brain working.</p>
</li>
<li>
<p><span class="bold"><b>Continuous design walkthrough</b></span> -
The design and code were reviewed in real-time by both programmers
who ultimately produced fewer errors in each team product. Classic
walkthroughs and inspections are, whether we like it or not,
somewhat adversarial. The continuous walkthroughs within the team
were more positive and supportive.</p>
</li>
<li>
<p><span class="bold"><b>Focused energy</b></span> - The individual
teams appeared to be more focused in their activities. The highly
visible aspect of this attribute was the programmers took fewer
breaks for restrooms, coffee, outside discussions, etc.</p>
</li>
<li>
<p><span class="bold"><b>Mentor</b></span> - When we started work
in this industry, we were usually told about on-the-job training
that never materialized. Pair programming, when the two programmers
were not of the same experience level, provided a
craftsman/apprentice relationship that elevated the junior
programmer's skill quickly. Conversely, the craftsman's skill is
extended by the apprentice's questions and thinking outside of the
box.</p>
</li>
<li>
<p><span class="bold"><b>Motivation</b></span> - In general, the
programming pairs appeared much more motivated than their single
counterparts. The motivation level cannot be solely attributed to
the pair concept or the experiment itself. Some of the motivation
must be attributed to the project manager. Some has to be
attributed to rapid progress and the product quality. One of the
Theory Y assumptions is that motivation occurs at the social,
esteem and self-actualization levels, as well as physiological and
security levels.</p>
</li>
<li>
<p><span class="bold"><b>Problem isolation</b></span> - The time
wasted with two pairs of eyes (or brains) is significantly less
than the amount of time wasted trying to solve a problem in
isolation.</p>
</li>
</ul>
</div>
<p>The negative observations cannot be ignored. The important
observations, not necessarily in order of importance, are as
follows:</p>
<div class="itemizedlist">
<ul type="disc">
<li>
<p><span class="bold"><b>Programming pair of the same experience
and capability level is often counter-productive.</b></span> The
most troublesome pairs we dealt with during the experiment were two
teams in which both members were near the same capability level.
The worst case team consisted of two &quot;prima donna&quot; programmers. The
programming pair theoretically has equal responsibility for the
team's efforts and product. We found teams functioned more
smoothly, in spite of the members equally being driver and
navigator, if one member was slightly more capable than the other.
I read a statement by a software industry leader that stated hiring
software engineers from the top ten percentile of the top ten
universities would produce the best software development teams. I
cannot imagine the stress that many egos can create on one project.
Two strong egos of any caliber on a team create chaos until they
recognize the power of two minds.</p>
</li>
<li>
<p><span class="bold"><b>Coordination between the five teams would
have improved if the teams had been working in a common
area.</b></span> Each team was located in a two-person cubicle,
which limited the interaction between the teams. I use the term war
room (or skunk works) to describe the ideal open environment, which
would be a large area with worktables in the centre and cubicles
around the outside.</p>
</li>
</ul>
</div>
<p>Some additional characteristics of the successful experiment are
worthy of note. First, one of the manager's principal
responsibilities was to buffer the teams from outside interference.
The manager listed other important responsibilities that included
referee (in the case of the prima donnas), arbitrator, coordinator,
planner, cheerleader, and supplier of popcorn and other junk
food.</p>
<p>Second, project managers must be supportive of the pair
programming process. A classic (Theory X) manager observed a
programming pair working on a design over a period of time. This
manager suggested to their supervisor that one of the two
programmers be laid off because only one was doing anything
constructive. (The driver always gets the credit.) When the
supervisor heard the suggestion, he replied that these programmers
were the most productive people in the organization. The manager
answered that the programmers keep their office door closed so
others would not get the same idea.</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage">
<h2><a name="d0e192" id="d0e192"></a>Summary and
Conclusions</h2>
</div>
<p>Most managers who have not experienced pair programming reject
the idea without trial for one of two reasons. First, the concept
appears redundant and wasteful of computing resources. Why would I
want to use two programmers to do the work that one can do? How can
I justify a 100 percent increase in person-hours to use this
development approach? The project cannot afford to waste limited
resources.</p>
<p>The second reason is the assumption that programmers prefer to
work in isolation. Programmers, like most other people, have been
trained to work alone. Yet, according to the 1984 Coding War Games
sponsored by the Atlantic Systems Guild, only one third of a
programmer's time is spent is isolation; two-thirds of the time is
spent communicating with team members. Managers wonder about the
adjustments necessary to adjust to another's work habits and
programming style. They also worry about ego issues and
disagreements about the product's implementation.</p>
<p>This experiment demonstrated strongly that programmers can work
together effectively and efficiently to produce a quality product
of which both programmers can be proud. Prior programming
experience is not an issue. There are situations that initially
occur, especially with a team of equal experience and ego, where
disagreements over who will be the driver arise. Those situations
are generally transient. The benefits listed in the Results Section
overwhelmed any personality issues that arose.</p>
<p>The second major benefit demonstrated in this experiment, a
three order of magnitude improvement in error rate, is hard to
ignore. Repairing defects after developments are much more
expensive to fix than uncovering and fixing the defects where they
occur. The benefits of developing and delivering a stable product
faster, reducing maintenance costs, and gaining customer
satisfaction certainly minimizes the risk of using pair programming
teams.</p>
<div class="sidebar">
<p><span class="emphasis"><em>This article has been previously
published (as follows) and is used by permission of
STSC.</em></span></p>
<p>Jensen, Randall W., &quot;A Pair Programming Experience,&quot; <i class=
"citetitle">CrossTalk: A Journal of Defense Software
Engineering</i>, (Hill AFB, UT: Software Technology Support
Center), March 2003</p>
</div>
</div>
<div class="bibliography">
<div class="titlepage">
<h2><a name="d0e212" id="d0e212"></a>References</h2>
</div>
<div class="bibliomixed"><a name="Manifesto" id="Manifesto"></a>
<p class="bibliomixed">[Manifesto] &quot;The Agile Manifesto,&quot;
<span class="citetitle"><i class="citetitle">Software
Development</i></span>, Vol. 9, No. 8, August, 2001</p>
</div>
<div class="bibliomixed"><a name="DeMarco" id="DeMarco"></a>
<p class="bibliomixed">[DeMarco] DeMarco, T. and T. Lister,
<span class="citetitle"><i class="citetitle">Peopleware</i></span>,
(New York: Dorset House Publishers), 1977</p>
</div>
<div class="bibliomixed"><a name="Weinberg" id="Weinberg"></a>
<p class="bibliomixed">[Weinberg] Weinberg, G. M., <span class=
"citetitle"><i class="citetitle">The Psychology of Computer
Programming Silver Anniversary Edition</i></span>, ((New York:
Dorset House Publishers), 1998</p>
</div>
<div class="bibliomixed"><a name="Beck" id="Beck"></a>
<p class="bibliomixed">[Beck] Beck, K., <span class=
"citetitle"><i class="citetitle">Extreme Programming Explained:
Embracing Change</i></span>, (Reading, MA: Addison-Wesley),2000</p>
</div>
<div class="bibliomixed"><a name="Williams" id="Williams"></a>
<p class="bibliomixed">[Williams] Williams, L., R. R. Kessler, W.
Cunningham and R. Jeffries, &quot;Strengthening the Case for Pair
Programming,&quot; <span class="citetitle"><i class="citetitle">IEEE
Software</i></span>, Vol. 17, No. 4, (July/August 2000), pp.
19-25</p>
</div>
<div class="bibliomixed"><a name="Beck2" id="Beck2"></a>
<p class="bibliomixed">[Beck2] Beck, K., &quot;Embracing Change with
Extreme Programming,&quot; <span class="citetitle"><i class=
"citetitle">Computer</i></span>, October, 1999, pg.71</p>
</div>
<div class="bibliomixed"><a name="Hersey" id="Hersey"></a>
<p class="bibliomixed">[Hersey] Hersey, P. and K. H. Blanchard,
<span class="citetitle"><i class="citetitle">Management of
Organizational Behavior, Utilizing Human Resources</i></span>,
(Englewood Cliffs, NJ: Prentice-Hall, Inc.), 1977, <span class=
"bibliomisc">Theory X assumes: 1. Work is inherently distasteful to
most people. 2. Most people are not ambitious, have little desire
for responsibility, and prefer to be directed. 3. Most people have
little capacity for creativity in solving organizational problems.
4. Most people must be closely controlled and often coerced to
achieve organizational objectives. Theory Y assumes: 1. Work is as
natural as play, if conditions are favourable. 2. Self-control is
often indispensable in achieving organization goals. 3. The
capacity for creativity in solving organizational problems is
widely distributed in the population. 4. People can be
self-directed and creative at work if properly
motivated.</span></p>
</div>
<div class="bibliomixed"><a name="McGregor" id="McGregor"></a>
<p class="bibliomixed">[McGregor] McGregor, D., The Human Side of
Enterprise, (New York: McGraw-Hill Book Co.), 1960</p>
</div>
</div>
</p>
<p><strong>Notes:</strong>&nbsp;</p>
<p><em>More fields may be available via dynamicdata ..</em></p>
</div>
</channel>
</rss>
