结对编程_结对编程的力量在于执行

结对编程

提示与提示如何更有效地配对 (Tips with do’s and don’ts for pairing more efficiently)

This is the third part of a small series of posts talking about the fundamentals of Pair Programming. I have already written about what is Pair Programming and how we can find the best context to apply it. Today I will be writing about the tips one can follow to be able to pair efficiently.

这是讨论结对编程基础知识的一小部分文章的第三部分。 我已经写过什么是结对编程,以及如何找到最佳的应用上下文 。 今天,我将撰写有关可以有效配对的提示。

Pair Programming is a pattern to solve problems in a better way, it's not doing somebody else’s job, it’s doing the job. Together. When you tell the other what to do you are trying to solve the problem alone. Even if you believe to know the "correct answer", never tell the partner what to do, instead, ask if it makes sense propose an experiment to test something that you have in your mind. There is a risk that the "correct answer" might turn out to be not so correct in that specific context, therefore it's worth keeping an open mind and never jump to conclusions early to avoid unnecessary conflicts.

结对编程是一种以更好的方式解决问题的模式,它不是在做别人的工作 ,而是在做工作 。 一起。 当您告诉对方该怎么办时,您就是在尝试独自解决问题。 即使您相信知道“正确答案”,也不要告诉对方该怎么做,而是要提出一个实验来测试您脑海中的想法是否有意义。 在特定情况下,“正确答案”可能会变得不太正确,因此有必要保持开放的态度,决不要提早得出结论以避免不必要的冲突。

Never tell the partner what to do, ask if it makes sense first
永远不要告诉伴侣该怎么做,先问是否有意义

Before doing anything everyone should agree and state clearly what is doing next and why. This will expose discrepancies and conflicts that would have to be handled anyway, the difference is that doing it early drastically reduces the costs resulted of doing it later.

在做任何事情之前,每个人都应该同意并清楚地说明下一步要做的事情以及原因。 这将暴露出无论如何都必须处理的差异和冲突,不同之处在于,尽早进行此操作可以大大减少后期进行处理的成本。

Before doing anything state clearly what will be done next and make sure both agree on that
在做任何事情之前,先明确说明下一步将要做什么,并确保双方都同意这一点。

Synchronization is an important aspect of pairing. Never lose the sync. If any of the pairs is feeling that the other is doing something that they don’t understand, they should go back and explain again, as many times as necessary. If anyone pretends to understand what is happening, Pair Programming will have no effect at all. It is the responsibility of the one that notices the loss of sync to point it out and suggest a step back to recover.

同步是配对的重要方面。 永远不会失去同步。 如果两对中的任何一对感觉到另一对正在做他们不了解的事情,则应返回并再次解释,必要时进行多次。 如果有人假装了解正在发生的事情,那么结对编程将完全无效。 注意到同步丢失的人有责任指出并建议退回一步。

If losing sync, take it back ASAP
如果失去同步,请尽快恢复

The constant focus on a single task is very important, parallelization of subtasks is not Pair Programming. If the pair shares the input (mouse and keyboard) they will create an implicit dependency on each other in a way that it will be necessary a synchronized movement of both for an action to succeed. This will help to ensure that both are in sync and agree on what needs to be done next, without splitting tasks.

持续关注单个任务非常重要,子任务的并行化不是结对编程。 如果该对共享输入(鼠标和键盘),则它们将彼此隐式地建立依赖关系,从而必须使两者同步移动才能使操作成功。 这将有助于确保两者保持同步,并就下一步要做的事情达成共识,而无需拆分任务。

Share the mouse and keyboard to make sure both are in sync and agree on what needs to be done next
共享鼠标和键盘,以确保两者同步并就下一步需要做什么达成一致

Pair Programming has an initial time cost because it leverages the effort of two individuals to maximize the overall return. Such cost should be spent consciously. It is very useful to timebox the pairing session within a reasonable timeframe so that both can be aware if the pairing is being efficient or not given the amount of time spent on each subtask.

结对编程具有初始时间成本,因为它利用了两个人的努力来最大化总体回报。 这样的费用应该有意识地花费。 在合理的时间范围内对配对会话设置时间标记非常有用,这样,在给定每个子任务花费的时间量的情况下,双方都可以知道配对是否有效。

It's easier for useless discussions and bikeshedding take longer, therefore it's necessary to be mature and keep track of the time that both want to dedicate to that session. If time is up, analyze again if there’s value in keep going given the perceived benefits so far.

毫无用处的讨论会更容易,而花费更多的时间进行骑脚踏车 ,因此有必要成熟起来并跟踪双方都希望用于该次会议的时间。 如果时间到了,请再分析一次,鉴于到目前为止已获得的好处,继续前进是否有价值。

Timebox the session to be conscious about unnecessary discussions and the time cost
安排会话时间,以注意不必要的讨论和时间成本

Sharing knowledge is one of the greatest benefits of Pair Programming. When pairing in a team, try to pair with individuals holding more or less business or domain knowledge in that specific task. Nothing prevents someone from pairing with the same level of skill, but rarely a team will have all individuals with the same level of skill in all types of tasks, there's always room for learning, and Pair Programming is the best and fastest approach for increasing the ramp up of the team members.

共享知识是结对编程的最大好处之一。 配对时,请尝试与在该特定任务中拥有或多或少的业务或领域知识的个人配对。 没有什么能阻止某人具有相同技能水平的配对,但是很少有团队会在所有类型的任务中让所有具有相同技能水平的个体,总有学习的余地,而“配对编程”是增加能力的最佳,最快方法。加强团队成员。

When two individuals with different levels of skills are pairing, everybody wins. The one teaching will have a higher retention of information by being forced to discuss the answer in details, and the one listening will learn better because they will be forced to elaborate the right questions.

当两个具有不同技能水平的人配对时,每个人都会获胜。 一种教学将被迫详细讨论答案,从而具有更高的信息保留率,而一种聆听会学得更好,因为他们将被迫阐述正确的问题

Prefer pairing with individuals holding different levels of skill in a specific task
希望与在特定任务中具有不同技能水平的个人结对

Just because the name is "Pair Programming" that doesn't mean that pairing is restricted only to programmers. The fundamental benefits of pairing make it possible for multiple roles — including Business Analysts, Quality Assurance, Project Owners and Designers — to pair with each other and the developers. It is very important for a developer to start pairing with different roles to understand and learn with their point of view and be able to come up with better ideas to tackle the problems.

仅因为名称为“ Pair Programming”,并不意味着配对仅限于程序员。 配对的基本好处是使多个角色(包括业务分析师,质量保证,项目所有者和设计师)可以彼此和开发人员配对。 对于开发人员来说,开始与不同的角色配对以理解和学习他们的观点并能够提出更好的想法来解决问题非常重要。

Encourage all roles on the team to pair between themselves and the developers
鼓励团队中的所有角色在自己和开发人员之间配对

Another important requirement to receive a good answer and increase personal growth is asking the right question. In Pair Programming we should try to ask the right question as much as possible, this allows the pair to close gaps of knowledge and understand each other clearly.

获得良好答案并促进个人成长的另一个重要要求是提出正确的问题 。 在结对编程中,我们应该尝试尽可能多地提出正确的问题 ,这可以使结对缩小知识鸿沟并彼此清楚地理解。

Nobody should have doubts and uncertainty on the definition of something alone, be it technical or non-technical. If there are uncertainties and someone from the pair didn't know it, then something is wrong. All members of the pair should be aware of gaps, together.

不管是技术性的还是非技术性的,任何人都不应对某个事物的定义产生怀疑和不确定性。 如果存在不确定性,而这对夫妇中的某人不知道,那就有问题了。 该对中的所有成员都应该一起意识到差距。

Asking the right question is much more valuable than believing to have the right answer

提出正确的问题比相信正确的答案更有价值

Last, but not least, the most important requirement for being able to do Pair Programming is to kill your ego. As a member of a team with a common objective, nobody should try to be better, everyone should try to help themselves in order to achieve the common objective. Having an ego, consciously or unconsciously, will destroy any chances of leveraging any of the benefits of Pair Programming in a team.

最后但并非最不重要的一点是,能够进行结对编程的最重要要求是杀死自己。 作为一个具有共同目标的团队的成员,没有人应该努力变得更好,每个人都应该努力帮助自己,以实现共同目标。 有意识地或无意识地拥有自我,将破坏利用团队中的结对编程的任何好处的任何机会。

Kill your ego
杀死你的自我

Many teams fail to apply Pair Programming. It's hard to tell what is done wrong because it's impossible to measure it. One thing that is easy to measure, albeit anecdotally, is the day-to-day of a team that knows how to communicate efficiently with each other. Teams on that level of maturity are naturally prone to apply Pair Programming efficiently and can even discover Pair Programming by themselves naturally.

许多团队无法应用结对编程。 很难说出做错了什么,因为无法衡量。 尽管很容易衡量,但一件容易衡量的事情是团队的日常工作,他们知道如何有效地相互沟通。 处于这种成熟水平的团队很容易有效地应用结对编程,甚至可以自然地发现自己的结对编程。

The point is that the power of Pair Programming doesn't lie just on the mechanics of how it is applied, it lies in the mindset of the ones who apply it.

关键在于,结对编程的力量不仅仅在于如何应用结对,还在于应用结对的人的心态。

Pair Programming is not just about the mechanics of how it is applied, it is about the mindset of who applies it
结对编程不仅涉及如何应用它的机制,还关系到谁应用它的心态。

Pair Programming works but is not a silver bullet. Do not treat it simply as a buzzword but as a set of attributes for your belt of utilities, worth experimenting under certain circumstances. It might fail or succeed in the current state of your team, but not trying is the same as failing by default.

配对编程有效,但不是灵丹妙药。 不要简单地将其视为流行语,而应将其视为实用程序带的一组属性,值得在某些情况下进行试验。 在您的团队当前状态下它可能失败或成功,但是默认情况下不尝试与失败相同。

As Wayne Gretzky, a Canadian former professional ice hockey player, liked to say:

正如加拿大前职业冰球运动员韦恩·格雷茨基 ( Wayne Gretzky)喜欢说:

You miss 100% of the shots you don’t take.
您会错过100%不拍摄的照片。

Enough showing how to do it correctly. If you want to know how to do Pair Programming the wrong way, see How to do Pair Programming The Wrong Way.

足以显示如何正确执行操作。 如果您想知道如何以错误的方式进行配对编程,请参阅如何以 错误的方式 进行配对编程

Thanks for reading. If you have some feedback, reach out to me on Twitter, Facebook or Github.

谢谢阅读。 如果您有任何反馈意见,请通过TwitterFacebookGithub与我联系。

翻译自: https://www.freecodecamp.org/news/the-power-of-pair-programming-lies-on-the-execution-a27938447994/

结对编程

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值