2006年11月14日

自己注册了域名和空间。此处不再更新。

http://www.vincentcao.com

2006年11月03日

以前曾经搬家一次,后来重新回到了donews。最近一来donews升了级,使我一段时间内用我以前登录的方法无法登录(现在用了新方法总算登录上来),二来未通知而强插并与blog内容不符的广告实在没法让人产生好感。
于是自己注册了域名www.vincentcao.com并选用了免费的AWARDSPACE.COM作为存放blog的地方。至于feeds,由于我的feed本来就是通过两层建立的,feedburner->feedsky->blog feeds,所以,应该不需要改动现有的。至于是否能将新老结合,就要看feedburner或feedsky是否支持合烧了。

2006年10月05日

下意识地慢慢睁开双眼,模糊的景象渐渐地清晰了起来,泛黄的土地上都是一些不规则的龟裂。环顾四周,发现一只猫,与我四目相望,它像是定住般地直视我的双眼,让我害怕得不敢正视。有些燥热,太阳已经在尽它最后的绵薄之力了,而游丝般地浮云却像是利器,直刺末日的心脏。分不清是烟还是灰,让人朦胧地感觉不到真实的存在。没有一点风声,却能够嗅到死亡的味道。


这个就是地球,也就是上辈子想入的天堂。

- If I may…?

当想插话的时候,可以这么用。

- You and your family will be on it when it [sets sail] tomorrow.

v.
张帆, 开航

- What kind of son of a bitch doesn’t have a [spare tire] in his car.

备用轮胎

- I was just [hitting the head], boss.

going to the bathroom. http://www.urbandictionary.com/define.php?term=hit+the+head

- Semper fi.

听上去像是口号。解释为,always faithful。 http://www.urbandictionary.com/define.php?term=semper+fi

 

2006年10月02日

Javascript功能不算弱,但语法不严谨,给阅读带来比较大的麻烦。一般来说,读代码通过单步调试的方法是比较理想的,起码在局部范围可以迅速理解代码段的用途和含义。不巧的是,Javascript好像还没有一个非常专业的IDE及调试器,所以,一般用的是Firefox的Javascript Debugger插件,或者是VS提供的脚本调试器。

这里再提供一个比较不错的调试方法。创建一个debug.js文件,内容如下:

function showDebug() {
window.top.debugWindow =
window.open("",
"Debug",
"left=0,top=0,width=300,height=700,scrollbars=yes,"
+
"status=yes,resizable=yes");
window.top.debugWindow.opener = self;
// open the document for writing
window.top.debugWindow.document.open();
window.top.debugWindow.document.write(
"<HTML><HEAD><TITLE>Debug Window</TITLE></HEAD><BODY><PRE>\n");
}
 
function debug(text) {
if (window.top.debugWindow && ! window.top.debugWindow.closed) {
window.top.debugWindow.document.write(text+"\n");
}
}
 
function hideDebug() {
if (window.top.debugWindow && ! window.top.debugWindow.closed) {
window.top.debugWindow.close();
window.top.debugWindow = null;
}
}

使用也很简单,在要调试的地方加上语句debug(val)就可以了,最后,在window.onload中加入showDebug(); 如果不想调试了,就把showDebug注释掉。

这个方法不是我的原创,但是用下来感觉不错,至于原文,已经找不到了,如果哪位大虾找到原文,麻烦通知下,免我落个不厚道的名声。谢谢。

2006年09月28日

以前用过UML,对Use Cases相对比较熟一点,最近在学习Agile的过程中,接触了一个新的概念,User Stories。 但是怎么就感觉说的和Use Cases是一回事,正好在《User Stories Applied: For Agile Software Development》一书的FAQ中发现了相关内容。

书中提及,“One of the most obvious differences between stories and use cases is their scope.”“ stories are kept smaller in scope because we place constraints on their size (such as no more than ten days of development work) so that they may be used in scheduling work. A use case almost always covers a much larger scope than a story.”“ Each story is not necessarily equivalent to a main success scenario”。按照这样的理解,Use Cases是针对一个比较完整的用例,包含正常情况和各种非正常的情况。相对的,User Stories更像是把User Cases break down,并排列整合起来。

Another important difference between use cases and stories is their longevity. Use cases are often permanent artifacts that continue to exist as long as the product is under active development or maintenance. Stories, on the other hand, are not intended to outlive the iteration in which they are added to the software. While it is possible to archive story cards, many teams simply rip them up.”对此,非常不理解,为何Stories就在迭代周期外不应存在呢?继续读下去。。。

Another difference is that use cases and stories are written for different purposes (Davies 2001). Use cases are written in a format acceptable to both customers and developers so that each may read and agree to them. Their purpose is to document an agreement between the customer and the development team. Stories, on the other hand, are written to facilitate release and iteration planning, and to serve as placeholders for conversations about the users’ detailed needs.”感觉这该是一个非常重要的差异,因为其他一些区别是基于这个差异的。

Finally, use cases are generally written as the result of an analysis activity, while user stories are written as notes that can be used to initiate analysis conversations.

读完了这些,基本上对作者想要阐述的区别有了一个大致的了解。由于两者存在的目的不同,Use Cases是为了让Business方和Software方能有一种双方能够理解的沟通方式并达成一致,使以后的软件开发有个依据,以遵从Business方的需求。而相对应的,User Story是为了在一个迭代周期内制定计划的。所以,他们的内容也许很相似,但是本质却很不一样。Use Case更有些为Software一方服务,可说是一个类似architecture的工具,而User Story更站在用户角度,主要为了Schedule,可以说是一个类似Project Management的工具。鉴于以上的目的不一致,表现形式的不一致也就可以理解了。所以,虽然Use Case是一个比较概括的东西,但是却必须是非常Serious的,相对而言,User Story就比较随意些。

顺便翻了下《UML Distilled: A Brief Guide to the Standard Object Modeling Language, Third Edition》,正好也简短的说到了两者的差距,觉得说得比较到位。

Features are a good way of chunking up a system for planning an iterative project, whereby each iteration delivers a number of features. Use cases provide a narrative of how the actors use the system. Hence, although both techniques describe requirements, their purposes are different.

并且,提供了一种比较好的建议,很赞同。

Although you can go directly to describing features, many people find it helpful to develop use cases first and then generate a list of features. A feature may be a whole use case, a scenario in a use case, a step in a use case, or some variant behavior, such as adding yet another depreciation method for your asset valuations, that doesn’t show up in a use case narrative. Usually, features end up being more fine grained than use cases.

2006年09月25日

- Apparently, Fibonacci’s [coming up for air] again….

coming up for air,看上去有点像闷了太久,“出来透透气”,呼吸点新鲜空气。

- ……a lot of people [are going down].

(如果这位老兄出来作证,那么,)好多人就要“落水”了。going down,玩完了。

- Are you [meeting up with] her, the doctor?

词霸解释为“偶遇”,感觉不合适,这里更有点“Date”的意思。查了相关资料,英文解释为:[verb] meet with by appointment; "She met up with her former lover"。按照这个英文解释,词霸的解释不仅是不合适的,甚至可以说是错误的。

- We’ll [drop you off] in the next town……

几个人一起坐车的时候,到了某个地点把某人放下去,就是drop sb. off

- The [dredging] of the river under Scofield’s apartment……

v.挖掘, 捞取

- Serial numbers match an order that Scofield put in with Dell a few months before he was [incarcerated].

vt.把…关进监狱, 监禁, 幽闭

- This is helping us how?

很奇怪的用法,竟然把how放在最后,是因为口语不讲究语法吗?还是这个语法我还不懂?

- I’ll [reach out] to the media.

我去联系媒体,我去通知媒体。[verb] attempt to communicate; "I try to reach out to my daughter but she doesn’t want to have anything to do with me"

- If it gets out that the guy who [masterminded] this whole thing is possibly dead, the other six cons are gonna get their guards up even more.

v.策划

- I want those guys out there getting more [complacent], not more careful.

adj.自满的, 得意的

- In national news, the eight escaped convicts from Fox River [Penitentiary] in Illinois are still [at large], and…

Time for me to learn a new word "penitentiary" other than "jail". at large, 在逃

2006年09月19日

I’d like to, mh

talk about John Wilkes Booth for a moment  if I could,

Abraham Lincoln’s killer.

12 days,

that’s how long it took to find him.

In his journal during this period, he wrote that,

the shadow was his friend,

the night his domain.

He acknowledged that whatever neuroses drove the criminal to commit the original crime is compounded,

magnified by flight, by the sounds of dogs at his heels.

Fear becomes paranoia,

paranoia ultimately psychosis.

I bring this up, because, in 140 years,

the fundamental mind of the escaped man has not changed.

The escaped man is still human.

He is still afraid, and he will stop at nothing in his attempt at flight. 

Fortunately for us,

while our quarry has shadow and night as his ally,

we have something far greater:

Television.

I would encourage everyone who is watching,

everyone in this country,

to take a good look at these faces.

These men right here are now the eight most-wanted-men in America.

2006年09月04日

今天想在自己winxp电脑上安装apche+php环境,结果就一个简单的phpinfo(),折腾了半天,记录下碰到的问题:

1 按照安装步骤,一切就绪以后,愣是无法重启apache Server。看了Apache的Test Configuration, 发现“LoadModule php5_module modules/php5apache2.dll ”有问题,load 没有成功。

解决方法:http://snaps.php.net/ 下载5.2.x dev版本的php,解压后将php5apache2_2.dll放到modules目录下面,并将config里面的php5apache2.dll改为php5apache2_2.dll。

 

2 简单的<? phpinfo() ?> 显示空白

解决方法:改为 <?php phpinfo() ?>

 

最后总算是看到了点界面。

2006年07月27日

近来有朋友向我抱怨说公司加班太多,这让我联想起最近的坐公交时碰到的问题。

公车有时候要等三分钟,有时等三十分钟;有时一辆挤得要命,有时三辆空车连在一起;路线的设置也有点问题,很多不同路线的公车在很长路段是重复的,不仅造成资源分配不合理,而且,在重复的这些站头,当高峰期间,司机竟然很难找到一个靠边停的地方。

如果参见国外的一些做法,可能会避免上述的很多问题。但是有一点是肯定的,就是简单的增加班次,增加路线,肯定不能解决人们碰到的不准时,上班迟到等问题。

软件开发也是如此,当项目进度落后的时候,为了能够按时发布或交付,最简单且容易想到的做法是增加人手,或者让现有的人延长工作时间。理论上说,这样似乎能成,但是,实际上似乎会带来更多的混乱,士气低落,产生不合格的产品,又疲于奔命般地亡羊补牢,不知何时才是尽头。

我们从小就被教育,做事要用功,但是,从来没有人说,做事要用力。学了最基本的物理知识,知道了功等于力乘以距离。接受了高级一点的物理知识以后,才知道,光增加力或距离,有时并不能增加功,还有一个角度在里面作怪。

加班或增加人手的确可能会解决问题,但是,那是初级物理。高级一点的,就要关注那个角度。想想,如果真的通过简单的加时或加人能解决问题,那还要软件工程干什么呢?还要项目管理干什么呢?

也许,调整一点小小的角度,会产生意想不到的效果,并且,不像以往那么费力。

做事要用功,而不是用力。