[racket] Code that double checks is good, bad, other?

From: Sean Kanaley (skanaley at gmail.com)
Date: Fri Oct 3 13:50:54 EDT 2014

"the problem is when you re-work the code, do you know for sure that
you moved the contract/assertion/validation/checking appropriately."

That's the real crux that I forgot to say. I was inspired to post when I
was slightly repurposing a mid-level function and realized it no longer had
to do as much, then trying to remember if it was used somewhere else where
that functionality was still needed. I *have* been writing more tests
recently. If the function never fails, it doesn't matter that it "could
have" failed if used elsewhere. So perhaps the answer is just lots and lots
of tests and less manual effort.

On Fri, Oct 3, 2014 at 1:28 PM, Raoul Duke <raould at gmail.com> wrote:

> in theory only the "top level" things should validate. by which i mean
> those things which get input from something other than your own code.
>
> the problem is when you re-work the code, do you know for sure that
> you moved the contract/assertion/validation/checking appropriately.
>
> test coverage can help there, in the absence of some AI looking over
> your shoulder for you.
> ____________________
>   Racket Users list:
>   http://lists.racket-lang.org/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20141003/98faffd8/attachment.html>

Posted on the users mailing list.