Some ways to add versioning to pickled objects

To follow on from yesterday's entry , suppose thatone is using (c)Pickle to save data in your Python program, and you wantto version your data somehow. I can think of a number of approaches:

  • take the 'pickle as stored JSON' approach; serialize your complexobjects to simple objects (dictionaries, lists, etc), add versionnumbers, and only pickle the simple objects. Then you can do all ofthe usual version mismatch fixups when you de-serialize the reloadedsimple objects

入Steve Jobs個腦睇睇

我等了很久,才終於見到 Inside Steve’s Brain 此書的Paperback 現身,當然即買,一看又停不了手。

本書作者Leander Kahney,曾經是美國雜誌老編及記者,又是著名Blogger,Wired Magazine網上版內的Cult of Mac Blog,就係佢老哥搞出來,是不少Mac友愛追的Blog,佢寫過幾本和Apple


晨早星巴你(四)—其貌不揚吉士包Ugly Coffee Dome

試吃過的多款Starbucks早餐中,這款肯定不是我的最愛,但我的口味並不代表大家的口味,與我同行的幾位女士們,就吃得大叫Yummy Yummy My God Auntie。

但我見這款包肯直認我很醜但我很溫柔,卻又令我產生了憐憫之心,明明不喜歡吃甜包的我,


何必為未發生的那個未來,放棄已擁有的這個現在。

時間像一陣風,剛剛才來,未及時看清楚,卻已經走了。

今年復活節,已是領養了Sophie的第四個Good Friday,事有湊巧,剛過去的週末,在家的附近,我們遇上了Sophie從前的女主人。

還記得三年前,她告訴我們正打算要和丈夫生小孩,家中


自在住



終於買下一本值得讓我掏腰包的書.

方盈是誰, 恐怕沒有多少人知道. 即使是影迷, 也未必知道她曾在60年代於邵氏當演員. 更加不知道她息影後當上電影美術指導的事蹟 ( 枉論知道她曾經在佳視演過與電視台共存亡的《名流

Sometimes you don't want behavior with your data

I have heard it said that objects are data combined with behavior, whichas a snappy summary strikes me as pretty useful; something like ithas certainly guided me in structuring my programs. (Although I amnowhere nearly as strongly object-oriented as is popular these days; Istill have at least a foot in the procedural programming camp.)

It is also a sensible notion, in the abstract; since data by itself isuseless, so you might as well bundle it together with the code thatunderstands it and


Lady First 專欄 (42)

《你連20元都不值



我有一位朋友, 空姐啦當然,還是貌美那種。


最近,她跟一位機師 date 緊,即處於約會階段,進展不俗。


不過,她有少少疑惑,就是跟機師外出的時候,一切使費都是 AA 制的,連一個二十五元的茶餐也不例外


同樣是金牌歌手,我的好友唐素琪。


無意見。


大快人心

若你跟猶大人討論是納粹屠猶抑或滅猶較貼切,你覺得他有何反應?

若有人質疑南京大屠殺是否所有人死在南京城內,抑或有人死在城外,你又有何反應?

「六四」二十週年前夕,不斷有人提出無關宏旨卻模糊焦點的疑問,是鎮