星期三, 2月 28, 2007

Perl中文處理問題

Download details: Microsoft Network Monitor 3

Download details: Microsoft Network Monitor 3

業界的Agile相關發展

Game

好的Test具備好的可度性

Test Double

MF Bliki: TestDouble

在Martin Fowler的網站上看到一篇文章,題中提到一些人對於Mock或Stub之類的物件有著各式各樣的說明。Gerard Meszaros試圖替這些相關的用詞訂出明確的定義,Gerard將這些類似用途的物件統稱為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.

星期一, 2月 26, 2007

沒有NULL Iterator

把c++ 程式碼升級到vs2005後才發現,先前vector::iterator ite = NULL之類的程式碼都編譯不過了,經過google一番後才發現,似乎STL的iterator本來就不存在著NULL的觀念,只能利用其他的變數,或是利用ite = some_container.end() 來達到類似的效果。

參考資料:
  • http://www.mip.ups-tlse.fr/~grundman/stl-tutorial/tutorial.html

    Why doesn't STL have null iterator values? STL iterators are supposed to be generalized pointers, right? That phrase has been bandied about a great deal, but it is very misleading. STL iterators are generalizations of array pointers, that is, a pointer set to point into an array, and then incremented or decremented. It does not make sense to talk about such a pointer having a null value.

    In C and C++, null pointers are used to indicate errors, or abnormal conditions. When you have a C++ iterator type, there is normally only one kind of error value it will return: one indicating "I fell off the end of the list". It is natural, therefore, for most iterator classes to use null as the "past-the-end" value. If you find yourself wanting a null STL iterator, you probably want the past-the-end value.


星期二, 2月 20, 2007

.NET中的Plug-In設計

Orcas包含了一個新的System.AddIn namespace用來輔助製作plug-in技術