October 2008 Archives
October 28, 2008
Parrot 0.8.0, "Pareto principle" released!
October 26, 2008
Passwords
I also didn't want to type in 200 English names (it was 50 before) and I had Excel files of their names from school.
I could have let them register themselves, but seeing they're doing it for a grade, I felt they should all be in the database from the start.
I used http://humanum.arts.cuhk.edu.hk/Lexis/Lindict, the Chinese-English dictionary I use most often, to transliterate the first character of their first names as a password, in an attempt to discourage students logging in and doing their classmates homework for them.
I didn't want to write the code that allowed them to change their passwords.
It was useful for me to learn how to read Chinese characters, too. I was confused by 旻 and 昱. And by 妤. I thought it was 好. 妤 isn't in the Lin Yutang dictionary.
The dictionary distinguishes between 露 and 濾, by writing them lu and lU. 'U' isn't a phoneme in English.
I also capitalized the first letter. But I think I need to make the password checking code case insensitive.
Because my students are still contacting me with problems logging in, 8 weeks into the semester.
October 24, 2008
Mosso CloudFiles
本文譯自 http://use.perl.org/~acme/journal/37717,原作者為 Léon Brocard
就在昨天 (譯註:2008/10/22) Rackspace 公佈了他們併購 Slicehost (最好的 VPS 主機服務商家之一)與 Jungle Disk (一個使用 Amazon S3 來儲存檔案的備份服務)的消息。但不止如此,看來他們想要進足成為雲端伺服器供應商家之一,並同時啟動了 Rackspace Cloud 的服務,其中包裝了 Cloud Files:「可擴展的動態式儲存系統,用多少付多少。」 Rackspace 以前曾經暗示過大家,其實他們已經研發在此一段時日了,詳見 How to Build a Storage System ,其中告訴我們那便是在妥善利用他們舊有的伺服器(看來 Could Files 的前身應為 Cloud FS)。
身為 Net::Amazon::S3 模組作者的我自然是樂不可支了。此刻我正在重新撰寫此模組以便能讓其更具彈性,同時也要完全利用到 S3 服務的優點。但既然是要備份到雲端,只有一片雲能夠選用的話那就太沒有道理了。因此,我買了一些巧克力跟可樂,hack 了一個小時之後,釋出了 Net::Mosso::CloudFiles 模組。
Cloud Files API 很明顯地與 S3 API 系出同源,但稍微簡化了一些:它使用純文字的回應(不是 XML),並且正確使用了 HTTP 回應的狀態代碼;相當清楚明白 REST 設計。截至目前我所發現的不同之處,也算是 Amazon S3 的一個重大特長。在列出 bucket (容器)內容時,S3 同時會傳回那些檔案的 ETag。而在 CloudFiles 中,目前必須另外送出 HEAD 要求以取得此資訊。除此之外都很好。