Xiao Peng

My personal blog moves to xiaopeng.me , blogs about design patterns will be synced to here.
肖鹏,ThoughtWorks资深咨询师,目前关注于架构模式、敏捷软件开发等领域,并致力于软件开发最佳实践的推广和应用。
多次为国内大型企业敏捷组织转型提供咨询和培训服务,在大型团队持续集成方面具有丰富的经验。
  博客园  :: 首页  :: 联系 :: 订阅 订阅  :: 管理

在开始动手之前别以为什么事情会很简单

Posted on 2008-05-01 22:17  勇敢的鸵鸟  阅读(204)  评论(0编辑  收藏  举报

开始翻译第18章之前,我以为这一章应该是比较简单的,因为这一章的内容我比较熟悉,大部分都是GOF那本书里面讲过的。但是开始翻译才觉得非常的困难,主要是作者的语言风格和用词特别的不舒服。不知道是自己水平不行还是作者用词太诡异。

Since the reusing existing code should ideally be a means to an end and not an end in itself, reused code should offer an interface that allows clients to use it in new contexts on their own terms.

类似的句子,作者信手拈来,我却是搜肠刮肚猜不出。你来帮我猜猜吧。这是讲Object Adaptor的。

a means to an end -- 达到目的的手段

an end in itself -- 目标本身

因为重用已有的代码是手段而非目的,所以重用的代码应该提供良好的接口,以便客户端可以按照自己的需要在新的环境下使用之。