I don't understand how to test complex data structures

One of my weaknesses as a modern programmer is that I don't reallyunderstand how to do test driven development. I understand the basicideas of automated testing and unit testing and so on, and haveused them to reasonable effect every so often; where I fall down isunderstanding how to test things in more advanced and challengingcircumstances.

My current example of this is our ZFS spares handling system. Simplifiedslightly, the core program works by reading state information on all ofthe ZFS pools and their components (some


移軸城市推廣「迷你價」火車票

Continue reading...

電波老少女漫遊芬蘭 - 機場客運站30小時(上)

看到早上的Bristol漫天飛雪,我當時還讚嘆造物者的浪漫。

12月19日的早上,
我從Bristol Temple Mead火車站出發,
準備到London Gatwick機場乘坐RyanAir到挪威的Oslo,
逗留兩天再轉飛我的目的地,芬蘭,會合我的朋友Olga。
火車在駛往倫敦中途因大雪阻塞了

三個烏龍男

昨天老婆跟朋友遊樂去也,出門前囑我帶兒子上小提琴課(平時是她帶的)。到了下午,正要送兒子到小提琴老師家裏,忽然記起一事,便問兒子:「今天是星期五,你的小提琴課不是在星期六的嗎?」兒子答道:「是呀!不過

A tale of memory allocation failure

I have a message for developers, and not the one you might think. Hereis my message:

Sometimes memory allocation failures are not because the system isout of memory .

There is a subset of programmers who do not want to really deal withmemory allocation failures, and to be honest I can't entirely disagreewith them; recovering from memory allocation failures in a complexprogram that also wants to use as little memory as possible is quitenon-trivial and rather contorted. Apart from just exiting on the spot


三首歌‧一個故事

( 原刊 AV Magazine 17-12-2010,這是修訂版本 )

三首歌‧一個故事

歌一 《 四十筆劃 》

過了半世旅程為何還心多

人到中年,對數字特別敏感,聽歌時也一樣,喜歡關於中年男人心境的歌,句句入肉。失業的日子,我每天都聽以


關於《Tron》的小懺悔

《Tron : Legacy》快要上映了,回想1982年的《Tron》,標誌著我打遊戲機的起點,當年我讀初中,開始到觀塘裕民坊大丸百貨公司4樓玩新興玩意:電子遊戲機。《Tron》除了是電影,也是雅達利( ATARI)公司出品的遊戲,我還與哥哥

Continue reading...

Regular Expression 測試 1 (Regular Expression Test 1)

只利用 Regex 來測試字串是否符合24小時制時間格式


數碼誌尚: Blog友變App人

數碼誌尚
P075-079  | Culture Digi


Blog友變App人 袁彌明

200萬點擊率港姐出身的 Erica,當年不滿電視台不平等簽約,毅然轉行從商開拓美容專業。最近搞埋政治,組成「選民力量」,唯一女將的她懂得利用互聯網的免費工具作宣傳

D90+Nikon 10.5mm 2.8+域多利監獄

原來我還沒有一篇文提過我的NIKON D90呢,太冷落他了,隨著D80送給我表弟,D90成了我NIKON ASP-C的主力機,好說是NIKON第一台可拍視頻相機,雖說給5D MARK2蓋過了鋒芒。不過有時覺得CMOS和CCD的區別很大,尤其在噪點方面

Continue reading...