News for hackers. Stuff that matters.
Re:On Pair Programming by jacques_chester on Wednesday January 15, 2020 @09:27PM (#22061163)
> what other industry or domain does this? none that i know of.

Aviation, some surgeries.

You know, low-stakes stuff.

Re:On Pair Programming by nikofeyn on Wednesday January 15, 2020 @11:14PM (#22061638)
those aren't analogous, like at all. or actually, they are analogous, just not in the sense you mean, as they don't serve as examples of "pair <whatever work>".

for both pilots and surgeons, no one is doing the same job at the same time. pilots and surgeons, when performing on the same flight or surgery, have different roles, and it's actually extremely important that they stick to and abide by those roles. you know, because it's high-stakes stuff.

however, before and after the flights or surgeries (akin to design or planning in software), or perhaps during sticky situations or emergencies (akin to debugging in software), or during post-flight or surgery reviews (akin to code reviews) they do work together on the same thing. during the sticky situation, emergency, or debugging stage, that thing is the emergency at hand. once it's dealt with, the separate, individual roles are assumed.

so thanks for your examples, as they just serve to further my point.

Re:On Pair Programming by jacques_chester on Thursday January 16, 2020 @08:15AM (#22064163)
> for both pilots and surgeons, no one is doing the same job at the same time.

Do you think pair programmers are literally bashing the keyboard simultaneously?

Your point, as I read it, wasn't that "only programmers do pair programming". That's as trite as "only surgeons do pair surgery" or "only aviators do pair aviation", because it includes the profession. It's that only programmers doing any kind of assigning two minds to cooperatively navigate one problem space, which is demonstrably false.

Re:On Pair Programming by nikofeyn on Thursday January 16, 2020 @11:31AM (#22066081)
> Do you think pair programmers are literally bashing the keyboard simultaneously?

that's how the article and other articles define it: two people sitting at the same machine writing code. what is your definition?

my point was indeed: what other industry practices "pair <work or implementation>" on the same task?

and why would it be the second? we're literally talking about pair programming here, not just cooperative work.

Re:On Pair Programming by rabidrat on Thursday January 16, 2020 @11:48AM (#22066238)
One person is sitting at the machine, the other is sitting beside them. Like how one person is flying the plane, the other is sitting beside them. Pilot/navigator is a common role division. In pair programming, the person at the keyboard is doing the minutiae of the immediate task at hand (the pilot), while the other person is thinking through the next steps or how it fits into the whole (the navigator). They are not actually typing at the same time.
Re:On Pair Programming by workthrowaway on Thursday January 16, 2020 @08:40AM (#22064374)
thank you!! i had the same exact thoughts last night but refrained from commenting. same exact thoughts about pilots and surgeons.

plus this: pair programming has only been studied / proven to work in a teaching environment, where one student is literally teaching the other and bringing them up to speed.

i don't know of any study that proves that it works in a professional setting with experienced people having more or less the same background, working on the same task

if there is any study, i would like to read it.

Re:On Pair Programming by ken on Thursday January 16, 2020 @09:02PM (#22071181)
And yet in software, the people in high-stakes domains who really care about quality (like the Lockheed shuttle group) don't use pair programming. Has any team using pair programming ever had a defect rate as low as 1 bug per half million lines of code? Or even within an order of magnitude of that?

For real quality, you need detailed specifications before code is written, an independent verification team, and root cause analysis on every bug. Otherwise, you're still down at CMM level 1 or 2 ("chaos, and slightly better than chaos").

Pair programming is putting a second pair of eyes on chaos to try to emulate an actual process. It's the Hyper-Threading of development processes. We're too cheap to implement what we all know we really need, so here's something that's better than nothing, for a small fraction of the cost, because it repurposes what we have on hand.

Re:On Pair Programming by cgrealy on Wednesday January 15, 2020 @09:42PM (#22061240)
Fundamentally different to software development on both counts.

Aviation and surgery are basically real-time activities. If you make a mistake in either, the consequences are dire. Also, in aviation, it's about redundancy... if there's an issue, it's not like you can wait while someone else steps in.

Software is not like that. Your code almost never goes straight into prod (unless you have really aggressive CI/CD!). There is always time to correct your mistakes.

Re:On Pair Programming by jacques_chester on Wednesday January 15, 2020 @09:47PM (#22061259)
Software mistakes can be pretty dire and if you want to ensure quality, in practice, you will want different eyes to look at the code. Which also lends redundancy, if someone wishes to move on.

The easiest time to catch mistakes is early.

Re:On Pair Programming by cgrealy on Thursday January 16, 2020 @03:19AM (#22062581)
> Software mistakes can be pretty dire

Absolutely, but again, they don't happen as you're coding, unlike aviation or surgery.

> if you want to ensure quality, in practice, you will want different eyes to look at the code

Totally agree, but that's an argument for code review, not pair programming. PP is a way to do code review, but I'd argue it's not a very good way, since you're asking the authors to review the code.

> The easiest time to catch mistakes is early. TDD and CI are a more effective way of doing this.

Re:On Pair Programming by jacques_chester on Thursday January 16, 2020 @08:09AM (#22064112)
> Absolutely, but again, they don't happen as you're coding, unlike aviation or surgery.

When do they occur?

> PP is a way to do code review, but I'd argue it's not a very good way, since you're asking the authors to review the code.

I'd argue that it is a good way, based on my experience of both methods. Code reviews are better than winging it, but given the choice between a PR-and-review process and pair programming with trunk development, I'd take the latter every time.

I agree with the virtues of TDD and CI, I see pair programming as a useful way to help with TDD.

Re:On Pair Programming by cgrealy on Friday January 17, 2020 @06:45AM (#22073849)
> When do they occur? When the code is run, not when it’s written.

> I'd argue that it is a good way, based on my experience of both methods.

And with similar experience, I’d disagree. Paired programmers are focused on writing the code not reviewing. The whole point of code reviews is to let someone divorced from the problem solving process objectively the code.

Re:On Pair Programming by Mike12398 on Wednesday January 15, 2020 @10:57PM (#22061563)
Coding is NOT a real-time procedural performance activity, and thus can not be compared to aviation or surgery. Code reviews, collaboration on architectural decisions, and QA catch mistakes as early as necessary.
Re:On Pair Programming by jacques_chester on Thursday January 16, 2020 @08:20AM (#22064206)
All these professions require a mix of procedural and declarative skill. Pilots and surgeons aren't professional athletes, they rely on enormous amounts of declarative knowledge.

The easiest time to catch a mistake is when it's made, which is as true of surgery or flight as of software development.

That's why I rely on type systems, tests and whenever I can, someone next to me asking "why?".

Re:On Pair Programming by Mike12398 on Thursday January 16, 2020 @01:38PM (#22067465)
Read again: Coding is NOT a real time performance activity, thus can not be compared with aviation and surgery in that way. Pairing is a requirement to do aviation and surgery reliably and accurately, but is completely optional for coding well, and arguably reduces quality of code in many cases.
Re:On Pair Programming by nikofeyn on Wednesday January 15, 2020 @11:16PM (#22061648)
> The easiest time to catch mistakes is early.

pair programming and the articles proposing it do nothing to help catch mistakes early. i would argue that they even delay catching mistakes due to what i'd call deconstructive interference during the implementation process.

there are plenty of much more systematic ways to catch mistakes earlier than just slapping pair programming onto the software process.

Re:On Pair Programming by jacques_chester on Thursday January 16, 2020 @08:11AM (#22064124)
My experience is that it does catch mistakes early. And it's not mutually exclusive of other ways of spotting errors, it's reinforcing.
Re:On Pair Programming by nikofeyn on Thursday January 16, 2020 @11:33AM (#22066092)
with pair programming, you have two people supposedly in the same head space, if it's working as sold, writing code. the benefit of tests and code reviews is that they come from a different head space than what the code was written in.