问题描述
我在一个环境中工作,由于历史原因,我们使用自定义实用程序类的大杂烩,大多数是在STL到达现场之前写的。有许多原因,我认为这是一个好主意,至少使用STL写新的代码,但主要的是,我相信它提高了程序员的生产力。不幸的是,这是一个我不知道如何证明的点。
I work in an environment where, for historical reasons, we are using a hodgepodge of custom utility classes, most of which were written before STL arrived on the scene. There are many reasons why I think it is a good idea to at least write new code using STL, but the main one is that I believe it increases programmer productivity. Unfortunately, that is a point that I don't know how to prove.
有没有试图量化或甚至暗示生产力的研究从使用STL获得?
Are there any studies out there that attempt to quantify, or even just hint at, a productivity gain from using STL?
更新:我想我应该更具体。我不是主张重写现有的代码,而且我不是担心新员工会得到一个运行的开始。前者是愚蠢的,后者本身不足以说服人。
Update: I guess I should have been more specific. I am not advocating rewriting existing code, and I am not worried about the new hires that will get a running start. The former would be foolish, and the latter by itself is not enough to convince people.
推荐答案
没有研究会显示STL更有效率,因为它是STL。
There are no studies that will show STL is more productive just because it is STL. Productivity gains from using it are due to it being a standard programmers are familiar with it, and because the code is already written and tested.
如果你的公司已经有了实用程序类员工熟悉,并且这个实用程序代码在整个现有的代码库中使用,那么切换到STL实际上可能会损害生产力。
If your company already has utility classes that employees are familiar with, and this utility code is used throughout an existing codebase, then switching to STL could actually be detrimental to productivity.
这表示使用STL的新代码将是一个好的举动。我不一定从生产力的角度来论证这一点,而是可维护性。如果你的代码早于STL,它似乎在你的公司的代码有相当长的寿命,并可能由多个新的程序员多年来维护。
That said for new code using STL would be a good move. I would not necessarily argue this from a productivity standpoint, but one of maintainability. If you have code that predates STL it sounds like code at your company has quite a long lifetime and is likely to be maintained by a number of new programmers over the years.
你可能还想要使用STL作为一种方式让每个人保持他们的C ++技能尖锐。虽然我不会拒绝不认识STL的C ++候选人,但我肯定会把它视为黑色标记。
You may also want to broach the use of STL as a way for everyone to keep their C++ skillset sharp. While I wouldn't reject a C++ candidate who didn't know STL, I would definitely view it as a black mark.
这篇关于通过STL与自定义实用程序类的程序员生产力的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!