Live data from Hacker News

Pair Programming Antipatterns

tuple.app

131–136 of 136 posts

Re: Pair Programming Antipatterns

#131
post #117

Earlier quoted context omitted.

Do they? I am on a team of two, and yet, I rarely have time to audit code that my fellow has written, simply because the rest of the day demands other tasks to be focused upon

If you don't have time to review, would you have time to pair? I think time constraints are a deeper problem

You would be surprised

Re: Pair Programming Antipatterns

#132

I used to be diametrically opposed to pair programming back when I was a junior developer. These days I often find myself parachuting into troubled code bases and trying to fix technical debt while under time pressure to launch a new feature. I often see things that, I can only imagine, were written by some junior dev trying to impress their boss by just hacking something together and throwing it over the wall. More…

That's what code reviews are for. You don't need pair programing for that. Places like google go even beyond by having a 'readibility' pass score for the code to be able to ship. Pair programing is something from the early 2000s, where code review tools were non-existent (I remember, people would just email diffs to each other), back in the day.

In my experience, code review often becomes a rubber stamping exercise. Reviewers only add trivial feedback and stop short of adding actual constructive criticism or feedback, either because they don't want to look like an arsehole, or because they don't have time.

That said, it's not an intrinsic problem with code review, but a team culture problem.

Re: Pair Programming Antipatterns

#133
post #67

Earlier quoted context omitted.

"IMO this is a very wrong way to look at pairing. It's not about one person being incapable of delivering a solution on their own, it's that having multiple perspectives on the code will lead to a higher quality and more well designed product." That's what PRs are for. One can't use the same argument to oppose PRs, as you suggest, because of this key difference: in a PR, the person doing the review has (or ought to h…

As the design evolves, this stuff should really be communicated to the rest of the team before the PR. The purpose of PRs should be almost entirely about finding bugs and typos.

It should be, but another thing in this industry is the completely subjective design ideas everyone brings. So PRs inevitably have comments about the approach to abstractions, testing, etc. that are really little more than ego-stroking.

Re: Pair Programming Antipatterns

#134
I'm curious where the pair programming religion came from. There was certainly a time when it didn't exist as a concept. I for sure don't remember anyone suggesting that it would be cool if two folks sat around the ASR-33 and took turns to hunt-n-peck on the keyboard. Perhaps it originated in the brogrammer movement?

Anyway, the sibling article says:

"A pair of programmers tends to produce better code than someone working alone."

Let's assume this is true (I'm reasonably sure it's false). If one programmer can type code that's at quality N, then add a second one to look at what they're typing and perhaps you can say that quality will be >N since the second person might spot errors made by the first. But we just used TWICE as many people to write that "better" code. I expect there are industries where this burning of resources makes sense, but most of the time it won't regardless of the improved code quality achieved. We could write 2x the amount of crappy code and most organizations would opt to do that.

If we're pairing up at the terminal to teach/train/transfer knowledge, that makes much sense and has been done since the ASR-33. Also sometimes it helps to have two or more people stare at a debugging session together to crack a gnarly problem. Designing at the whiteboard has been a thing since Von Neumann and Turing (chalk board...)

Programming however, isn't a thing you do in pairs, imho. It's creepy and weird.

Re: Pair Programming Antipatterns

#135
I would quit if I was forced to pair program. Pair programming is loved by incompetent software developers because they can hide in the shadow of more competent developers. That's my experience anyway. YMMV of course.

Re: Pair Programming Antipatterns

#136

Earlier quoted context omitted.

As the design evolves, this stuff should really be communicated to the rest of the team before the PR. The purpose of PRs should be almost entirely about finding bugs and typos.

What are "draft PRs" for then?

If you mean what I think you mean, those are one of the few exceptions. I assume you mean just implementing the feature/bugfix quickly because it helps with the design discussion. Even in that case, I think it's a good idea to have a final non-draft PR (or just have people look at it again with fresh eyes once out of the draft stage) where the main goal is just to verify correctness.
Post reply on HN