News for hackers. Stuff that matters.
Re:Against Pair Programming by stevage on Friday February 18, 2022 @07:25AM (#30384858)
Ha. I dislike pair programming as much as anyone, but this argument is really weak. It doesn't sound like he has actually had much experience of it, and is just judging it from the outside.

But let's go through some points:

>Since we are employing two programmers to do work on the same keyboard at the same time, the output of pair programming must be greater than 2x the output of a single programmer to make sense.

In "output" you have to include quality (fewer bugs), improved codebase knowledge (bus factors etc), improved team cohesion etc.

> Pair programmers tend to give feedback that's more appropriate in a design or code review.

What's his evidence? Why is it more appropriate there (after the code is written) than here (before/during)?

> For the pairs that follow this, the only feedback that's left tends to be bikeshedding or stylistic, both of which kill velocity.

That's, um, bullshit. Pair programming can pick up mistakes before they propagate, which increases velocity.

> It's like having a backseat driver.

I'd say it's more like having a second pair of eyes while you're doing a tricky reversing maneuver.

> Alternatives like code reviews, design reviews, and general documentation are much better 1-to-n ways to share knowledge instead of 1-to-1.

Aren't code reviews and design reviews 1-to-1 as well? Or worse, n-to-1.

> In addition, most of these alternatives be done asynchronously.

And this is better, because...?

Re:Against Pair Programming by mrozbarry on Friday February 18, 2022 @08:46AM (#30385585)
Just to tag along (I was going to quote and write just about all the same things), but with two developers, the HUGE value-add is codebase knowledge.

If two people on a team regularly contribute to a repo, one person likes to work on feature A, and the other feature B, and all of a sudden, the feature B person leaves and never comes back, that will kill velocity. Even if feature A person has been doing code reviews, a code review is much different than being aware of the system and continuing to improve a feature. Now person A has to either read documentation (which is, for the sake of code writing, a 0 velocity), or take larger tours through the code to figure out why a feature is how it is, and what needs to be done.

So the big question for anyone is if they want to focus on velocity/lines per day, or consistently smooth development. You can get both of those things when everyone is doing their own tickets, but that will immediately stop as soon as there is a change in your team.

I don't think pairing is perfect, or mobbing for that matter, but it does give clients a more consistent/smooth experience if they are okay with paying more for quality than speed. It does take the right kind of people and the right kind of project, just like any problem and tool set.

Re:Against Pair Programming by JKCalhoun on Friday February 18, 2022 @08:58AM (#30385697)
I'll tag along as well. (But I happen to think pair programming is a beautiful thing.)

Code reviews in real time, in situ.

"White board discussions" in real time, in situ.

Learning how someone else codes/debugs.

These are all worth the price of pairing up engineers in my mind.

If we're talking agile development, I would love it if all engineers could get paired up for at least one sprint a year. Especially less experienced or new to the team engineers. I suspect it will be the pairing experiences that foster the most professional growth.

Re:Against Pair Programming by ineptech on Friday February 18, 2022 @10:49AM (#30387234)
One more, though this is hard to explain analytically: shared language about and mental model of the codebase. If four people build a platform working separately, they will each come out of the project with subtly different ideas of what the platform is and how it's organized.

That's kind of subjective and I don't think I could prove its usefulness on graph paper to someone who isn't convinced, but I think it's real and significant. (and hence I'm curious if people who have mobbed a lot agree)

Re:Against Pair Programming by mrozbarry on Friday February 18, 2022 @11:51AM (#30388083)
I have this exact issue. My client has a few teams working on related products on different platforms and languages, and when we discuss bugs, I'll use a term that will almost immediately get a "oh, that's not what you mean, because thing x in this context means thing y." For example, iOS sandbox applications vs testflight applications vs sandbox purchases. Both applications use sandbox purchases, so just saying "sandbox" is ambiguous or can often cause confusion.
Re:Against Pair Programming by mrozbarry on Friday February 18, 2022 @09:06AM (#30385787)
Oh, I should have mentioned, I mob program every day at my current job, and pair programmed every day at my previous job, and both were very successful and enjoyable jobs.
Re:Against Pair Programming by gopher_space on Friday February 18, 2022 @01:28PM (#30389290)
My biggest gripe with pair programming is that people are already too close to me when they're at their own desk minding their own business. I love working on closely related or even intertwined projects, however. It'd be interesting to work on a really good pair team for a little bit, see what a "perfect example" looks like.
Re:Against Pair Programming by walljm on Friday February 18, 2022 @11:24AM (#30387714)
I also find that pair programming can be a great way to train programmers in areas of knowledge they may not be up to speed on, to mentor junior programmers, or to just learn from your peers as they approach problems from different perspectives.

i also find paring to be useful when troubleshooting or working on a hard to find bug.

pairing shouldn't be the norm, but it can certainly be useful.

Re:Against Pair Programming by marcosdumay on Friday February 18, 2022 @11:27AM (#30387742)
Well, yes, pair programming comes with a builtin permanent reduction on individual productivity. Partial knowledge comes with a builtin sporadic reduction on individual productivity when there are personal changes.

What is higher depends on a lot of details. You will see a lot of completely different experiences, all real, none alike.

Re:Against Pair Programming by toqy on Friday February 18, 2022 @07:28AM (#30384884)
> I'd say it's more like having a second pair of eyes while you're doing a tricky reversing maneuver.

I’ve always liked the rally racing driver/navigator analogy for explaining pair programming. It tends to go better if you generally follow those roles when doing it too.

Re:Against Pair Programming by watwut on Friday February 18, 2022 @08:49AM (#30385608)
I don't think that is good analogy. Driving race with driver and navigator are in completely different then anything related to programming or even pair programming.

That analogy is just yet another way how to shut up people who dont like the process.

Re:Against Pair Programming by travisjungroth on Friday February 18, 2022 @09:06AM (#30385788)
The way some people pair is really more similar to rally driving than you give it credit. I hate backseat driver style pair programming. Strong-style is very different and more like right-seat (I’m in the US, so let’s say not-driver seat) driving. https://llewellynfalco.blogspot.com/2014/06/llewellyns-stron...
Re:Against Pair Programming by toqy on Friday February 18, 2022 @09:08AM (#30385812)
> That analogy is just yet another way how to shut up people who dont like the process.

In that case explaining why you like anything is a way to shut people up who don't

Re:Against Pair Programming by watwut on Friday February 18, 2022 @10:25AM (#30386904)
> In that case explaining why you like anything is a way to shut people up who don't

No. It is just that specifically agile has a way to responding to people who dont like something with very very handwavy explanations that feel good, but dont really mean anything. Explaining why you personally like something is entirely different kind of communication. Explaining why you think something works well is also different. But, going into "this makes sense, because two people make sense in rally racing" is neither of those.

Why rally racing and not any of the other races where competitors are alone? Why not soccer team for that matter? That seems closer to development then any vehicle racing anyway.

Re:Against Pair Programming by travisjungroth on Friday February 18, 2022 @03:14PM (#30390466)
> Why rally racing and not any of the other races where competitors are alone? Why not soccer team for that matter? That seems closer to development then any vehicle racing anyway.

There seems to be two directions of analogies here. One is arguing from subject to analog. “Programming is like rally car driving so we should act like they do.” Pretty crummy argument. I’d have no answer to your “why rally car?” question.

The other direction is explaining from subject to analog. “Strong-style pair programming is like rally car driving.” There’s much less of a claim here. I’m just saying they have enough shared attributes that I can map how they’re similar and you may find that useful for understanding. So why rally cars? Because that’s the context that has the most similar method as the one I’m talking about (not that it’s the most similar context).

In the latter case, the claim of fitness is separate from the analogy. “This method is useful. It’s like one rally car drivers use”. There’s no “because” in there.

Re:Against Pair Programming by watwut on Saturday February 19, 2022 @07:24AM (#30396604)
> I’m just saying they have enough shared attributes that I can map how they’re similar and you may find that useful for understanding.So why rally cars? Because that’s the context that has the most similar method as the one I’m talking about

It is fair to guess that nearly no one here ever sat in rally car. We know it has navigátor, but we don't actually know what navigator exactly does. And I genuinely don't see many similarities. It seem to be more about split second decision making in situation where you need to speed up or slow down toward turn.

Re:Against Pair Programming by travisjungroth on Saturday February 19, 2022 @01:20PM (#30399197)
You don’t need to have sat in a rally car. The split second decision making is the context, not the method. The context doesn’t have to match perfectly. They just share the attribute of “high cognitive load”.

Did you read the link I posted? The essence of the idea is you have one person who takes physical action, makes small decisions and take orders. That person is called “driver”. You have another person who makes larger decisions and gives orders. That person is called “navigator”.

The dynamic I just described is true of rally car driving and strong style pair programming. It’s not true for most pair programming or most other types of driving.

Re:Against Pair Programming by projektfu on Friday February 18, 2022 @11:08AM (#30387503)
> Why not soccer team for that matter? That seems closer to development then any vehicle racing anyway.

Perhaps unintentionally, a good analogy for traditional software teams. Eleven players, one or two stars, the other players mostly looking good because they can pass the ball to the top players.

In the end, all analogies suck. Pair programming is a pretty unique situation in the workplace, it works great for some people, others will never like it. It worked for me because I was kept on task. It may have slowed down the top performer but that person appreciated the company. Overall I think it made our team of 8 at the time more productive than they’d have been with separate assignments, and it really helped with team cohesion.

Re:Against Pair Programming by watwut on Friday February 18, 2022 @12:42PM (#30388695)
It was not unintentional. It does fit better and has no pair programming.

But, the non star soccer players in competitive teams are significantly better then what you imply. And do way more work and have way more knowledge.

Re:Against Pair Programming by IanCal on Friday February 18, 2022 @08:02AM (#30385187)
Yeah it would be weird to me if programming is some unique task where two people solving a complex problem together is a bad thing.

I'd not done it much in the past but recently seen it done more and participated more - each time it's been useful. I paired to deploy some work, and having both of us work together was really helpful as we could talk through issues we were seeing as we went and it taught me more about infra & them more about the project.

Re:Against Pair Programming by Veuxdo on Friday February 18, 2022 @09:46AM (#30386345)
What's weird and unique about work that one person can do better than two? Novel writing is complex, chess is complex, art is complex. Individuals do these things all the time.
Re:Against Pair Programming by IanCal on Friday February 18, 2022 @10:55AM (#30387312)
Chess seems like an odd addition there, would two people who are able to discuss strategy and reason about the next move be worse than one? For writing, workshopping jokes or scenes happens a lot doesn't it? Particularly with scripts.

When it comes to novels and art though, there's a focus on producing one persons imagined work, edited and helped by others. When it comes to programming, particularly in a company, there's a problem to solve.

Is it common in other fields of engineering to say that only one engineer can work on a problem at once?

> Individuals do these things all the time.

Individuals code alone all the time too. What I'm commenting on is the idea that programming together with someone is terrible.

Re:Against Pair Programming by Veuxdo on Friday February 18, 2022 @11:02AM (#30387419)
Do engineers pair CAD on e.g. bridges? Does anyone know?
Re:Against Pair Programming by skeeter2020 on Friday February 18, 2022 @11:10AM (#30387525)
> Novel writing is complex, chess is complex, art is complex.

Well one thing you need to consider is that most software is not written in small, artisian batches but at scale. Pairing is one way to promote doing development and all the things you mention at a greater capacity than the individual.

Re:Against Pair Programming by Veuxdo on Friday February 18, 2022 @11:20AM (#30387656)
Maybe? Dividing up the work is the other, traditional, way to work at scale. It hasn't been shown that pair programming is more effective.
Re:Against Pair Programming by ravishi on Friday February 18, 2022 @07:37AM (#30384970)
His argument seems focused on a single output: developer velocity. That's a dangerous metric to optimize for.
Re:Against Pair Programming by Smeevy on Friday February 18, 2022 @10:30AM (#30386976)
That's exactly the problem with what Agile has become. The only way to get the ear of a bad management is to talk about how you can be EVEN FASTER.
Re:Against Pair Programming by sascha_sl on Friday February 18, 2022 @08:18AM (#30385321)
Asynchronous workflows should be the default. Interruptions are almost universally bad, so being able to fit a code review into your work day whenever you want is much better.

Even if you have a fixed meeting, you might've just started to get productive on something else, or maybe there's something that actually needs to be handled synchronously, like an incident.

It also is a lot more pleasant for neurodiverse developers. I have ADHD and pairing is not great for me. My attention doesn't work on demand, for any topic I choose. I fit chores in between engaging tasks to keep things going, creating the illusion of doing one thing after the other, but I'd rather not be interrupted or judged with either and to a neurotypical person this behavior might seem erratic and confusing.

Re:Against Pair Programming by bluefirebrand on Friday February 18, 2022 @11:12AM (#30387549)
I also have ADHD and find pair programming is great for me. Having a person that I am working directly with helps me keep on task and prevents my brain wandering off to do other things or scattering around a bunch of tasks.

Sometimes it helps me to have an external force help direct my focus.

Re:Against Pair Programming by sascha_sl on Friday February 18, 2022 @01:03PM (#30388987)
I've completely blanked out more than once on pair programming where my attention went into what I like to call "brute force mode", where your working memory scatters every few seconds or so, and you keep starting thoughts from scratch.

It honestly feels like torture to me.

Switching tasks lets me reset from this state well enough, so I consider it essential coping.

Re:Against Pair Programming by SideburnsOfDoom on Friday February 18, 2022 @11:38AM (#30387885)
> Asynchronous workflows should be the default. Interruptions are almost universally bad,

What's great, though, about getting some work ready, creating the PR; and then waiting .. Minutes? Hours? ... days? who can tell? For a response.

if you're wanting "productive", that isn't it.

Re:Against Pair Programming by sascha_sl on Friday February 18, 2022 @01:06PM (#30389026)
But you're breaking someone else's productive time. The way around this is (1) having enough work prepared that you can start on something else and (2) cutting your PRs well enough for them to be entire (sub-)tasks. And if you can't, maybe you need to cut smaller tasks.
Re:Against Pair Programming by SideburnsOfDoom on Friday February 18, 2022 @06:38PM (#30392708)
> But you're breaking someone else's productive time

Yes, the system's productivity is not about maximising the uninterrupted productivity of person A, or of person B either.

Sending a whole pile-up of PRs isn't a great solution either.

Re:Against Pair Programming by SideburnsOfDoom on Friday February 18, 2022 @08:24AM (#30385378)
> In "output" you have to include quality (fewer bugs), improved codebase knowledge (bus factors etc), improved team cohesion etc.

yes, this is important: for a senior / expert, knowledge transfer, i.e. showing someone else what to do, often is much slower than "just doing the work by yourself"; but that does not make its value lesser.

If you optimise for productivity today, you might regret it tomorrow.

Re:Against Pair Programming by tkindy on Friday February 18, 2022 @07:48AM (#30385075)
I generally agree with your take.

> Aren't code reviews and design reviews 1-to-1 as well? Or worse, n-to-1.

I think PR reviews can be a resource for other engineers on the team to learn from beyond just the PR author. Granted, I think pair programming can probably deliver these lessons more effectively since you can have a live conversation about it and clear up any confusion there.

>> In addition, most of these alternatives be done asynchronously.

> And this is better, because...?

I don’t know the author’s feelings here, but I think this makes some sense in the context of the rising popularity of remote work. It isn’t necessarily a given that you’re in a similar time zone to your teammates.

I’ve also been interested in the topic of async work throughout the pandemic, with companies like Gitlab and Doist as examples who also evangelize the practice. I’ve pushed for some of those async practices on my team at work but feel like we’ve had mixed to little success with them.

So I agree with your skepticism of “async is better”, even if there was some reasoning provided.

Re:Against Pair Programming by whiplash451 on Friday February 18, 2022 @11:42AM (#30387945)
Well said. I would add to that: pair programming is a unique opportunity to create human connections between teammates, which is very valuable in general, and even more valuable in a remote setup.
Re:Against Pair Programming by notjustanymike on Friday February 18, 2022 @08:39AM (#30385528)
Agreed. Sounds like someone who pays for lines of code.
Re:Against Pair Programming by Supermancho on Friday February 18, 2022 @10:45AM (#30387187)
> In "output" you have to include quality (fewer bugs), improved codebase knowledge (bus factors etc), improved team cohesion etc.

> Pair programming can pick up mistakes before they propagate, which increases velocity.

Notice how it's "reduce bugs" twice with some other hand-waving qualities thrown in. Even if you have some solo developer write code with a bug, having another developer go through and fix it is a time saver over PP for all the code that was not error prone. Then we have the metric mixing issue of measuring developer code quality, over time, when mixing more than 1 person in a task.

> And this is better, because...?

Because you can avoid paying for idle time. The most common quality of pair programming team (considered productive or not) is watching one member waiting to see the other write out the function and functionality that was already agreed upon. Developers already do this when they have a tough problem. They invite others to talk and look through the code, ad hoc.

Pair programming has already been tried by a multitude of teams across decades and it does not produce results that have driven it's widespread adoption. End of story.