[plt-dev] random testing, we need to do more of this
Just thought I'd share my coding story of the day.
I'm getting ready to make a change to the internal data structure in
the image library (normalized shapes; they are a subtype of the full
shape data structure that simplifies the structure in certain ways to
make it easier to process). So, to get read for this change to the
code that produces normalized shapes, I wrote a predicate for
normalized shapes and then randomly made up shapes, normalized them,
and then checked to see if the result of normalization was, in fact, a
normalized shape.
And guess what: I had changed the normalized shape slightly a month or
so ago and fixed up code in two places incorrectly that this found.
This wasn't at all what I was looking for, either!
Anyways, yet one more time I've learned that random testing is a big
win, so I thought I'd post about it. You should give it a try yourself
sometime.
Robby