本文介绍了您与不测试其代码的开发人员怎么办?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们的一位开发人员正在不断编写代码并将其置于版本控制中,而无需对其进行测试.结果,我们的代码质量受到影响.

One of our developers is continually writing code and putting it into version control without testing it. The quality of our code is suffering as a result.

除了摆脱开发人员,我该如何解决这个问题?

Besides getting rid of the developer, how can I solve this problem?

编辑

我已经和他讨论过很多次,甚至还给过他书面警告

I have talked to him about it number of times and even given him written warning

推荐答案

如果在允许开发人员提交代码之前系统地执行代码审查,那么,您的问题通常就可以得到解决.但这似乎不是您的情况,因此,我建议您这样做:

If you systematically perform code reviews before allowing a developer to commit the code, well, your problem is mostly solved. But this doesn't seem to be your case, so this is what I recommend:

  • 与开发人员交谈.讨论对团队中其他人员的影响.大多数开发人员都希望得到同行的认可,所以这足够了.还要指出,比起几周前的代码,更容易解决在您脑海中浮现的代码中的错误.如果您已具备某种形式的 code ownereship (代码所有权),这部分就很有意义.
  • 如果一段时间后仍然无法解决问题,请尝试制定一项政策,使提交错误代码的行为对作者不利.一种流行的方法是使破坏结构的人负责创建下一个结构.如果您的构建过程是完全自动化的,则寻找另一项艰巨的任务来代替.这种方法的另一个好处是无需特别指出任何人,这使每个人都更容易接受.
  • 使用纪律措施.取决于您的团队和公司的规模,可以采用多种形式.
  • 解雇开发人员.保留劣质苹果需要付出一定的代价.当您走到这一步时,开发人员将不再关心他的同伴开发人员,并且您已经遇到了人员问题.如果工作环境中毒,那么您可能会比这个坏的开发人员损失更多的钱-从生产力和人员角度而言.
  • Talk to the developer. Discuss the consequences for others in the team. Most developers want to be recognized by their peer, so this might be enough. Also point out it is much easier to fix bugs in the code that's fresh in your mind than weeks-old code. This part makes sense if you have some form of code owneship in place.
  • If this doesn't work after some time, try to put in place a policy that will make commiting buggy code unpleasant for the author. One popular way is to make the person who broke the build responsible for the chores of creating the next one. If your build process is fully automated, look for another menial task to take care of instead. This approach has the added benefit of not pinpointing anyone in particular, making it more acceptable for everybody.
  • Use disciplinary measures. Depending on the size of your team and of your company, those can take many forms.
  • Fire the developer. There is a cost associated with keeping bad apples. When you get this far, the developer doesn't care about his fellow developers, and you've got a people problem on your hands already. If the work environment becomes poisoned, you might lose far more - productivity-wise and people-wise - than this single bad developer.

这篇关于您与不测试其代码的开发人员怎么办?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-09 17:28