Live data from Hacker News

Pair Programming Economics

wiki.c2.com

21–30 of 82 posts

Re: Pair Programming Economics

#21
I work at a company that does full-time pair programming whenever possible. There can be drawbacks for sure, but overall, I love it. However, one caveat is that our hiring process places emphasis on finding people that are collaborative and easy to work with as opposed to know-it-all "rockstar" developers. We also do test-driven development, so in addition to the most common pattern (driver / navigator) we sometimes do it a different way wherein one person writes the failing test, then their pair writes the implementation to get the test to pass along with the next failing test. Rinse, repeat.

I generally find the axiom "If you want to go fast, go alone. If you want to go far, go together." applicable to this context.

----

Benefits of pair programming (IMHO):

* It eliminates the need for code review (most of the time) since another dev is providing input as you write.

* Pairing senior and junior developers is an excellent way to build the abilities and confidence of the latter.

* Pairing decreases siloing of knowledge and one individual's "ownership" of a particular feature or system. You much less frequently see things like "Oh, you have a question about our Widget Framework? Go ask Sally, she's the only one who touches that part of the code."

* You're less likely to implement hacky solutions just to get something to work because someone else is working alongside you. (At least, I am.)

* It's easier to find and fix bugs (in my personal experience) when you have two sets of eyes on the code.

* You have to slow down and explain your ideas before immediately jumping in and implementing them. I generally find that reaching consensus with my pair about the strategy to solve a problem helps surface edge cases I might not have thought of alone.

Re: Pair Programming Economics

#23
Personally, I dislike PP

- hard for remote teams. Only good if everyone on the team can easily pair up.

- only good if everyone follows a strict schedule

- only good if everyone understands the problem and solution space equally. If one of us needs to go into a cave for an hr to read documentation or experiment, it all falls apart.

- very mentally intense. You're always on. Can only keep it up for a few hrs without some massive mental drainage.

Overall I like PP for small problems to help teach someone. I dislike it for day-to-day.

Re: Pair Programming Economics

#25
Through a lot of experimentation I found that pair programming can help in many cases: onboarding, code reviews, design & architecture and others (https://www.togetherwecode.com/articles/seven-ways-explore-p...).

It doesn't always work for me, but I found that it offers a surprising amount of benefits.

Re: Pair Programming Economics

#26

Personally, I dislike PP - hard for remote teams. Only good if everyone on the team can easily pair up. - only good if everyone follows a strict schedule - only good if everyone understands the problem and solution space equally. If one of us needs to go into a cave for an hr to read documentation or experiment, it all falls apart. - very mentally intense. You're always on. Can only keep it up for a few hrs without s…

I find it really hard to try things I'm not sure will work, or noodle around, or feel my way toward a solution, when someone's watching. Just incredibly uncomfortable. Since those sorts of things are where a lot of my value comes from, count me out on PP. It's fine in very small doses for specific purposes when both people want it and are already comfortable working together but I'd go fucking crazy being forced to do it every day on a schedule.

Re: Pair Programming Economics

#27

Some people hate pair programming. I happen to be one of them. It kills my personal job enjoyment/satisfaction and if I was coerced into pair programming too often, I would find a job elsewhere. So, the cost of losing one or both of the programmers in the process must be considered too.

Next time on Hacker News: an article about the economics of strong typing, with someone threatening to quit if they have to use a strong typing system, demanding that be factored into the economics as well. Perhaps true, but not really the point the authors were looking at.

If you look at @programminggeek's point without passive-aggressive exaggeration and then at the wiki, you'll see that it's specifically called out as a potential problem.

Sadly, it's dismissed out of hand as a "people problem" and "irrelevant". It really deserves more attention.

First of all, if you're looking for programmers to maintain a VB6 app, you really should factor into the economics of that endeavor the fact that most people don't want to code in VB6.

Second, no matter how potentially beneficial the pair programming approach is, there is a question of psychology in play. There are people who are introverted enough that the constant company required for pair programming will wear them down and cause them to quit or change teams. Dismissing it as a "people issue" and misrepresenting it as being unable or unwilling to be a team player is an oversimplification.

Re: Pair Programming Economics

#28
post #9

Pair programming can be fantastic in short burst. The other day me and a coworker were working through a difficult solution and having another set of eyes was needed. Maybe its just because I get along with my coworkers, but when working on something difficult we naturally collaborate and end up in an unofficial "pair programming session"

Over the last few years I’ve come to this exact realization as well. I used to think about it as a couple devs sharing a keyboard for interminable stretches and it made my skin crawl. Watching someone “drive” fumbling for buttons in the IDE and not using shortcuts makes me want to shoulder them out of the way and take over. However, for short bursts (10minutes to max about 90) that are focused on a particular goal ma…

I have worked in 100% pair programming environments for 5 years now, across 2 different employers. I feel like what you’ve just discribed is a good example of the beniefts of pair programming along with the downsides of not doing it all the time.

Your skin crawling while your pair is fumbling for buttons in the IDE is likely displayed by you physically as well, maybe holding your breath or twitching your hands towards the keyboard, your pair is probably then also thinking “what are they thinking but not saying, have I just done something really stupid” which leaves everybody feeling very uncomfortable, and is unproductive. However if people are comfortable with each other and importantly, open to being shown something new, the whole situation is fixed with a simple “hey, did you know there is a shortcut for that”. Over the weeks simple interactions like that add up to mean the whole team is using all of the keyboard shortcuts. The same is true of software patterns and useful library functions, they spread like gossip in the group because everyone is excited to show the next person.

I totally understand that pair programming isn’t for everybody in fact I think it is only for a specific type of person and group. Pair programming only works in groups where each member has high levels of empathy and trust is high within the group. Everybody on this thread that turned down pair programming jobs because they thought it sounded awful were definitely right to do so. But for some it can be an extreamly productive and fun way of working and learning at the same time.

Re: Pair Programming Economics

#29
post #20

I spent the first fifteen months of my current job on a 100% pair programming team before transferring to a more traditional scrum-based team. Some observations: team cohesion on the pp team was much higher, code quality was higher. Flexibility, not surprisingly was lower: we had a very fixed schedule: "Stand up" at 8.06 (despite the name, it was unrelated to the scrum event, instead it was more time for sharing news…

Agreed. This has been my experience as well. I've mostly pair programmed over the last 15 years. Very similar schedule. Same pros & cons. There's a counter intuitive key element to Pair Programming - you're slowing down in order to go faster. You make fewer mistakes and correct them an order of magnitude faster when you do. You spend less time "thrashing" on something. You're less likely to loose the better part of an hour going down an implementation rabbit hole. Once you let get of the illusion that you can be better long term "by just going off and cranking this out on my own" (e.g. cowboy coding / hacking / JANGIT - Just Add New Garbage Ignore Testing), then the value of pairing really shines. 18 months into a project, you're looking at something that is still high quality, still manageable, and you still actually want to work on because you're proud of what you and your team have done.
Post reply on HN