August 12th, 2008

Sweeping Up

I rewrote our calculation engine late last year to add minimal recalculation. I knew that there were going to be bugs, but -- since we were far away from release! -- there would be plenty of time to test the beast and knock out the odd things that I'd missed.

Little did I realize that our testers would be so busy testing other releases that this release wouldn't get tested until, oh, about now. Eek!

Actually, that's not quite true. We went through a round of testing about a month ago where they found and I fixed some problems with initialization of funding accounts that crept in with the minimal recalc code. When you have to handle your initialization completely differently because you're not initializing the whole thing -- minimal recalc, right? -- then you're going to have some glitches. And I fixed those.

Then our currency translation test was run late last week and showed errors. This turned out to be more initialization problems with the minimal recalc code, this time related to our debt scheduler. It stuffs some values that need to be cleared out before each run -- unless, of course, you're not recalculating those cells because they aren't dirty. And figuring out which cells actually need to have the stuffed data cleared out is a bit more complex, because one cell runs the debt schedule calculation and stuffs data into a half-dozen or so other cells.

I've now refactored the code that initializes those values so that the tests are being run in the right places and it seems to work. We'll see what the currency translation test has to say about it.