Re: Exceptions, Go to Hell!
On Aug 27, 6:19 am, "joe" <jc1...@att.net> wrote:
RB wrote:
Found the answser to my error bug question.
Error: Is an undesirable deviation from requirements or Cosmetic .
Bug: Is an error found BEFORE the application goes into production or
missing Functionality.
Defect :Is an error found AFTER the application goes into production
or missing Requirement
I don't agree with those definitions, and they seem a bit "lofty".
They sound rather "artificial". Maybe specific definitions
introduced locally in order to characterize problems.
"bug/defect", "tomato/tomoto", they mean the same thing to me.
That one tries to get all the bugs out before release doesn't
factor into the definition for me, nor does it make me want
multiple terms based upon the discovery time of the bug.
In C++, "errors" are expected and defined things (though
probably occur rarely) that one can manage with the exception
machinery (or some other facilities, perhaps that which one
built themself). Errors are detectable while bugs are not (but
they can be flushed out by testing and reduced via good coding
practices).
"Errors" are something that occurs but which shouldn't occur (in
an ideal world). Programming errors are made by programmers,
writing the code, and in general, can't be handled in the code
(because the presense of such errors means that we don't know
the current state of the program). Another word (probably
better) for such errors is defects. Other errors (dropped
connections, errors reading files, etc.) may be due to defects
in other equiment connected to the machine, but there's no
reason to abort everything when they occur. Other things, like
insufficient memory, are processed as "errors", since their
impact on the program is very much like that of a defect in
other equipment. And of course, there are user errors. And
hardware errors in the equipment you're running on. (One of the
most difficult errors I ever had to track down was a hardware
design error which resulted in one bit in the generated machine
code changing---about once every three or four hours.)
Before talking about appropriate strategy, I think you have to
rigorously defined what types of errors you're talking about. I
like the term "defects" for errors in the system you deliver (as
opposed to defects or failures in connecting equipment, or user
error), and errors for the rest. But even then, I wouldn't
ignore the fact that a defect in the software is always due to a
human error in the development process. Somebody made a
mistake, and at least to me, a "bug" sounds to impersonal,
random and caused by some external factor, which is not the
case.
--
James Kanze