星期一, 1月 31, 2005

Modern Roundabouts

每次騎車經過新竹東門圓環, 都像是一場汽機車大亂鬥, 實在是很受不了

以前我就一直覺得圓環是一種很糟糕的東西, 中看不中用, 新竹東門就是一個很糟糕的例子

不過我去年在 schee 的 blog 看到了新的思維, Modern Roundabouts, 真是大大顛覆我的想法, 希望台灣也能用這種觀念來蓋圓環, 不過在那之前, 必須先拋開汽機車分流的錯誤思維

另一個很有趣的東西, The Magic Roundabout, 實在是相當了不起的設計, 而且超炫

凌晨三點的大潤發

好像是最近幾年吧, 到了過年的時候, 各個量販店就會來個 24 小時不打烊, 我就覺得很奇怪, 到底有什麼人會半夜跑去逛大賣場咧?

上禮拜去亞太, 看到他們 24 小時不打烊的廣告, 我就打定主意找個時間半夜去逛一趟, 於是星期天凌晨三點多, 我就到亞太買宵夜去了

到了之後, 發現只剩下一個門可以進去, 我看到了一張海報, 意思大概是如果你半夜來大採購, 就會送你什麼有的沒的, 正要走進大門的時候, 一男一女推著推車走出來, 那男的看到我還笑了一下, 我猜他大概覺得遇到瘋子同夥有點開心

進了賣場, 空空蕩蕩, 真是很有趣的感覺, 我走向蔬果區, 一路上努力的搜尋人影, 幾乎看不到顧客, 工作人員倒是蠻多的, 在裡面繞來繞去, 最後決定買包刀削麵回家煮
我想這種時間營業應該純粹是噱頭吧, 不過對一個半夜想吃宵夜沒有存糧又不想泡麵的人來說, 倒還不賴

星期四, 1月 27, 2005

寫個美美的 Makefile

上禮拜看到 O'reilly 去年十一月新出的 [Managing Projects with GNU make, 3/e], 真是相當興奮, 馬上就在天瓏的網站下了訂單, 到手之後迫不及待的馬上花兩天大致 K 過一遍, 真的是好到令人感動的一本書

Makefile 對我來說一直是一種符咒, 各種詭異的符號, 再加上難以理解的語法, 實在常常讓人感到無力, 想要靠自己的力量為一個複雜一點的 project 寫出 Makefile, 簡直是不可能的任務, 就算從別的 Makefile 開始修改也不是什麼簡單的工作

我以前買過 [Managing Projects with make, 2/e], 中文版, 這實在是一本不怎麼樣的書, 大概年代也很久遠了, 裡面充滿了一堆古代的語法, 只有一些最基本的能被 gmake 接受, 翻譯大概也不怎麼樣, 整本書的參考價值相當的低, 不過這也是市面上唯一一本了, 除了這個之外唯一的資料只有 man page 和 GNU 的線上文件, Makefile 仍然是個謎

看過這本第三版, 我很驚奇的發現, 這書竟然這麼好懂, 簡直可以在馬桶上看, Linux 的 Makefile 竟然一瞬間不再是亂碼, 我竟然花一天就寫出了一個可以 include dependency, recursive make, 跨越好幾個各種深度 directory 的 Makefile, 最棒的是, 幾乎沒有 code redundancy, 也不用為了新增一個 .c file 就得動手改 Makefile, 一切自動搞定

天啊, 為什麼會有這麼好的事!

Robert Mecklenburg, 請受我一拜

星期四, 1月 20, 2005

忽然想到很久沒去收 Gmail 的信了...

之前 coby 送我一個 Gmail account, 不過我實在太少上去看信, 剛剛上去一看才發現有去年九月寄來的信, 真糟糕...
我一直沒辦法適應 webmail, 打開 browser 之後輸入網址, 輸入帳號密碼, 仔細想想也算不上多複雜的動作, 可是對我來說就是非常的麻煩...
要說是因為嫌 webmail 太慢, 平常逛網站也不會快到哪去
要說是輸入密碼太麻煩, 我每天都用 putty login 不知道多少次也甘之如飴
難道只是純粹反動? 我是個無法接受新科技的人?

後來我想到一個原因: webmail 要 login 的時候, 我必須先用滑鼠點一下輸入 id 的格子, 用鍵盤打完 ratbert 之後, 再用滑鼠點一下輸入密碼的格子, 手再回到鍵盤打密碼, 然後再用滑鼠按一下登入的按鈕, 右手在鍵盤滑鼠間的切換太過頻繁, 導致 login 成為一件很辛苦的工作

我太懶了嗎?
也許我該買個 IBM 小紅點鍵盤

星期二, 1月 18, 2005

二輪免許の取得

看看日本, 這才叫考駕照啊, 交通部麻煩趕快把駕照全部取消重來好嗎

原付 (~ 50cc, 不可雙載)
16 歲以上
適性檢查
 視力檢查兩眼 0.5 以上, 視角 150 度以上 (可戴眼鏡)
 色彩識別檢查, 可分辨紅綠黃
 運動能力檢查, 手指手腳腰, 無身體機能障礙
 聽力檢查 10m 以外可聽見 90 分貝(?) (可使用助聽器)
學科試驗
 文字題 46 題 (每題 1 分), 危險預知插圖題 2 題 (每題 2 分)
 總分 50, 作答時間 30 分鐘, 45 分以上合格
原付講習
 基本操作, 基本行駛, 應用行駛, 安全駕駛知識, 三小時學科技能教學
 技能教學須穿著長袖長褲運動鞋, 騎乘原付機車

普通二輪小型限定 (50cc ~ 125cc)
16 歲以上
學科敎習
 沒有駕照或持有原付駕照者, 須經過 26 小時學科教學以及測驗
 持有普通汽車駕照者, 須經過 1 小時二輪特有交通法規及安全駕駛教學
技能敎習
 課題走行, 基本駕駛姿勢教學
 法規走行, 交通規則遵守行駛教學
 直進狹路: 寬30cm, 長 15m 之一本橋 5 秒以上通過
 急制動: 40km/hr 以上煞停, 路面乾燥 11m 以內, 路面潮濕 14m 以內

普通二輪 (125cc ~ 400cc)
可行駛高速道路
16 歲以上
學科敎習
 沒有駕照或持有原付駕照者, 須經過 26 小時學科教學以及測驗
 持有普通汽車駕照者, 須經過 1 小時二輪特有交通法規及安全駕駛教學
 持有普通二輪小型限定駕照, 不需學科教學
技能敎習
 課題走行, 基本駕駛姿勢教學
 法規走行, 交通規則遵守行駛教學
 直進狹路: 寬30cm, 長 15m 之一本橋 7 秒以上通過
 急制動: 40km/hr 以上煞停, 路面乾燥 11m 以內, 路面潮濕 14m 以內
 坡道發進: 坡度 10% 之上坡, 停止後起步, 後退 1m 以上檢定中止
 障礙迴旋: 繞行五組等間隔 (4.5m) 交通錐, 7 秒以內通過

大型二輪 (400cc ~)
可行駛高速道路
18 歲以上
學科敎習
 沒有駕照或持有原付駕照者, 須經過 26 小時學科教學以及測驗
 持有普通汽車駕照者, 須經過 1 小時二輪特有交通法規及安全駕駛教學
 持有普通二輪小型限定以上之二輪駕照, 不需學科教學
技能敎習
 課題走行, 基本駕駛姿勢教學
 法規走行, 交通規則遵守行駛教學
 直進狹路: 寬30cm, 長 15m 之一本橋 10 秒以上通過
 急制動: 40km/hr 以上煞停, 路面乾燥 11m 以內, 路面潮濕 14m 以內
 坡道發進: 坡度 10% 之上坡, 停止後起步, 後退 1m 以上檢定中止
 障礙迴旋: 繞行五組等間隔 (4.5m) 交通錐, 7 秒以內通過
 波狀路: 長 9.5m 路面, 9 個不等間隔突起, 5 秒以上通過

星期一, 1月 17, 2005

高中英文課本裡我最喜歡的一課

Information Please

When I was quite young my family had one of the first telephones in our neighborhood. I remember well the polished oak case fastened to the wall on the lower stair landing. The shiny receiver hung on the side of the box. I even remember the number - 105. I was too little to reach the telephone, but used to listen with fascination when my mother talked to it. Once she lifted me up to speak to my father, who was away on business. Magic!

Then I discovered that somewhere inside that wonderful device lived an amazing person - her name was "Information Pease" and there was nothing she did not know. My mother could ask her for anybody's number; when our clock ran down, Information Please immediately supplied the correct time.

My first personal experience with this genie-in-the-receiver came one day while my mother was visiting a neighbor. Amusing myself at the tool-bench in the basement, I whacked my finger with a hammer. The pain was terrible, but there didn't seem to be much use crying because there was no one home to offer sympathy. I walked around the house sucking my throbbing finger, finally arriving at the stairway. The telephone! Quickly I ran for the footstool in the parlor and dragged it to the landing. Climbing up, I unhooked the receiver and held it to my ear. "Information Please," I said into the mouthpiece just above my head.

A click or two, and a small, clear voice spoke into my ear. "Information."

"I hurt my fingerrrr-" I wailed into the phone. The tears came readily enough, now that I had an audience.

"Isn't your mother home?" came the question.

"Nobody's home but me," I wept.

"Are you bleeding?"

"No," I replied. "I hit it with the hammer and it hurts."

"Can you open your icebox?" I said I could. "Then chip off a little piece of ice and hold it on your finger. That will stop the hurt. Be careful when you use the ice pick," she admonished. "And don't cry. You'll be all right."

After that, I called Information Please for everything. I asked her for help with my geography and my arithmetic, and she told me that my pet chipmunk - I had caught in the park just the day before - would eat fruit and nuts.

And there was a little time that our pet canary died. I called Information Please and told her the sad story. She listened, then said the usual things grown-ups say to comfort a child. But I was not consoled: why was it that birds should sing so beautifully and bring joy to whole families, only to end up as a heap of feathers, feet up, on the bottom of a cage?

She must have sensed my deep concern, for she said quietly, "Paul, always remember that there are other worlds to sing in."

Somehow I felt better.

Another day I was at the telephone. "Information," said the now familiar voice.

"How do you spell fix?" I asked.

"Fix something? F-i-x."

At that instant my sister, who took unholy joy in scaring me, jumped off the stairs at me with a shriek - "Yaaaaaaaaaa!" I fell off the stool, pulling the receiver out of the box by its roots. We were both terrified - Information Please was no longer there, and I was not at all sure that I hadn't hurt her when I pulled the receiver out.

Minutes later there was a man on the porch. "I'm a telephone repairman," he said. "I was working down the street. And the operator said there might be some trouble at this number." He reached for the receiver in my hand. "What happened?"

I told him.

"Well, we can fix that in a minute or two." He opened the telephone box, exposing a mess of wires and coils, and fiddled with a small screwdriver. He jiggled the hook up and down a few times, then spoke into the phone. "Hi, this is Pete. Everything's under control at 105."

He hung up, smiled, gave me a pat on the head and walked out the door.

All this took place in a small town in the Pacific Northwest. Then, when I was nine years old, we moved across the country to Boston - and I missed my mentor acutely. Information Please belonged in that old wooden box back home, and I somehow never thought to trying the tall, skinny new phone that sat on a small table in the hall.

Yet, as I grew into my teens, the memories of those childhood conversations never really left me; often in moments of doubt perplexity I would recall the serene sense of security I had when I knew that I could call Information Please and get the right answer. I appreciated now how very patient, understanding and kind she was to have wasted her time on a little boy.

A few years later, on my way west to college, my plane put down at Seattle. I had about half and hour between plane connections, and I spent 15 minutes or so on the phone with my sister, who lived there now, happily matured by marriage and motherhood. Then really without thinking what I was doing, I dialed my hometown operator and said, "Information Please."

Miraculously, I heard again the small, clear voice I knew so well: "Information."

I hadn't planned this, but I heard myself saying, "Could you tell me, please, how to spell the word 'fix'?"

There was a long pause. Then came the softly spoken answer. "I guess," said Information Please, "that your finger must have healed by now."

I laughed. "So it's really still you," I said. "I wonder if you have any idea how much you meant to me during all that time...."

"I wonder," she replied, "if you know how much you meant to me? I never had any children, and I used to look forward to your calls. Silly, wasn't it?"

It didn't seem silly, but I didn't say so. Instead, I told her how often I had thought of her over the years, and I asked if I could call her again when I came back to visit my sister after the first semester was over.

"Please do. Just ask for Sally."

"Good-by, Sally." It sounded strange for Information Please to have a name. "If I run into any chipmunks, I'll tell them to eat fruit and nuts."

"Do that," she said. "Well, take good care, good-by." Just three months later I was back again at the Seattle airport. A different voice answered, "Information," and I asked for Sally.

"Are you a friend?"

"Yes," I said. "An old friend."

"Then I'm sorry to have to tell you. Sally had only been working part-time in the last few years because she was ill. She died five weeks ago." But before I could hang up, she said, "Wait a minute. Did you say your name was Villiard?"

"Yes."

"Well, Sally left a message for you. She wrote it down."

"What was it?" I asked, almost knowing in advance what it would be.

"Here it is, I'll read it - 'Tell him I still say there are other worlds to sing in. He'll know what I mean.'"

I thanked her and hung up. I did know what Sally meant.


Anonymous

星期六, 1月 15, 2005

瓦斯熱水器 optimization

我家應該是因為浴室旁邊沒有陽台, 所以從小我們都是用電熱水器, 電熱水器加熱慢慢的, 不過只要溫度夠了, 就有一桶相同溫度的熱水, 淋浴的時候水溫非常穩定, 壞處是, 如果前一個人把熱水用光了, 下一個人就得等一陣子

不過自從我大學開始外宿後, 我住的地方都是用瓦斯熱水器, 這些熱水器的火老是要點不點的, 在浴室裡水一下子超燙, 一下子又變冷水, 幾年下來, 我對瓦斯熱水器的評價真是低到不行, 深深覺得要淋浴還是非電熱水器莫屬

最近天氣冷, 我住的地方風又大, 把門關起來之後還是可以明顯的感覺到空氣的流動, 在浴室裡洗澡真是嚴酷的考驗, 每次打開水龍頭總是發抖個好幾分鐘等水變熱, 然後洗到一半又變成冷水澡, 於是我開始思考到底問題出在哪裡, 經過幾個月斷斷續續的理論分析和實驗測試, 我終於在今天晚上徹底破解了瓦斯熱水器的奧秘:

瓦斯熱水器上面都會有兩個調整鈕, 正面會有一顆圓形的, 底下會有一根棒子, 圓形的是瓦斯旋鈕, 底下的棒子是用來調節進入熱水器的水量, 而熱水器的出水量必須達到一個 threshold 才會點火

瓦斯開大, 流出水龍頭的水就會比較熱, 不過因為太燙了, 我們就會把水龍頭扳向冷水那邊, 結果導致從熱水器流出來的水量太少, 火就熄了, 接下來就是冷水伺候, 這就是忽冷忽熱的原因, 解決方法就是把瓦斯旋鈕調小, 這麼一來, 因為水溫變低, 就必須把水龍頭往熱水那邊轉, 出水量容易達到 threshold, 熱水器就不會老是不點火

另一個問題是, 火常常點不起來, 這問題也是因為從熱水器流出來的水量沒有到達 threshold (熱水器裡面的裝置不太靈光也有可能), 所以就不會點火, 解決方法就是把底下的棒子扳到左邊 (上面寫高溫, 不過這種標示真是讓人 confused), 出水量大了, 火自然就點起來了

現在洗澡終於不再痛苦了, 看來瓦斯熱水器經過良好的調整也是能夠淋浴的, 我對瓦斯熱水器的看法也開始改變了

星期四, 1月 06, 2005