是夜去左 MegaBox 的喜百合食晚飯。d 野食唔錯。炸子雞,小籠包,松鼠魚等等全部都好好食。之後仲叫左幾過甜品。我自己既合桃露 ok。 反而 share 的豆沙鍋餅非常正。d 豆沙唔似出面食果 d 咁甜,個皮又脆脆地兼有咬口。
另外個拔絲係你面前「拔」俾你睇既。見佢開支忌廉汽水,倒入一碗冰到「拔」。不過…點解拔完都冇絲既?
有片為証喲:
Sunday, September 23, 2007
四部戲
係剛過去的一個禮拜,睇左四部戲。好耐都冇試過咁樣「煲碟」法。
先睇左朋友借俾我既 Life is Beautiful 。睇之前並唔知到原來係二次大戰片黎。老實講,如果淨係睇開場個十幾分鐘的話,真係會以為睇緊鬼佬版「周星星」d 戲。個故事係圍繞二次大戰時,主角點樣用樂觀的態度,令佢身邊既人,特別係佢個仔同太太,渡過難關。比起 Schindler's List,呢部戲冇咩煽情場面。同 Saving Private Ryan 比,又連一個荷里活式的大場面都冇。對猶太人所受的逼害,套戲都係用一 d 隱喻的鏡頭表達。例如集中營的人會討論老弱的人會被騙去洗澡,其實係被送入毒氣室。跟著鏡頭會見到德軍送一大班人平靜地行入「澡堂」,然後鏡頭一轉,只係見到煙囱噴出大量黑煙。所有「慘情」場面的處理都係隱隱約約的,可能是要突出主角的樂觀性格。但呢 d 都冇減少呢部戲的震撼性。總括黎講,唔錯。
跟住睇既就真係周星馳既戲 — 「功夫」。冇咩好講。純粹一部可以 shutdown 個腦睇既戲。ok 喇。想睇既原因係,早前和同事一齊食飯時,大家飲到 high high 地,係到笑某同事「可以好似肥仔聰咁係心口劃對斧頭」,於事想睇睇係咩一回事。雖然之前有人話呢部戲係想帶出什麼「本領愈大的人,責任愈大」的訊息等等。不過…算把喇,當係「周星星」既戲睇咪算囉。
再跟住睇既係 Babel 。香港上畫時譯做「巴別塔」。記得細個讀聖經故事,巴別塔的故事係講原本人類係用同一語言的。當時大家想建造一座塔直達天堂,以為自己可以同神相比。於是神決定變亂世上的語言,令大家不能溝通,最終建唔成座塔。部戲圍繞住四個家庭的事,不停 back and forth 咁跳黎跳去。大家都好似冇關係,但其實每件事最終係由另一件事帶出黎。套戲有英語,日語,西班牙語,阿拉伯語場面。真係有 d 「巴別塔」 feel。不過,唔同語言唔係最大既問題。部戲帶出的訊可能係,要真正做到「溝通」得到先係最大的問題。仲有,係好多地方上,套戲都冇正式交待到前因後果…不過都好,有 d 位俾人去諗諗。唔錯唔錯。
最後一部係 300。又係唔洗點用腦的。 CG 勁。場面血腥震撼。純觀能刺激。正正正!
先睇左朋友借俾我既 Life is Beautiful 。睇之前並唔知到原來係二次大戰片黎。老實講,如果淨係睇開場個十幾分鐘的話,真係會以為睇緊鬼佬版「周星星」d 戲。個故事係圍繞二次大戰時,主角點樣用樂觀的態度,令佢身邊既人,特別係佢個仔同太太,渡過難關。比起 Schindler's List,呢部戲冇咩煽情場面。同 Saving Private Ryan 比,又連一個荷里活式的大場面都冇。對猶太人所受的逼害,套戲都係用一 d 隱喻的鏡頭表達。例如集中營的人會討論老弱的人會被騙去洗澡,其實係被送入毒氣室。跟著鏡頭會見到德軍送一大班人平靜地行入「澡堂」,然後鏡頭一轉,只係見到煙囱噴出大量黑煙。所有「慘情」場面的處理都係隱隱約約的,可能是要突出主角的樂觀性格。但呢 d 都冇減少呢部戲的震撼性。總括黎講,唔錯。
跟住睇既就真係周星馳既戲 — 「功夫」。冇咩好講。純粹一部可以 shutdown 個腦睇既戲。ok 喇。想睇既原因係,早前和同事一齊食飯時,大家飲到 high high 地,係到笑某同事「可以好似肥仔聰咁係心口劃對斧頭」,於事想睇睇係咩一回事。雖然之前有人話呢部戲係想帶出什麼「本領愈大的人,責任愈大」的訊息等等。不過…算把喇,當係「周星星」既戲睇咪算囉。
再跟住睇既係 Babel 。香港上畫時譯做「巴別塔」。記得細個讀聖經故事,巴別塔的故事係講原本人類係用同一語言的。當時大家想建造一座塔直達天堂,以為自己可以同神相比。於是神決定變亂世上的語言,令大家不能溝通,最終建唔成座塔。部戲圍繞住四個家庭的事,不停 back and forth 咁跳黎跳去。大家都好似冇關係,但其實每件事最終係由另一件事帶出黎。套戲有英語,日語,西班牙語,阿拉伯語場面。真係有 d 「巴別塔」 feel。不過,唔同語言唔係最大既問題。部戲帶出的訊可能係,要真正做到「溝通」得到先係最大的問題。仲有,係好多地方上,套戲都冇正式交待到前因後果…不過都好,有 d 位俾人去諗諗。唔錯唔錯。
最後一部係 300。又係唔洗點用腦的。 CG 勁。場面血腥震撼。純觀能刺激。正正正!
Thursday, September 20, 2007
stupid jokes and stupid programmers
Received an e-card from a friend today. The URL for picking up the card is something like this:
http://www.whateversite.com/pickupcard?read=1&id=123456
The "read=1" part caught my attention. So instead of reading the e-card immediately, I did a little experiment first.
I went through the trouble of opening an account on that site and sent myself several e-cards with the "Send me an email when the card is being retrieved" option checked. And when opening my own e-cards, I removed the "read=1" part... and BINGO! The site won't send the notification email if the part is removed from the URL!
This proves:
http://www.whateversite.com/pickupcard?read=1&id=123456
The "read=1" part caught my attention. So instead of reading the e-card immediately, I did a little experiment first.
I went through the trouble of opening an account on that site and sent myself several e-cards with the "Send me an email when the card is being retrieved" option checked. And when opening my own e-cards, I removed the "read=1" part... and BINGO! The site won't send the notification email if the part is removed from the URL!
This proves:
- The site will update the record on the first retrieval of the card and only send out the email at that time. Because even if I added back the "read=1" part later, the site still won't send out the notification email.
- The programmers for that site made a stupid and fundamental mistake. Never ever trust any input from users, especially if it is via the Internet. As the logic is to send a notification when the card is retrieved, there is no need to use a parameter for that... at least not that obvious on the URL! Just store sender's selection in DB and check it when the card is first retrieved.
- I have too much time! Because after the experiment I decided to make a stupid joke on my friend. When I eventually read my friend's e-card, I removed the "read=1" part so that he/she won't get the notification email (that is, if he/she indeed checked that option :P)!
pyschological balance sheet
睇緊本 The Paradox of Choice,入面有好多有趣例子。好似:
就案例一而言,九成人會答買。但係案例二就只有少過五成人會用多廿元買番張入場卷。
心理學家話,其實兩個案例的 "bottom line" 都係用四十元去聽演唱會。但係結果之所以有分別,係因為我地心中有唔同「戶口」去扣數。係案例一中,入場卷果廿元係 “演唱會戶口” 扣數。而跌左果廿元呢,就係 “雜項戶口” 扣。而案例二果四十元就全部都係扣落 “演唱會戶口”,所以就多 D 人覺得唔值。
佢想帶出個訊息係:我地做決定時,其實好多時都唔係 logical 的。我地有時仲勁過 D accountant 砌 balance sheet,係自己心中砌條「靚」數俾自己睇。
不過計我話,D 人係案例二中選擇唔買其實原因好簡單:人都入左場啦,洗鬼買多張飛咩! 求其搵個「吉」位坐咪算囉!哈哈! :P
案例一:你諗住用廿元去買入場卷聽演唱會。 就係你準備買飛時,你發現自己先前係街跌左廿元。 咁問題係你仲會唔會用廿元去買演唱會入場卷?
案例二:你用左廿元去買入場卷聽演唱會。 係你入場後,你發現自己唔見左張飛, 而你又唔知自己個位係邊。 咁問題係你仲會唔會用廿元去買番張演唱會入場卷?
就案例一而言,九成人會答買。但係案例二就只有少過五成人會用多廿元買番張入場卷。
心理學家話,其實兩個案例的 "bottom line" 都係用四十元去聽演唱會。但係結果之所以有分別,係因為我地心中有唔同「戶口」去扣數。係案例一中,入場卷果廿元係 “演唱會戶口” 扣數。而跌左果廿元呢,就係 “雜項戶口” 扣。而案例二果四十元就全部都係扣落 “演唱會戶口”,所以就多 D 人覺得唔值。
佢想帶出個訊息係:我地做決定時,其實好多時都唔係 logical 的。我地有時仲勁過 D accountant 砌 balance sheet,係自己心中砌條「靚」數俾自己睇。
不過計我話,D 人係案例二中選擇唔買其實原因好簡單:人都入左場啦,洗鬼買多張飛咩! 求其搵個「吉」位坐咪算囉!哈哈! :P
Wednesday, September 19, 2007
typo bug
The blogging engine that I am using is called Typo. One of the nice features is the "live search", in which it starts to search as you are typing (yes... it is AJAX).
But there is a stupid bug that stopped it from working with non-latin characters. I spotted it about 2 years ago but yet the bug is still here... orz... so here it is again: To fix it, simply change the Javascript from
to
But there is a stupid bug that stopped it from working with non-latin characters. I spotted it about 2 years ago but yet the bug is still here... orz... so here it is again: To fix it, simply change the Javascript from
escape($F('q'))
to
encodeURIComponent($F('q'))
Tuesday, September 18, 2007
Monday, September 17, 2007
Missed Calls Reminder for Symbian S60 3rd Edition
The missed call reminder program for my N80 phone is done. There are still many things missing to make it a "real" application. But at current state, it suits my needs. So I will leave it as-is. Feel free to grab the source and improve it.
The current features / bugs are:
- By default, every 5 minutes, the program checks for missed calls and unread messages.
- If there are missed calls or unread messages, it will beep and vibrate
- The period of checking, beep tone, and vibrate duration are NOT configurable via the GUI. Modify the program if you want to :P
- When there is not enough memory, Symbian will close the background applications. Should have modified this program into a background service to avoid this
- The current method to check for unread messages is to open the inbox and loop the messages one by one. Need to find a more efficient approach / API
- When executed, the program main screen WILL NOT show. As most of the time you don't want to see the program main screen anyway (as there is NOTHING to see!). If you want to see the program main screen, you can press and hold the menu key on your phone and select the application.
- Update: The volume of the alert tone will follow the settings of the current portfolio
NOT FOR THE FAINT OF HEART. This program is for fun only. Absolutely no guarantee or whatsoever. Use at your own risk.
The source + binary + Carbide workspace are available. Feel free to modify the code (and remember send me the improved version :D). And here is the binary installable program.
Sunday, September 9, 2007
rsync bugs?
For one of the web sites that I built, it has 2 servers. The main server has 2 RAID sets to backup each other. And there is another machine with an extra RAID set for off-machine backup.
Recently, the RAID on the second machine died and need to be re-configured. When initiating rsync to copy the files from the primary machine to secondary machine, the process mysteriously failed with a timeout message after coped several hundred files.
It seems to be caused by dropped network packets. So tried to use the -bwlimit parameter on rsync to reduce the speed (the machines are connected with gigabit network). And BINGO. Although a bit slow, but at least it gets the job done.
Still have no idea whether it is caused by the rsync program or the network stack or the kernel though.
Recently, the RAID on the second machine died and need to be re-configured. When initiating rsync to copy the files from the primary machine to secondary machine, the process mysteriously failed with a timeout message after coped several hundred files.
It seems to be caused by dropped network packets. So tried to use the -bwlimit parameter on rsync to reduce the speed (the machines are connected with gigabit network). And BINGO. Although a bit slow, but at least it gets the job done.
Still have no idea whether it is caused by the rsync program or the network stack or the kernel though.
Choices
Should I kill myself, or have a cup of coffee? - Albert Camus.
Life is full of choices. I just started reading the book The Paradox of Choice: Why More Is Less. In the first few chapters, the author tries to show that nowadays we are facing more and more choices. And in some ways it is not a good thing. Some examples of choices could be Choosing How to Love, Choosing How to Pray, Choosing Who to Be etc. But one particular topic that I want to write about: Choosing How to Work. Because it is somehow related to a 是日金句 I posted a few days ago... 「一鳥在手,好過百鳥在林」
(At least) In our society we have the freedom to choose our jobs. Which led to a trend that we switch jobs quite (too) often. Most people don't work in the the same company for 10, 7 or maybe even 5 years. Is this kind of job mobility a good thing? Is working in the same company for long should be classified as 係出便撈唔掂?
When should we switch job? Where should we work? By thinking about these, are we wasting too much of our time and resources?
Life is full of choices. I just started reading the book The Paradox of Choice: Why More Is Less. In the first few chapters, the author tries to show that nowadays we are facing more and more choices. And in some ways it is not a good thing. Some examples of choices could be Choosing How to Love, Choosing How to Pray, Choosing Who to Be etc. But one particular topic that I want to write about: Choosing How to Work. Because it is somehow related to a 是日金句 I posted a few days ago... 「一鳥在手,好過百鳥在林」
(At least) In our society we have the freedom to choose our jobs. Which led to a trend that we switch jobs quite (too) often. Most people don't work in the the same company for 10, 7 or maybe even 5 years. Is this kind of job mobility a good thing? Is working in the same company for long should be classified as 係出便撈唔掂?
When should we switch job? Where should we work? By thinking about these, are we wasting too much of our time and resources?
是日金句
「唔做中,唔做保,唔做媒人三代好」
近來時常為身邊朋友的事煩惱。但其實大多數的事情都和我無什關係,我通常只是在旁乾著急。我自己不好過之外,可能不少朋友覺得我「好很煩」。所以以後都係唔好做「八公」orz。
要對俾我「煩親」的朋友說聲對不起。而想俾我煩的朋友可隨便開聲。 :D
近來時常為身邊朋友的事煩惱。但其實大多數的事情都和我無什關係,我通常只是在旁乾著急。我自己不好過之外,可能不少朋友覺得我「好很煩」。所以以後都係唔好做「八公」orz。
要對俾我「煩親」的朋友說聲對不起。而想俾我煩的朋友可隨便開聲。 :D
Friday, September 7, 2007
謊言
不要對身邊的人講大話,尤其是當這大話很快或很容易給其他人拆穿。這世上並沒有所謂「善意的謊言」。
在謊言的開始至拆穿期間,痛苦的會是說謊的一方。到拆穿時,痛苦的可會是身邊的所有人。
有時,選擇 no comment 可能會更好。
在謊言的開始至拆穿期間,痛苦的會是說謊的一方。到拆穿時,痛苦的可會是身邊的所有人。
有時,選擇 no comment 可能會更好。
Thursday, September 6, 2007
Tuesday, September 4, 2007
Adding vibration to my missed call alert program (S60)
Used Symbian's HW Resource Manager Vibra API to control the vibrator.
First, include the header and declare a member variable in the application class:
In the 2nd phase constructor, create the instance:
Start the vibrator when necessary:
And remember to destroy it in destructor:
First, include the header and declare a member variable in the application class:
#include. . . . . . CHWRMVibra* iVibra;
In the 2nd phase constructor, create the instance:
...... iVibra = CHWRMVibra::NewL(); ......
Start the vibrator when necessary:
> ...... // vibrate for 5 sec, strongest intensity iVibra->StartVibraL(5000, 100); ......
And remember to destroy it in destructor:
...... if (iVibra) { delete iVibra; iVibra = NULL; } ......
Monday, September 3, 2007
Apple special event
Apple confirms that there will be a special event on Sept 5... will it be a Mac OSX based iPod?
... or maybe even an iPod touch??
... or maybe even an iPod touch??
Sunday, September 2, 2007
mc don don
尋晚發左個怪夢:夢見自己走左入去工司附近間 mc don don。出奇地,午飯時間的中環 mc don don 竟然一個客都冇。正當我企係 counter 前諗緊食咩時(呢個動作絕對唔似我。事關我通常一早諗定食咩,一走入就會直撲 counter,以機關槍方式嗡 order 的說),突然係 counter 後面的收銀員一齊指住我,大聲叫:……
「今日唔賣 mc don don 俾你食!」
跟住就醒左喇…… orz
~~完~~
「今日唔賣 mc don don 俾你食!」
跟住就醒左喇…… orz
~~完~~
Subscribe to:
Posts (Atom)