I think the closest most people come to pair programming is an (often mandatory) code review process.

I love to do code review, and love to receive it. However power imbalance tends to weaken the value of code review in two ways. When (as it often is) the reviewer is a more experienced or more senior developer, the reviewee can perceive the review comments as a set of instructions. And when the roles are reversed, the reviewer will tend to restrict their comments to blatant bugs or typos: they will rarely feel confident enough to question everything that isn't clear to them, even though they may be expected to maintain it in the future.

Here's the psychological safety aspect: for a code review to be truly productive it should be a dialogue.

If a code review comment says "why did you do it this way rather than this other way", most people's instinctive reaction is to change to "this other way", when a preferable response would be a) to explain why you did it this way, or b) propose a modification that adds a comment explaining why it was chosen to do it this way. If there are arguments to be made either way, then have that discussion until consensus is reached (or if time does not permit, at least add a comment that the other way is worth considering).

When code review works well, multiple benefits are achieved simultaneously: the quality of the eventually submitted code improves; the reviewee learns something; the reviewer learns something; and the record of the review process serves as a useful historical document helping to explain why the code now looks as it does.

I have never experienced pair programming; I can guess that it needs a lot of respect and trust from both parties. But while I can imagine it resulting in better code (similar to a good review process), my guess is that it is less likely to result in the documentation improvements that a good review process can bring - I think that's a particular benefit to bringing in a fresh pair of eyes at the point the originator(s) consider a piece of work complete.


In reply to Re: Working Solo and in a Team by hv
in thread Working Solo and in a Team by eyepopslikeamosquito

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.