Goldenseal Pro Progress Report #8 (July 29)

We have shifted gears, and are reading up on all the stuff we’ll need to know for writing our own GUI (graphic user interface) code. That applies to both Goldenseal Pro, and the small phone apps we will link to it.

On Windows, that means developing with Android libraries, using the Java programming language.  On the Mac, it means using Cocoa libraries, and a combination of the new Swift language, and Objective-C.  On desktop it also requires Objective-C++ to link to our existing C++ code.

The number of libraries and new languages is daunting, but fortunately it is not as bad as it might seem.  All of the libraries use concepts that are very similar to what we already use. And all those new languages are pretty much derived from C++.  The syntax may be different (some have semi-colons and some don’t) but the coding is the same basic stuff.

Meanwhile, our contractor is currently on vacation, but he is going too slowly and we’ll have a discussion with him soon.

With both Swift and Java, it’s possible to develop a GUI with very little actual coding.  The hard part is linking it to our existing code.  If we write the Pro GUI in Swift, it’s going to involve four different programming languages!

C++ is a great language, and getting better all the time. Unfortunately, it seems like Apple, Google and Microsoft all want to lock developers into writing code that can’t be used on other platforms.  Nice for them, sucks for us.

Dennis Kolva
Programming Director
Turtle Creek Software

Goldenseal database code (July 19)

We are still fine-tuning our basic database code. It is a gradual process since it requires testing, and making design decisions.  This is pretty much the last programming we need to do, outside of the GUI (graphic user interface).  Our contractor is making slow progress on that.

We use a B-tree to store the disk location of every record.  It is a popular design that is similar to the older NeoAccess code.  However, we make each node much wider, thanks to the generous amounts of RAM available on modern hardware.  It’s also faster that way: these days, a 64K read takes much less time than 16 4K reads.

Neo had a complicated system to keep track of empty spaces in the database (necessary to keep the file from becoming huge).  It was buggy, so in 2003 we replaced it with our own File Manager.  The new system performed well but took up a big chunk of memory, which sometimes caused quits or file corruption when there was not enough RAM to load it. In theory we could have rebuilt the FileManager from the NeoAccess records, so corrupted files could be fixed.  Unfortunately, the Neo code was so complicated that we never could make that happen.

In Goldenseal Pro we now use multiple File Managers, so each keeps track of records in just one sector of the file (32,000 records). They have a relatively small memory footprint, so they’ll be quicker and safer.

In the new database, the location of every record is stored in two different places, and now it uses code that is easy to understand. That means we can cross-validate them, and fix any errors.  Our own company file actually has a few corrupted records from the early 2000s, so it will be the perfect test platform for developing a self-repairing database.

The classic B-tree requires ‘branch balancing’ code to keep it in shape, and part of the complexity in NeoAccess was that it kept moving things around to balance the tree.  We add ID numbers sequentially, and most users don’t delete many records.  Our initial design takes advantage of those conditions, but we are still researching other ways we can make it better.

Dennis Kolva
Programming Director
Turtle Creek Software

 

The 90-90 Rule

There is a saying in software engineering that the first 90% of the project takes the first 90% of the time, then the last 10% takes the other 90% of the time.  For brand-new coding, I think it may even be a 90-90-90 rule, where the final 1% takes the really-last 90% of the time.

Anyhow, our new database code is working pretty well now, though we still need to test it on really large data sets, and stress-test it over the summer.  In other words, the second 90% is now completed.  Everything is much simpler and safer than the old NeoAccess code, so it will be much easier to maintain.  It’s designed for modern systems and uses modern C++.

We also finished the code that reads existing Goldenseal files, and writes them to the new file format.  That means that people’s existing Goldenseal data will be very easy to move into Goldenseal Pro.  We will be testing that code as well for the rest of the summer.  We’ll run Turtle Creek on the new version for a while, before opening it to beta testers.

Dennis Kolva
Programming Director
Turtle Creek Software

Website outage July 6/7

Our ISP had a server melt-down, and turtlesoft.com was out of commission July 6 & 7, and possibly partial days on either side.  It’s back in action now (Fri, July 8).

Emails sent to us during that period were temporarily delayed.  We have a big pile of old messages now, but it is possible some were permanently lost during the outage.  If you sent us an email recently and don’t get a reply today, please resend.

Our apologies for any problems this may have caused.

Dennis Kolva
Programming Director
Turtle Creek Software