Finding Bugs
4 points by hwayne
4 points by hwayne
I think the real moral of the story is that you should always test in a variety of ways :P
Always just bad when people solely follow TDD unit testing dogma, or solely doing integration tests, or solely fuzzing, or solely property testing, or solely testing against known-good (or at least differently-bad) implementations, or whatever. I don't think I've once written nontrivial software that didn't have at least one notable bug caught by every distinct paradigm of testing I implemented (regression testing included too, because bugs love recurring with future changes).
Good article! Bit of pedantry:
And for, a regex engine, coming up with an oracle shouldn’t be hard, as they typically already come with multiple specialized implementations under a single facade, and the implementations can be cross-checked against each other.
That's differential fuzzing, which isn't quite the same as having an oracle. It's possible to have the same bug in two implementations. Differential fuzzing is also useful, and is often easier (especially for things like regexes where there are many implementations lying around), though when it finds an issue it leaves you with the additional step of figuring out which implementation is wrong.
Mostly I point this out because it's good to be aware of both things. Some problems really do have oracles (e.g. factoring a number).