Archive for February, 2004

今天

Saturday, February 21st, 2004

現在是快一刻到下午一點,今天過了三個半小時。還是沒了解為甚麼某些 DNA 序列有奇怪的關聯函數。去中國城的亞洲圖書館還書,又借了本魯迅的書和其他的雜書。吃了點還不錯的上海小籠包。現在在某家 Wifi Cafe 內,喝 expresso,寫著流水帳式的 Blog。

在想,到今天結束睡覺的時候,會不會搞清楚那奇怪的關聯函數為何如此?會不會知道為甚麼百年前出了魯迅,雖說有所點進步,老掉牙的問題仍像惡夢般揮之不去?是不是『大約國民如此,是絕對不會有好政府的:好的政府,或者反而容易倒。』,還是『大約國民如此,也不會有好議員的』、『這類的議員,其實的確是國民的代表』?

第一個問題好搞,弄出正確答案不過是短時間內的問題。第二個問題,難!

今日一卦

Wednesday, February 18th, 2004

There once was a master programmer who wrote unstructured programs. A novice programmer, seeking to imitate him, also began to write unstructured programs. When the novice asked the master to evaluate his progress, the master criticized him for writing unstructured programs, saying: “What is appropriate for the master is not appropriate for the novice. You must understand the Tao before transcending structure.”

– Geoffrey James, “The Tao of Programming”

警察來募捐

Monday, February 16th, 2004

最近又接到好幾次某某關於警察的組織打電話來要我捐錢。一開始就問你覺得警察保護你是不是很重要,然後告訴你如果你捐錢的話,他們會寄一張貼紙過來你可以貼在車後說明你支持警察。說實在每次收到這些要你拿錢出來支持這些 『公家機關』,就覺得很不舒服。由其是警察,總讓我覺得如果我不拿錢出來,我就不被保護,還不知道會不會被找麻煩。乖乖的納稅,不就是支持警察。如果警察資源不夠,那就讓大家知道,編預算改善。拿警察的名義募捐,實在是有點問題的。並不是沒錢捐,而是那種態度讓人捐不捐都不爽。

我向問打電話來的人說我要知道他們在做甚麼才能決定,他說要寄資訊來要郵資,要我答應至少捐一定數目,我就問那你們有沒有網頁,他就把我轉到另外一條線,確認我的地址(很可怕,我搬家不到三個月,他們就有我家的電話和地址。除了在 911 後外國人要報告地址到某機構,在美國是不用報戶口的,所以不知道是那家公司把我們的資料給賣了。),要寄資料過來。根據以前的經驗,如果到時決定不捐,他們還會寄信或是打電話來說『你不是說要支持警察,為甚麼沒有捐錢?』

我覺得這種以警察,消防隊或是其他公家機關為名義的募款是很有問題的,應該要立特別的法律來規範。更何況的確有拿他們名義來斂財的(參考1/參考2)。

硬碟遺照 / Last Portraits of an Old Hard Drive

Tuesday, February 10th, 2004

上次搬家的時候,找到了來美國後用的第一台硬碟,只有 1.6 G,拿來放半片 DVD 都不夠,我也早忘了裡面有甚麼資料。當時在想要怎麼處理妥當,想來想去覺得把那硬碟給拆了好了,還可以玩裡面的磁鐵。不過因為這顆硬碟用的是 Torx screw,手頭上沒工具,就一直擱在那裡。今天突然發現我的 Leatherman 小刀上的起子居然可以用來轉這硬碟上的 Torx screws,就一口氣把它給拆了! 下面就是這顆硬碟的遺照。可惜的是主馬達的螺絲大小不對,拆不下來,不然那馬達雖然以今日的標準不夠快,但還滿好看的,說不一定上 eBay 賣還會有人要。

I found an old hard drive last time I moved. It was the first hard drive that I used since I came to U.S. The capacity of the hard drive was only 1.6 G which is less than half of a DVD. I also forgot what I had in the hard drive. I was thinking how to deal with this hard drive and I finally decided to disassemble it such that I could destroy my data on it and I would also get some nice magnets to play with. The above were the last portraits of my hard drive. The hard drive uses Torx screw, which I don’t have a proper tool to unscrew. I can only disassemble it after I realize that my Leatherman can unscrew most of the screws on the hard drive. Unfortunately, I still can not remove the main motor from its base. It is a nice looking motor. Although it is probably slow by today’s standard, if I can remove it from the base, maybe I can still sell it on eBay.

Xcode, Applescript and Shell script

Saturday, February 7th, 2004

I recently tried to use ssh tunneling to mount a remote samba filesystem. I wrote a one line shell script to execute ssh tunneling and then I used finder to mount the remote samba server. Although I like CLI most of time, I do like to find a different way to do the same thing. I read this document about using applescript to run shell scripts. I also found that it seemed easy to build a GUI program with Xcode/Applescript (ref). I decided to give it a try to wrap my simple shell scripts with a GUI. Now, with few clicks, I can automatic mount my remote samba server and edit and process remote file with OS X applications. It is very convenient for telecommuting. The development environment for OS X is indeed cool!

STC.jpg

If you like to try the very simple application, you can download
the source code, SambaTunneling.zip, and modify the code to suit your need. Unfortunately, you do need to have some simple knowledge about applescript and shell script to read and modified the code. However, if you know some simple programming, it would be easy to add any function you like

讀雜書

Sunday, February 1st, 2004

來美念研究所後,雜書越讀越少。

小的時候,一大嗜好就是看雜書。這裡所謂的雜書,主要的是指不為了任何先決目的而看的書,並不一定是亂七八糟的書,雖然雜書通常也包括了不少亂七八糟的書。念研究所後,多只看兩種書,一是和研究相關的書,二是科普方面的書,算起來是一種嗜好,但也不能說和研究沒有關係。

Read the rest of this entry »