in reply to Re^10: Corner cases are not always "code smell"
in thread Neither system testing nor user acceptance testing is the repeat of unit testing (OT)
Yes - any version that implements the spec is correct. If your version doesn't implement the spec, it is incorrect. Any changes you need to make to your version to have it match the spec is internal to that version.
(BTW your refusing to call this switch an "optimization" is disingenuous at best.)
Why? You said that the "optimization" fixed bugs. To me, that's a bugfix. That it optimized the code is often a consequence of correct implementation.
Saying "this must work" and "that must be fast" says that you need 2 different strategies. It doesn't say where the boundary between them should be.
"This must work according to spec." is all I'm saying. The spec contains a speed requirement.
It doesn't say where the boundary between them should be. That boundary should be invisible to the user of your code. And therefore you have an internal code boundary that is not part of the external specification.
Does the code implement the spec? If yes, you may pass Go. If no, then go directly to Jail. If your version implements the spec and is faster than mine, that's wonderful. If it's faster, but it's wrong, then we're not comparing apples.
Furthermore without knowing the exact implementation, you can't specify how it works, because the appropriate boundary depends on the optimization chosen, which is highly implementation-dependent.
This sentence makes absolutely no sense to me. A specification tells you what it does. It most certainly doesn't say how it accomplishes that goal. And, yes, an optimization may certainly be platform-dependent, tools-dependent, etc. If your implementation wants to take those factors into account, it is welcome to do so. However, you're still implementing the spec, which, at the end of the day, is all that matters.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^12: Corner cases are not always "code smell"
by tilly (Archbishop) on Oct 26, 2005 at 02:47 UTC |