Youda's blog

努力工作 认真生活......

0%

关于软件生产力度量的问题

软件生产力这个概念是不存在的。

正如马丁·福勒在大约十年前指出的那样,软件中的生产力是无法有效衡量的。原因在于它根本就不存在于相关事物的领域中。换句话说,生产力作为软件中的一个度量标准是不适用的。“我们今天创造了多少?”这不是一个相关的问题。即使能够衡量,软件的生产力也无法以任何有意义的方式近似于商业价值。

这是因为软件开发不是一种必然产出某物的活动。这里有一个思维实验:假设有两个开发者在同一天从事同一个项目,并偶然地选择了同一个任务。第一个人,弗兰克,迅速编写了一个1000行的框架,美妙地解决了问题。代码编写得很好,经过了良好的测试,部署和操作也有很好的文档记录。第二个开发者,彼得,去公园了一整天,在那里一边喂鸽子一边思考问题。大约下午4点45分,彼得回到办公室,删除了100行代码,部署了更改……问题就解决了。

这两个开发者中,哪一个今天更“高产”?答案是:这并不重要。重要的是彼得解决了问题,同时为团队减少了长期维护成本。弗兰克也解决了问题,但他通过产出代码增加了维护成本,因此(在其他条件相同的情况下)他的解决方案是较差的。称彼得更“高产”是对比喻的一种折磨,已经超出了任何可能的实用点。

我认为,优秀的软件开发者所做的是解决问题。实际上,这与生产正相反。技术制品的创建,如代码、文档、数据等,都是为了实现解决问题的目标而不得不采取的必要手段。这就是为什么有时候,解决问题的最有效方法可能是一次5分钟的对话。

原文: https://www.benrady.com/2012/11/theres-no-such-thing-as-software-productivity.html

Bill Caputo, through repeated conversations we’ve had, has convinced me of something very surprising. It was something that changed the way I think about the world, and how I do my job.
There is no such thing as software productivity.
As Martin Fowler observed almost a decade ago, productivity in software cannot be usefully measured. The reason why is it just doesn’t exist in The Realm of Relevant Things. Put another way, productivity has no applicability as a metric in software. “How much did we create today?” is not a relevant question to ask. Even if it could be measured, productivity in software does not approximate business value in any meaningful way.
This is because software development is not an activity that necessarily produces anything. Here’s a thought experiment: Let’s say that you have a couple of developers working on the same project, and by accident, both of them pick up the same task on the same day. The first one, Frank, hauls off and writes a 1000 line framework that solves the problem beautifully. The code is well written, well tested, and the deployment and operation of it is well documented. The second developer, Peter, heads off to to the park for the day, where he thinks about the problem while he feeds the pigeons. Around 4:45, Peter wanders back to the office, deletes 100 lines of code, deploys the change…and the problem is fixed.
Which of these two developers was more “productive” today? The answer is: It doesn’t matter. What matters the that Peter solved the problem, while simultaneously reducing long term maintenance costs for the team. Frank also solved the problem, but he increased maintenance costs by producing code, and so (all other things being equal) his solution is inferior. To call Peter more “productive” is to torture the metaphor beyond any possible point of utility.
I would argue that what good software developers do is remove problems. The opposite, in fact, of production. The creation of technological artifacts such as code, documentation, data, etc…are all necessary evils to achieve the goal of removing problems. That’s why, sometimes, the most effective solution to a problem is a 5 minute conversation.