Automated testing with Travis CI

Intermediate Perl shows the basics of Perl testing. We show you how to write test programs and how to run those from the command line. That’s the language-specific stuff and within the scope of the book. You can take it further though. You can set up your code in a “continuous integration” system that runs the tests whenever you commit change (most of these trigger on a source control commit). You commit your code and grab some more coffee while your tests trigger themselves. Martin Fowler has some interesting thoughts on CI and wikipedia has a comparison matrix of CI services. Continue reading “Automated testing with Travis CI”

Trying to divide the smallest hexadecimal number

You can run into problems relying on the averages of floating point numbers. This is something I think about often after reading Sinan Ünür’s How you average numbers matters. I thought about it again when I read Honza Brabec’s Mean of two floating point numbers can be dangerous. Despite the hyperbole of “can be dangerous” (see “Considered Harmful” Essays Considered Harmful), it certainly can do something that you don’t intend. Continue reading “Trying to divide the smallest hexadecimal number”