January 31st, 2019

Sherlock's Stupider Brother

I had an opportunity to pull out my favorite Sherlock Holmes quote today: "Once you eliminate the impossible, whatever remains, no matter how improbable, must be the truth."

I was helping one of my colleagues chase down a bug in some code he was writing on the Java server. We're trying to add the time period editing over there that we have on the C++ side, so it's just a matter of making sure the code is correctly ported.

But the data spreading was going awry, so *something* had to be wrong. "Ok," I say. "Let's stop the calculation in the middle of the process so we can see if the data is getting spread correctly in the first place."

It wasn't.

Some time this afternoon, I realized that there might be a problem with the calculation order. Had it been reinitialized correctly after the changes? Where's the routine that does this? Ah, here it is! Why is it empty with a comment that says "STUB"?

Eep. This routine only gets called from the time period editing code. And since we hadn't exercised that on the Java side, we hadn't noticed that I'd never filled it in.

Well, it's filled in now. And the code works a lot better.