今日連結 (2007-03-02)
今日連結:
- 用鍵盤作滑鼠的工作 - 直接用鍵盤控制 gVim 的視窗大小與位置,方便與其他軟體協同作業。
- 日本人說南京大屠殺是唬爛的,你會很生氣。可是二二八呢? -
- TestDouble - 從阿司卡程思筆記那邊看來的。Martin Fowler[1]推薦 Gerard Meszaros 對 stubs、mocks、fakes、dummies 這類在 test frameworks 裡的「東西」的分類,並統稱為 Double:
- Dummy objects are passed around but never actually used. Usually they are just used to fill parameter lists.
- Fake objects actually have working implementations, but usually take some shortcut which makes them not suitable for production (an InMemoryDatabase is a good example).
- Stubs provide canned answers to calls made during the test, usually not responding at all to anything outside what's programmed in for the test. Stubs may also record information about calls, such as an email gateway stub that remembers the messages it 'sent', or maybe only how many messages it 'sent'.
- Mocks are pre-programmed with expectations which form a specification of the calls they are expected to receive. They can throw an exception if they receive a call they don't expect and are checked during verification to ensure they got all the calls they were expecting.
- JavaScript 的 Memory Leak - Scripting language engine 有這種隱藏的 memory leak 問題,真是讓人害怕。
- 卓越客戶服務的七步驟 - Fix everything two ways!!
- Martin Fowler 是 《Refactoring》作者之一。 ↩



Post a Comment