Goldenseal Pro Progress: Resources (Mar 23)

Goldenseal estimating and accounting software is built from three components. There is C++ source code that runs business functions and the user interface. There’s construction accounting and estimating data in the starter files. And in between, there are resources: text, layouts, icons and other program details.

The source code is compiled into machine language, with no easy way to see it. The estimating data is totally visible and easy to change. Resources are in between.

In the original Goldenseal for Mac, resources were built into the app file. Anyone could use an app called ResEdit to change them. One user actually converted all the text to Spanish. Other changes were possible if you hacked the right resources. Sadly, ResEdit never made it out of Mac OS 9. It was still possible to hack Goldenseal while it ran on PPC Macs, but the switch to Intel zapped all user access to resources. Meanwhile, the Windows version never had resource access at all.

We are still trying to figure how best to handle resources in Goldenseal Pro.

These days, the Mac hides resources inside what’s called a package or bundle. You can see the resources for any app: just right-click on the icon and choose Show Package Contents from the menu. Early on we wrote temporary code that exported all the resources out of the current Goldenseal, and into the Pro version. Those resources were in the bundle, and user accessible.

Apple really likes XML as a way to store data (it’s similar to the HTML that builds web pages). We tried XML at first, but didn’t like it. The text is hard to read: stuff like <tag><anothertag>blahblahblah</anothertag></tag>. Just one wrong punctuation mark, and it crashes. So, we switched everything to plain text. It’s easy to edit in Excel or TextEdit, and reads are 10x to 100x faster.

Qt also manages resources. It wasn’t hard to re-use most of the existing stuff when we switched over. Unfortunately, Qt hides them somewhere. If you open the app bundle, they aren’t visible. There may be some way to make Qt resources act more like Cocoa, but so far we haven’t discovered the secret.

It may be a moot point. Apple has toughened its security: to run Goldenseal Pro on newer Macs we must jump through hoops to guarantee that the app comes from a legitimate source. That probably means that users can’t hack app resources any more. The changes will be considered a security threat and it just won’t run.

We could store resources and other data outside the app bundle, but that makes installation and updates more difficult. Having just two things to keep track of (app and company file) is simpler for everyone.

Aside from the Goldenseal app, there is also your own accounting data, stored in your company file. One of the first things we wrote was a translator which converts existing Goldenseal files into Goldenseal Pro format. It even makes a few improvements along the way.

There is one piece of data that gets lost in the move: pictures. The current Goldenseal stores them in an obsolete format (PICT) which neither Cocoa nor Qt support. Fortunately, there are websites that convert PICT files to .jpg, .png or whatever. When we launch the Pro version we’ll provide links and instructions so you can salvage any pictures you may have stashed away.

Dennis Kolva
Programming Director
TurtleSoft.com

Goldenseal Pro Progress: Layouts & Actions (Mar 16)

After two weeks, Custom Layouts is starting to look like something. It loads fields. You can drag them around on the screen. Click a tool, and you can add a new field. The app is already further along than we ever got with the Cocoa version.

Unfortunately, there isn’t any Qt sample code for doing a MacDraw-like environment. We’ll have to create most of the interface from scratch. None of it is real hard to write, but there are many fussy details. Undo in particular is a PITA.

The original Custom Layouts command needed at least one programmer-year to finish. Qt will be faster, but most likely it will take 2 or 3 months to get everything working well.

This stage of programming is a bit like starting rehab work on an old house. Sometimes you have to knock a few holes in the walls, just to see what the guts are like. Then you can get a better estimate of what’s needed. We kinda just did that with Custom Layouts. Now there’s a clear scope of work, and we know it’s doable.

Speaking of knocking holes, I must share a construction tale from an Ithaca rehab project in the 1980s. It was a small, odd house that had been owned by a custodian who worked at Cornell. The new owner wanted to remove a non-bearing wall to combine two rooms. I tried knocking holes to check for wiring, but couldn’t. It was plaster over an old door, with concrete fill behind it, then wood scraps nailed together, then plaster on the other side. Demolition was like an archeology dig through all the random building materials that someone brought home from work. Bricks, putty, roofing tiles, wadded newspaper, grout, tar, woods of all sorts. Too bad YouTube didn’t exist back then, because the demo (or the construction process) would be an amazing time-lapse video.

Anyhow, next on the agenda for Goldenseal Pro is the final untouched mode: action commands (Reconcile, Pay Bills, Deposit Funds, Project Billing, Sales Billing, Write Payroll, Job Costs). It definitely will be hard, because the current code sucks. Giving a complete overhaul to the interface has been on the to-do list for more than a decade.

The rest of Goldenseal uses Custom Layouts to arrange fields on the screen. It makes setup easy for our staff. It also lets users make changes. Action screens currently use a different system that is awkward for us. Users can’t change anything there at all. Since we have to rewrite anyhow, now is the time to switch them over to the Custom Layouts system.

Our staff probably will be working on the two areas in parallel for a while. If it gets too frustrating, we’ll take a break and work on other, simpler loose ends.

Meanwhile, this winter I’ve been doing major interior work on my house. In 2 or 3 weeks it will be ready to list and sell. This area is in a seller’s market for single-family homes, so it probably will go fast. I’m already looking at fixer-uppers to replace it.

The current house was built in 1910, right after the chestnut blight came through. Chestnut lumber was cheap for a while, so they used it for all the trim work. I wouldn’t mind finding another house from the same era. Chestnut looks great, and it’s easy to work with. Too bad it’s now a fossil.

If the next house needs trim or flooring, I’ll put in ash. This century’s cheap hardwood caused by a major species loss.

Unfortunately, the whole selling, buying and moving process may cut into programming progress for a couple months. We’ll see.

Dennis Kolva
Programming Director
TurtleSoft.com

Covid-19: Mutations (Mar 8)

Life is not easy when you’re a coronavirus. If you can even call it a life.

You’re tiny. Too small to see in a microscope. Rock bottom on the food chain. You can’t move, and you’re delicious. Rich in protein, plus tasty fat and sugar. Happily snarfed up by bacteria or dust mites. Easily killed by UV, or just about anything else.

You only have one trick: sneak into the right vertebrate’s cells, and you’ll reproduce like crazy. But even that’s just temporary. In days or weeks, their immune system will learn how to stomp you. Eventually, the entire species will be resistant. The only way to survive long-term is to mutate, and change enough to infect again. Or better, jump to a new species and start over with fresh victims.

We are already seeing that with Covid-19. New versions keep popping up. Some reinfect people who survived earlier versions. Some are jumping to minks, cats, other species.

This is yet another reason why it’s a whole lot better to nip contagious diseases before they become pandemics. Fewer infected people means fewer mutations, and lower risk that the disease recurs for decades. SARS and MERS both were caught in time. Now SARS is gone forever. MERS is gone if you don’t hang out with camels.

It’s way too late for Covid-19 to ever be contained. The question is, what happens next?

For the short term, vaccinations are starting to kick in. They will help slow down the spread. Life will probably be close to normal this summer.

Unfortunately, Covid-19 will keep making new mutants. Most likely, there will be reinfections and outbreaks for years or decades. It’s established too deeply, now.

The only good news is that co-evolution is likely to happen. A virus spreads faster when their carrier is out and about, not deathly ill. If they kill the host, they also die. That means mutations and natural selection gradually make a disease less serious (but faster-spreading).

Warts are the ideal end point, from the viral point of view. Common colds are almost as good: infect everyone, rarely deadly. There already are four coronavirus strains like that (229E, NL63, OC43 and HKU1). Covid will eventually settle down to be the fifth.

Sadly, the process of becoming less deadly takes years, and it’s not 100% reliable. Folks probably will need an annual Covid booster to go along with the flu shot, at least for a while. Face masks may be a long-term reality.

In 2009, the US launched the PREDICT program. It set up a global network of labs and researchers to act as an early-warning system for pandemics. It cost about $20 million a year. Funding for that and other international health programs was cut in mid-2019. That was a 5 or 6 trillion dollar mistake just for the USA.

In this century, there have been 3 serious Coronavirus outbreaks: an average of one every 7 years. Fatality rates of 34% (MERS), 10% (SARS) and about 1% (Covid). Toss in Zika and a couple of Ebolas, and it’s one outbreak every four years. That’s not even counting influenza and other random diseases.

Humans are a densely packed and mobile species. Pandemics are nature’s way to fix that sort of overpopulation.

We probably should do more stuff like PREDICT, not less. Along with the sickness, dying and inconvenience, pandemics are very expensive.

Dennis Kolva
Programming Director
TurtleSoft.com

Goldenseal Pro Progress: Reports & Layouts (Mar 1)

Our estimating and accounting software has five different modes. Three of them are now working: data entry, Find command, and reports.

That doesn’t mean the project is 60% finished. Our rule of thumb: this stage is the first 1/3 of the work. The second 1/3 is finishing all the little details. The final 1/3 is testing and debugging.

Building software is similar to building a house. We did foundation work last Fall. Now three wings out of five are framed up and closed in. The app is starting to look like the architect’s drawing, but it’s not too late to tweak the floor plan. There is still plenty of utility and finish work to do.

It took a couple months to get the basic app window set up. Data entry screens needed a couple more months. Find and reports only required a week or so apiece. The two remaining modes (layouts and action screens) will be somewhere in between.

While working on the new Qt code, we often step through the old, partly-finished Cocoa version to recall how it works. No sense in re-inventing any wheels. If there’s nothing useful in the Cocoa app, we can also go back and step through source code for the current Goldenseal.

Back when we stopped work on the Cocoa version, I estimated that it was 1/2 to 2/3 complete. However, stuff keeps turning up that was never even started. That estimate probably was too optimistic. While struggling with Cocoa every day, I guess it was hard to see what a morass it was. Not seeing the forest for the trees.

Last week our staff worked on Reports. To see a report in the current Goldenseal, you choose something from the Reports menu at the top of the screen. It’s way over on the far right, so people often miss it. In Goldenseal Pro, there is a Reports button right on the main window. It makes navigation easier. From then on, the interface is similar.

We just started on the 4th mode: Layouts. It lets you change the appearance of data entry screens, printed forms and reports. In the current Goldenseal you get there via Options–Custom Layouts. Another nifty feature that is tucked away and hard to find. In Goldenseal Pro, it also gets a button on the main screen.

Custom Layouts was one of the first components we built in the current Goldenseal, back in the mid-1990s. It allowed the project manager (me) to design the app, while the programmers were writing C++ code to make it work.

It would also be nice to have Custom Layouts right away in Goldenseal Pro. Then we can adjust the current layouts for bigger screens.

Apple has sample source code for a drawing app that is very similar. We had high hopes it would make the work easy for the Cocoa version. Unfortunately, the sample code was old and unusable. As the project bogged down, we finally decided to skip Layouts entirely for version 1.0.

Based on results so far, I am optimistic that Custom Layouts will be easier to create in Qt. We’ll know better about that in a few weeks.

Goldenseal’s layout mode is similar to the MacDraw program on early Macs. That app never made it to OS X. Too bad, since I had useful data in MacDraw files: house plans, travel maps, flow charts, ad layouts. There was never a great replacement.

If Qt is not too much of a struggle, it will be tempting to spin off a MacDraw clone some day.

Dennis Kolva
Programming Director
TurtleSoft.com