這個老師太IT

上面條LINK希望仲得啦。鳴謝中學師妹李盈袖(呢個係假名但佢個真名都差唔多咁古色古香)。 佢唔識老師架陰功!

os.walk can be surprisingly slow

Yesterday's tracing made one particular bitof DWiki 's page rendering pop out at me; almost 40% of the time forthe page was going just to create the '(Previous | Next)' links at thebottom.

Because DWiki is entirely filesystem based, its 'metadata' is the stateof the filesystem. Thus, creating the previous and next links requireswalking WanderingThoughts ' directory hierarchy to find out the order ofthe entries. Once I saw the times, I immediately started wondering if I


早睡早起精神好

bed

相信很多人都有「睡過頭」的經驗,現代都市人往往夜睡,但又要早起床上班上學,於是就發明了鬧鐘。而因為人們對鬧鐘有不同程度的「適應」,所以又有了不同類型千奇百怪的鬧鐘:

  • 捉迷藏型 — 務求令你要起身才可以關掉:

來吧!我要更多的溫馨和感慨!

Dear Siu Wa,
Do your very best to finish the whole thing before the end of May. Give Prof. Chen JH and Prof. Kao copies in June and take the oral in late July or early August. This is all assuming that Prof. Chen and Kao will be in Hong Kong in late July or early Aug. Very few HUMA teachers will be around for the whole summer. So you have to find out Prof. Chen's and Kao's summer schedule before planning the date for oral.

偶然的旅人


“住院?”

“後天要做乳癌手術。切除右側。整個切除。不過誰也不知道,這樣癌是于是就能夠順利停止蔓延。說是切掉之後才知道。”

他一時說不出話來。手依然放在姊姊肩膀上,沒什麼用意地一一順序眺望著放在房間裡的各

20060303網摘 – 當電影節遇上博客

HK Media


Visualizing dynamic program flow

Someone I know has been talking to me recently about bravely becomingthe first outside user of DWiki . As part of this, I realized he mightlike to have practical documentation about how DWiki templates get used in practice for things like producingthis blog. Which made me realize that I'd forgotten how the templateflow goes.

I could have re-read the templates and traced the execution path, butthen I had a bright idea: why not make the program do this for me? So Iinstrument template processing


我身困於此處沒法與君一起並肩上

我亦無辭說斷腸 (click啦,咁我死得眼閉)。

心神大亂

Dear Siu Wa,
How are you doing?
As you know, time is extremely tight now. I'm afraid you have to concentrate on nothing else but your thesis now. This may require writing day and night every day in these two months. Please let me know of your progress and if I could be of any help.
LF

我如何對你講我的進度呢美麗老細………

The :; shell prompt trick

For years, I've had a somewhat unusual shell prompt. It looks likethis:

: ;

(where is the hostname of the current machine.)

Putting the hostname in your prompt is pretty ordinary, but what'sthe other stuff? These days, a more typical shell prompt is somethinglike ' cks@newman:~$ ', to quote a Debian example. (And manypeople use more elaborate prompts, such as Jamie Zawinksi's .)

The trick