Liste des Groupes | Revenir à cl c |
On 19.11.2024 09:19, David Brown wrote:Both activities are about reducing the risk of incorrect code getting through. In some cases, one of them is more practical or more effective than the other, while in other situations you want to combine them.
[...]>I don't want the theme to get out of hand, so just one amendment to...
There are a great variety of projects, [...]
Of course testing is important, at many levels. But the time to testSound like early days practice, where code is written, "defined" at
your code is when you are confident that it is correct - testing is not
an alternative to writing code that is as clearly correct as you are
able to make it.
some point as "correct", and then tests written (sometimes written
by the same folks who implemented the code) to prove that the code
is doing the expected, or the tests have been spared because it was
"clear" that the code is "correct" (sort of).
Since the 1990's we've had other principles, yes, "on many levels"
(as you started your paragraph). At all levels there's some sort of
specification (or description) that defined the expected outcome
and behavior; tests [of levels higher than unit-tests] are written
if not in parallel then usually by separate groups. The decoupling
is important, the "first implement, then test" serializing certainly
not.
Of course every responsible programmer tries to create correct code,
supported by own experience and by projects' regulatory means. But
that doesn't guarantee correct code. Neither do test guarantee that.
But tests have been, IME, more effective in supporting correctness
than being "confident that it is correct" (as you say).
Les messages affichés proviennent d'usenet.