Why templating systems are the wrong answer for simple HTML generation

One common proposed solution to the problem of simple HTML generation is a templating system. Apart from anypractical issues (all of which can be worked around), I've come torealize that I believe that they're the wrong answer in general, becausetemplating systems are solving a different problem.

At least for me, the problem simple HTML generation solves is thatHTML is annoyingly verbose and picky to write directly by hand (andpartly as a result is difficult to cleanly embed into Python code).This


jQuery 1.3 and JS Bin

剛剛出籠,重點是新的 selector engine 。效能提昇之餘,更可因此而引進新功能,如 ,據說普通的 event delegation 也會更快 (也是因為 selector 快了吧)。而 Sizzle 本身已成為一個獨立專案,讓其他 library 也可以用。

jQuery 的 也更新了,在試用之時發覺每一個 code example 都伴隨


我記得

LULU:你記唔記得我個電話號碼?

旭仔:寫咗喺張紙上面啦!

LULU:如果你唔見咗張紙咁點算呀?

旭仔:張紙唔見得咁即係個人都可以唔記得啦!


(《阿飛正傳》的一段對白,印證了我們對八十年代念念不忘的情意結,但這部電影的

慾孽姊妹花

如果問我最沒有膽量看哪套電影, 必然是以Papin姊妹為題材的電影. 就算找到有關Papin姐妹介紹的網站, 網站主人也列出內容不安的聲明, 也不敢細看.

Papin 姊妹在上世紀法國三十年代聲名大噪, 比同期的阿部定有過之而無不及, 皆因

藍藍的天,涼涼的風。


藍藍的天,坐在白茫茫的沙灘中。

Continue reading...

20090113金句

時 —— 2009年1月13日晚上8時20分

地 —— Times Square I.T

人 —— 蘇眉與我

我:「真係一d買冬天衫o既意欲都冇。」

K:「點解呀?」

我:「我根本唔鍾意著衫。」

K:「... ... 」

low tech

我想有很多人都會將此 blog 歸類為 tech blog,但不得不承認的是,在下是相對 low tech。

家裏有的是普通 PC、NAS、Router、迷你 HiFi、大牛龜電視,沒有高清、沒有X世代遊戲機。我有的最新科技產品是肥仔 iPod Nano,電話是老舊 SE J230i,沒有


Documenting the kernel.sem sysctl

Programs on our web server machine recently started complaining aboutbeing unable to set up semaphores (well, once we figured out what theerror message meant). This rapidly sent us on an expedition into theunderdocumented mists of the kernel.sem sysctl, and so I'll writedown what I've learned about what I think is going on.

In the grand style of System V IPC in general, what programs allocateis not semaphores, but semaphore arrays (officially called 'semaphoresets'). A semaphore


有故事的人

大部分人都會同意:澳門人多數都很念舊。念舊,體現於我們重視人際關係,我們還很熱愛傳統,積極擁抱一套昔日的價值觀。然而,念舊的另一面,其實也包含了意想不到的健忘,這裏的人也善於選擇有利自己的東西去念舊,

Counts

I would be lying if I told you that I never pay attention to the whims and words of others. It is not that the external opinion is the gold standard of judging ourselves. We are simply human beings who tend to fall prey to the others' view. When the story of our hospital or unit appears in the press, I simply can't ignore it and then answer like Socrates who was once asked if he would worry about being called names, "Why? Do you think I should resent it