Are code assertions considered harmful?
rsharpe at richardsharpe.com
Sun Nov 9 07:04:27 GMT 2003
On Sun, 9 Nov 2003, Cameron Paine wrote:
> > > To my question then: why are assertions considered unhelpful? ...
> > Assertions are not considered unhelpful. At work they are often very
> > helpful. However, you will find very few in the two open
> > source projects I work on. Perhaps it is the nature of those projects.
> Hmmm, that concurs with my own observation. I'm a passionate advocate
> of open source in my work places. My advocacy is not however based on
> cost. It's about transparency, the free exchange of knowledge and the
> fact that we can spend our time improving on each other's work rather
> than re-inventing pale imitations of it.
> Your comment implies that open source is fundamentally less rigorous
> than "work" coding. Can we afford to take that view if we want open
> source to be taken seriously by other than our peers and the home
The way I see it, this _is_ one area where vendors do a lot more work that
open source writers.
The level of testing that is done by many of the open source projects I
work on and I have seen is well below that done on [some] commercial
For example, when we are making changes where I work, we have a battery of
tests to do, which typically includes:
1. Build in several versions (debug, release, trace) on up to three
platforms (FreeBSD, Linux, Solaris)
2. Run SFS to ensure that no regressions have been caused
3. Run Bandwidth tests to ensure that no regressions have been caused
4. Run several specific regression tests (such tests keep expanding)
5. Run reliability tests from multiple clients.
It currently takes two people about a day to do all these tests, and then
our QA group does daily tests looking for regressions and these tests are
growing. It also takes a lot of equipment just to do that level of
testing. Some of the tests require 100 or more clients to run, and that
number will grow soon. Some of the other tests, like trying to achieve 10s
of GBps (yes, GigaBytes per second) require multiple Extreme BlackDiamond
switches or equivalent.
Very few open source projects do this sort of testing or even have that
level of resources and many of them grew from simple beginings.
However, that is not to say they should not and could not improve.
Richard Sharpe, rsharpe[at]ns.aus.com, rsharpe[at]samba.org,
More information about the samba-technical