• Steve Jones - SSC Editor (11/10/2015)


    GilaMonster (11/10/2015)


    I've recently seen a system with many user-defined functions, each with thousands of lines of code, often calling each other. Tests or no tests, I'm not touching that.

    Write a test. You might be surprised how much it helps.

    The problem is what test to write. If the code and documentation is such that you havent a clue how it's supposed to achieve whatever it's expected to achieve (and maybe appears to achieve) your chance of producing a test that reveals anything useful is approximately nil.

    I'm a great believer in testing. But I thin k youu are being a bit naive here, Steve.

    Then write another.

    When the first test fails to provide ny useful information people tend to be discouraged from writing another. For a serious chunk of software, you need to star from "write five dozen tests" - and then use the one (ones if you are lucky) that tells you something useful to discover some more tests that have a good chance of being useful.

    Tom