TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: How to Approach Pair Programming?

24 点作者 jerrygoyal大约 1 年前
I run a small remote startup with two other developers. I've heard good things about pair programming, but I have never done it myself. Any suggestions or advice on how to approach pair programming?

12 条评论

eps大约 1 年前
What is the problem you are hoping to resolve with this?
评论 #40113195 未加载
ravenstine大约 1 年前
If you&#x27;ve never done it yourself, then the answer is right in front of you.<p>Before you try to make pair programming happen with your developers, a move that is fitting of the boss from <i>Dilbert</i> comics, I suggest you work on some of your own programming tasks and ask one of your developers to help you figure something out. Doesn&#x27;t really matter if you aren&#x27;t that skilled. Just find a harmless task you can do that isn&#x27;t critical but can help you facilitate pairing as a culture. If it&#x27;s clearly beneficial, then there&#x27;s a decent chance your developers will simply start doing it amongst themselves.<p>However, pairing doesn&#x27;t magically create good code, better products, or more efficient developers. If your devs don&#x27;t take on pair programming, then it&#x27;s in your best interest to accept that it&#x27;s not for them. Everyone has a different style of being productive, and for some that means deep focus and not playing backseat driver.<p>In any case, definitely don&#x27;t try to push pair programming on them without having experienced it yourself. At the very least, ask your developers what they think about pair programming and try to get as honest an opinion as you can. Chances are they actually have opinions on it.
danielovichdk大约 1 年前
You will not get it right the first many times.<p>A lot of things can happen 8n a pair programming session that has nothing to do with programming but everything to do with psychology.<p>I urge you to take small steps. Pick a small challenge.<p>Make sure you change who is programming, so the level change in overview versus implementation changes. When writing code you can be locked in, and that lock will tighten on a mental level when other people have insights right away, that you must listen to while programming.<p>Take your time. Discuss and level the knowledge. Have people explain why and make sure they get time to explain without discussing. Pair programming and mob is very much about connecting the intelligence of more people but the knowledge sharing is immense.<p>Have fun with it. Throw away branches. Start over. Discuss paths. Don&#x27;t push eachother towards an unknown future just because you cannot say no to cleverness.<p>Hope it gave you a little bit of support
sureglymop大约 1 年前
When I had to go to the mandatory army service, on the first day we were told &quot;you will always work with at least one other person and never be solely responsible for anything&quot;. I guess the army can afford it here since the service is mandatory. This is good in my opinion. In a team of two, there is not only the opportunity to help each other but also shared responsibility and not wanting to &quot;get your coworker in trouble&quot;. So it would be interesting to see a company try radical pair programming. People coding and learning together always. Of course there would be some logistical difficulties but overall it would be interesting.
zer00eyz大约 1 年前
So I have been doing flavors of this for almost 20 years. I can give you a system that will work. You, or your team might think that it wont work, or that you will hate it.<p>1. Everyone has to use the same IDE 2. Everyone needs to stop doing local dev.<p>That first one seems like a massive hurdle. It may be one. Vim users tend to look down their nose at IDE&#x27;s. IDE folks think vim users spend more time playing in vim than working. And we all want to forget about people who use VS code. (I say this having 2 open vim sessions, 2 IDE&#x27;s running and used VS code today to build some firm ware).<p>There really is one choice at this moment. Pick intellij (or one of their branded products) and code with me. Dont fuck around with VS code. VIM is NOT an option. You need everyone using the same tools so that you can work in files together (think dual cursors), or in the same tree concurrently. You also need to let someone take the wheel of your machine (think kvm&#x2F;vnc) or you theirs and work effectively. Someones vimrc file is going to be disaster for you. VS code is just too incomplete and too easy to experiment with odd ui and plugins. If you have a die hard vim user then just put vim in your IDE... and lern how to toggle back and forth if loves vim that much.<p>This gives you a fair bit of the tooling your going to need. I cant stress enough that all of you are likely going to need desks, and matched monitors... You cant have one of you in 4k and one of you in 1080. Its going to be a nightmare when you need to share screens. And your going to want to share screens.<p>The other side of this is moving to remote dev. In an ideal world you all live in the same city, still have an office (or access to some rack space) where you could put a server and run prox mox on it. Everyone would get a VM (a whole, real VM) and then run containers&#x2F;what ever they wanted on that. Why does same city&#x2F;office matter. Because the spead of light is a bitch... if it takes a 1&#x2F;3 of a second for the one team member across an ocean they are going to be really unhappy. If your all spread AND every one has good internet AND can poke the holes needed then set up a bunch of mini pcs&#x27;s at everyone house... You can also just rent servers from someone like OVH (flat rate, unmetered bandwitdh) again pay attention to latency.<p>Why &quot;remote dev&quot;? 1. easy to backup &#x2F; restore (even more so with a tool like prox mox) 2. You can now take risks, having back ups, not risking your dev instance do that dumb thing. If it goes badly just turn on the backup. 3. You can do this to someone elses dev env! If your having a problem or trying to recreate a complext bug, or chase an issue through a deep stack you can all trouble shoot on the same instance. Hell you can break that, restore and be back up and running in zero time flat.... At no poit is your personal work computer, with your mail&#x2F;slack&#x2F;logins ever at risk of getting knocked out.<p>The whole goal is to end up with a LOT of parity and a lot of access. You all managed to agree on a programing language, a data base etc... the rest of this is just furthering that standardization. It is going to feel weird, it is going to be rough the first two weeks but if you spend a lot of time with open voice chat and accessing and looking and making an effort to be involved in each others work your going to find you get a LOT of productivity gains.<p>It is a tough level of collaboration to maintain your going to spend the first month forcing it for an hour a day for 3 days a week. Your going to spend a bit of time over indulging (where you end up spectating too much) ... when you all get comfortable with it the exchanges just turn into &quot;hey can you look at&quot; for 5 mins here and 10 there with some weekly catch ups, group code reviews and really paring for the gnarly changes.
评论 #40075405 未加载
评论 #40075240 未加载
评论 #40075683 未加载
jerrygoyal大约 1 年前
I found these links helpful:<p><a href="https:&#x2F;&#x2F;tuple.app&#x2F;pair-programming-guide&#x2F;" rel="nofollow">https:&#x2F;&#x2F;tuple.app&#x2F;pair-programming-guide&#x2F;</a><p><a href="https:&#x2F;&#x2F;martinfowler.com&#x2F;articles&#x2F;on-pair-programming.html" rel="nofollow">https:&#x2F;&#x2F;martinfowler.com&#x2F;articles&#x2F;on-pair-programming.html</a>
gtirloni大约 1 年前
Please consider some people might not enjoy working in that arrangement.<p>You can try to convince them by showing concrete benefits (for them or the company).<p>Some people won&#x27;t have the personality for that or be neurodivergent enough that there is no way this will work for them.
nunez大约 1 年前
If you&#x27;re that small and are all devs, you&#x27;re probably already doing some parts of it!
sandreas大约 1 年前
My advice: While I find TDD is not a good practise for all day problems, it has its good parts for educational purposes. Pair programming is one of them.<p>1. Start with planning a coding dojo (about 2-3 hours), invite the whole team<p>2. Start a small theory session (15 minutes) about TDD and Pair-Programming essentials when starting the dojo (someone of you has to research, build knowledge and prepare beforehand)<p>3. Select one pair - the others are watching (in your case 1 other person)<p>4. Start the TDD cycle with your challenge (e.g. fizzbuzz) - Write a failing test, switch driver, fix the test, refactor, write next failing test, switch driver, repeat<p>5. Urge yourself and your partner to communicate (talk about what your doing atm), focus on the method not the problem and remember to stay in the roles (driver writes code, navigator manages tasks &#x2F; todos)<p>6. After 15 minutes Change pairs to devs, who haven&#x27;t been practising yet<p>7. Repeat until your dojo time is over<p>This way you can educate yourself without focusing on your current work problems, but having fun focusing on the TDD and pair programming part. Knowledge transfer is also guaranteed, because the ones that don&#x27;t pair-program will at least look at what the others are doing.<p>After you&#x27;ve built some knowledge (after around 2 or 3 dojos), try to do 1h pair programming sessions (no longer - without the need of TDD) in your all-day work. Set a clock timer to around 10 minutes, so you don&#x27;t forget to switch driver and navigator.<p>I would not start with sessions &gt; 1h, because pair programming can be pretty exhausting when you start.<p>Have fun :-)
NewByteHacker大约 1 年前
Decomposing goals reasonably is the key.
brudgers大约 1 年前
Talk to the other two developers because what is going to work is specific to the three of you. Figure out what it means collectively. Theory doesn&#x27;t matter. Other people&#x27;s experience doesn&#x27;t matter.<p>Buy-in is all that really matters. Without an ongoing process, there&#x27;s nothing to improve. Good luck.
mharig大约 1 年前
I think pair programming cannot be made cost effective.<p>I am quite a fan of pair debugging.