Friday, August 05, 2005

Backwards programming

I noticed an interesting manner I am programming right now. I am programming and testing all the error cases before
even attempting to perform one successful variant. This is a little backwards from what I usually have done and also
backwards from what I've seen other programmers do. It's kind of nice however since when the successful tests work then
the work is completed rather than having all the boring test cases still to work on.

Also when working in adapting code others written (or yourself where some time has passed) this works since you check
that your assumptions were correct and that the code fails where you expect it to fail and not before that and not passing
the expected failures. Thus one is always in full control.