Goldenseal Pro & Mac Catalina- Part 3 (Oct 10)

Our staff restarted work on Goldenseal Pro for Windows last week, and it’s moving right along.

There are two cross-platform libraries that use one code base to run for both Mac and Windows: QT and wxWidgets. We checked them 5 years ago, but eventually decided to write native code instead. Last week we revisited them, since they might be a way to get a Mac version out more quickly. Both have improved, but they still have a steep learning curve. Their end results still don’t look as good as native. So I think we are better off continuing with MFC for Windows, and then returning to using Cocoa for Mac after that is finished.

One of our staff members posted to Apple’s Cocoa Developer mailing list last week, explaining the problems we have had. Several other companies responded with their own complaints.  We are not alone.

Apple has earned many, many billions from the iPhone. They probably feel a bit of hubris because of that. But maybe they will respond to developer feedback, and make Cocoa easier to use before we return to programming the Mac version. It would sure be nice for the work to go faster.

At the moment, the estimated timetable for Goldenseal and Goldenseal Pro looks like this:

2019:
Macintosh– Goldenseal does not run on Catalina (OS 10.16). It does run on Mojave (OS 10.15) and anything earlier.
Windows– Goldenseal runs on any current or recent Windows OS (XP, Vista, 7, 8, 8.1, 10). Some annoying screen problems caused by QuickTime dependence.

2020:
Macintosh- no change.
Windows
– Goldenseal Pro released for current 64-bit Windows 10. Maybe also for some recent Windows versions. Easy platform swaps for Mac users.

2021 ?????:
Macintosh- Goldenseal Pro released.

Dennis Kolva
Programming Director
TurtleSoft.com

Goldenseal Pro & Mac Catalina- Part 2 (Oct 2)

I sat down with a spreadsheet this week, and tried to estimate how long it will take to finish the Mac version of Goldenseal Pro. It said 6 to 8 months of small details, plus whatever new problems arise with the Cocoa library. Based on past experience, that’s probably another 2 or 3 months. Plus whatever I forgot, which could easily double the time estimate.

I also checked our past sales data: 64% were Goldenseal for Windows. Only 36% Goldenseal for Mac. That surprised me. I though it was closer to 50/50.

Our staff has struggled with Apple’s Cocoa library for more than 3 years, under pressure to finish the Mac version of Goldenseal Pro before 32-bit support ends in OS 10.16 Catalina. For the past two years we abandoned work on the Windows version and focused exclusively on Mac, trying to meet that deadline.

We failed. It wasn’t even close.  There has been far too much time spent on weird Cocoa problems. Not enough time spent on actual Goldenseal stuff.

It’s time to stop short-changing our Windows users. Our staff is shifting gears. We just put the Mac version on hiatus, and will focus on Goldenseal Pro for Windows until it is finished.

The Windows MFC library is much more compatible with our code. It uses the same programming language (C++). Its basic design is more similar. MFC and Cocoa are both 30 years old, but Microsoft has done a very good job of updating their code. Probably better than Apple has done with their Cocoa library.

Even better, some of the prep work we’ve done on the Mac version also applies to Windows. I would not be surprised if we finish Goldenseal Pro for Windows in less than a year. With hindsight, we should have followed this path two or three years ago, or at least kept working on both in parallel.

Meanwhile, Apple is planning to switch from Intel chips to their own ARM chips in 2020 or 2021. They are also working on something called Marzipan that merges iOS (for iPhone and iPad) and Mac OS. Apple has not announced details for either project yet, but odds are good that the changes will make life more difficult for us. One way or another. Maybe even impossible. That is yet another reason to delay the Mac work for a year. Better to throw away 3 years of effort if we are doomed, rather than 4 or 5.

Unfortunately, this decision means that our Mac users will need to stick with existing hardware that can run 10.15 Mojave or earlier, at least for a while. Every model currently available is fine, but future Macintosh models probably won’t support 32-bit apps like the current Goldenseal. I’m sorry. Unfortunately, the best we can do is make it easy to switch to the Windows app when that is ready.

Dennis Kolva
Programming Director
TurtleSoft.com

 

 

 

Goldenseal Pro & Mac Catalina (Sep 26)

Apple plans to release the latest version of Mac OS (10.15 Catalina) in October. It will not support 32-bit apps like the current version of our Goldenseal estimating/accounting software. They just won’t run.

This is not a surprise. The change was on the roadmap more than 5 years ago, which is when we started work on Goldenseal Pro. Back then, 5 years seemed like plenty of time to get it done. Unfortunately, the project was much bigger than expected. Our resources to finish it have been smaller than expected.

I apologize for the delay.

Catalina is a big release. Apple has been updating their own system code and apps from 32-bit to 64-bit, and it is not an easy process. Many testers are reporting that the beta versions have been very buggy. Odds are good that the first 10.15 release will still have some of those bugs. It’s probably a good idea to wait for version 10.15.1 or 10.15.2. Maybe even later.

In the past, the problematic big releases have been followed by a small update a year later, with code that is much more stable and reliable. Back in the cat era, Leopard was buggy, while Snow Leopard was fantastic. Ditto for Lion and Mountain  Lion, then Sierra and High Sierra in the current California geography era. It’s a good guess that next year’s 10.16 will be similar. Will Apple follow the same naming system and call it Santa Catalina?

Some Macintosh apps will never be updated to 64-bit. The previous updates to PPC, OSX and Intel chips each killed off about half of the small-to-medium Macintosh apps, plus a few big ones. Most likely the same will happen with this transition.

Frankly, if TurtleSoft had a time machine, we would hop right in and set the dial for 2014. Then hit the Undo button, retire Goldenseal, and do something much more fun than learning Cocoa and rewriting 2/3 of the code.

However, in the present timeline Goldenseal Pro is far enough along that we will finish it.  It does have some big improvements that we are eager to start using.

Dennis Kolva
Programming Director
TurtleSoft.com

 

 

Goldenseal Pro Pricing (Sept 12)

From 1987 until 2000, TurtleSoft sold Excel templates for construction estimating and accounting. They were very profitable for about a decade. Demand was huge, because many construction businesses were just starting to computerize. Each template took a year or less to develop, so startup costs were minimal.

Unfortunately, templates also had problems. For one thing, Excel just isn’t designed to create easy-to-use apps. Users required almost four hours of phone support, on average, to get things running. Excel itself had a bug that sometimes zapped our code. Even worse, some things were just not possible to do in a spreadsheet. So, in 1993 we started writing a C++ app that later became Goldenseal.

Building desktop apps is hard. It took more than 10 programmer-years (and 7 real years) before Goldenseal 1.0 was ready to release. Template sales paid for the first 2/3, but the rest was financially scary. Between 2000 and 2015 we invested another 10 programmer-years in new features, bug fixes, and system updates. That got it up to the current version 4.96.

The hardest updates were for the Mac: moving from OS 9 to OS X, then from CodeWarrior to Xcode, then from PPC to Intel. Each transition took a few programmer-months. We hoped that the 64-bit update would be similar, but that was not to be. So far we’ve spent 4 or 5 programmer-years on the conversion. It’s in the home stretch, but Goldenseal Pro is still not finished.

As we inch towards completion, it’s time to think about how to price and distribute the new product.

For the past 32 years, TurtleSoft has used the same pricing model. You pay one up-front payment, and get a perpetual license, a printed manual, plus free lifetime support. Updates are optional, and not very expensive.

That worked fine when many companies were just starting to computerize. Unfortunately, the software industry has grown mature.  New users are scarcer, so it’s harder to get a steady income from first-time sales. We found that out the hard way in 2007 to 2010, when construction collapsed.

These days, Microsoft, Adobe and Intuit have switched to online services as a way to keep income more steady. You pay them a monthly fee to use their software.  Apple is also moving in that direction. It’s called SAAS (Software As A Service).

SAAS probably is not a good fit for Goldenseal Pro. For one thing, it takes time to set up. It also requires an Internet connection for users to retrieve data and/or the app.  Our main audience is builders and remodelers. They often are mobile, or rural, or on jobsites without steady Internet.

SAAS also requires providers to run a server farm, and worry constantly about security. Based on past history, it seems almost guaranteed that there will be data breaches and/or outages. We would like to keep the free support going, because it provides good feedback for future product design. And we really don’t want hundreds or thousands of angry users to be calling. We are just not big enough to run a totally bulletproof set of servers. Nobody is.

I didn’t start this topic with a specific solution in mind. It’s a bit of a dilemma. Where should TurtleSoft go from here? Comments are welcome.

Dennis Kolva
Programming Director
TurtleSoft.com

 

 

 

 

Goldenseal Pro Progress- Outline View & ARC (Aug 30)

Last week I mentioned a mystery problem we were fighting: the outline view in our main window used to work OK. Then suddenly, it didn’t.

Folks on the Cocoa-dev mailing list were very helpful, with many suggestions on what might fix it. We tried them all, but nothing worked. Along the way our staff learned way too much about Apple’s memory system. It’s called ARC (Automatic Reference Counting). Developers on the list think it’s the bees knees. It is certainly better than the old manual system. Except that ARC was deleting our outline view, even though code was there to prevent it.

These days, most programming languages manage memory automatically. Stuff sticks around as long as you need it, then disappears when it’s no longer needed. Popular languages like Java, Python and C# use “garbage collection” to accomplish that. It’s probably not the ideal way to manage memory, but it works fairly well. And it makes life much, much easier for programmers.

Most of Goldenseal is written in C++. It is considered a difficult language, mostly because it doesn’t have garbage collection. On the other hand, C++ does give better performance. It’s also fairly easy to debug. There are many ways for programmers to manage memory reliably, and the language keeps improving every year.

Using C++ is a bit like, say, using power tools. Sure, they have sharp whizzing parts that can easily remove your limbs or digits. But they include guards and safety features. If you use power tools carefully, they get the job done safely.

Apple’s ARC seems to be somewhere in between C++ and Java. It promises easy memory management, but there are many “gotchas” that we discovered this week. It is not easy to debug. It definitely is not as simple as the garbage-collected languages. That applies both to the Objective-C language that we use for the new Goldenseal code, and to Apple’s new Swift language.

I hate to criticize a trillion-dollar company, but our life would be way easier if Apple used C++, Python, Java, or pretty much any other programming language. There’s a reason everyone else uses those other languages.

At any rate, we did find a fix. Our code worked OK until we made changes in June, and we can revert those changes. Theoretically it will leak some memory, but it won’t be very much. It won’t happen at all for most users.

With hindsight, we could have just reverted right away, and saved two weeks. But we learned stuff along the way. It was good to find out we hadn’t done anything obviously stupid.  If our staff did cause the problem, it was something extremely subtle. It may even be a bug in Apple’s ARC code, though it’s not worth another week of digging to find out for sure.

At least Goldenseal Pro is back on track. This is not the first time we’ve bogged down in Cocoa complexities, and lost weeks or months.

Dennis Kolva
Programming Director
TurtleSoft.com

Goldenseal Pro Progress- Outline View (Aug 23)

A while back I mentioned how easy it was to set up the Goldenseal Pro outline view. It replaces the menus at the top, and does an excellent job of organizing things. I assumed that NSOutlineView probably was so reliable because it also runs the Macintosh Finder.

Unfortunately, I spoke too soon about that. This week we opened a few items, and the outline view stopped working. Clicking did nothing.

Usually our staff is very methodical. We add new code, make sure it works, and then commit it to the source control system. Nearly always, the process works well. Stuff improves, step by step. Unfortunately, a few times a year we miss something subtle, or change something with unintended consequences. It becomes a bug that rears its head weeks or months later. This is one of those times.

The first thing we did was check the weekly full-project backups, to see when it broke. Recent backups also had the problem. The June 2 backup worked OK. The June 9 backup didn’t. Most of the changes that week were related to bank transactions, and unlikely to affect the outline view. That week we did add a new NSSplitView to make the window resizable. So we removed that, but it didn’t help.

Next step was to rebuild from source control, to narrow it down to a shorter time range. June 7 was OK. June 8 wasn’t. Most of the changes that day were just accounting stuff, but we also started to add “weak” references. It’s an Apple thing that prevents memory leaks. That seemed like the smoking gun.

To test it, we set some breakpoints. Sure enough, the outline table was deleted randomly, after running a while. In earlier builds it stuck around. It didn’t work because it wasn’t there.

Apples ARC (automatic reference counting) is hard to debug. In C++ you can set a breakpoint right where an object is deleted, to see what killed it. Objective-C with ARC does the deletion some random time later. That makes it very difficult to find the cause of death.

Our staff spent a couple days stepping through code and reading more about ARC. It’s more complicated than we first thought. One website describes ARC as “kind of like a Japanese B-horror movie”. That seems accurate. We spent several weeks in April and May, struggling with a similar problem in the tab view.

Today we got too frustrated, and gave up for a while. It’s time to get back to more productive programming.

The Apple developer list is often helpful for odd problems, so we just posted a message there. This is the kind of enigma that may be solved in a dream at 3 AM, days or weeks later. Worst case, we get one support incident with Apple per year. It may be time to use it.

Dennis Kolva
Programming Director
TurtleSoft.com

 

Goldenseal Pro Progress- Links (Aug 15)

Goldenseal stores many different types of business data. There are customers, suppliers, employees, projects, purchases, estimates, sales, payroll and bank transactions. Then another 40 or 50 special items like change orders and equipment hours. Then another 70-odd small details like sales tax rates and payroll tax tables.

Navigating around in that sea of information is challenging. Goldenseal makes it easier by providing may ways to see linked info via a click or menu choice.  For example, a material purchase has quick links to the supplier account and job account, plus the bank transaction that paid for it. Project accounts have buttons to view job costs, contacts and other details. Pretty much everything has a quick link to something else that’s related.

The current Goldenseal version has separate windows for each type of data. When you click a link, it opens another window for it. Most of the windows are about half the size of a laptop screen, or 1/6 of a big desktop screen. It’s easy to end up with 20 or 30 Goldenseal windows scattered about. Not the ideal way to manage a virtual desktop. It’s kinda like strewing papers across your actual desktop.

Goldenseal Pro uses an outline and tabs to organize things into a single window. You also can open separate windows just like the old style, but you probably don’t need to. The new interface is the virtual equivalent of putting your paperwork into folders and binders. Tidier. Quicker access.

With the new interface, the question is: how best to show linked records. There are five choices:

* Open a new window, just like the current version.
* Open a smaller, simpler window, with just one record and no fancy controls.
* Open a temporary panel that drops down in front of the current record.
* Add a tab for the record, and bring it to the front.
* Add a tab, and leave it somewhere behind the current record.

The past couple weeks, our staff has been experimenting with all of them. We are still deciding which are the most useful and the least annoying.

Actually, there’s a 6th choice. For a while, we showed breakdowns in a slide-out drawer on the right side. That would also be a great way to view linked records. Related and connected. Drawers used to be a standard Apple interface feature, but they are deprecated. Goldenseal Pro used them for a while despite that, but ran into bugs we couldn’t fix. An attached window may still be the ideal solution for linked records (and breakdowns), but it won’t happen for Goldenseal Pro 1.0. It will be complicated to program it from scratch, and the deadline for 64-bit conversions is coming soon.

This sort of interface design needs a few weeks of real-world testing and usage. Link display may be something that deserves a Preferences option, or a way to control how it looks via a modifier key.

Dennis Kolva
Programming Director
TurtleSoft.com

 

 

Goldenseal Pro Progress Report (23 Jul)

Progress on Goldenseal for Mac has been slow but steady. Most of the basics are finished, but there are many small details still left to test and fix. We are testing it with TurtleSoft data, but the software is not good enough for daily use, yet.

Our staff is also still working on the shopping cart for SmartKnives. We bought many vintage Swiss Army knives and Leatherman tools from airport confiscations in the years after 9/11. Now it’s time to sell them to collectors. Setting up the e-commerce has taken longer than expected. Unfortunately, it will continue to consume time between now and year end.

In the short run, it’s going to delay completion on the first release of Goldenseal Pro for Mac. However, programming is hard, and very few people can keep it up full-time. Taking breaks to do inventory counts and photography is a good break. A chance for ideas to percolate.

In the long run, the extra income will allow us to pay subcontractors for the Windows version and  multi-user code. Our staff has less experience in those areas, and there are plenty of contractors able to do the work. It will take time to ramp up software sales, and this is something to fill in the gaps.

We came close to launching SmartKnives in 2015. The plan then was to subcontract the entire upgrade, so it was something to do while we waited. That was before we discovered how few people actually know how to write 64-bit software for Macintosh. It was long before we gave up on contractors, and tackled the Pro update with our own staff. That’s when we discovered the reasons why competent Cocoa developers are so rare.

In the mid 1990s we talked with some Venture Capital folks, considering a quicker and more massive launch for the original Goldenseal. One of their requirements was sufficient “barriers to entry”. Essentially, it means you need patents or some other protection to make sure there won’t be too much competition. They saw QuickBooks looming, and thought it would eat our lunch and only leave crumbs. It did.

We have struggled with Cocoa the past few years. But what keeps us going is the fact that it’s difficult for everyone. Cocoa is just about the only way to write Mac software that will run on Catalina. QT is an alternative, but that also is no easy road.

When we finally finish this thing, it will put us behind that barrier to entry.

Dennis Kolva
Programming Director
TurtleSoft.com

 

Goldenseal Pro Progress- Leaks & Crashes (Jul 5)

Our staff is back at work on Goldenseal Pro. The first thing we faced was a new problem while editing list items. The OK and Cancel buttons used to work fine, but suddenly they didn’t.  It turned into a journey down the rabbit hole of Cocoa memory management.

Memory is a general problem for all programmers. Apps need to use many small chunks of RAM: thousands, sometimes millions of them. If you don’t delete them when done, it’s a memory leak. Leaks cause the app to gradually use up more and more memory space. Eventually it will get slow. Pile up enough leaks, and it will crash. Web browsers often do that.

Preventing leaks is not easy. Delete something too early, and the program will fail when you access a long-gone bit of memory. Usually the app crashes from that, but sometimes it reads corrupted data and causes a hard-to-fix bug. Wait too long, and there’s no way to go back to tidy up.

The C and C++ programming languages are considered “hard” because they require programmers to manage raw memory.  On the other hand, most newer programming languages do the memory management for you. Usually that involves periodic garbage collection: automatically deleting objects from memory, when they are no longer needed.

Apple’s Cocoa framework started out by requiring programmers to manage their own memory, just like C++. It then added its own memory manager in 2010. Rather than garbage collection, Cocoa uses something called ARC (automatic reference counting).

We turned on ARC when we first started programming Goldenseal Pro for Mac. Sometime in the past year or two it was accidentally turned it off, possibly during an Xcode update. The setting is buried in a list of 200+ other build settings, so it’s easy to overlook.

Removing ARC caused no noticeable problems, since the app was never used long enough to show leaks. Finally we noticed the setting this March, and turned ARC back on. That broke the buttons, and a few other things.

Our staff has worked with ARC long enough now that I feel confident in saying it’s the worst of both worlds. Yet another complaint about Cocoa.

It’s possible to write code in Python, Java, Javascript or other garbage-collected languages, and simply not worry about memory. It’s all taken care of for you. During run time there may be weird multi-second delays as the app cleans up memory, but it’s a small price to pay for convenience.

It’s also possible to use C or C++, and manage memory reliably. Many tricks exist to make it easier. We used them for the original Goldenseal, and it almost never leaks or crashes.  Recent versions of C++ provide even better tools for managing memory. We use them in any new code we write.

With its in-between approach, ARC is definitely not mindless. It makes you decide whether to make connections “strong” or “weak”. It sometimes deletes things unexpectedly. It also is hard to debug. There are tricks to help track down memory problems, but nothing as simple as in C++.

Despite all that, the buttons are working again. Then for a while, the app crashed when editing a second list item. That is fixed too. Both were general “object lifetime” problems caused by ARC. They also applied to code in other places, so all those are also fixed now. Sometimes it’s one step backwards, two steps forward.

Dennis Kolva
Programming Director
TurtleSoft.com

 

 

Apps vs Web (Jun 28)

Our staff took a short break from Goldenseal Pro, the past couple weeks. Instead, we’ve been finishing up the shopping cart for SmartKnives.com.  It’s almost done. A contractor did most of the work, but we needed to import inventory data, and tweak the appearance.

As app developers, it has been interesting to visit the world of e-commerce and website development.  Things are very different there.

When building an app like Goldenseal Pro, programmers spend most of their time in source code. For us it’s a couple thousand text files, mostly in the C++ programming language. Some of the files are 25 years old. We make life easier by writing clean code, and adding comments to explain what’s going on. When something doesn’t work, there’s a debugger that shows what is happening, line by line. Most of the code is very well polished.

App developers also use libraries, usually written by some big entity like Microsoft or Apple. Some libraries show their source code, and some don’t. It’s always harder to work with code written by other people. It’s even harder when the source code isn’t visible. But, lots of people use the same libraries. For most problems, there usually is an answer on Stack Overflow or a developer forum.

Web development is much crazier.

It’s possible to create simple web pages by just writing some html and css text files. But, to accomplish anything complicated, programmers must use layers upon layers upon layers of other people’s code. Most of it is open-source. Most is in a state of utter chaos.

App developers occasionally make hacks- an ugly bit of code that does the job. It’s the duct tape of the programming world. Eventually we refactor them into good, solid code.

E-commerce code is almost entirely hacks. It’s an empire built entirely of duct tape. No debuggers. Lots of poorly written code that is rarely fixed. Lots of guessing.

It will be good to get back to the comfort zone of Goldenseal Pro source code. We’ll probably appreciate the Cocoa libraries more.

Dennis Kolva
Programming Director
TurtleSoft.com