in reply to Recommendations re tests wrt a reference implementation

Let me propose a third option: Don't rewrite your old code.

In fact, don't ever rewrite working code. At least not all at once.

Far better IMHO:

  1. Pick a piece of functionality in your old code.
  2. Write tests for it.
  3. Make sure that it works (you will likely find some bugs you didn't know about :)
  4. If it makes you happy, rewrite/refactor this small portion of your old code.
  5. Repeat

In this manner, you will always have a working application.

Iteratively improving a piece of code is almost always the better idea.

My two cents,

-guinex

  • Comment on Re: Recommendations re tests wrt a reference implementation

Replies are listed 'Best First'.
Re^2: Recommendations re tests wrt a reference implementation
by roboticus (Chancellor) on Jun 19, 2007 at 19:43 UTC
    ...and an additional benefit is that you spend your time where it's needed. The stuff that you're unhappy with and/or are changing get the benefit of all the tests they should have. The stuff that's basically working won't be tested until you need to change it.

    ...roboticus