星期二, 3月 06, 2007

病理複習考

禮拜三要考上學期全部的病理,總計四十本共筆,目前只唸了十五本,只剩下禮拜二一天可以準備。

唸書念到整個人幾乎快炸掉,昨天還莫名其妙失眠在床上滾到五點。

這幾天比較有建樹的娛樂就是改了切片瀏覽程式的核心。原本的核心是用二維陣列,以預設的大小讀圖,因為結構的問題限制頗多,在優化的過程中整體逐漸膨大複雜化,昨天唸書休息的時候就把想到的新演算法拿來用,在唸書之餘,花了不少時間把繪圖核心全部拿掉重寫。最後成功達到優化目標,老核心的速度和新核心完全不能比!禮拜四開會看來可以安心交差。

寫切片瀏覽程式讓我深深體會到一段話:
(引自Imperfect C++)
It's better to catch a bug at design time than at coding/compile time.


It's better to catch a bug at coding/compile time than during unit testing.

It's better to catch a bug during unit testing than during debug system testing.

It's better to catch a bug during debug system than in prerelease/beta system testing.

It's better to catch a bug during prerelease/beta system testing than have your customer catch one.

It's better to have your customer catch a bug (in a reasonably sophisticated/graceful manner) than to have no customers.

抓蟲和優化都一樣,與其花時間看trace或是用小技巧優化,不如一開始就用正確的設計或是把複雜度降低。

病理學切片網站 全文連結

2 意見:

piaonlyes 提到...

失眠啊?就乾脆起來唸書啊!不要這麼客氣在床上滾啦!說不定共筆一翻開就打瞌睡了!

d8888 提到...

沒錯,我花了一個小時唸病理共筆就睡著了XDD