The problem with unit testing programs

A commentator on my entry on why your main program should be import able mentioned that a third reason is to beable to unit test your program. I agree with the sentiment in general,but in specific I've never been able to get unit testing of my mainprogram code to work very well.

While I can unit test most of the low-level code involved in a program,I've found that much of the high level code, the stuff that goes in themain program, has two


有關 Chrome 的東拉西扯

對不起又要說 Chrome 了。經過接近一星期的使用,又看了很多不同的意見,也想詳細談談自己的一些看法。

Chrome 的名字

首先,有很多人都不知道為甚麼 Google 要叫這個瀏覽器做 Chrome (雖然中文版本仍然叫「Google 瀏覽器」)。有些人就從直譯意思


congrats to 毓民、長毛

精華重溫:
長毛在港台選舉論壇金句

黃毓民踢爆毛孟靜講大話

民建聯有佢講無人講 毓民拔刀相助



同場加送:

蕭若元精闢分析:點解選社民連的毓民,長毛等候選人?

安慰了我跟社民連線的經濟立場分歧的憂慮:“經濟立場的不同

try our breaast??

how is he going to "try our breasts"?

原來最後一句他是說 "Improve people's LIVERHOOD"
!!!是指我的肝藏健康嗎?


我地去打針針喇,唔使驚!!!
















Continue reading...

阿女永遠係最靚的













Continue reading...

How to get as much of your program byte-compiled as possible

The CPython interpreter doesn't run Python code directly, but first compiles it to bytecode . Because this parsingand compiling steps are somewhat time-consuming, CPython optimizesthings by saving the compiled bytecodes into .pyc files (or .pyo files if you used the -O switch to python ), and trying to usethem when possible.This speed increase doesn't necessarily matter all that much for aprogram that runs a long time, but it does matter for typical utilityprograms, which only run for a


try our breast

唔得忍唔住啦太好笑啦,一定要打幾隻字~~~

" er... ... er... ... er... ... we will try our breast... ... "

我笑到抽筋~~~


.
.
.
.
1997年香港中文大學政治與行政學系畢業
2003年香港中文大學法律

不在香港,未能投票。抱歉,各位港島區泛民候選議員。


又到“我不是股神系列”時間

1)HSI終於跌穿20,000,還未下試最低位。預料美國還有壞消息,最終令恒指 見18,000水平。

2)一到18字頭可以入大紅籌和

無言的澳門

默默吞忍四百年的苦果在十二月某天被吐出來
一種接近瘋狂的笑意令咀巴疲倦卻擠不出笑聲
無言

一道自以為吐氣揚眉的苦澀很和諧的纏繞著某些人
謊言說上一百次即為真相
(澳門 就是與別不同)
同一句說話為什麼要說上一百次