[Ukfreebsd] Notes from last nights meeting

David Cantrell david at cantrell.org.uk
Thu Nov 30 17:04:33 GMT 2017


On Wed, Nov 29, 2017 at 08:32:27PM +0000, Sevan Janiyan wrote:
> > On 29 Nov 2017, at 11:56, Tony Finch <dot at dotat.at> wrote:
> > AIUI he believes TDD is a panacea and that all other software reliability
> > techniques are irrelevant. Not a very interesting person.
> In the world of Ruby & Java, do you have any better options than unit tests?

Unit tests != TDD, of course.

The very first tool in my box for software reliability is a set of
sensible coding standards that everyone on the team agrees to,
including:

  Check your return values. Always.
  Test your errors as well as your successes
  Thou Shalt Not Use Any Construct That Smells Like Goto
    In particular switch/case/break is Right Out

The second tool is test coverage measurement. Measure both that your
tests cover all* your code, and that all the code in your tests gets
run.

* this is an aspiration that you will in practice rarely achieve, but
  merely knowing how uncovered your code is is jolly useful, and seeing
  how it changes over time is very useful indeed.

The third tool is code review and continuous testing (ideally your test
coverage measurement will go here).

Sorry, that's all really boring stuff, nothing fancy like static
analysis or funky type magic. Those certainly have their place, but if
you have a choice of only one of fancy tools or boring procedures,
you'll get more benefit from the boring procedures.

-- 
David Cantrell | Official London Perl Mongers Bad Influence

Cum catapultae proscriptae erunt tum soli proscript catapultas habebunt


More information about the Ukfreebsd mailing list