Pair Programming (give it a rest)
peniwize.wordpress.com
peniwize.wordpress.com
If it's sincere, I think the author is attacking a rather extreme position.
Sometimes I like to write code by myself. Sometimes I like to pair on stuff. It depends on a lot factors. Is it complicated code? Do I know the language/framework/codebase well? Do I have a peer who knows more than I do about the problem I'm trying to solve? Is it important that multiple people be able to maintain this code? Etc. Like most things, pairing is a trade-off. It can have benefits, but it costs twice as much to write code.
That said, I think most people in our industry could benefit from pairing more, not less. Studies on pair programming show significant advantages in many circumstances [2]. If the author is sincere, I hope he'll keep an open mind about an occasional pairing session in the future.
1. http://en.wikipedia.org/wiki/Poe's_law
2. http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.101...
> I don’t believe that I’m alone in my opinion. All of my colleagues are very similar. In my 20+ year long career, I’ve only known one person that I suspect would be comfortable with pair programming
So I can easily imagine that he was unlucky during his 20+ year career, because it is not easy to find such group of people especially in Age of Everyone Can Become a Programmer.
But do these studies take into account employee happiness (and thus potentially losing good developers)? In other words, is it better to have five mediocre engineers pair programming or having five stellar engineers working normally?
All agreed that PP promoted the formation of good team spirit in the beginning of the project. The information radiator and the open workspace were also mentioned as contributors to good team spirit. Two of the developers liked PP more than solo programming and two found no difference.
Please at least skim references before calling them into question.
All the developers were recruited based on their interest in using agile practices including PP
Personally I would prefer not working in a paired programming environment, though I'm not sure it would be a deal-breaker. But I know developers (more introverted than me) who I imagine it might be.
Even though I enjoy pairing, I also doubt I would enjoy working at a place that required people to pair. Rules like that irk me. They're often a symptom of other, bigger problems.
Sure, I've had to endure somebody trying to 'help' when I have a hard problem to find. I spend my time explaining to the other guy, bringing them up to speed. And they spend their time suggesting things that have already been done, or suggesting using some buzzword toolchain like it will solve all the problems.
If I were churning out web logic or designing dialogs or some such it can be useful I suppose - "You forgot a brace. Remember we have to try all these on the proto server first." etc.
But I spend my time on tricky problems in the core IP of our company. I've always had that job, wherever I work. And let me tell you, having someone in the same room is a no-go for the hours of mental model-building it takes to diagnose or design these kind components.
Now, let admit there are different kinds of programming jobs. Maybe the bulk of web design etc is amenable to having two shovels in the same ditch - of course you'd get more done, its obvious! But for other tasks it is absolutely not going to help.
When it comes to code complexity, meta-studies argue against your claim. Pairing isn't worthwhile for simple code, but it's great for reducing defects in complex code:
The benefit of pairing is greatest on tasks that the programmers do not fully understand before they begin: that is, challenging tasks that call for creativity and sophistication.[1]
I and most everyone I've paired with have found this to be the case in our own work.
A side note: I'm not sure what your core argument is. Most of your comments in this thread seem to be a combination of self-aggrandizement, personal opinion, and veiled insults towards those who pair. I've tried to keep my own comments civil and evidence-based, but many others in this thread are full of negativity. It makes me sad.
1. http://en.wikipedia.org/wiki/Pair_programming#Meta-analyses
There does seem to be more emotion than logic expressed here. I've meant to try to counter this with sincere expressions of my experiences. I must have gotten emotional in return. I'm at my wits end, trying to counter the simplistic claims of PP proponents that everyone else is a cowboy or just too inexperienced to 'get it'. I get it, I don't like it, I can see constant refutation of the whole idea of PP in my team.
"reduce development time somewhat and produces marginal positive effects on code quality"
A good professional engineering environment where you start a sprint by having a design discussion with peers, and then come back to your peers on the tail end of the sprint for code review, is likely to provide all the same benefits as pair programming.
After all, this is not supposed to be a software factory. Developing software is engineering work, and designing the work well, with your peers, will do just as much to strengthen the team and it will also improve the work quality.
Working in pairs is useful in bringing junior people up to the next level, and in helping newcomers learn the problem domain or the platform/framework that you use, but it is not a universal good practice that you would use all the time.
And so you refuse to do it even if it would be tremendous help for the other person. You won't pair with a colleague, because you don't like it, because it would "disrupt your work", even though you could cause the other person to become much more productive in much shorter time. You're not only being a jerk by doing so, you're actually undermining your project and putting your "decades of successful projects" at risk.
Yeah, highly rational decision, based on your dislike of (as per OP) interacting with other people. I'm so happy I never met you.
I don't get anything done if I'm made to waste large portions of my day hand-holding other programmers. My work is best done in a silent room with hours uninterrupted.
I'm sure you'd be glad to meet me; I don't dislike interaction at all. Lets just do it at a coffee shop.
Shared understanding is vital, even more so in a team of "left brain" introverts. Whether it is establishing what everyone thinks TDD to be and the metrics to be extracted. Or whether it is making sure that at least one other person knows what your code does, that it is the best way of doing it, that you're not taking shortcuts or making "clever solutions" that aren't needed and sacrifice maintainability.
Being a professional isn't about being dismissive of 9 to 5 paycheck developers and their skills whilst slamming out loads of code. If your experience is all of introverts who want to be left alone I dread to think what your code review practices are like...
How did you go around to finding him? I feel we really need that where I work, go back to basics and take up some "good habits"[0], but without a consultant/trainer to suggest it feels like whining without contributing. Attempting cultural changes internally on a suggestion basis doesn't really work, people (me included) just go back to their previous stable state.
[0] both small scale, the testing and refactoring stuff, and larger-scale with system architecture.
If you're going to shop around for a change agent, I recommend reading Jerry Weinberg's "Secrets of Consulting"; although this is targeted at consultants rather than their clients, it can provide useful insight into how to create an effective working partnership with one.
Technical know-how doesn't by itself qualify someone to help you implement changes towards becoming more effective. It can be detrimental, in fact.
But someone with a solid grasp of the fundamentals AND a productive attitude to coaching/mentoring/consulting can be a great asset. One I recommend wholeheartedly is JB: http://blog.thecodewhisperer.com/ (and if you can't get him, try to find someone like him).
Yeah I'm well-aware of that.
> One I recommend wholeheartedly is JB: http://blog.thecodewhisperer.com/ (and if you can't get him, try to find someone like him).
Thanks for the suggestion.
At our workplace, we have a monthly hour-long "Lunch and Learn" where we all meet to do three things: listen to someone share some interesting code they worked on that month (which helps to generate some enthusiasm and spread some knowledge around); talk together about a specific best-practice; collectively review some code with a focus on using that best-practice to improve the code. It is a very simple, low-cost, low-time-cost way to formalize the fact that you want everyone to pay attention to these things, and (in our case) has really stimulated a desire among the developers to improve their code practice.
To implement this, put someone in charge (or take charge yourself :) and just start asking people to contribute. You will probably find there is a lot more interest in this than you think.
Also, be sure to go easy on yourself and your peers as you try to change habits. If you look back at code you wrote, say, three years ago, you will probably say to yourself, "What was I thinking? I could write that so much better now." In the same way, three years from now you will be able to say, "What was I thinking? I could [test|commit|organize|pair-program|etc] that so much better now."
It really drives the point - the social connections are what makes or breaks you in an organisation. Any meaningful change needs allies, needs to persuade people, and needs to deal with ego and politics. The people responsible for what you want to change are probably those currently in management roles! It's probably one of the harder transitions from academic/training when there are absolute truths, to business where things become much more complex.
The best advice I can give is to find someone/a firm who hires people who switch between doing and consulting. It's a bit like the old "those who can do, those who can't, teach". Having someone with loads of current practical experience convinces the tech types to go along with their proposal. Having someone with "expert" consultant credentials persuades management to go with something. Which is frustrating when an employee has been suggesting the same thing for ages, but a massive bill is convincing...
The other top tip - especially if they are from out of town and thus staying over - invite them to the pub at the end of day one. They want to hear the gripes of those at the coal face.
Part of writing good software is the ability to interact with people. That requires certain social abilities and the ability to talk confidently to people about code, the same as pair programming.
Truly introverted developers may write elegant and beautiful code, but they generally need an abstraction layer between them and the user/customer, which can cause the most beautiful code to be wrong, because it doesn't fulfil the requirement.
Pairing with people improves code quality by forcing you to explain your decisions, allowing you a better understanding of what you write, sharing knowledge of the codebase across the team, and preventing tangents that aren't what the client wants. It's not just about being more productive -- my personal opinion is it's actually slower than 2 developers working separately -- but that doesn't make it less worthwhile.
Yes, he does try to rationalize a little bit here and there, but overall I think that's it.
I don't at all believe that pair programming necessarily gives you a better end product. I think it can, but I think it depends a lot on the project and individuals involved. Personally I'm not a fan. I'm not quite the hater that the OP is, but I, too, would likely look for a new job if my company suddenly required regular pair programming of everyone.
I think I'm pretty damn good at what I do. That's obviously a subjective statement, but I could back it up with some facts that would seem to indicate I know what I'm doing. If I paired with someone on certain projects, would it create a better outcome? I'm not sure. Maybe it would. Maybe it wouldn't. But I really don't care, because I'm certain I wouldn't enjoy the process. Does that potentially limit my greatness as a developer? Maybe. Maybe not. But that's where the happiness thing comes in. If pairing truly could make me a better developer, and there's nothing else that could, then I'm honestly totally fine not being the best developer I could be, because I wouldn't be happy while practicing my craft.
As an aside: I'm talking about two peers of roughly the same skill pairing. I'd be happy to pair with a junior dev for the purposes of mentorship or knowledge transfer. Actually, I think pairing with anyone for the purpose of knowledge transfer is probably a good thing. I just wouldn't enjoy pairing as a fundamental part of working on a project.
You don't like to pair. You don't want people to try to pair with you.
So far, I'm with you.
How do you get from there to "if you ever talk about pairing, you're incompetent and horrible"? I have trouble with that part.
As an aside: I am pretty tired of people saying "I'm an introvert," when what they mean is "I'm an asshole." Even if you're introverted, you have the same responsibility as everyone else to communicate in order to get things done.
Not really. This is a guy who hates pair programming and believes it would make him unhappy. Full stop. Don't mistake his screed about how he'd quit programming if pairing were required with a belief that this is where the industry is going. That's merely language to show how much he really really really hates pair programming.
I am pretty tired of people saying "I'm an introvert," when what they mean is "I'm an asshole."
I think that's a bit harsh. Note that the article starts off with a warning that it's a rant: the author is admitting up-front that he's letting off some steam. Social interaction is a limited commodity for introverts. The author would likely prefer to spend his daily allotment of social interaction on what he'd consider more useful forms of workplace communication.
Well, somewhat. But I read other comments here and in at least three cases the posters were proudly describing themselves as assholes. The problem with all of them was that they never once realized that pairing may be done not for them, but for the other person (or them both). I thought it's common sense to consider all the people involved in the interaction. For those people it's not, it's only about how they feel and how they are influenced by pairing. I was very, very lucky (apparently) that I didn't meet any of them (or they didn't have the chance to manifest their attitude towards me - towards all of us) in my professional life.
This "fuck you all, whatever it may be I'm working" attitude may be tolerated in people who really contribute a lot. Their presence may be beneficial on the whole to the company or even to the team they're on. That doesn't mean they are not assholes - it just means that in our industry being a jerk is not disqualifying feature. I have no idea what they are so proud about, though.
I personally would like to try pair programming but none of the companies I have worked for would do it much. (Although the most productive time I had at my last job was a single pair programming session.)
And I'm pretty tired of extroverts expecting everyone else to be like them and consider anyone "assholes" when they aren't.
That goes both ways - if you're dealing with an introvert it might benefit you to communicate in a different style and with a different frequency. Some management books even provide models for quick and dirty social analysis so that people can do so. The model I've found most immediately applicable is:
Extroverted
|
Person focused ----- Task focused |
Introverted
You can pick up on that sort of thing fairly easily, when people speak how loudly do they speak - do they project their voice? When they talk do they gesture a lot with their hands? When they talk is about things or people? Does their tone of voice alter when they talk about different areas - do the volunteer information as readily about those things, ask the same number of relevant questions?Most people really don't like being preached at, and the agile community is very preachy. They're also very certain that agile is best practice, while everything else is cowboy.
I'm confident at this point that a sizeable chunk of the agile mantra is pretty poor practice. TDD, for example, definitely seems worse than actually using your human intelligence to plan ahead and design.
I don't necessarily agree with this article. I think most programmers do want and benefit from some degree of collaboration on problems. Mostly at the start when they're figuring out what they should actually build. I certainly sympathise with it though. Sometimes I just wish agilists would shut up and go away.
The main point of TDD is organically "growing" modular and testable code. Also, after a session, you have unit and function tests for free, instead of having to implement them afterwards. Having a plan from the start, however, is beneficial with TDD as well, as long as you're flexible enough to modify it if necessary.
The irony? Pair programming has become a dogmatic process over the needs of the individual developer in many locations, yet is still considered a core Agile technique. That just isn't right.
Like the author, I'm more introverted. I prefer to code alone. Forced coding or working with others drains me. However, if assistance is needed--myself or others--I've no issues working in a temporary pair to solve a problem.
Pair programming wasn't intended to be an iron dictate of "you must". It was intended to be a "it's ok to ask for help if you have a problem, because working software is the goal".
(Also I'd edit the last sentence to read proscriptively rather than historically: "Pair programming shouldn't be an iron dictate..." since that's really more interesting.)
Its OK if you hate Pair Programming. Its even OK if you hate it without even trying it. But just don't generalize it with being an introvert.
We had to create a strategy to manage the quality of the project and chose a task-based pair programming strategy. In those student projects it is often the case, that the better students do a rather big portion of the project while the others try to keep up. With pair programming this was not the case. Everyone developed on a similar level. Yes, it probably slowed down some of the developers, but for a student project, the main goal is to learn. And pair programming was a way to do that.
Also, our project quality really benefitted from this. After developing the basic server, client and game logic, we switched teams to do the next step. For example, the team that connected the client to the server would now have a person that knows the server side and one that ones the client side. This team changing was done on a regular basis and helped putting the software together. There were less problems with the code of different people working together than in most other projects and I believe, that pair programming was a big factor in that.
So, I can't speak for the work environment, but for learning to be a software developer, it really was a good experience.
Quite apart from his stubbornness around pairing, his broad-stroke presumptions about people who do pair, people who are introvert and people who are enthusiastic about sharing their patterns and practices smack of the worst kind of smug arrogance.
It's fine if the author isn't interested in the benefits of pairing, everyone's different. However I don't think I'd be particularly interested in working with him or hiring him.
You do realize that the first line of the post is "this is a rant", right?
So really, this isn't about pair programming, it's about the fact the the poster has social anxiety, and needs to address that. (And I need to stop posting on HN and write some tests).
If you've never gotten into the zone; if you've never spent an entire afternoon and missed meals and been utterly surprised at the clock when you come up for air; if you've never been productive at the level of a seriously skilled programmer, then I suppose you would dismiss this as a silly rant. But that says more about you than the OP.
(And did you think about testing your tests?)
I guess during the refactor stage you would have some sort of design discussion as well. And it might be useful for one person to be the DRY promoter while the other person promotes the YAGNI point of view, or else refactoring can get out of control.
Do we want this to be an industry where only the self taught succeed? I don't. I believe there are still some things that I can learn from others. I believe I am obligated to help those around me get better- it should be part of the job description. Pair programming, if it does nothing else, does open up what is normally a solitary activity and gives people a chance to learn from others.
It's the same as any software practice: TDD, which form of typing, vim/emacs/IDE, OO, etc. Without solid measurable proof that it's best for your specific job/domain/team (basically impossible) it's all just preference anyway. And someone who hates OO is going to constantly find ways why OO is terrible.
So we gather into jobs and teams that all share the same religious faith on all the above mentioned. Interviews are basically the same as you get in any church: do you believe these core faiths about our doctrine, and are you cool? Great, you're in!
Does this mean Code/Peer Reviews should be given a rest too?
A specific type of interaction is not for everyone, its clear you are not making any claims about it except for it doesn't work for your personality.
This is the future of pair programming... Hive programming.