Archives for: November 2010
新车是否要拉高速
November 14th, 2010新车磨合后拉高速是误区
作者不赞成拉高速.
vim As A Personal Wiki | iface thoughts
November 11th, 2010Markdown, VST and viki etc.
November 11th, 2010为了用纯文本记录文件,在wiki的激励下,涌现了markdown, reStructedText和wiki之类的格式.
ReST for Markdown and Textile Users - why ReStructuredText is better
街区上最快乐的宝宝:The Happiest Baby on the Block
November 11th, 2010Dr 卡普出了一系列如何带刚出生的婴儿的书和影像制品。如下:
视频: 街区上最快乐的宝宝A The Happiest Baby on the Block
视频: 街区上最快乐的宝宝B The Happiest Baby on the Block
网站http://www.happiestbaby.com/

Ant, Junit and Assert
November 7th, 2010ant and junit
WWW has a lot tutors on using junit with Ant, such as Tutorial: Hello World with Ant. But if you following it, you'd find ant complains about something. Here are some points I find:
- You must install ant full if you want using embed junit. You need to run following command in the directory you just unpack ant binary
ant -f fetch.xml -Ddest=system. It'll install all the dependency java libraries for ant tasks.Please see http://ant.apache.org/manual/install.html - Ant will automatic to include junit-x.x.x.jar in classref, but you must write a target to explicitly compile test sources to test classes.
ant and assert
For enabling assert in runtime, java must be invoke with option -ea. And for ant, build.xml must add <assertions> in <java> and <junit>. For example:
<assertions>
<enable />
</assertions>
ant and proxy
For java version 1.5+, please using following command to complet ant install process:
ant -autoproxy -f fetch.xml -Ddest=system.
More info can be getten from here
EasyMock for junit\
Mock object is needed for unit test. For java, there are tons mock lib. After a rough study, I choose EasyMock due to it is similar to the mock lib I used in Ruby. There is no good official document for EasyMock, but I found a great blog which can be seen as document of EasyMock: http://jeantessier.com/SoftwareEngineering/Mocking.html