张恂 2005年8月
draft
最近 Artima Developer 的主编 Bill Venners 对 Erich Gamma 进行了系列采访,谈及 Gamma 对 OO 设计模式、设计原则、软件重用的理解,还透漏了 Eclipse 开发的一些内幕,果然是一组难得的采访文章,值得细细研读。一共分五篇: Part I: How to Use Design Patterns, Part II: Erich Gamma on Flexibility and Reuse, Part III. Design Principles from Design Patterns, Part IV: Patterns and Practice,Part V: Eclipse's Culture of Shipping。我将在这里记录我对这组文章的所有看法、感受以及获得的一些重要信息。
背景
Gamma 谈到 Eclipse 的起步来自多个源头,至少有 6 年以上的历史。Gamma 曾经参与了 Visual Age Micro Edition 的开发,15 年来 IDE 一直是 Gamma 拿手的领域,当然 IDE 的开发 也早就是一个相当成熟的领域。历史上 IDE 是中国程序员再熟悉不过的。
开源之要务
Since we are open source, we also learned the importance of the feedback loop with the community. It is vital to interact with the community and to be transparent so the community can participate. We have achieved a good transparency level
与其他传统 IDE 相比,这次 Eclipse 开发的特殊性在于是个开源团队。“透明水平”,一个不错的概念。
Open source in particular, though, is not just about making source available under some license; it is really about building up a community.
经典!敏捷实践
In software, having cool ideas is nice, but shipping
them is what counts.
经典!拿不出真正好用的产品,再好的想法也是白搭。
We usually try to have our milestone plan posted after one week. The last week in a cycle is the "chill down." Typically we do a candidate build on Tuesday, testing on Wednesday, fixing critical bugs on Thursday, and declaring the milestone build on Friday. We need one week to get the plans done, and we need a little more than half a week to stop.
6 周的工作是如何划分的After we ship a major release, we have around one month of decompression time . (主发布后有一个月的休整期)
The end game plan defines a rhythm of test, fix, test, fix, test, fix.
Eclipse 团队采用的敏捷实践:
refactoring, unit testing, fear-free development with
a local history and tightly integrated versioning, automated build
process support with Ant--things like that--directly in Eclipse. We
also do incremental planning with time boxing. We practice incremental
design. We i nvest in APIs up front . But we're also improving them
incrementally.
并非没有一丁点儿的 up-front design
For each build we run over 20,000 tests.(两万多项测试!这个数目不小。)
他们执行了三级测试。The next promotion level is an integration build: once a week ... we practice continuous integration with promotion.
从 Gamma 的介绍中能否还原出 Eclipse 团队的 SDLC 模型,可以试试看。经验之谈
One thing we learned was the importance of teasing out continuous deliverables . Initially we didn't have that. As a consequence we had stressful finish sprints towards the end of a release cycle. Now we have short delivery intervals. Every six weeks is a milestone. (即便世界上最优秀的团队也有一个逐步规范的过程。他们的迭代周期为什么是 1.5 个月?Gamma 作了解答)
Eclipse 团队有没有出现过差错?
For example, we find that a lower layer has added
a new mechanism that isn't leveraged yet in all the upper layers. These
kinds of ripples are difficult to plan. An upper layer might have jumped
on a new function and a lower layer thinks they are already done. (好像团队的沟通曾经出现过一点问题)
还有:
Recently
in 3.1, we added performance tests. So we not only test for correctness,
but also for performance. (这么看来,好像他们也不是一开始就做自动的性能测试)
一些题外话
Gamma is an IBM Distinguished Engineer at IBM's Object Technology International (OTI) lab in Zurich, Switzerland.
一看到“Engineer”这个词,我那敏感的神经立刻被触动了,不知道 IBM 以后会不会改为评选“Distinguished Craftsman”,也不知道 Gamma 本人会不会接受这个新头衔。