afuna: Cat under a blanket. Text: "Cats are just little people with Fur and Fangs" (Default)
[personal profile] afuna
When I first did renames, I didn't have the concept of a rename token object -- I had the shop item, and then I was doing a bunch of stuff directly in DW::Rename. At some point, I rethought, and encapsulated some of that logic into a new class DW::RenameToken, and I had to do a lot of tweaks to what I had already done to accommodate it.

I'm so *absolutely grateful* that [personal profile] szabgab did such a job towards making existing tests usable, because that put tests in mind when I first started doing the renames module, and I felt obliged to take the time to wrote a few simple tests.

Now the tests are failing, and in all the ways that point out to me where my old assumptions no longer bear weight under the new/tweaked code. They have paid for themselves many times over.

Now how do we convince others to write more of these things? :-)

Date: 2010-02-07 07:34 pm (UTC)
pauamma: Cartooney crab wearing hot pink and acid green facemask holding drink with straw (Default)
From: [personal profile] pauamma
Now how do we convince others to write more of these things?
Good question. Offhand, what fraction of the bugs in committed and pushed code (which are for obvious reasons the ones we most want to avoid) do you think would have been spotted by appropriate tests?

Date: 2010-02-09 05:22 pm (UTC)
pauamma: Cartooney crab wearing hot pink and acid green facemask holding drink with straw (Default)
From: [personal profile] pauamma
Hmm, yes. Good point. (And no, it doesn't, but I suspect the answer is along the lines of "not a lot, and the effort involved in writing an automated test to check for these bugs and prevent a regression would be out of proportion with the gain.")