透明思考


Transparent Thoughts


  1. 关于编程的阅读推荐

    首先假设你认为自己写出的程序不够好并且你想要把程序写好。不符合这一假设者不必继续看下去。

    我推荐Code CompleteSICP

    如果你没时间,至少要读Implementation Patterns

    如果你还没时间,至少要读它的第六章。

    如果连这都还没时间,我就没辙了。


  2. How To Run A Refactoring Project

    (From my chat history with Michael Robinson.)

    (11:16:46 PM) xcqmichael: In your situation, it’s important to understand that there are two ways oflooking at software, the coder way and the business way.
    (11:17:22 PM) xcqmichael: The codersayssoftware is successful if all the tests pass, the code is well structured, and easy to understandandmaintain.
    (11:18:01 PM) xcqmichael: The businessman says software is successful if it deliversmorevalue to the business than the business spent to create it.

    (11:19:22 PM) xcqmichael: You separate them in terms of pain points.

    (11:25:00 PM) xcqmichael: point 1:
    (11:25:53 PM) xcqmichael: Refactoring stories (or othertechnicaldebt stories) are like any other kind of story; they should follow INVEST criteria, they should haveanestimated effort, and they should have a prioritized business value.
    (11:26:18 PM) xcqmichael:Because, in the end, it all comes down to cost to code vs. value to business.
    (11:26:28 PM)xcqmichael: point 2:
    (11:27:12 PM) xcqmichael: Refactoring, by definition, means making changestothe structure or organization of a code base without changing its functional behavior.
    (11:28:06PM)xcqmichael: When you have a code base that is fragile and has no test coverage, it is very costly torefactor because it is very costly to confirm you have not changed functional behavior.
    (11:28:12PM) xcqmichael: point 3:
    (11:28:51 PM) xcqmichael: When the cost of a technical debt story isveryhigh, then the business value must be even higher.
    (11:29:44 PM) xcqmichael: Consequently, theworsethe code looks to you from a coder point of view, the more you should leave it alone from a businesspoint of view.
    (11:29:51 PM) xcqmichael: point 4:
    (11:30:27 PM) xcqmichael: Therefore, whensomeone says, “there’s whole bunch of code needs to be refactored”, probably, none of it should be.

    (11:31:49 PM) xcqmichael: Well, it all comes down to prioritization.
    (11:32:00 PM) xcqmichael:And aclear sense of the cost/value tradeoffs.


  3. AMM不是什么

    以前我不认为一个被称为“敏捷成熟度模型”(Agile MaturityModel,AMM)有可能是什么好东西。原因是显而易见的:第一,我担心它把一组实践奉为圭臬,而敏捷的核心正是在于根据团队和项目的实际情况构造自己的方法;第二,我担心它成为一种认证,从而像它的前辈一样被骗子利用。

    直到我给客户做了一次AMM评估。

    第一,AMM不是认证,它是帮助我们集中注意力、了解真实情况的工具。
    第二,AMM不是考试,分数是指示性的而不是决定性的,它的价值是指出改进的方向和切实的目标。
    第三,进行AMM评估的目标是帮助团队更加高效地开发更高质量的软件,而不是拿到高分。

    不遵循这三点原则的AMM评估,就可能滑入骗子横行的境地。敏捷的本质决定了AMM评估只能并且只应该被用于三个目的:(1)了解“我们在哪儿”;(2)计划“我们要去哪儿”;(3)讨论“如何去”。因此,任何与真实情况不符的、夸大的、粉饰太平的评估,都是毫无价值的自欺欺人。

    参见另一个ThoughtWorker,Ross Pettit的文章,An “Agile Maturity Model?”


  4. 致那个人

    http://sports.sina.com.cn/nba/topic7.shtml

    没有任何话可说,尽管有那么多话想说。心里翻起的太多太多。最终清晰的,还是十一年前那个人。原来,已经十一年过去了。


  5. 发明敏捷工具

    • 问题是什么?
    • 头脑风暴:可能的候选方案有哪些?
    • 这些候选方案之间的差异是什么?(分出至少三个维度)
    • 选择其中最重要的两个维度,划出四个象限。
      • 标注:每个象限里的候选方案适合哪种场景?
    • 我们的问题在哪个象限?(选择推荐方案)
    • 从三个角度细化推荐方案
      • 要达到什么目标
      • 采用什么手段来达到目标
      • 如何验证目标是否达到
    • 用适当的格式把细化的推荐方案记录下来


  6. 大师级著作

    本书的审阅者们给我的手稿提供了清晰而又及时的反馈,为此我要感谢Erich Gamma、Steve Metsker、Diomidis Spinellis、TomdeMarco、MichaelFeathers、Doug Lea、Brad Abrams、Cliff Click、Pekka Abrahamson、Gregor Hohpe和Michele Marchesi。

    什么样的作者能请得动这样一批审阅者?什么样的书当得起这些人来审阅?

    InfoQ的书评

    KentBeck的新书《实现模式》是一本关于如何撰写Java代码的书。本书中的模式,是基于Kent对现存代码的阅读以及他自己的编程习惯而形成的。这些模式来自他早年使用Smalltalk模式通过代码与其他开发人员进行沟通的过程。它们的级别相对设计模式较低,与Larman提出的GRASP模式处于同一粒度。本书中的模式试图为如何撰写大家都能看得懂的代码提供一个清晰明确的视角,并告诉你这些代码如何为人的需要和降低成本的需求提供保障。


  7. Announce Stomperl 0.0.2- Message Queuing And Transaction

    Dear all,

    I’m glad to announce that Stomperl 0.0.2 is out. You can now check it out athttp://stomperl.googlecode.com/svn/tags/0.0.2/.

    Since the first preview version [http://gigix.thoughtworkers.org/2007/12/12/announcement-stomperl-0-0-1], we’ve made somementionable progress. The most significant one is the support to message queuing. Messagedestinations in Stomperl version 0.0.1 were only allowed to be topics. Now they are allowed to bequeues as well: destination with its name starting with “queue^” would behave as a queue. (Check outthe difference between a topic and a queue from “Enterprise Integration Patterns” [http://www.enterpriseintegrationpatterns.com/].)

    Furthermore, Stomperl 0.0.2 supports transaction: messages in a transaction would be send all-or-not.It also supports ACK and ERROR frames. Actually it supports all commands listed in the protocol sofar. Although we haven’t got any official compatibility test suite yet, I feel it’s fairly safe tosay that Stomperl is a 100% Stomp compatible broker.

    What’s next then? I’d like to do some investigation to other Stomp brokers (as well as clients) anddo some performance benchmarks. Besides that, I suppose there would be some defects andhousecleaning need to be done. Still,any suggestion and feedback would be highly appreciated.


  8. 讲述iTechTag网站的故事

    InfoQ之后,《程序员》杂志又发表了iTechTag网站的故事

    时至今日,iTechTag仍然只是一个小网站,我们有的也只是一些小故事,我们的思考大多没有得到实践的检验。不过好现象仍然很多:我们起初的设想到现在大致不差,网站也一直在稳步发展。最重要的是,不管iTechTag是否真能像我们希望的那样帮助整个技术社区重建他们的声望,至少我每天看着自己blog上挂着的技能云暗爽,而且还知道有那么一群用户也跟我一样暗爽,这就足以抵偿我们付出的那些努力了。

    IceskYsl在这个周末又做了重大的升级,加上之前发布的新特性(例如挂在我Blog右边的技能饼图),现在的iTechTag逐渐变得越来越丰富多彩了。注册用户也超过300了。


  9. Announcement- Stomperl 0.0.1

    Dear all,

    Stomperl 0.0.1 (the first preview release) is out.

    Stomperl [http://code.google.com/p/stomperl/] is animplementation of Stomp [http://stomp.codehaus.org/] brokerwith Erlang. That means performance, scalability, reliability and elegance in concurrent programmingare our goals. And since Stomp is simple enough, it’s a good start point to learn Erlang/OTPprogramming.

    Version 0.0.1 is the first preview release. The main purpose is to gather feedbacks from thecommunity. So far it supports basic elements in Stomp protocol: CONNECT, DISCONNECT, SUBSCRIBE,UNSUBSCRIBE, SEND and RECEIPT. It passes acceptance tests built with both Java and Perl clients.That’s why I consider it as “usable” and decide to announce it.

    To give Stomperl a try (NOTE: EUnit later than 2.0 beta is required):

    1. Check it out with Subversion:svn checkout http://stomperl.googlecode.com/svn/tags/0.0.1/ stomperl-0.0.1
    2. Kick off the broker:make startup
    3. Now you can connect to the broker at port 61613. However I suggest you run the test suite first:make test

    What’s next? I suppose Stomperl will support full Stomp protocol in its 0.0.2 version, along with abetter test coverage. We will do more acceptance test, compatibility test and performance test inthe future. But first, any suggestion and feedback would be highly appreciated.


  10. 科学革命的结构

    托马斯·库恩:科学革命的结构

    科学的发展分为两个阶段:常规科学和科学革命。前者实质上是解谜的过程,而后者是设定谜题的过程。

    常规科学就是解谜:提出问题,随后用实验解答问题。

    能提出怎样的谜题,取决于当前采用的科学范式。亚里士多德的追随者无法提出关于单摆的问题。

    和证伪主义的断言不同,范式是自洽的。特例可以用补充来解释。未加转换的视角看不到异常。

    由于实用主义或者别的什么理由,当越来越多的特例需要越来越多的补充才能解释、或者根本不能解释时,危机就出现了。

    危机常常预示着范式转换。我们无法说究竟是谁在什么时候“发现”了氧气,因为我们真正关注的是范式转换。

    范式转换带来崭新的谈论问题的方式。这是世界观的变化,这是格式塔转换。所以它是科学革命,而不是渐进发展。

    科学文献习惯性地掩盖科学革命不断发生这一事实。德谟克利特意识到朴素的原子学说了吗?牛顿所说的“时间”和“空间”与爱因斯坦所说的是同一概念吗?

    科学革命的价值不在于常规科学意义上的“发现”或“发明”。科学革命让人们能够谈论在原来范式下无法谈论的问题。

    科学革命常常由进入领域不久的年轻人实现,因为他们的视角尚未被定型,他们看到异常。爱因斯坦在专利局工作。