Slashdot Mirror


The Programmers Go Coding Two-by-Two — Hurrah?

theodp writes "The Wall Street Journal reports that pair programming is all the rage at tech darlings Facebook and Square. Its advocates speak in glowing terms of the power of pair programming, saying paired coders can catch costly software errors and are less likely to waste time surfing the Web. 'The communication becomes so deep that you don't even use words anymore,' says Facebook programmer Kent Beck. 'You just grunt and point.' Such reverent tones prompted Atlassian to poke a little fun at the practice with Spooning, an instructional video in which a burly engineer sits on a colleague's lap, wraps his arms around his partner's waist and types along with him hand over hand."

41 of 318 comments (clear)

  1. Suck it and see, it's not for everyone by Peter+Cooper · · Score: 5, Insightful

    Like many workplace practices, it's something worth trying, but not something to be trumpeted as "the way" to do things. Some people get on with pairing, some don't. And it's OK either way. Likewise, there are writers who work in pairs, but many who do great work alone. There are architects who work in groups and alone. So it goes for software developers.

    Where it goes sour, however, is when people who find pair programming valuable start tarring anyone who doesn't do it as being error-prone slackers.

    1. Re:Suck it and see, it's not for everyone by O('_')O_Bush · · Score: 5, Insightful

      It also works better for inexperienced programmers than it does for seasoned vets. Partly because of egos, partly because problems don't end up being as difficult to solve.

      Also, there is the problem of getting tired, where programming ends up being handed off between partners while the other partner zones out, and at each handoff, one has to come back up to speed. Surfing the web is bad for some, but for many programmers it is an opportunity for one to collect and organize their thoughts, and attack problems from new angles.

      I've heard pair programming increases productivity by 150% over a single programmer, but two programmers independent are still more efficient than a pair. I believe this to be accurate, after a few months experience.

      --
      while(1) attack(People.Sandy);
    2. Re:Suck it and see, it's not for everyone by man_of_mr_e · · Score: 5, Insightful

      I agree. Not everyone can work in pairs. And certainly there are many people who cannot work in pairs with certain other people. It really requires a good friendship to make it work.

      I actually stumbled across this myself in 1994 when I was forced due to time constraints to work with another programmer to finish a project... we sort of accidentally did pair programming and it was very effective.

      But i'm not sure I could recreate that kind of synergy again.. I've tried and it didn't work.

    3. Re:Suck it and see, it's not for everyone by mooingyak · · Score: 4, Insightful

      It also works better for inexperienced programmers than it does for seasoned vets.

      My understanding of the process is that it's ideally a pair with one seasoned vet who is supposed to have the large view and one junior programmer who is supposed to be handling the details while learning from the seasoned vet.

      --
      William of Ockham had no beard. The most likely explanation is that it was chewed off by squirrels every morning.
    4. Re:Suck it and see, it's not for everyone by jellomizer · · Score: 5, Insightful

      I found paring inexperienced with experienced developers actually work a lot better.

      1. Ego - Developers need to keep their ego's aside. There Egos is what keeps them doing the wrong thing over and over again. A fresh young mind to challenge his decision really helps him rethink what he is doing.

      2. Experience - The new guy doesn't have experience, experience isn't how fast you code, but to know what gatcha will get you, unless you account for them early. New developers tend to code themselves in a box. More experienced developers keep a hook open to add changes in particular areas where they know there will be a change (even though non of the specs say it will change), Experience workers can teach them why they break the rules when they do.

      3. Trading Skills - Having one code owner is dangerous, having a few developers knowing what is going on is very handy. The idea of coding yourself a job, is often short sited because you have coded yourself in a position where you cannot advanced. Plus giving young developers skills to work and advance in the project is a good thing too.

      4. It restricts getting tired - Coders will pass off the boring stuff back and forth so when you are at the 80% complete mark, you have energy to fill in the 20%
       

      --
      If something is so important that you feel the need to post it on the internet... It probably isn't that important.
    5. Re:Suck it and see, it's not for everyone by jythie · · Score: 3, Insightful

      Sadly there seems to often be an attitude of 'I selected programmers who are ideal for X, X worked, therefor X is the way to program!'... which if you follow the mantra too closely can really limit your pool of talent since not only do you have to find someone who is good at the job, but someone who enjoys working in that very specific environment..... it decreases workplace flexibility.

      Then again, with the rise of brogammer culture, I gather a lot of place are not concerned with flexibility or diversity in the first place and actively encourage mono-cultures. And of course it is another way to push out all those pesky introverts who keep thinking they are people.....

    6. Re:Suck it and see, it's not for everyone by slim · · Score: 4, Interesting

      Great points all. I'll add:

      5. It keeps you honest. Coding is full of temptations to cut corners. But you're less likely to cut that corner if someone else is watching -- and you won't let a colleague do the kind of lazy things you'd do yourself.

    7. Re:Suck it and see, it's not for everyone by Gr8Apes · · Score: 3, Informative

      Mine's been pretty much consistently <50% productivity for the pair.

      Why, you ask? Because 2 senior people working on web services can knock out 2 web services in 'x' timeframe, or 1 when paired, in 'x' + 'y' timeframe, where 'y' is a number equal to or greater than 0. The same goes for any other component functions.

      --
      The cesspool just got a check and balance.
    8. Re:Suck it and see, it's not for everyone by CodeHxr · · Score: 3, Insightful

      I currently work in this scenario with myself being the more knowledgeable programmer. While there is a bit of dictation from time to time, I always take the time afterwards to make sure my pair understands what was done and, more importantly, why. As time goes on, these dictations become fewer and farther between. If a pair is working primarily and continually from dictation, then they're doing it wrong.

    9. Re:Suck it and see, it's not for everyone by Fallingcow · · Score: 3, Insightful

      Shit, I spend more time reading docs, googling, staring in to space thinking about problems, and doodling ideas and flows on paper than I do actually coding. I'd think it would be hard for two programers' true coding time to line up well enough for pair programming to work, and you'd have to allow time for them to share any breakthroughs they'd had between sessions, unless you tried to pair-think too, which sounds annoying at best. Bouncing ideas off co-workers as necessary is one thing, but beyond that it seems counterproductive.

      Maybe this works if you have a very top-down structure with an engineer/analyst up the chain handing you every single thing you need and defining in extremely precise terms how everything last detail should be implemented so there's nothing left to do but type, and maybe decide which kind of loop to use or whether to use switch/case versus if/else or whatever.

    10. Re:Suck it and see, it's not for everyone by Anonymous Coward · · Score: 3, Insightful

      Yeah, if you want the seasoned vet to commit seppuku...

    11. Re:Suck it and see, it's not for everyone by AwesomeMcgee · · Score: 5, Informative

      No, this is a magnificent technique for mentoring, but this is *not* pair programming. I can't stress how great it is for mentoring though. Turn a Junior into a mid-level engineer real fast.

    12. Re:Suck it and see, it's not for everyone by luis_a_espinal · · Score: 3, Interesting

      YMMV. In my experience, it makes me cut corners more, because I feel like I'm wasting the other guy's time if I sit and think hard for a couple minutes about how to, say, rewrite a loop more clearly.

      But that's part of one's job, to think about those things and when to do them and when not to. You are teaching the junior person how to thing about such concerns, and hopefully many others (instead of just let's get this shit to compile asap!!!!). Quality coding is not just banging the shit out of the keyboard, and anytime a vet helps a junior cross that mental chasm faster, it helps both the junior and the company's bottom line.)

    13. Re:Suck it and see, it's not for everyone by xtracto · · Score: 3, Interesting

      I have seen a problem in that in the time I have done pair programming.

      When I am the 'seasoned vet' I get quickly frustrated by the slowness of the person who is writing. On the other hand, when the writer is more senior than I am, oftentimes I just cannot follow what he is doing, if he goes too fast (like when doing Vi-editing).

      This maybe except with one particular very good senior who was saying out loud what he was doing *as* he was doing it.

      --
      Ubuntu is an African word meaning 'I can't configure Debian'
    14. Re:Suck it and see, it's not for everyone by gutnor · · Score: 4, Interesting

      That is the most difficult pairing you can make unfortunately. Either you put the vet as the driver and the junior will simply not follow or get bored. Or you let the junior drive and then it becomes a dictation. In both case, the junior brain shut down and it relies on what's written/dictated and stop thinking for himself.

      You want junior dev to struggle a bit on their own so they have the opportunity to evaluate various options. That process is enhanced in pair with another junior developer. Immediate feedback from a more senior dev is in my experience slowing the learning process and killing the creativity of the junior.

    15. Re:Suck it and see, it's not for everyone by Jane_Dozey · · Score: 4, Interesting

      Yes, I've worked with people who are great at pair programming and those who are not so good. I find that when working with someone who really gets PP you end up with two programmers (or more!) working together, both of them on the same page, catching mistakes and improving how the code is written.
      When working with someone who just starts coding and expects their partner to magically understand what they've decided to do then it can be impossible to keep up or figure out what on earth they're doing. At that point you have a programmer programming and another programmer wasting their time scratching their head.

      PP works wonderfully when you pair people up correctly and train everyone involved how to effectively work like that, but if you don't then you waste resources and frustrate your coders.

      --
      Silly rabbit
    16. Re:Suck it and see, it's not for everyone by SomePgmr · · Score: 5, Interesting

      You used the word, "mentoring". It occurs to me that people have been doing this in virtually every trade for centuries in more traditional apprenticeships.

      I was in a situation similar to this as a programmer. Nobody had planned for us to work in pairs, it just worked out that way. The bit in the summary about the two of you learning to basically read each others' minds is pretty accurate.

      One guy tends to introduce the more creative, interesting ideas, while the other (probably more experienced guy) sees when you're missing the forest for the trees. The end result is, hopefully, more impressive work that's not so impressive that it fails at basic functionality.

      It worked out really well for us. Of course, YMMV.

  2. Maybe this is a generational thing... by sticks_us · · Score: 3, Interesting

    But most of the elder wizards of the programming community (at least the ones I know) tend to shy away from the pair programming mentality. Younger folks (especially people in their 20s) don't seem to mind as much.

    I wonder if this has something to do with the nature of the people who went into programming 20 years ago (compared to today), or what...?

    --
    "Beware of bugs in the above code; I have only proved it correct, not tried it." -- Donald Knuth
    1. Re:Maybe this is a generational thing... by O('_')O_Bush · · Score: 5, Insightful

      That is because new programmers don't have experience solving problems, and end up getting stuck spinning their wheels. For them, programming is the challenge. For more experienced people, the programming is trivial, it is the design that is a challenge.

      --
      while(1) attack(People.Sandy);
    2. Re:Maybe this is a generational thing... by mooingyak · · Score: 4, Funny

      we can talk about it in complete detail when it makes sense, i don't need to smell your farts

      You might change your mind if you were working with me. My farts smell like roses.

      --
      William of Ockham had no beard. The most likely explanation is that it was chewed off by squirrels every morning.
    3. Re:Maybe this is a generational thing... by vlm · · Score: 5, Insightful

      I wonder if this has something to do with the nature of the people who went into programming 20 years ago (compared to today), or what...?

      After you live and work through 10 or so silver bullet fads you'll get a bit jaded at "oh god not yet another silver bullet that'll magically fix everything if we just change everything and hire some expensive consultants".

      http://en.wikipedia.org/wiki/No_Silver_Bullet

      My main whine about pair programming is its a bastardization of ye olde master/apprentice. Oh so close to being correct, yet still miss the target. That's worked in about a zillion other fields for only about a zillion centuries. I learned a lot as an apprentice from some good masters and taught a few apprentices as a master, hopefully well. Pair programming claims master/apprentice inevitably leads to "watch the master" where the apprentice sits around and learns nothing. That's wrong; its not an inherent effect of master/apprentice, it's an inherent effect of shittymaster/apprentice. It does correctly show that having a con man or moron as master doesn't work, or maybe the older the programmer is the more important it is that he not be an idiot. Also its the apprentice's job not to be passive... ask why, ask how it works, ask what other options exist, etc.

      I suppose you can't charge $xxx/hr as a consultant or book author merely by telling the boss to set up something like a medieval blacksmithing guild, gotta come up with some new twist on the old story.

      --
      "Science flies us to the moon. Religion flies us into buildings." - Victor Stenger
    4. Re:Maybe this is a generational thing... by vlm · · Score: 5, Funny

      we can talk about it in complete detail when it makes sense, i don't need to smell your farts

      You might change your mind if you were working with me. My farts smell like roses.

      Theoretically pair programming is supposed to pair up programmers with other programmers, not with management.

      --
      "Science flies us to the moon. Religion flies us into buildings." - Victor Stenger
    5. Re:Maybe this is a generational thing... by mooingyak · · Score: 4, Funny

      we can talk about it in complete detail when it makes sense, i don't need to smell your farts

      You might change your mind if you were working with me. My farts smell like roses.

      Theoretically pair programming is supposed to pair up programmers with other programmers, not with management.

      Hrmm. My farts smell like modular, well engineered roses?

      --
      William of Ockham had no beard. The most likely explanation is that it was chewed off by squirrels every morning.
    6. Re:Maybe this is a generational thing... by pixelpusher220 · · Score: 5, Insightful

      Or drive the few women in tech far far away....

      --
      People in cars cause accidents....accidents in cars cause people :-D
    7. Re:Maybe this is a generational thing... by dingo_kinznerhook · · Score: 3, Funny

      we can talk about it in complete detail when it makes sense, i don't need to smell your farts

      You might change your mind if you were working with me. My farts smell like roses.

      Theoretically pair programming is supposed to pair up programmers with other programmers, not with management.

      Hrmm. My farts smell like modular, well engineered Rational roses?

      There, fixed that for you.

      --
      "God does not play Minecraft with the world." - Albert Einstein
    8. Re:Maybe this is a generational thing... by tool462 · · Score: 4, Funny

      My farts implement an abstract flower class. You can use any number of decorator "Petal" classes to configure to taste. I work well with people who like roses, tulips, chrysanthemums and many more.

  3. Facebook Mobile Apps by Kadagan+AU · · Score: 3, Insightful

    If the Facebook team is using pair programming for their mobile apps (on all platforms!), maybe they should try something more traditional because it's not working! They have so many bugs and glitches in the IOS, Android (tablet), and Blackberry apps that they definitely need to try a new approach! Maybe if they TESTED them before releasing, they'd have better results?

    --
    This space for rent, inquire within.
  4. yeah, I don't think so by macbeth66 · · Score: 3, Funny

    I can't think of ANY one that I want to spend that much time around.

    My wife can't code, but I would not want to spend that much time with her either.

    Now, maybe my girlfriend. But I don't htink we would get much coding done. Besides, she can't code and I don't care.

  5. Kent Beck, Facebook programmer by Barandis · · Score: 5, Insightful

    I know it's just a summary and all, but it makes me feel vaguely sad that out of all of the things you can say about him, Kent Beck is tagged as a "Facebook programmer."

  6. Re:Pair or 1 + 0.3? by Anonymous Coward · · Score: 5, Funny

    PRO-TIP: the other guy was the compiler.

  7. less pair-programming chain gangs by Anonymous Coward · · Score: 4, Insightful
  8. Back in the old days... by YodaSensei · · Score: 3, Informative

    We used to call that eXtreme Programming: that was the rage a while ago, then went out of fashion in favour of other agile development methods. But that happened a lifetime ago (the early 2000s :p ), and computer fashion have changed more times than I can really keep track.

    I guess that the people who were actually programming 10 years ago are now managers, gurus or architects and want to bring back their happy childhood memories (id est, programming with their buddy) back to reality, imposing it on the newer generations.

  9. Worth trying by Divide+By+Zero · · Score: 5, Interesting
    Everybody poo-poos it, I'm a better coder on my own, the other guy's wasting time, etc. But I tried it and I was never a better coder than when I was working in a pair. You'd get all the "missing semicolon" stuff that everybody talks about, which isn't exactly a waste, but you also have two brains deeply enmeshed in the code and data structures, so you can blend the best of two styles of programming. Sometimes I'd write a braindead construct and the other guy would simplify it, and sometimes he'd create this god-awful structure and I'd clean it up. But you can bounce ideas off another programmer without having to explain the function, show him the code, let him get his head wrapped around it, all that. It's not all grunting and pointing, sometimes it's, "Dude, use a switch/case" or "Just use the library function."

    It's not for everybody - nothing is - but it's definitely worth trying with an honest effort.

    --
    Dare to Hope. Prepare to be Disappointed.
  10. Maybe its an experience thing ... by perpenso · · Score: 4, Interesting

    But most of the elder wizards of the programming community (at least the ones I know) tend to shy away from the pair programming mentality. Younger folks (especially people in their 20s) don't seem to mind as much. I wonder if this has something to do with the nature of the people who went into programming 20 years ago (compared to today), or what...?

    Or it has something to do with experience. The elder programmers have seen many programming fads come and go, many claims for the "one true way" to greater efficiency and reducing bugs. Like most fad/pop things, pair programming probably worked in a specific environment, with specific people doing a specific type of task ... but is probably not a universal solution. It is merely hyped as such by the "training" industry, book sellers, etc.

    Elders may realize when working in pairs will help and when it will not. I've seen plenty of instances when elders call in a peer for an hour or two for a particular bit of code and then part when returning to the more mundane parts of the code. Or ask a peer to review a bit of code they just wrote.

    1. Re:Maybe its an experience thing ... by pclminion · · Score: 4, Interesting

      The elder programmers have seen many programming fads come and go, many claims for the "one true way" to greater efficiency and reducing bugs. Like most fad/pop things, pair programming probably worked in a specific environment, with specific people doing a specific type of task ... but is probably not a universal solution.

      I have to disagree. At its most basic, pair programming is simply having somebody directly help you to accomplish a task, and also, observe your actions as you make them. The concept of using a helper is not a fad, trend, or technique. A better term for it would be "no brainer." The reason it sometimes fails is because of the personalities involved, and it's the same reason certain people can't work together doing ANYTHING (for instance, repairing a car).

      It's true that programming often requirements moments or even extended periods of intense, solitary concentration. Your partner just has to know when to shut up. Even with compatible personalities it still takes practice.

      But really, it's just two humans working together on something, which is not a "fad."

  11. We're taking pair programming to the next level by ddd0004 · · Score: 3, Funny

    We have one big cube with one computer and we put all of the programmers in there. We call it the stable and the programmers are now just referred to as the herd.

  12. Yep by Quiet_Desperation · · Score: 5, Funny

    I think we can all see where this is going.

    Programmer centipede.

    You know I'm right.

  13. Ok in small doses by composer777 · · Score: 4, Insightful

    I've had experience with pair programming. In my mind here are the pro's:
    1. It keeps you engaged and prevents your mind from wandering.
    2. It is a great way to teach junior level programmers, many of whom suffer from a lack of training and are thrown to the wolves in the beginning of their careers. I would have LOVED pair programming (in small doses) when I was starting out. It's a great way to learn things about a complex system that are not obvious.
    3. Different people tend to approach problems differently, and this difference in perspective can make it easier to catch bugs that are not obvious to a single programmer.

    The Cons:
    1. When abused, it can reduce productivity by distracting coders and not allowing them the space they need to think.
    2. It can create a hostile environment where the employee feels that they have no privacy, room to think, and where they are constantly being watched. This is part of why I think management loves it so much, they are outsourcing micro-management to their underlings.
    3. It can reduce motivation of individual developers since the buck no longer stops with them, but instead is the group's (or pair's) responsibility. While diffusing some responsibility across the team is not a horrible idea, people tend not to be as motivated. I observed motivation take a big nose dive when the shop moved to XP, since people were no longer as accountable for finishing anything, they just had to come up with a BS explanation for what they did the past day during the scrum, and really, it's a lot easier to BS one day at a time than it is to explain just what the hell you've been doing the past two months.
    4. Many poorly designed XP programming environments are inherently disrespectful, and are merely an attempt to turn a programming shop into a factory floor with no privacy. As a skilled programmer, I won't go along with this, and I actually refused to move into this kind of space at my last job, and instead left, along with the majority of seasoned developers.

    Overall, I can get some of the benefits of pair programming by walking down the hall, grabbing another team member and saying, "Hey, could you take a look at this?", when I'm having trouble finding a bug. It shouldn't require them to sit there all day.

  14. Methodology Talent/Skill/Experience. by Shoten · · Score: 5, Insightful

    Let's face it...this is yet another iteration of the dance we've seen before. Extreme Programming, Agile Programming, and so on. Companies keep hoping that there's a methodology that can be applied to the process of coding and development that will homogenize their workforce, allowing them to look at coders more like cookie-cutter individuals. There are multiple drivers behind this: the difficulty of assessing a programmer's talent during the recruiting process, the desire to use cheaper resources, especially in outsourced business models, and the challenges that result from coders who turn out not to be a good fit with their role. But at the end of the day, coding is a creative process, and creativity fares poorly under standardized, one-size-fits-all models.

    --

    For your security, this post has been encrypted with ROT-13, twice.
  15. 1999 by nitehawk214 · · Score: 4, Insightful

    1999 called, they want their useless waste of resources techniques back. Nice try Kent trying to jam Extreme Programming on us again.

    --
    I'm a good cook. I'm a fantastic eater. - Steven Brust
  16. Re:Not pair programming... by Spy+Handler · · Score: 4, Funny

    the driver writes code while the other, the observer (or navigator[1]), reviews each line of code as it is typed in.

    Driver sounds cool, that's what fighter pilots call themselves too. But observer sounds lame... we should call it wingman. Then we have the driver who writes codes, and the wingman who watches for errors. Plus we get to say cool stuff like,

    "You can be my wingman any time!"