Re: A simple unit test framework
On May 7, 9:43 pm, Ian Collins <ian-n...@hotmail.com> wrote:
James Kanze wrote:
On May 7, 11:31 am, Ian Collins <ian-n...@hotmail.com> wrote:
James Kanze wrote:
Comprehensive unit tests are most important for maintenance.
New code should always be reviewed. But a review is not without
costs, and reviewing an entire module because someone has
changed just a couple of characters in just one line isn't
really cost effective. Comprehensive unit tests, on the other
hand, are very effective at catching slips of the finger in the
editor.
Again, that's where paring and continuous integration come in, the code
is under constant scrutiny from many pairs of eyes.
It's not a question of numbers. It's important that the
reviewer have a fresh view of the code.
Say Fred and Jim work on a story for a couple of hours, then Fred moves
off and Bill joins Fred to carry on, doesn't Bill have a fresh view of
Fred and Jim's code?
Certainly, for that part which is already written. Does Bill
carefully reread all of the code that was already written, to
ensure that it is correct and conform to the local coding
standards? Is there a mechanism which ensures that yet someone
else intervenes once Bill and Fred have written something?
In practice, well run code reviews are necessary, and once they
are taking place, adding pair programming adds very, very little
value, while effectively doubling the cost. In general---I can
imagine that in some specific circumstances, it is worth while.
--
James Kanze (Gabi Software) email: james.kanze@gmail.com
Conseils en informatique orient=E9e objet/
Beratung in objektorientierter Datenverarbeitung
9 place S=E9mard, 78210 St.-Cyr-l'=C9cole, France, +33 (0)1 30 23 00 34