什么是结对编程?

发布于 2024-07-16 05:42:50 字数 1431 浏览 14 评论 0 原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

迷爱 2024-07-23 05:42:50

结对编程是极限编程(XP)的主要实践之一。 它的字面意思是两个人在一台计算机上工作,通常一个人负责键盘(通常称为驱动程序),另一个人负责操作(称为乘客或猎枪)。 它被认为可以提高生产效率和生成代码的质量,并强制执行代码的组所有权——这是 XP 的另一个宗旨。

Pair programming is one of the main practices in Extreme Programming (XP). It does literally mean two people working on one computer, usually one at the keyboard (often referred to as the driver) and a partner (referred to as the passenger or shotgun). It is reputed to improve productivity and the quality of the generated code as well as enforce group ownership of the code - another tenent of XP.

々眼睛长脚气 2024-07-23 05:42:50

http://en.wikipedia.org/wiki/Pair_programming

结对编程是一种软件开发技术,其中两个程序员在一个键盘上一起工作。 一个人输入代码,另一个人检查输入的每一行代码。输入的人称为驱动程序。 审查代码的人称为观察者1 或导航者。 两个程序员频繁地互换角色(可能每 30 分钟一次)。

在审查时,观察员还会考虑工作的战略方向,提出改进的想法以及未来可能需要解决的问题。 这使得驾驶员可以将所有注意力集中在完成当前任务的“战术”方面,并将观察者用作安全网和指南。

http://en.wikipedia.org/wiki/Pair_programming

Pair programming is a software development technique in which two programmers work together at one keyboard. One types in code while the other reviews each line of code as it's typed in. The person typing is called the driver. The person reviewing the code is called the observer1 or navigator. The two programmers switch roles frequently (possibly every 30 minutes).

While reviewing, the observer also considers the strategic direction of the work, coming up with ideas for improvements and likely future problems to address. This frees the driver to focus all of his or her attention on the "tactical" aspects of completing the current task, using the observer as a safety net and guide.

农村范ル 2024-07-23 05:42:50

如有疑问,请询问维基百科:结对编程。 总体思路是让一个人编写代码,而另一个人则扫描错误和凝聚力。

When in doubt, ask Wikipedia: Pair Programming. The general idea is to have one person writing code while the other scans for mistakes and cohesiveness.

鞋纸虽美,但不合脚ㄋ〞 2024-07-23 05:42:50

测试驱动开发的实践者有时使用的结对编程扩展是乒乓球配对

Ping Pong Pairing 的工作原理类似于:

  • 编写一个失败的测试(开发人员 A)
  • 然后实现使测试通过的代码(可选)重构(开发人员 B)
  • 编写失败的测试(开发人员 B)
  • 实现使测试通过的代码,然后(可选)重构(开发人员 A)
  • 等等...

Ping 的好处之一Pong Pairing 的特点是,任何一个开发人员都很难睡很长时间;-)

An extension of Pair Programming sometimes used by practitioners of Test Driven Development is Ping Pong Pairing.

Ping Pong Pairing works something like:

  • Write a failing test (developer A)
  • Implement code that makes the test pass then (optionally) Refactor (developer B)
  • Write a failing test (developer B)
  • Implement code that makes the test pass then (optionally) Refactor (developer A)
  • and so on...

One of the benefits of Ping Pong Pairing is that it's tough for either developer to sleep very long ;-)

甜味超标? 2024-07-23 05:42:50

结对编程是指两个开发人员共享一台计算机和键盘,在同一张故事卡上工作。 它被认为是一种极限编程实践。 极限编程需要一些积极的东西,在本例中是代码审查,并将其发挥到极致。 持续代码审查之外的好处如下:

  • 提高质量:一对活跃的程序员在同一张故事卡上工作,将完成缺陷较少的卡片
  • 提高生产力:如果在解决问题时没有完全阻止,则配对不太可能被减慢。 此外,当您与合作伙伴一起工作时,很难通过电子邮件或网络休假......您不想让合作伙伴失望。 结对工作时,您将通过更简洁的设计和更少的代码行来解决问题
  • 消除知识孤岛:通过轮换结对,您将学习整个团队的应用程序和领域业务知识。 该团队不太可能被阻止,因为苏正在度假,没有其他人知道她的代码。
  • 知识转移:轮流结对在合作过程中互相教授新技能(工程和领域)。 每个人的团队水平都会提高,知识也会通过团队传播。
  • 团队自我选择:团队学习某人的技能,并很快淘汰掉表现不佳的人。

Paired programming is when two developer work on the same story card sharing a single computer and keyboard. It is considered an extreme programming practice. Extreme programming takes something positive, in this case a code review, and takes it to the extreme. The benefits beyond the continuous code review are as follows:

  • Improved quality: A pair of active programmers working on the same story card will complete the card with less defects
  • Improved productivity: a pair is less likely to be slowed down if not outright blocked when solving a problem. Furthermore, it is harder to take an email or web vacation when you are working with a partner ... you don't want to let the partner down. You will solve the problem with a cleaner design and less lines of code when working as a pair
  • Eliminate silos of knowledge: With rotating pairs, you will learn application and domain business knowledge across the team. The team is less likely to be blocked because Sue when on vacation and no one else knows her code.
  • Knowledge Transfer: Rotating pairs teach new skills (engineering and domain) to each other as they work together. The level of the team will rise for everyone and the knowledge propagates through the team.
  • Team self selects: The team learns one anther's skills and will quickly weed out someone that is not performing.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文