Archive for July 2007

明報的水準真是不太行

2007-07-31

明報的記者原來連甚麼是 chess,甚麼是 checker 也不知道。初時看一看這篇明報的報導

加拿大科學家用了18年時間,發展出一套完美西洋棋的電腦程式,……

這時已有點驚奇,因為在現代來說應該還是不可能的,但它還拿深藍來比較啊。再去 Slashdot 看一看

My story on the Nature site announced that a team of computer scientists at the University of Alberta has solved checkers.

兩者必有一者錯了。就算 Slashdot 的品質如何差,鬼佬也不至於會將 chess 和 checker 搞錯吧。於是上 Chinook 的 site 看一看,果然是 checker。

Recommended site for WordPress security

2007-07-19

Lately this site, blogsecurity.net, caught my attention. Although a new site, it has already done a really good job disclosing and discussing new vulnerabilites in WordPress, be it serious or not.

One of the most important stuff is its WordPress Scanner, which used to be a downloadable script, but now this thing is available on web only. It tries to scan your WordPress blog, and discover its version, plugins used, and whether it is vulnerable to XSS attack. (Thanks to this scanner, I have fixed some of the problems in my own blog.)

And it is not holding back new WordPress holes from disclosure — for example, a new article yesterday showed how to perform enumeration on WordPress installation by brute force, so that valid usernames can be found, as a stepping stone on obtaining username / password. And everybody is using the default ‘admin’ username, right?

The share of XSS vulnerabilities would not be omitted. Just counting post-2.2.1 ones, there are at least 2:

Here is a good quote from one of them:

WordPress have apparently said they will resolve this vulnerability in v2.2.2.

And indeed, none of which is fixed in WordPress source code repository at all as of now. (2 weeks after the latter vulnerability is disclosed, that is) And there is no apparent schedule for 2.2.2.

Overall, this site provides a good reading for those who care about their WordPress’ safety.

WP-GownFull

2007-07-17

上個月 Ben Lau 向我提及功夫輸入法這個 project;其中一個有趣的地方是,這個 project 是由兩個香港人負責的。撇開負責的人不說,單說 project 本身,是一個在 web 介面使用的中文(也可以是別的語言)輸入法,系統本身不需要安裝任何輸入法,只要有個瀏覽器就可以用了。即是說用英文 Windows 也可以在瀏覽器中入中文字。當我看過 demo 不久,就在想有沒有可能在 WordPress 裏面用 —— 於是寫了點東西出來。

WordPress 的留言欄位中使用 GownFull

花的時間不多,主要都是用在解讀 GownFull 輸入法如何讀取設定,和考慮如何將設定簡化,並透過 WordPress 的資料庫儲存設定。本來 GownFull 的設定方法頗為原始,要人手修改 config.php,現在不用了,而且可以在 WordPress 的管理介面選擇啟用哪幾種輸入法。暫時只在 blog 留言的位置啟動輸入法,遲些考慮會不會在 post 文章的介面也啟動吧。

其實已經想不到有甚麼功能要加了,日後最麻煩的,恐怕就是要從 GownFull 的 source code 定期更新;只是一個月,就多了 mimeTeX 的輸入法了,看來他們開發的速度不算慢。還有就是想更新一下它的倉頡和速成碼表:好像很多字都 map 到 PUA(即造字區)去,這樣對於 Unicode adoption 很不利。

有興趣想試的話可以在這裏留言,或者私下問我,因為我還未想 Google 找得到自己的 subversion repository。另一方面也在自己的站安裝了(在留言時留意一下左上角)。本應到 WordPress 登記開一個 subversion 戶口的,但 WordPress 已漸漸顯露出商品化的徵兆,不能賺錢的事務已經開始拖得就拖,有些人一個月也沒有回覆。或者我在 Google Code 開個 project 算了。

我不再忍了

2007-07-11

上星期五過得很不愉快,因為這麼多年以來,從來沒有人能夠令我憤怒得準備動手的。星期五晚準備教書之前,在房外聽到一連串大聲叫囂漫罵,多年來除了陳曉陽 (voidoo) 之外,沒人會這樣做。一聽那種聲音,就知道是他了。他在罵甚麼人我就不清楚了,在房內聲音變得模糊,可是我正準備開始上課,學生已到了大半,選擇在這種時候叫罵不是趕客走是甚麼?我立即出去企圖喝止他繼續胡鬧,但得到的回應是甚麼?

我係唔停呀,吹咩?

等於:「我偏不停口,你能拿我怎麼樣?」說話能夠寫得出,但說話時那種驕縱任性、不可一世的口氣和面孔,我可寫不出。我即場氣得準備將他扯出教書場地之外,但是被同場的人阻止了。

本來以為是自己一時衝動,但過了這麼多天,衝動的都衝動完了,但這種氣結還是積在自己心內久久不散,無法不下筆。可能是因為已經日積月累太久,而不是一時的氣憤難平。數年前他已經是用這種卑劣態度對待人,認識的人儘量問問 YP, Kevin Chow, Sammy, Zunix 等等,他們應該都領教過。我也不止這一次,對上一次還在學生面前當眾侮辱我,侮辱夠了就滿足地離開。只是因為學生已經一排排坐在我面前才不敢發作。比起來,單純地不尊重人已經屬於低層次了。

別人可能還會投鼠忌器,但我現在已經不用再擔心了,也許正是因為眾人都容忍,才助長了那種人的氣焰無限擴張。

應否封殺做問卷調查的人?

2007-07-04

平常我對待做問卷調查的人還算客氣,別人一聽到是問卷調查,立即就會 cut 線,至少我還會禮貌地說一句:對不起,我不打算接受問卷調查。一般上對方也會說句對不起,然後收線的。

但昨天我遇到個很沒禮貌的……小姐(差點想說「八婆」了),說是中文大學甚麼地方打來,做強積金的問卷調查,一如以往我禮貌地回絕,但竟是輪到對方立即 cut 我線。真是很沒品。連推銷員,即使是怎樣 hard sell,最後起碼也有句對不起,這麼沒家教的恐怕是學生吧。

日後我應不應該 cut 線就算?真是要好好考慮一下。

How to test gettext translation

2007-07-03

In general, translating software is most likely followed by testing the translation, unless for those who don’t care about the quality. Doing this needs a dirty procedure, however.

All I knew in the old days is to overwrite translation files (.mo files) with my own. Usually default location for those translation files is /usr/share/locale (or /usr/share/locale-langpack for Ubuntu). But after each time system update is done so that software is updated, I have to overwrite the translation file again and again, fighting with system update. Tedious.

Recently I’ve learnt a new brilliant/ugly trick (depends on point of view), which works for most software: setting the $LANGUAGE environment variable. It looks like:

Read the rest of content »