Tuesday, May 22, 2007

MSN

Ok, I finally gave up my insistence on not using msn. Perhaps I've been asked just once too often about this. In case you care to know, the email is a gmail account. The rest should be pretty obvious.

Tuesday, May 15, 2007

new home

This new place appears to be better than I thought. However, as regular readers of this blog will know, I am quite negative and only look at bad things. The main problem is with the shower heater. Ok it doesn't "burn" the fuse this time (I mean, hasn't). But the product of rate of water flow and the temperature of water is a constant, which is not a problem by itself, but this constant is just too small...

Wednesday, May 09, 2007

moved

So I finished moving house, and came off the days without Internet at home a bit sooner than I thought!

Thursday, April 26, 2007

Snooker championship 2007

Time runs so quickly and it is another snooker championship already. Not unexpectedly, Marco Fu loses pretty quickly. Whenever you have any expectations on him, he will not perform. In fact, his mistakes are sometimes so embarassing to watch.

It is the second time that I watched a O'Sullivan-Ding match. This Ding Jun-hui simply doesn't look like wanting to win. Whenever a few frames behind, he will behave like this so that, like some school students, he can subconsciously give himself the excuse "it's not my standard too low, it's only I choose not to perform".

Friday, April 13, 2007

to view and be viewed

Yesterday a (continental-European?) couple viewed my flat. I don't know whether it is obviously too good or obviously too bad, but they spent less than 2 minutes here.

Today I viewed another flat, although I'm supposed to have committed to the one I mentioned last time. It is a brand new flat, the interior of which is furnished to the highest standards. What's more, the rent is exactly the same as my current one. On the down side, it is immediately next to a construction site, and the building (or group of buildings) itself is not completely finished, so you feel somewhat living in a construction site. But other people are apparently rather happy with it. This is also a bit too far from the university, which means extra travel costs. If not for this I would be very happy to take this...

Monday, April 02, 2007

Moving house?

My current tenancy contract is about to expire and I want to find some cheaper place to live. (Actually, the real problem is this. There are still some unexplained ways for them to possibly get in. And rumour is that they have the same problem two years before. Another rumour is that there was even wasps...) So I viewed a couple of flats.

The first one I viewed was a complete joke.

I was advised long ago that "the other side" of London road is not as safe. Wondering why just the other side makes a difference, I arrived and noticed that, just a few blocks off the road, it clearly is a poorer part of the city.

When I found the house, the first thing to notice is that the house next door had its windows smashed. For the flat itself, there was still someone living and was in a mess, but let's forget about it. When I walked into the bathroom the biggest surprise came: one of the walls was only halfly built. The other side of the wall opened to the next flat, which was then visible from outside the house. The landlord said this is "renovation" and "will be finished within days". Then why don't you just wait a few more days before letting people view it? It's a complete waste of my time. And the most bizarre thing is that, as mentioned above, there was still someone staying there, although he was going to leave in a few days... I just wondered, how on earth does he use the toilet these days?

The second flat I viewed is much more reasonable. Its on the busiest road, near the train station, and directly above a restaurant, and should be very noisy. Other than this, it looks a reasonable place, but certainly not as good as the one I am living. The furniture etc. are not as complete/good and I will need to spend some money. I am actually looking for something with smaller area but similar quality (comparing with my current one), but it looks like all available out there is similar area but poorer quality.

I have some psychological struggle to move to a clearly worse place. I need to keep on reminding myself, "imagine a hundred wasps all burst into your flat through the ceiling!"...

Sunday, March 25, 2007

LSD 2007

So I went to London again, this time for the LSD 2007...

(1) Obviously, you can't expect stringology people to be interested in online scheduling algorithms. Not much happened in the talk.

(2) It was announced that I made an important discovery. No, I didn't prove any important theorems. It was only about "discovering" a new toilet...

(3) We went to Chinatown again. Most stuff there are more expensive than those in here (the only problem here is that brands and choices are rather limited), but it turns out that instant noodles are cheaper.

Sunday, March 18, 2007

Matchings, algorithms and problems

Some time ago I heard a presentation of a final year project. Somehow the student believed the project involves stable matchings. It is good that they attempt these things, and at first sight it appears to make sense. But when you think about it for a bit more you will realize that it actually does not make any sense to use stable matching in that problem. I won't go into the details here, but basically, the input arrives online rather than a batch, and only perhaps one side has preferences (and even that is arguable).

But this is not the point I want to make. The student did not understand the difference between a problem and the algorithms that solve the problem. His presentation showed a stable matching algorithm, but did not say anything about stable matching itself. So I asked, "So what is stable matching?" Then he showed that slide with the algorithm and is about to explain, when I interrupted and asked the matching itself, not the algorithm. He couldn't answer, and at the end said "a matching that everyone is happy". Other students there, even though they also don't know what a stable matching is, can at least appreciate that this answer cannot be correct.

And of course, he is not the only student with similar problems. Last year I had a project student whose project involve matching papers to referees, and the problem is to find a maximum matching. He just proceeded directly to invent some algorithm to find a "large" matching. I attempted to explain but he couldn't understand that there is a "maximum" matching independent of what algorithm you might what to use.

More recently, a student is doing a project on timetabling. I have nothing to do with his project, but anyway he came to ask me how to find the "optimal solution". I asked, "So what is the optimal solution you want to find?" and he wanted me to tell him what is the optimal solution. He has no idea of different "objective functions".

And I wonder, is all these because of me teaching too badly, or are they simply impossible to be understood by some people?

Tuesday, March 06, 2007

Almost an issue 3

Within less than 6 months I lost it again! Except this time I discover it within 10 minutes, so rushing back to the supermarket to get it back...

I will now seriously consider not to use it in supermarkets, at least not in Sainsbury's.

Friday, February 23, 2007

Algorithms exam

At St. Valentine's day we had a dreadful meeting about the arbitrary manipulation of some numbers that are important to students (many of whom I don't know) in modules (many of which I don't care). I think it is now time to say something about the algorithms exam paper.

The exam paper has 6 questions and students answer 4. (I don't have any say about this.)

(1) I think I did an ok job of getting an average mark close to whatever number they want. You can easily estimate marks of students on different questions: if you want them to know how to answer, you must give them the exact same question beforehand, with only different numbers. This is the only way they know how to do something. Changing anything else would result in a very low mark.

(2) I included several straightforward (i.e. non-tricky) true/false questions, which are answered satisfactorily. (Never do tricky questions: the correct rate would be far lower than 50%).

(3) You might think that questions asking for simple counterexamples are easy, but they are not. I think this holds true for HK students as well.

(4) I believe no students can ever understand what "lower bound" means. Majority thinks "If the fastest known algorithm of a problem runs in O(n^2) time then the problem has a lower bound of Omega(n^2)" is a correct statement.

(5) There is only one dynamic programming question that you can expect people to do it correctly (and hence I put it in the exam paper) - working out longest common subsequences. They are fairly competent in filling in the tables, perhaps without knowing what they are actually doing.

(6) The divide and conquer question is a "difficult" one and as expected very few people do it. In an earlier assignment they did a question which has similar flavor - the standard maximum-sum contiguous subarray problem - and almost no one can get it correct. In fact, many do not even attempt to do it. It looks like if they decide that a question is difficult, they don't even bother to plagiarize - just leave it blank. I must say that I don't quite understand why they consider this very difficult, as I think this is a rather "natural" D&C problem - even when I first saw it in my first DAA assignment. Having said that, interestingly, a few actually accidentally discovered the linear-time algorithm.

Sunday, February 11, 2007

LAW 2007

I went to the London Algorithmic Workshop, held at King's College London a few days ago. The main purpose is to see people, and to have some feeling of being in a city. (I don't expect to understand things like counting runs in a string using automata and such; although there is a talk about my ex-boss and his student's previous work.)

For all sorts of reasons, the cost of going there had increased considerably from the original estimate.

One thing is that I ended up staying at a hotel. Finding a cheap hotel in central London is like 買大細, for you never know how bad it can be. There are always terrible comments on the web for whatever hotel you pick. At the end, I picked one which seem to have not-too-bad comments. When I arrived I was relieved - it was very small as expected, but tidy and clean. From outside, the room is like a storage room or so at a turn of the stairs, but as long as you shut yourself inside it feels alright. There is no toilet/bathroom inside - have to use the shared ones outside. Apparently, this is the default for cheap hotels.

The return trip coincided with the heaviest snow of UK in 10 years (or something like that). You look out of the train window and it is white everywhere. But while the weather was bad enough, the train was very accurately on time.

Tuesday, January 30, 2007

Gaim Internet messenger

On the school linux computer I am using Gaim as the ICQ client (I don't have much choices). Somehow it doesn't look like they can block people not in your contact list. And so every day I receive dozens of authorization requests or even direct messages from Russians... and also, HK people. And this does not happen with my Windows ICQ (which is a very, very old version). I think no one uses ICQ anymore these days and perhaps they connect through other protocols when I use gaim...

Friday, January 19, 2007

Chinese food at co-op

I don't really know when these all started but the co-op at the student union here start selling many Chinese food, including all varieties of instant noodles, vitasoy milk, and even 王老吉. I suspect this might be something one-off as I don't think the Chinese student population here is large enough to support it...

(PS. I know, I haven't blogged for some time. But I promise some interesting stuff are coming. Like a detailed analysis of the course evaluation. Only that it takes some time...)

Monday, January 08, 2007

Christmas holiday

Alright, I was back in HK once again. Somewhat too frequent is it, when there is no particular reason to go back...

At Heathrow, it is very fortunate that the plane could actually take off with all the fog. I looked out the window at the airport, saw a plane and couldn't saw the next one. Other than the fact that they had no personal TV, I was quite happy with the airline.

In HK I went to a hospital to visit someone. Also I witnessed the last day of Hardee's. I should say that I'm not a big fan of it. However apparently quite some people do, and lots of people were gathering inside or taking photos.

And about the earthquake, I didn't sense anything at all. At that time I was probably staring at a bunch of equations...

Finally. It was not 5am or so at Heathrow, but still there was absolutely no one whatsoever in the Customs, again. Next time I will bring some "white powder"...

Sunday, December 17, 2006

Some thoughts about star ferry pier incident

關於市民反應:

來來去去都得小貓三幾隻去反對,可見大多數市民都唔 care 的,傳媒也不怎麼報導。如果有幾十萬人去包圍,難道還能拆嗎?看來我不得不相信某才子的「民族 DNA」說法,中國人就是喜歡拆拆拆,是不配有古蹟的,要看去外國看好了...

關於政府反應:

本來市民唔 care,政府理應好辦事,但它大概自己心虛,於是有調虎離山、摸黑拆樓、快刀斬亂麻等行為。到星期一甚麼立法會,專家會議云云,還開個屁。這些「懶醒」戰略,使人十分反感...

關於爭論本身:

那些反對人士大概自己也不清楚想怎樣,是反對填海呢,還是反對拆碼頭呢,還是只反對拆鐘樓呢,...

至於親政府陣營,則再一次示範中國人的醜陋,以「只問動機,不問是非」的思維方式,不斷質疑別人「遲唔反對,早唔反對」,是「有陰謀」。別人有沒有陰謀,跟應不應該拆鐘樓有甚麼關係?

關於填海:

據說拆卸鐘樓是為了填海建馬路以解決交通擠塞問題云云。這等廢話早有人駁斥。填了海自然要起樓, (你不是以為真的填海來起公園吧?) 起了樓自然有更多交通流量,之後交通擠塞,然後又要填海,如此循環不息... 直至維港填平了為止。那之後怎解決交通擠塞?

其實大家只要看看地圖就可以了,會展一頭突了出來,IFC 在另一邊突了出來,中間豈有不填之理?早有預謀的了...

關於拆下鐘樓的下場:

據說拆下的鐘樓已運往堆填區。這我又不明白了,眼前不就有一個「中環三期」填海工程嗎,幹嗎不「原地拆卸,原地堆填」,方便快捷呢...

關於「三維立體」激光掃描技術:
「土木工程拓展署也已採用了先進的「三維立體」激光掃描技術,把整個碼頭的資料,以電子數碼方式詳細地保留下來。」

「發言人說,當局會研究如何把鐘樓及碼頭的特色部分融入新海濱的設計,政府早前已用「三維立體」激光掃描技術,保留碼頭資料。據悉,當局有不同構思保留鐘樓,包括在新碼頭重建、與九倉舉辦大型展覽讓市民憑弔、或把設計融入新中環填海區。」
以上文字的荒謬程度,實在很難以筆墨形容,唯有引用某討論區的說法:
市民也準備採用先進的「三維立體」激光掃描技術,把整個孫明揚的資料,以電子數碼方式詳細地保留下來。之後,孫明揚將被拆毀。有關人士稍後將會研究仿製一具孫的屍體,樹立於中環舊天星碼頭舊址供市民憑弔*。
(*: 在原文中,「弔」字被改為某粗口字)

關於新碼頭:

我只想說,那個新碼頭「很膠」...

Monday, December 04, 2006

International Conference on Junk Emails 2006

This looks like a very interesting conference. For one, it is held in Hong Kong Productivity Council, which is certainly appropriate since it relates to the productivity of everyone. Also, some talks look particularly interesting:

How AMD Opteron processor architecture well fit into Email marketing?

Poor processor designers. Do they have special instruction sets for sending spams?

Wednesday, November 29, 2006

又來奇文共賞

沒有甚麼值得怕的 ~ 梁立人

29/11/2006

近日食物安全中心接二連三公布有淡水魚含孔雀石綠,內地淡水魚商會為報復本港的行動,宣布暫時中止所有淡水魚輸港,香港人食無魚的日子即將到來。

其實豈但食無魚而已,如此下去,香港將會失去內地的食品供應,需要完全依靠其他地區進口,生活指數定會瞬時飆升,社會不穩定的情況必會加劇。

政 府呼籲內地淡水魚商會要理性行事,但雙方是否能達成諒解那是後話。其實內地食品超過安全標準並非一朝一夕的事,近幾十年來我們都在吃這些有毒食品,但為甚 麼現在才開始警醒,才開始害怕呢?再說,即使香港完全不再進口內地食品,難道每天十萬八萬的人進入內地,這些人所吃的食品就沒有問題了嗎?可以說,只要香 港和內地的關係切不斷,有害食品就無法根除,面對這種現實,我們只有兩種選擇:

一是移民到外國,遠離內地有害食品的威脅;二是習以為常,繼續若無其事的吃下去。

我會選擇後者,因為一來走到全世界都有內地供應的食物,二來使用化學藥品先進國家比內地更內行,只是毒性沒有殘存在表面而已,誰敢保證他們的食物會比較安全呢?

其實,我們吃這些有害食物已經有數十年之久,身體早就適應了,香港人的人均壽命已是世界之前一二名,我實在不明白人們還害怕甚麼。我會毫無懼色的繼續吃這些有害食物,就像我會繼續吸煙一樣,而且相信,自己會活得比那些怕得要死的人更加長久!

Saturday, November 11, 2006

消滅香港


消滅香港是香港城市規劃的唯一目標

消滅香港的歷史
消滅香港人的集體記憶
消滅香港人的社區
消滅香港人的家庭
消滅香港人的個人意識

消滅海港
消滅街道,消滅街市
消滅小販,消滅大排檔
消滅老商店,消滅戲院
消滅樹木

香港成為了一座八百萬人的石屎監獄,不是石屎森林
全香港佈滿著一式一樣的大型商場
一式一樣的樓貼樓大型樓盤大型豪宅
香港不需要社區,不需要鄰居,不需要家庭,不需要有個性的個體
需要的是更多的消費,更多的信用卡,更多的名牌,更少的人情味,更少的清新空氣
街道佈滿的是巴士,更多的巴士,比火車地鐵還要長的巴士鐵路
香港的春夏秋冬都是冷氣,室內四處都是冷氣,室外四處都是廢氣
小市民不可在街作小販,大企業可以在街邊推銷信用卡,推銷寬頻,推銷樓盤
不正常的在香港成為正常

香港只可以有現在,沒有未來
租金可以無止境的上昇
投資只可以是投機
沒有人會安分守己
沒有人會腳踏實地
沒有人會做好學問
沒有人會相信未來,相信理想

香港已經不是以前的香港
對於現在的香港人,人情味是笑話
認真是一種謊言
狗仔隊是神是真理
香港人沒有人相信人可以是好人
憎人富貴厭人窮
講權利但不相信義務
假道學成為主流

城市的規劃影響著我們的價值
個人的價值
家庭的價值
朋友與朋友之間的價值
社區的價值
人類存在的價值

以金錢為唯一指標的香港規劃政策
令短期金錢效益成為香港成功的唯一指標
香港成為了一個沒有賭場的賭城
短視
功利
投機
膚淺

造成這種以錢為本的價值
是香港政府的責任?
是香港政黨的責任?
是香港傳媒的責任?
是香港教育界的責任?
是香港文化界的責任?
是香港學者的責任?
是香港市民的責任?

這是香港人的命運?
還是中國未來的命運?
命運可以改變嗎?
我們會認命嗎?

《 香港風格 2 ─ 消滅香港 》 胡恩威

Friday, November 10, 2006

Halfway through the algorithms module

In the classroom:

Me: Are there any questions about the assignment?
Student X: We want extension.
Me: That's not a question. Actually, some of you told me that the assignment is "too easy".
Student Y: Who's that?
Me: Yeah, who's that? Do you know? I don't remember...
Student X: (pretending to be looking around) ...

***

The old problem of "Find an efficient algorithm for returning the n copies of assignments to n students" arises again. Although we clearly know there is an O(n) time algorithm, in practice no one (including the teacher) like to use it and end up with the O(n^2) time algorithm.

***

Teaching algorithms has the advantage of you really know what you are talking about, so you don't need too much preparation, don't need to look at the screen every second, etc. The feeling of my best year of DAA teaching, where I have the freedom to say almost anything I like, seems to have come back.

***

However, too little preparation and relying on memory can be a problem. The lecture notes on quicksort and order statistics - I just don't remember how many bugs have been fixed during or after class. I would blame the CLRS again - I'm not fully aware that a different Partition() algorithm in its second edition affects that many things.

Saturday, October 28, 2006

DSA and Gantt charts

So, I think I have almost covered the first-year Data Structures and Algorithms part in a third-year module. (I mean, the absolutely essential part. Sorting is n log n, etc etc. They will never know what a "binary search tree" is.) Sometimes I don't really understand their math thinking. OK you don't know geometric series, or have forgotten logarithms, or never really know what is induction. But given the recurrence T(n) = 2 T(n/2) + 1, say, isn't it "immediately obvious" that T(n/2) = 2 T(n/4) + 1?

On a completely unrelated thing, in final year projects, I think I have seen 10 different spellings of "Gantt chart"...