Hacker News new | ask | show | jobs
by zeristor 443 days ago
Strangely I’ve found myself to be something like 400% more productive when pair programming.

I’ve not heard anyone mention this aspect of paired programming for people with ADHD, although as a colleague once mentioned I jump from one thing to another, but in the end I’ve done the loop.

4 comments

Pair programming flummoxes me because I find it significantly harder to concentrate when someone's watching. It's like having that execrable old Visual Basic feature where it flags up syntax errors if you cursor off a line, forcing you to correct the errors before moving to a different line. Except now implemented with a smelly human flagging up the errors!

I get it. XP, and Agile in general, is all about relying less on individual programmers' focus on the task and more on external checks (a shoulder surfer and automated tests). The revolution of software development in the 21st century is building more effective teams rather than relying on super-productive individuals (the fabled 10x engineers). But I don't have to like working that way, and I don't.

My personal experience with pair programming is that I first was very intimidated by it and instinctively hated it

Then, it slowly creeped up at work, and I noticed that initially, most people seemed uncomfortable with it. But, if we were able to build trust and get to a place where we weren't judging each other, just trying to make progress with the task, then things would magically flow and we could solve things that each person individually had been stuck on

We then mostly kept it to a weekly activity, in which we could tackle either specific tickets from a certain list that no-one was actively working on, or on specific things that someone would bring up and needed help with

I believe it's probably not the way to work every single moment, but it is definitely a very powerful and useful tool

There is very little evidence for this. IMO, it is feel good advice that sounds right.

Try background noise of any sort, until you find a fit.

I can't pay attention to anything anymore without noise. A little rumble in thy ears does wonders.

I severely question anecdotes that pair programming does anything other than motivate you to not look like a moron wasting time in front of someone else (in the context of ADHD -- there are other uses for it).

That isn't a viable strategy for growth, imo.

Also, if you are new to taking stimulants, you might be surprised how much worse it gets later in life, especially if you have been taking them since youth. There is a non-zero cost (I would say a sacrifice) to treating ADHD with amphetamines or other dopamine reuptake inhibitors / dopamingenics.

If you doubt this, there is very little mention of body doubling in literature outside of blogs:

https://pubmed.ncbi.nlm.nih.gov/?term=%20%22Body%20Doubling%...

https://pubmed.ncbi.nlm.nih.gov/?term=%22Body%20Double%22%20...

https://pubmed.ncbi.nlm.nih.gov/?term=%22Body%20Double%22%

> I severely question anecdotes that pair programming does anything other than motivate you to not look like a moron wasting time in front of someone else

So... you're basically saying it works? Because that's what it does in practice. The other person is the external motivator for keeping attention on the task.

> you might be surprised how much worse it gets later in life, especially if you have been taking them since youth

Got any support for that? (Not being dismissive; never heard of that beyond the usual "effectiveness goes down over time")

> If you doubt this, there is very little mention of body doubling in literature outside of blogs:

Yup, there's still little in terms of specific research, but if you look at the papers about externalising motivation/triggers... it's close to a specific implementation of those ideas rather than a separate thing.

> So... you're basically saying it works?

Working under pressure isn't a viable therapy, IMO. In my experience, it is a path to burn out and diminishing returns.

> Got any support for that?

Anecdotally, ~25 years of eating them, but there is plenty of evidence that prolonged use of amphetamine causes structural neuronal changes, even at therapeutic doses.

Here is one article: https://pubmed.ncbi.nlm.nih.gov/38665308/

> you look at the papers about externalising motivation/triggers

What papers? What do they say?

Also, fear (an external motivator) is a great way to release catecholamines for positive outcomes in ADHD, but it is also a great way to increase general stress, which has many other outcomes (free cortisol changes, etc).

> Working under pressure isn't a viable therapy, IMO. In my experience, it is a path to burn out and diminishing returns.

Except that pair programming doesn’t make you work under pressure. I extensively use this technique for body doubling as much as I can. It motivates me to start the task and I also love the exchange : you can learn things, teach things, be stuck together, find solutions together, swear together, laugh, agree on how horrible is this thing you must fix …

In fact it’s what I’d call real teamwork. I never felt it like pressure and it gives me a lot of energy.

Incidentally, I think the only friends I made at work (the real friends you invite at home even when you don’t work at the same place anymore) were through frequent pair programming sessions. I think there is something about knowing how the other person thinks that helps bonding together.

> Except that pair programming doesn’t make you work under pressure

Sure, in ideal circumstances.

Do you remember your first day on a job anywhere as a programmer? You were so relaxed, no pressure.

It sounds like you have an emotional attachment to pair programming. That is cool, but it certainly isn't the norm.

> Working under pressure isn't a viable therapy,

None of ADHD related stuff is really therapy. We only know how to manage symptoms for now.

> Anecdotally

Yeah...

> prolonged use of amphetamine causes structural neuronal changes

Sure. But is it worse than unmanaged ADHD which also results in brain changes over time?

> What papers? What do they say?

It's a whole category, but you could start with this collection:

https://www.connectedpapers.com/main/00e762a8efd5581c93afcb8...

Every time ADHD coaching is mentioned, part of that process is learning planning ahead for distractions, part is learning to externalise reminders / triggers and hacking the reward functions. Maybe there's some paper which tests each of those in isolation, but I'm not going to dig that deep. In aggregate, ADHD coaching has positive results. Pairing is an extreme version of one part of it.

> Also, fear (an external motivator)

Pairing with others shouldn't involve fear. It's just two people being able to share and communicate the motivation to initiate the next step / question. If it causes you actual stress, either you're doing it with a wrong person, or it may just not be for you.

> None of ADHD related stuff is really therapy. We only know how to manage symptoms for now.

Managing symptoms is therapy?

>> Anecdotally

> Yeah...

Then ignore everything that came after that?

> Sure. But is it worse than unmanaged ADHD which also results in brain changes over time?

Physiologically, yes? I am honestly concerned for people who think eating amphetamine or similar drugs daily has no negative outcomes.

> It's a whole category, but you could start with this collection:

There is zero mention of anything discussed here in that root paper, but cool information bomb. No one is going to read 40 papers to respond to you. Honestly, that is a dickhead thing to share.

> shouldn't involve fear

If you've never felt nervous (fear) while pair programming, you might be experiencing a bit of over-confidence.

What is at all strange about wanting to work near other people so you keep each other motivated to remain focused? It's not magic, and it's not a treatment for ADHD (nor a replacement for such). It's just a common sense response to living in an age where everyone works from home isolated. Some people just work better with company.

> If you doubt this, there is very little mention of body doubling in literature outside of blogs

Wow, I sure better stop doing everything in my life that there isn't literature on.

Yeah, I mean, saying stuff like this is polarizing.
Good points.

Meds. They never quite worked for me, others have noticed a change, but not me; and the side effects became too intrusive.

Working under pressure, I guess this is an issue for me. As mentioned it can be a load on the person you’re pairing with, but so often I can unlock skills pairing with someone that neither of us can ordinarily access.

I’ve never really understood the hype around pair programming. In practice, it’s usually just sitting with a coworker who wants to chat and crack jokes while working. That’s fine socially, but I don’t see any productivity gains.

What I find actually useful is a short, focused meeting with the relevant people before coding. That way, we align on what’s being built, resolve confusion, and then I can just go write the code.

Once I'm typing, I don’t see how having someone else there helps. It mostly just gets in the way — we keep having to stop and explain what we're thinking, which slows things down. And usually the other person gets confused at some point, so I have to stop and explain things again to get them back on track.

The productivity gains come from:

* You get unstuck faster.

* When the passenger does background research/slacking stakeholders meaning that the driver doesnt have to context switch. Sometimes they even just know the answer to something you would have to spend 30 minutes researching.

* When the passenger spots something you didnt (antipattern, bug, problem) and they spot it quickly before you dug yourself a hole with it.

* When it makes it easier to take bigger decisions and bigger risks as a pair - risks/decisions most people wouldnt feel confident about taking solo.

* When those decisions are better - fewer rabbit holes are jumped into, more landmines are averted.

* When your respective coding philosophies developed over decades hit one another and you try to synthesize something that accomodates the best of both (this is next level pairing).

Mostly I find the productivity gains come from the quality of decisions being higher, which is invisible short term but overwhelming long term.

It doesnt help much if the person is very junior and needs to have everything explained but if theyre junior pairing is the best way to train and mold them into something better, which is probably what you want, right?

I already get those benefits from focused pre-coding discussions and pull request reviews. They allow for high-quality decisions, involve more perspectives, and are asynchronous.

Pair programming might help when training juniors, since they need that level of hand-holding. But for experienced devs, constant back-and-forth while typing mostly just adds friction.

No. You dont. The feedback cadence is then wildly stretched out.

Instead of getting notification that you made a mistake within a few seconds of making it you are told at, say, 4pm, 45 minutes after you raised the PR, 4 hours after you made the mistake and in time for you to maybe fix it tomorrow. Also, if it was a rabbit hole mistake thats a whole lot of wasted work.

With PRs I find reviewers tend to miss more stuff (especially forest-not-trees stuff) because there are usually a lot of changes all going on at the same time and because the mental tax of trying to grasp all of the necessary context is higher.

The pre-coding discussions also do NOT provide the same value because many problems only become apparent after you've started coding. Only correctly anticipated problems are caught at that stage.

Code reviews and pre coding discussions are still good practices and add value of their own (especially because for some issues you do benefit from > 2 sets of eyes), but not as substitutes for pairing.

Pairing is also effective at training juniors and onboarding, but not only.

Absolutely same experience. It's quite draining but extremely effective.
That kind of aligns with Guy Steele's experience pair programming... with Richard Stallman: "My first thought afterward was: it was a great experience, very intense, and that I never wanted to do it again in my life."

https://www.oreilly.com/openbook/freedom/ch06.html

It helped that they were working on an interesting problem. Most problems that need solving are not interesting.