Try Before Choosing

?

Try Before Choosing

Erik Doernenburg

CREATing An AppliCATion REquiRES MAKing MAny dECiSionS. Some might involve choosing a framework or library, while others revolve around the use of specific design patterns. In either case the responsibility for the decision generally lies with the architect on the team. A stereotypical architect might gather all the information that can be gathered, then mull over it for a while, and finally decree the solution from the ivory tower for it to be imple- mented by the developers. Not surprisingly, there is a better way.

In their work on lean development, Mary and Tom Poppendieck describe a technique for making decisions. They argue that we should delay commitment until the last responsible moment; that is, the moment at which, if the team does not make a decision, it is made for them—when inaction results in an outcome that is not (easily) reversible. This is prudent because the later a deci- sion is made, the more information is available on which to base the decision. However, in many cases more information is not the same as enough informa- tion, and we also know that the best decisions are made in hindsight. What does this mean for the good architect?

The architect should constantly be on the lookout for decisions that will have to be made soon. Provided the team has more than a handful of developers and practices collective code ownership, the architect can, when such a deci- sion point approaches, ask several developers to come up with a solution to the problem and go with it for a while. As the last responsible moment approaches, the team meets to assess the benefits and drawbacks of the different solutions.

?

??Usually, now with the benefit of hindsight, the best solution to the problem is apparent to everybody. The architect does not have to make the decision, he or she merely orchestrates the decision-making process.

This approach works for small decisions as well as for large ones. It can allow a team to figure out whether or not to use the Hibernate templates provided by the Spring framework, but it can equally answer the question of which JavaScript framework to use. The duration for which the different approaches evolve is obviously very dependent on the complexity of the decision.

Trying two or even more approaches to the same problem requires more effort than making a decision upfront and then just implementing one. However, chances are that an upfront decision leads to a solution that is later recognized to be suboptimal, leaving the architect with a dilemma: either the team rolls back the current implementation or it lives with the consequences, both of which result in wasted effort. Even worse, it is entirely possible that nobody on the team recognizes that the approach chosen is not the best one, because none of the alternatives was explored. In this case, effort is wasted without any chance of addressing the waste. After all, trying multiple approaches might be the least expensive option.

时间: 2024-08-03 05:38:20

Try Before Choosing的相关文章

《100种过度医疗大公开》:转译自日文版,日文版依据的是美国的“Choosing Wisely”项目。三星推荐

本书转译自日文,日文版则是在美国的“Choosing Wisely”项目中选择了100个相对常见的过度医疗项目做解说.Choosing Wisely项目,是由美国多个专业医学组织发起的列出过度医疗项目的活动. 日文作者是兽医专业的新闻记者,中文译者不是医学专业人员,个别专业词语翻译有误,“随机对照试验”翻译成“随机比较试验”了,有些句子翻译的也比较别扭.基于以上两点,这本书的权威性可信度我认为都不算太高,只能给三星.感兴趣的话还是应该直接上网看英文原版. 以下是书中部分信息的摘抄: 1:以美国内

Codeforces Round #135 (Div. 2) D. Choosing Capital for Treeland dfs

D. Choosing Capital for Treeland time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard output The country Treeland consists of n cities, some pairs of them are connected with unidirectional roads. Over

Educational Codeforces Round 23 E. Choosing The Commander (trie)

题目链接: Educational Codeforces Round 23 E. Choosing The Commander 题意: 一共有n个操作. 1.  插入一个数p 2.  删除一个数p 3.  询问有多少个数 使得 x^p<l 题解: 对于前两种操作用01trie就能解决. 对于对三个操作,我们考虑在trie上搜索. 1.  当l的bit位是1时,那边bit位是p的字数全部的数都会小于l,(因为p^p=0) 2.  当l的bit为是0时,那边只能向bit位是p的子树中搜. 这样算下来

ZOJ 3690 Choosing number(dp矩阵优化)

Choosing number Time Limit: 2 Seconds      Memory Limit: 65536 KB There are n people standing in a row. And There are m numbers, 1.2...m. Every one should choose a number. But if two persons standing adjacent to each other choose the same number, the

(纪念第一道完全自己想的树DP)CodeForces 219D Choosing Capital for Treeland

Choosing Capital for Treeland time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard output The country Treeland consists of n cities, some pairs of them are connected with unidirectional roads. Overall

树形DP Codeforces Round #135 (Div. 2) D. Choosing Capital for Treeland

题目传送门 1 /* 2 题意:求一个点为根节点,使得到其他所有点的距离最短,是有向边,反向的距离+1 3 树形DP:首先假设1为根节点,自下而上计算dp[1](根节点到其他点的距离),然后再从1开始,自上而下计算dp[v], 4 此时可以从上个节点的信息递推出来 5 */ 6 #include <cstdio> 7 #include <cstring> 8 #include <cmath> 9 #include <vector> 10 using name

zoj3690 Choosing number 矩阵

Choosing number Time Limit: 2 Seconds      Memory Limit: 65536 KB There are n people standing in a row. And There are m numbers, 1.2...m. Every one should choose a number. But if two persons standing adjacent to each other choose the same number, the

Choosing web framework: ASP.NET MVC vs Django Python vs Ruby on Rails(转载)

来源:http://podlipensky.com/2012/06/choosing-web-framework-asp-net-mvc-vs-django-python-vs-ruby-on-rails/ How often do you emerge from you cubicle to look around, note new faces or new facial expression on old ones? How often do you emerge from you tec

BAPC 2014 Preliminary ACM-ICPC Asia Training League 暑假第一阶段第一场 A. Choosing Ice Cream-gcd B. Failing Components-最短路Dijkstra F. Runway Planning

开始水一波博客 题目链接: A. Choosing Ice Cream 传送门 题意就是n个冰淇淋,骰子有k个面,问你是否能在公平的概率下转几次骰子能确定买哪个冰淇淋. 举个例子,假设我只有一个冰淇淋,我不用转骰子直接就会买这个,所以转骰子的次数是0,如果我有4个冰淇淋,2个骰子面,我可以先把冰淇淋abcd分成两部分,ab一组,cd一组,这是等概率的,我先转一次骰子确定是选ab组还是cd组,然后再转一次就可以确定买哪个了.如果我有6个冰淇淋,12个面,我可以每一种冰淇淋贴2个面,转一次就可以确定