Hi Nick,
On 3/11/2012 6:09 AM, (e-mail address removed) wrote:
that's not quite the same as "no bugs"
Exactly! Yet that seems to be the most common approach to testing
nowadays (how many folks have formal specifications, test suites,
validation procedures, etc.).
You have to consciously *attack*/challenge a piece of code to
identify deficiencies. Where are the boundary conditions?
What did the developer *not* expect? etc.
I tend to be pretty good at coming up with "unexpected"
operating conditions. When the developer invariably
*whines* saying "but you're not supposed to *do* that!"
I grin and reply, "Then don't LET me!"
I'll be impressed if you succeed
This is really not hard to do. Since most of my work is for
real-time applications, *how* the algorithm performs (timeliness)
is as important as what it *does*.
This was the motivation for developing this version of the
memory management library -- since an application must be
able to accurately predict how a particular request will
be satisfied INCLUDING HOW LONG IT WILL TAKE.
because the real world is a constant surprise
Engineering is the art of anticipating those surprises!
In the "ethereal" world of software, this is considerably easier
than in the physical world ("What happens if a guy whacks it
with a 20lb sledge hammer?")
"should" being the operative word!
Of course! That's what makes me good at what I do! :>
"
GLENDOWER
I can call spirits from the vasty deep.
HOTSPUR
Why, so can I, or so can any man,
But will they come when you do call for them?
"
This is one of the reasons the formal methods approach has been sluggish.
In theory you prove a program is correct without ever executing it. But
people rarely do this on any large scale.
Actually, this is common on very large scale projects (which,
otherwise, would never be able to run a single invocation to
completion, otherwise).
Where it *doesn't* happen is smaller projects, "lone wolf"
developers, "immature" organizations, etc. "Pay me now or
pay me later" is a great mantra when it comes to software
quality and testing, in general.
The writers of the Space Shuttle software might have acheived to what
you're trying to do. At enourmous cost.
There are many industries where formal testing and validation
are the norm and "required" practices. Surprisingly, the
cost for this isn't as great as one would think. Once a
module has been validated, that cost is behind you -- any
future use of the module comes with an *assurance* of proper
operation (within the constraints of the contract/spec).
In these environments, you really benefit from code AND
design reuse.
OTOH, if you are developing "ad hoc" and testing is left
to the whims of the developer, chances are you can't
afford a proper validation environment and you'll just keep
paying for it in OTHER ways (bugs, feature creep, training,
etc.) without ever being able to wrap your hands around the
entire problem.
[Do you get the impression that I am a big advocate of
formalized methods? :> ]