恭賀新禧

寂然世界在大年初一以最亢奮的心情向大家拜年,祝各位:
好運連年
萬象更新
大吉大利
金玉滿堂
吉祥如意
鴻運當頭
時來運轉
迎春納福
富貴有餘
闔家平安


音樂鬼才將為香港迪士尼樂園創作音樂

相信和不少人一樣,先因為一套 陰間大法師(Beetle Juice) ,然後再來一套 剪刀手愛德華(Edward Scissorhands) ,我開始迷上了 添布頓(Tim Burton) 充滿黑色幽默的奇幻世界。

喜歡 添布頓(Tim Burton) 電影的話,又大概沒可能不知道配樂大師 丹尼艾夫曼(Danny

Continue reading...

網上真我

雖然網絡世界裏的不少人和事都如幻似真,不可輕信,但寫網誌的人如果是持久地寫,遲早會流露真我,讀其文,亦可知其人之一二矣。我這裏所謂的「真我」,並不是甚麼高深的哲學或心理學概念,而是指一個人的真實性格和

兔年快樂

祝大家兔年快樂!

My issues with primary keys are not Django specific

A commentator on my recent entry about learning from my Djangoschema design experience wrote,about me abandoning explicit primary keys:

I'm not sure your data will be best served by giving up the databaseschema you want in deference to the conventions and limitations of the(Django ORM) framework.

I want to clarify something: the issues in my schema that are drivingme away from using explicit primary keys and to surrogate keys are not Django specific.

I've now designed two database schemas, one purely in SQL


Django and primary keys versus surrogate keys

What Django does to my primary key problem is magnify the effects ofchanges and errors in two ways. First, the admin interface allowsconvenient direct insertion of data into the database, includingimmediately creating foreign key dependencies. People sometimes makemistakes when typing things in; the fewer steps between typing insomething and having it wind up in the database, the fewer chancesyou have of catching your error. In a slower environment I might havenoticed some of my typos after I had written the file of loader commandsor SQL


買新年

農曆新年了。因為香港沒有過年氣氛,所以有些人過去澳門。沒有辦法,因為放爆竹是犯法的,沒有聲音上的氣氛;而且家家戶戶都閉上門,揮春都貼在內室,也沒有了視覺上的氣氛。像澳門如此擠逼狹窄的舊,又不限制爆竹,

歲末

年廿八要打掃家居,大除夕要闔家歡聚,過新年要穿新衣服,向長輩拜年要講吉利的說話 …… 年復一年的習俗,過得多了也許會令人麻木,為新年而設的消費活動,響應得多了也禁不住會質疑。我們生命中有哪一天不是獨一無二

世界末日

相 2012 年末日預言之後,網上又流傳今年 5 月 21 日是世界末日,並附有一些摘自 《聖經》的片言隻字來支持其論點,加上最近自然災害多,海嘯地震水災雀鳥神秘死亡應有盡有,很多人見到災難情景時,都不自覺地聯想到

黑暗的根源

上周 youtube 流傳一段名為 「高士德早上8時離哂譜事件」的短片,拍攝地點是培正中學門口的天橋底,事件主角是一名家長,此君愛護子女無微不至,似乎也有點反智,為了處理孩子的便急問題,他把私家車停在路中心,並抱起其尊