Goldenseal Pro Progress- Windows & Macintosh (Jan 28)

Our staff is still working on code for breakdown tables in Goldenseal Pro for Windows. The starting point was GridCtrl sample code, available online. After removing 2/3 of that, we are now revising the remainder to include the best ideas from our original table classes (plus Cocoa’s NSTableView).

It’s possible we should have just started from scratch. But Windows and MFC have many quirks, and most likely we would have spent many frustrating weeks or months learning those the hard way. Better to use something that actually works at the start.

Meanwhile on the Mac side, it’s not looking good for the future of Objective-C and Cocoa.  All signs point to them being retired soon, and replaced with the new Swift language and SwiftUI framework. Moving to Swift would be much harder than Cocoa, well beyond our abilities.  So, it’s not looking good for the future of Goldenseal Pro for Macintosh either.

Microsoft is working on WinUI 3, which is a grand plan to modernize its developer tools. In theory, WinUI 3 will allow us to gradually replace our GUI code with more modern controls. They’ll look better, work more smoothly, and be more compatible with future OS versions.

Of course, Microsoft is a big corporation that doesn’t always deliver on its promises. Sometimes it produces products that suck. But at least their process is visible so we can plan around it. As turtles living under the feet of elephants, it’s kinda nice to know where they are headed.

Meanwhile, we filed a support incident with Apple Developer Tech Support in November, trying to get better info about their plans for Cocoa and Objective-C. We also emailed

Apple DTS replied in late December that they don’t release future plans.  We then asked if anyone at Apple will talk with small developers like us. Yesterday they just replied again that they don’t release future plans. We didn’t hear from Tim or his assistants at all. We are still trying to find someone else at Apple who actually listens to developers, but it may be a futile task.

Back in TurtleSoft’s first decade, Apple had a dedicated manager for the A/E/C market (architects, engineers and construction).  Besides that, there were several other Apple employees that we could talk with. All that evaporated when Apple almost died in the late 90s, and it wasn’t replaced when they became prosperous again.

Swift and SwiftUI look great for building small phone apps.  They are not good for building large desktop apps such as ours.  We really need easy linkage to C++, and a promise that it won’t require major rewrites every 5 years. Windows delivers all that: if anything they have too much backwards compatibility. Apple has been the opposite, and they are getting worse at it.

It wouldn’t hurt for our die-hard Mac users to contact Apple, and let them know that you still need specialty apps that run on the Mac desktop. Otherwise, the future appears to be a Macintosh that is pretty much a big-screen iPad. Lots of pretty little apps but no software for business.

Dennis Kolva
Programming Director


Goldenseal Pro Progress- Windows Tables (Jan 16)

In December our staff discovered a batch of C++ code online that makes spreadsheet-like tables for Windows. It didn’t take long to add their sample code to Goldenseal, and get it displaying a spreadsheet on the screen. It looked a lot like Excel for Windows 95, without the formulas. Not surprising, since the code was written back then.

Getting their code to be fully usable for our needs has been more challenging. Fortunately, we’re making steady progress on that. It really helps to see all the source files, and be able to change it.

First step was to remove unnecessary features. The ideal way to do that is to remove them one at a time, and test the code to make sure it still works after each removal.  Sadly, everything was too interconnected for that. So we hacked away and deleted everything all at once. Then spent a week fixing hundreds of error messages, until it worked again. Very similar to the demolition phase in a gut/rehab project.

With the raw framing exposed, we are now adapting the code to better suit Goldenseal’s needs. By the time it’s done, I suspect almost all will be rewritten. Some of the work is updating 90s code to modern standards. Some is plain old refactoring and redesign. For example, they store cells in columns then rows, but Goldenseal works better if they are in rows then columns. They use 0 for the first row, and we’d rather start with 1 like normal humans.

When we worked on the Mac version, Apple’s NSTableView class did have better overall design than the original Goldenseal. As we revise the Windows tables, it’s a chance to work in some of those improvements. This is the third batch of table code our staff has created, and each one is slightly better.

20 years ago, we thought Goldenseal would last for decades without big rewrites. Now we are more cynical realistic. The goal now is code that works well for the moment, and isn’t too difficult to adapt in the future.

Dennis Kolva
Programming Director



Payroll Withholding Tables- US & Canada (Jan 3)

2020 has been a double whammy year for payroll tax calculations.

IRS changed the W-4 form. Instead of the number of exemptions, it now uses a complex calculation that involves dependents, student loans, multiple jobs and gross income. The only good news is that you won’t have to deal with any of it until the first time you hire someone in 2020. Then it’s just a one-time setup hassle.

We had to add a second set of tax tables to support the new forms: instructions here. Payroll will be more complicated for the next 5 or 10 years, until the day when IRS stops allowing the old forms. Then we can delete the old tables, and it will be simpler again.

Meanwhile, Canada also made a big change, replacing the personal deduction with a step table. We had to create a custom option in 2002 just to calculate Canadian withholding, and this change breaks it.

Revenue Canada has an insanely complex system to calculate withholding. The formulas use almost every letter in the alphabet, plus K1 to K4, T1 to T4, and 20 multi-letter codes. Ten different TurtleSoft employees worked on it and failed, before one finally figured it out. We are still slogging through the instructions to see how to make the new setup work. One of the calculation options for US states looks promising as a substitute.

As math nerds, we get especially frustrated by complexities like this, because it’s totally unnecessary. Tax dudes, you only need a few numbers to make it work!

Six US states have a simple flat tax rate for everyone. Most have a deductible, so taxation starts at some income greater than zero.  If you graph tax withheld vs income, it will be a straight line. Two numbers are enough to define that: one for the zero point, and one for the slope. In algebra, it’s y = a + bx.

Sales tax, gasoline tax and most other taxes are regressive. Poor people pay a higher percentage of their income on them, because rich people spend more on non-taxable stuff like school tuition and tax shelters. To compensate, it’s reasonable to have a progressive income tax. That means higher earners pay a higher percentage. If you graph tax withheld vs income, it will be a curve.

Mathematically, you can define progressive tax curves with three numbers: zero point, slope, and curvature. In algebra, it’s y = a + bx + cx^2 (the ^2 means x squared).

However, using exponents makes it too scary for most people. The easiest alternative is a step table, with different rates for each range of extra income. If you graph payroll tax vs income, it will be a series of straight lines that approximate the desired curve. Data-wise, it only needs two numbers for each step: start point and slope.

For any desired ‘tax curve’, it’s possible to make a series of steps that are accurate enough for tax policy. Most US states do exactly that, using anywhere from 2 to 12 steps.

Unfortunately, a few states add all sorts of weird stuff to make it more complex. Connecticut is an extreme example, with 13 different step tables arranged 6 layers deep. Presumably the tax committee was stoned when they created the Table C 3% Tax Rate Phase-Out Add-Back. Canada has a related problem: they really need some good tech writers to redo the tax guide, so humans can understand it.

Thankfully, we only spend a few days a year on payroll tax tables. Our staff will soon be back to more productive work, programming regular tables for Goldenseal Pro.

Dennis Kolva
Programming Director