Michael Chen's Blog

World in my view is a word of my view.
随笔 - 74, 评论 - 375 , 引用 - 375

控制发散思维

深入开源世界的程序员的思维大多发散严重,这种发散在很多情况下是有害的。在制作一个新的产品/项目之前,很多人都会说,唔,你应该参考好的开源东西,把他直接使用。殊不知这样拿来就用伤害最大:因为自己根本没有机会仔细思考自己要做的东西是什么样子的。这就是Hibernate之所以创建EHCache的原因。在EHCache之前,已经有不少Cache实现,为什么没有直接使用?因为Hibernate自己都不知道Cache接口应该是什么样的。因此有了小小的简陋的EHCache, 正是有了这个小小的东西,其他Cache机制的集成才成为可能。因为Hibernate知道与外界集成要遵循的接口是什么。如果当初直接采用某一种Cache实现,恐怕就没有了现在灵活的Cache机制了。

(这种思维的方式同样可以推广,为什么小公司不愿意接受数额较大的融资,因为这样很容易将小公司原本不太清晰的发展观念冲垮,最后什么也不是。)

现在设计平台,发现陷入了这样一个怪圈:我总想将最新最好的开源产品集成到平台中,却忽略了Roadmap Feature的定义,也就是说,没有一个清晰的标尺来定义平台某一个版本应该包含那些特征,应该达到什么效果。这样做的后果是我陷入在一个又一个优秀的产品中,像上瘾的烟鬼拔不出来。在深邃的开源世界里,一切的一切都太又诱惑了:为了选定一种O/R映射方案,我比较了JDO的各种实现以及Hibernate,阅读了大量文档(广告?),最后还是回归到Hibernate; 为了选定一种Mock测试方案,我比较了EasyMock, jMock, 之前我从未用过Mock测试,现在我对EasyMock的机制已经相当清楚了;为了选定一种代码覆盖率工具,我比较了Clover, Jcoverage和Emma,最后选定了Jcoverage, 为了选择一种IoC容器,我比较了Spring和 HiveMind,最后选定Spring, 为了选定一种Web开发框架,我重新审视并比较了SpringMVC, WebWork, Struts, Tapestry.,最后选定了Tapestry。这个过程充满了感叹,也充满了诱惑性:很多具有相关性设计精美的项目会时不时招摇的在你眼前晃来晃去,让你忍不住看下去,然后你一个下午的光阴就耗费在从Google或者TSS或者JavaLobby一个链接开始而引入的一个深渊,留下你无法弥补的4个小时的时间。看着越来越近的Release Date, 心情越来越不爽。

因此,一旦前期调研结束,程序员应当果断的将与开源的联系一举切断,专心致志的投入到实现中去,一旦发现有可能抠出新的设计的地方,不要马上就找开源的产品,请先用自己的智慧设计一个能用哪怕是破败不堪的(好的设计是重构出来的,不是吗?)东西,先将框架搭建出来,一个迭代过后,开始重构,等到这个设计基本成型了,能够运行了,然后重新获得与OS的联系,参考同类产品,进行重构或者集成。这么做的目标是控制住发散的思维,在有限的时间内拿出一个在当前状态下最好的方案与实现,没有底线的项目/产品是个毫无意义的泡泡,脆弱,除了作为夸夸的谈资,经不起明眼人的一锥子。

发表于 2004年12月22日 9:27

评论

# re: 控制发散思维

不错不错,有时候也这么想,如果开源软件的选择本身就是单独的项目,或者能够在项目之前充分选择,那么编成生活会简单一些。
不过,有时一些开源软件确实会给带来重大的影响,比如在spring之前有多少人的设计是ioc的呢?
2004/12/22 9:54 | aoaoao

# re: 控制发散思维

呵呵,我前一阵也有这样的感觉
我称之为:新技术躁狂症
2004/12/22 17:24 | flyingbug

# re: 控制发散思维

这不是转载的,是吗?写的太好了,受益匪浅
2004/12/23 20:47 | ZhuLiPing

# re: 控制发散思维

不错.收藏.
2004/12/24 13:45 | 大郎

# re: 控制发散思维

写得好。收藏之。
我现在就这样。
陷入一个个技术的漩涡里面去,新技术曾不不穷,把握不住自己。
2004/12/27 13:27 | Hut

# re: 控制发散思维

赞一下!
2004/12/30 11:43 | shidu

# re:控制发散思维

^_~,pretty good!
2005/4/20 0:05 | 氧气传感器

# re:控制发散思维

控制发散思维ooeess
2005/6/16 0:25 | 气味检测仪

# re:控制发散思维

控制发散思维ooeess
2005/7/16 5:41 | 红外热像仪

# re: 控制发散思维

是不应该在开发阶段,尤其是中后期引入新的开源项目;但为什么你说到的这些诸如ORMapping 的选择等没有在前期完成呢?我觉得这些应该在设计前就应该确定了啊

另外,我自认我所能做出来的抽象、提炼 远不如开源项目做得好;看珲一些开源项目后,才知道,原来还可以这样做......
看来,我还是水平太低了啊 :)
2006/4/3 22:09 | camelwoo

# 控制发散思维-祝chen君工作进步

我是做医学研究中,无意中发现chen君在学术思维上有这么一段精彩的描述,相当赞同。尽管术业有专攻,我还是觉得基本的思维模式还是相通的。发散与收敛的结合,向来便是仁者见仁,智者见智的事情,而采取chen君的策略,无疑对工作是一个有益的指导。祝chen君工作进步。
2006/4/12 18:41 | medlin

# coach outlet online

The most incredible knack about the coach bag of coach outlet online is that it would excellently please your minds beyond your mind's eye. For example, if you want to become the Angelina Julie, you will immediately need to wear the coach handbag around your shoulder.On establishing contact with a coach outlet hire agency, a few clarifications would need to be put to rest prior to working out a deal.
2012/1/6 11:56 | coach outlet online

# louis vuitton uk

As we know,
louis vuitton uk

as we can imagine are a little expensive but are of good quality like the brand Coach. It's really a good choice to shopping in Louis Vuitton outlet.
louis vuitton

Outlets offer famous classic brand for LV,Channel, with perfect service.So become to the VIP soon.They offer more new styles,like LV purses,LV wallets etc. And are tested by product quality monitoring center .
http://www.louisvuitton-ukoutlet.org.uk
2012/1/6 13:53 | louis vuitton uk

# louis vuitton sale

There must be one louis vuitton vernis that is sure to fit your style. louis vuitton sale provide Louis Vuitton belt for men has royal purple lining, which could burnish whatever clothes.As we show below, louis vuitton outlet have a number of Louis Vuitton Earrings, louis vuitton replica handbags, in different styles for your selection.
http://www.louisvuittonoutletsaletime.com
2012/1/6 13:57 | louis vuitton sale

# coach factory outlet

Welcome to the coach factory outlet store and Enjoy Shopping Here! We promise all the customers to have the superior qualities and low prices.Many people like to go to coach factory online, Some people like to designers and shiny metal or leather coach shoulder bags. However, the majority of women choose to safe the neuter color coach shoulder bags. http://www.coachfactoryoutletlove.com
2012/1/6 13:57 | coach factory outlet

# coach outlet online

At the
coach outlet online

you have the largest selection of the day. If you touch the item and like it, keep it in your possession until you make your final decision.In particular, products from
coach factory outlet

with leather design are fashionable, handmade,leading the wave of American pop.It with simple,durable and unique style to win consumers.
http://www.coachoutletonlineusacoach.com
2012/1/6 14:52 | coach outlet online

# louis vuitton outlet

In the web times, even if you are a noble person on
louis vuitton outlet

, or to real action to prove himself, has been integrated into a new era.If in a foreign country to join the twitter, it is best to join army of micro-Bo;They're not chosen, so one of these ideal for you.For more flexibleness a lot more like these, there are lots of discount 'shoulder' variations outlet
louis vuitton bags

.
http://www.louisvuittonoutletbagsu.com
2012/1/6 14:53 | louis vuitton outlet

# coach outlet store

Coach Outlet Store vision system is a visual enjoy, is a visual art. The particular design has been integrated function and the element of elegancy, then show you an exquisite and excellent product. You need not worry about the quality of the coach outlet store online for sale now. The Coach brand is famous for the perfect products.

2012/1/6 15:16 | coach outlet store

# coach outlet

if your dream is to look like a million bucks for a mere several dollars, then our coach outlet store is the Jiminy Cricket of your existence. to obtain coach outlet online in Hainan is amongst the brand new darling from residential holiday makers.


2012/1/6 15:17 | coach outlet

Post Comment

主题  
姓名  
主页
校验码  
内容   
京ICP备 05050892号