First, I think guinex has a good point: consider not rewriting your codebase. Instead try refactoring your existing codebase before adding your new features. I'm guessing you're thinking about rewriting because the current codebase is becoming difficult to maintain. If you take the refactoring route, you should be able to use unit tests from the initial application to ensure that you don't regress upon refactoring or addition of new functionality.

I understand both guinex point and your expanded explanation about it. The point is, the original app was written naively with no tests in mind or any other control structure, and it has grown more than initially expected. It has served me right since then: but it is poorly written and it lacks functionality that for some reason it would be not that easy to just cram in. Thus following the disciplined approach most of you suggest, I would modify it with small incremental steps, also gradually adding tests to make sure I don't break anything step by step: I do agree that this is the most reliable way of proceeding. But it's also more work than I may want to spend on it: the original app may have not been perfect - yet my primary concern is that the new one just behaves like it when no new functionality is adopted.

As far as the actual way of rewriting goes, I'm not really sure it will be from scratch: indeed I will probably still gradually modify the existing codebase, preserving the original one apart. But to also add tests for the latter, however good in principle, would be much like duplicating the efforts. So I think I'll take a lower profile approach and leave some junk in, duly hidden under the carpet.


In reply to Re^2: Recommendations re tests wrt a reference implementation by blazar
in thread Recommendations re tests wrt a reference implementation by blazar

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.