Goldenseal Pro Progress Report (Apr 19)

Up until now, our staff has been using the Sample Company File to test Goldenseal Pro (our new, updated accounting and estimating software). The sample file has fake data for a fake company. It was first set up in 1997 to test pre-alpha versions of Goldenseal. Having existing records makes it easier to run accounting commands, and make sure everything works properly.

When you open an older-format file with Goldenseal Pro, it first creates a new file in the new format. Then it reads each record from the old file, and copies it to the new one.

The work on Goldenseal Pro is almost far enough along to start using it for our own business. To get ready for that, we currently are working on the conversion, to get TurtleSoft’s accounting file into the new Goldenseal Pro format.

When a software company uses its own software for daily use, it’s called “eating your own dog food”. It does produce better software, since any problems are right there in your face. On the other hand, it also means that corrupted data can creep in, from using the accounting software in real life before it is fully debugged. Because of that accumulated cruft, converting our own file gives errors. Most of this week, we have been running the conversion until it complains, then stepping through to find out what’s wrong. Fix that problem, and move to the next.

Right now we are still working on a tough one. Since about 2002, our file has suffered from a corrupted NeoAccess index for sales breakdowns. Try to look at them, and Goldenseal crashes. The bad data may have been caused by “bit rot”, or it may have been from some NeoAccess bug that was fixed long ago.

Fortunately, the corruption only affects a few records from the 1990s, so it doesn’t bother us in daily use. Unfortunately, the conversion goes there when it moves records to the new file. So, we need to get past the corrupted index. Ideally, we should fix it in a way that handles any other data corruption that may be present in other users’ files. That means stepping through NeoAccess code many times, and trying out small changes. Right now it no longer crashes, but it still skips all the sale breakdowns that are after the bad index. We need those.

The NeoAccess database structure has many places where changing a single bit wreaks havoc. That’s a big flaw, because there are things like cosmic rays and radioactive decay that sometimes change a 1 to a 0. “Bit rot” is rare (and getting rarer as technology improves), but it still happens.

In this case, each index in the tree has a list of file addresses that point to its branches. If any of those change by accident, they’ll read from the wrong part of the disk and get garbage. It’s all downhill from there.

Goldenseal Pro already stores addresses in two different places, but the headache of trying to fix NeoAccess code made us decide to store each file address a 3rd time. It adds 8 bytes per record, but then we can compare two numbers at every read, and give a warning if different. After that, the code can look at both locations, and see which one makes sense.

The conversion from Goldenseal to Goldenseal Pro already futzes with a few things: converting bank accounts, merging breakdown classes, switching to 64-bit, and adding more safety tags to the data. As corrupted data turns up in our file, we add a fixer routine in the conversion code. It might as well tidy up along the way, in case other users have similar damage.

There will be a few weeks or a month when we run TurtleSoft from two company files: one in Goldenseal, and in Goldenseal Pro. We’ll taste the dog food as an appetizer, but still eat human food for the main course. That will be the perfect time for current Goldenseal users to run the conversion on their own data. If any new problems turn up, we’ll have plenty of time to fix them before the final release.

Dennis Kolva
Programming Director
TurtleSoft.com

Author: Dennis Kolva

Programming Director for Turtle Creek Software. Design & planning of accounting and estimating software.