What?! Um... do you think we should write the test first? >> No, I don't think so. <thinking> Here we go again...why doesn't he ever listen? >> We can write more meaningful variable names,
'x' is not conveying anything >> I have been doing it this way for ages.
This is how we should do it. >> Yeah but then we will have this huge commit,
do we really want that? >> We need to get this done today, we have so much to deliver. We don't have time to gold-plate. >> Look there's a lot we're doing wrong,
that's not what we want to do. >> No, this is how we should do it! >> So this part of the code uses reflection...
<discussing code> >> Sunit! Can you help me with this? >> Let me just go there and I'll come back in 2 minutes. >> Sure. >> So this is the story that we'll be working on ...let's just refactor a few things
that I think are necessary before... ...this class name, what do you think?
Is it right, or do we need to change somethings? I feel we should change it, let's change it to... ..and here, the method called 'create',
it doesn't say what does it create. I'll change it to something else- 'create filters'. >> That's exactly what I was thinking! >> Now I feel we should do it, and let's see how it goes...
<thinking> is this guy even listening? Ok, and here is Trump's letter, maybe. And now we are preparing some food for this filter-
let's see how it works. This code looks a bit crappy, so I think
we should kill our client and go away. >> Sounds good, yea >> Let's do that. >> <thinking> What are we doing??
Yea, ok. >> ...good game, man.
>> I'll finally beat you! We'll see about that. So let's end this day, commit this Committed! Let's push it. But the build is broken- what do we do? Whatever we want to do I guess! Push! Alright, let's go! Lets go play that game >> No no no- you might want to use 2 spaces and not 4 >> Why? >> 2 spaces are more elegant >> But we've been using 4 spaces in the rest of the project >> We don't need to make the same mistakes we've made in the past >> It's not exactly a mistake, it's conforming to the standard >> I don't agree >> It's just spaces- use 2 spaces, 4, 4, 2. What do you think of 42? >> The meaning of life? >> The meaning of everything, essentially! ...but if you think about it, at the point of Big Bang, it was finite... >> Guys- is it 2 or 4? >> Have you watched the '24' series? The English one? >> No, how is it? We all are guilty of these anti patterns, consciously or unconsciously It's important to be aware of them and correct them Pair programming is more effective, and if done well, it's more enjoyable.
The cynic in me says that pair programming, like open plan offices, mainly exist to keep programmers off reddit.
I usually only like pair programming if there is some implementation decision-making or difficulty with the problem that you'd like to share with other team members before code review. Other than that, pair programming is annoying if all you're doing is chugging away at a simple or time-consuming problem. Code review can handle all the simple/normal work.
Interesting to see how many people dislike pairing. I'm on a pairing team - 9-5. There are certainly trade-offs but I think they're worth it. I've been on the team for 6 months. After 3, my manager's feedback was that I never seemed to go through any sort of onboarding - I just showed up one day and got to work. That is 100% because we pair. I really like the give and take of ideas during a pairing session, and my pairing partners and I tend to push each other. We're more likely to do the "right" thing than the "quick" thing because we remind each other. It's a lot easier to let something slide in a PR than while you're writing the code. All that being said, it is an adjustment for people who haven't done it before. And I'm definitely more tired at the end of the day.
Pair programming is an anti pattern