Re: First class developer: who ?

Patricia Shanahan wrote:
Tom Anderson wrote:
On Sun, 14 Mar 2010, Patricia Shanahan wrote:

BGB / cr88192 wrote:
often, if there is no good way to test or use a piece of code, well then this is a bit of an issue...

The conditions that trigger a piece of code in operation may be difficult to cause in system test,

If it's difficult to cause with a system test, then it's possible, and that's something that can and should be tested - corner cases are something you should pay particular attention to, because they usually won't be caught by informal testing.

If it's impossible to cause with a system test, then why is the code there?

I take the view that any multi-processor or multi-thread timing case
that cannot be proved impossible will happen sooner or later, even if
there is no known system test that can be guaranteed to produce it. That
means the code to handle it should be there, and should be tested.


It seems to me that if you are sufficiently skilled in concurrency programming that you can pinpoint a situation that you cannot test but can't prove impossible, that rather than spend time writing code to handle the execution of the "possibly impossible" code, and then testing that handler code, that you might be better off simplifying your original code in the first place.