Modern C++ and Compilers (Aug 27)

Goldenseal estimating/accounting software is built from about 1,000 text files. TurtleSoft Pro is similar in size.

To convert all that text into a final app, we use an IDE (Integrated Development Environment). First it was CodeWarrior, then Xcode, then Visual Studio, and now Qt Creator. The most important part of every IDE is the compiler. It checks for errors, then turns the C++ into machine language for the final app.

Compilers are excellent helpers. They catch most stupid typos and fatal errors. They also give warnings for code that is legal, but possibly risky or confusing. Compilers keep getting stricter, which is fine with us.

Meanwhile, the C++ language is also improving. The 2011 and 2014 updates added many features that help make code safer and faster. Unfortunately, the changes caused our code to give over 70,000 warnings: mostly for lack of the new override keyword in our pre-2011 code. It’s one of those changes that makes code a bit clearer.

The huge list of warnings slowed down compile times, and made it hard to see the ones that are most useful. We could have turned off some of the warnings, but it’s good to get them when writing new code. So we just spent a few days to update all the files. Thousands of copy-pastes. Most of the changes were benign, but we did catch a couple of potential bugs in the process.

The warning list is now down to 430 items, and shrinking gradually. Ideally we’ll get it close to zero soon. Anything that’s left will act as a to-do list.

Meanwhile, the estimating interface now looks good. Our staff has moved on to bank transactions and the Reconcile command. Reconcile, Pay Bills and other action commands are the last big and unfinished interface chunk. Once we figure out how to do those, it’ll be down to smaller details. Many, many of them.

Our staff has worked with Qt for about a year now. We’re becoming more fluent with it. Programming is fun when you can whip out a few lines of code and make something happen.

Dennis Kolva
Programming Director

TurtleSoft Pro (Aug 17)

Twenty years ago, the local hippie bank gave us a free marketing analysis. It complained that we used three different names: TurtleSoft, Turtle Creek Software, and Goldenseal. Too confusing, should be just one.

That was soon after we launched Goldenseal 1.0. The advice made sense, but not enough to be worth a total rewrite of printed manuals, website, and everything else. Sadly, was already taken. Otherwise we could have just changed the company name.

The past few years I’ve been calling the next generation Goldenseal Pro, but it’s time to shift gears. Listen to past advice, and abandon the creeks and the goldenseals. Everything will just be TurtleSofts, all the way down.

Once our staff finishes the new interface code, we’ll launch TurtleSoft Accounting, TurtleSoft Estimating, TurtleSoft Payroll, and a few other single-purpose apps. Some of them may have more than one version, with different features and prices. Also TurtleSoft Contractor, TurtleSoft Retail and a few more that combine things for different types of business.

The current full version of Goldenseal will become a mongo TurtleSoft flavor, for the rare souls who need construction estimating, accounting, retail and property rentals all together. For now we’ll call the whole family TurtleSoft Pro. Same features as Goldenseal, and mostly the same interface. But we’ve rewritten about 2/3 of the code.

Some large accounting packages use separate modules: people get the ones they need and run multiple apps. That would make marketing easier. However, using one database to feed multiple apps seems like a recipe for data corruption and disaster. Using a separate database for each app has even bigger problems. So, we’ll stick with the current format, with just one app and one company file.

All versions will use the same database structure, so it will be easy to move from one flavor to another. Just switch the app, and it’s good to go.

Dennis Kolva
Programming Director

Estimates, Icons & URLs (Aug 6)

This week our staff shifted gears again, and started work on Estimates. They have the most complicated interface in our estimating/accounting software, so it makes sense to tackle them now. Most likely it will take a few passes to get all the details finished.

The main estimating window has a row of buttons for dimensions, each with a small picture/icon. The first task was to get the icons to appear onscreen.

For 32-bit apps like the current Goldenseal, Macs store icons as resources inside the application. Our Windows version does the same, with the help of Apple QuickTime. Newer 64-bit frameworks take a totally different approach. Icons are now in regular graphics files, accessed with a URL. It’s just some text than can point to a web page, a file on the hard drive, or a resource file that’s buried inside the app.

Years ago, our staff used ResEdit to draw the Goldenseal icons, pixel by pixel. It took a few months, so we definitely don’t want to do them again. Fortunately, it wasn’t too hard to convert icons into the new URL format. We took screen shots, cropped them, then saved them into a couple hundred individual files.

There’s also another change: every resource used to have a ID number, but now it needs a file name and path. To handle that, we wrote a translator that links the old resource IDs to the new URLs. The icons now show up properly.

Larger pictures are more complicated. Right now, Goldenseal stores them inside the layouts as a PICT image. PICT used to be one of the most popular graphics formats, but now it’s totally defunct. Modern programming frameworks use .png, .jpg, .gif or .pdf files instead.

The only layouts with PICT images are in estimate dimensions. We’ll have to cheat and write one-time C++ code to place those correctly. Eventually we’ll add interface so users can paste in new images and move them around.

There’s one more place where the loss of PICT is an problem. Goldenseal lets users paste images into optional picture fields in some records. They are stored inside the company file as PICT data. So far we have not found any way to use them in Goldenseal Pro. Those images are in a dead, foreign language.

In the future, Goldenseal Pro probably will store user images as files in a folder somewhere. It’s more future-proof than adding raw data to the company file. Also, it will allow users to store scanned images and other big files, without making the company file enormous. The downside is that separate files can get lost more easily. URLs are great if nothing ever moves, but that’s asking a lot.

Updating our code to the 2020s takes effort, but it does have benefits. The URL system makes it much easier for us to open and save files. Not just the main company file: there’s also contracts, imports, exports, Save As Text. In the current Goldenseal, doing anything with files requires many lines of code and weird data structures that change every few years. Now it’s just a line or two and a simple URL.

We haven’t investigated the networking features in Qt yet, but the URL system probably will make that easier, too. It may help us create the ideal multi-user version: enter an IP address, and log into your company file over the web from any device.

Dennis Kolva
Programming Director