Goldenseal Pro Progress Report (Oct 20)

On the Mac, Goldenseal Pro now shows data entry windows: complete with fields, titles and buttons.  That is pretty much the specs for the first draw stage of six. It feels like we are making decent progress, and getting ‘up to speed’ with Cocoa.

The second draw is to link in the fancier aspects of the human interface: tables, having controls interact with each other, and lots of little stuff like colors and fonts and sounds.  Originally, we planned to use the same basic approach as the current Windows code, but now we are considering a more complete redesign. There is a lot of old clutter in the code base, which may be easier to just replace entirely.

It makes sense to get the Windows version caught up to the same place, before deciding how much GUI code to rewrite.  So we have shifted gears, and are currently delving into Visual Studio and Microsoft Foundation Classes (MFC).  We’ve also peeked at C# and .Net (the Microsoft equivalents to Objective-C and Cocoa), but probably won’t use those.

Sadly, Microsoft’s software design and documentation is even denser than Apple’s.  The first part of Goldenseal Pro for Windows will be a spell of rather frustrating work. Still too early to say how difficult it will be, or how long it will take.  Best guess is a month or two.

On the plus side, we can do small stuff in the Mac version whenever Windows gets too head-bangingly difficult.  Some programming problems are best solved by just ignoring them for a few days, and doing something that is more fun.

Dennis Kolva
Programming Director


Writing Big Software (Oct 11)

Goldenseal is a rather big app: 6 million lines of code, which compares to the 20+ million lines in Microsoft Office.  We have at least 15 programmer-years invested in it.

Like any big project, you still have to build it one day at a time.  We have learned that programmers need to see tangible results at least a couple times a day.  A couple times per hour is better. So we are inching along on the interface conversion, with many small milestones (yardstones?). Sometimes we add temporary code to draw something on the screen, just so there is visible progress!

Yesterday we got over a big hump when we figured out how to write ‘linkers’ that connect each of our interface classes to the matching one in Cocoa.  Cocoa was using our C++ code weeks ago, but it was much harder to go the other direction. Now that we have a template for a few classes, the rest will be easier.

Along the way, there are many small details to convert or modernize. Right now we are working on colors. Goldenseal used to pick most colors from a palette of 256 colors, but Goldenseal Pro will use ‘color wheels’ with millions of choices.

Dennis Kolva
Programming Director


Goldenseal Progress Report- Sept 30

Goldenseal Pro now connects from the database to the display windows, which is where our previous contractor got “stuck”.  It was very exciting, the first time it showed a list of categories!

The Goldenseal app includes several hundred layout resources, used for data entry screens, reports and printed forms.  In the original Goldenseal they were stored as resources, embedded in the application file.  The modern approach is to store them as separate files, hidden in an ‘application bundle’.  So we wrote some one-time code to translate all the layouts to the new style. Now we are working on the code that reads them, and sets up the fields and buttons on-screen.  Getting that to work is the biggest task in the whole project, and it probably will take a few weeks to complete.

At every design step, we need to decide where to draw the line between Cocoa and our existing C++, but we are using Cocoa as much as possible.  It means rewriting more code, and spending more time learning the ins and outs of Apple’s framework, but it ought to result in a better interface (and better compatibility with future OS versions).  We used a pure-Cocoa setup for the list of categories, and it seemed worth the extra effort.

Dennis Kolva
Programming Director

Goldenseal Pro Progress Report- Sept 20

We are gradually ramping up the programming work on the Mac version of Goldenseal Pro, accounting software.  

After starting on the interface classes, we soon realized that almost everything needs to be written in Objective-C. That is the only way to hook into our existing C++ code.   We were really psyched to use the newer Swift language, but switching between three different languages drove us nuts.  Partly because different concepts, but mostly because the punctuation is very different. So, Swift is out, unless we find good reasons to use it later.  We will still use Swift for future iPhone/iPad development, because that will be entirely new code that won’t need to integrate with anything old.

Back when we tried subcontracting the upgrade work, the contract had 6 payment draw stages of approximately equal sizes.  Draw 1 is to open a list window (for example, anything from Options-Payment Terms), and then view and save list records.  Now that the programming work is in-house, we will use the same milestones.

We are still climbing the learning curve for Objective-C, but the Pro version already has menu commands that open windows and show a list of items. We still need to link it to the database and have it load screen layouts, then that will finish draw 1.  This is also the time to design many basic structures, which is good reason to take it slow, and do it right.

The Cocoa framework was developed in the mid-1980s for the NextStep computer.  It’s a ‘black box’ with many nifty features, but it can be challenging (especially for large apps like ours). We aren’t the only ones who still need a major rewrite: Microsoft is finally releasing their first Cocoa and 64-bit code this year, in Office 2016. 

On the plus side, Cocoa lets you build a lot of interface with very little code.  It’s going to allow some nifty improvements to the Goldenseal user interface. For example, popup buttons you can access from the keyboard.

On the minus side, Cocoa is hard to debug, and lacking in practical documentation. We have been perusing open-source projects, just to see how other people handle ‘the basics’.  Cocoa is also changing constantly, so at least half the answers for it in Stack Overflow are outdated and incorrect.  We have learned to check the date on all books and online info.  Much before 2013 and it is probably wrong. Anything after 2014 will be for Swift, not Objective-C. The ‘sweet spot’ is very narrow!

Some year soon, Apple will probably change the Macintosh from Intel to their own ARM chips.  Most likely they will also replace Cocoa with a new Swift-based OS, though that will be an enormous project.  We’ve learned our lesson, and are now designing things so the next remodeling round will be easier.

Dennis Kolva
Programming Director

Goldenseal Pro Progress Report #10 (Sep 6)

Our staff now has a decent grasp of the new Swift programming language, and the basic Cocoa libraries.    It will take a few months to get fully up to speed, but we are ready to start coding.

Our contractor wrote quite a bit of startup code in Objective-C, and we are reviewing it now to see how much can be salvaged.  We may need to start over entirely, but it’s worth spending a week to understand his code, and decide what to keep (and how to merge it).  If nothing else, we need to learn enough Objective-C so we can link our C++ to Swift.

It took us about 2 months to move Goldenseal from Mac OS 9 to X, and 2 weeks to move it from PPC to Intel.  Unfortunately, this is going to be a bigger transition.  Hard to estimate right now, but it will be months, not weeks or years.  A lot of the time will be “learning curve” that will pay off when we start writing apps for iPhone and iPad.

Dennis Kolva
Programming Director

Swift vs Objective-C

Our staff has been getting “up to speed” with Cocoa, so we can build the Macintosh GUI (graphic user interface) for Goldenseal Pro.  It will probably be another week or two before we are ready to start writing code.

Swift is a new programming language that Apple introduced in 2014.  It is designed for rapid GUI development, and we are finding that it definitely works well for that.  It’s possible to create fairly complex apps with just 20 or 30 lines of code.

Swift is a young language, and still evolving. We are writing practice apps using a book from The Big Nerd Ranch dated April 2015, and about 25% of the code in the book has changed since then. They put updated code on their website, but some of that has changed since it was posted. There are even more changes coming when version 3.0 comes out this winter. Using Swift for development will definitely be “bleeding edge” technology for a while longer.

On the other hand, the Objective-C language is old (first developed in the early 1980s) and ugly. Nobody uses it except for Cocoa developers, so it is doomed to fade away, as Swift takes over.

We have been working with both, and will use Swift for Goldenseal Pro.  Better stabbing pains for a while, than a dull ache that goes on forever!

The good news is that once we have mastered it, we can also use it to develop apps for iPhone and iPad.  Our original plan was to subcontract that work, but we can probably design and build apps in about the same time it would take to write specs, supervise and test someone else’s code.  Annoying to have to learn new stuff, but worthwhile in the end.

Dennis Kolva
Programming Director

Goldenseal runs OK in Mac OS 10.12 (Sierra)

We just tested Goldenseal with the public beta version of the next Mac OS (10.12 Sierra).  Everything still runs as it should.

The only problem we found is that the blue-highlighted OK buttons in dialogs are hard to read. The ‘flat’ buttons in OS 10.10 and newer have a dark background that is designed for white text, but our code still draws the text in black.

Goldenseal Pro won’t have this problem, and it is far enough along that we probably won’t fix this appearance issue in the current Goldenseal app.

HINT: if you click on the colored button and then move the mouse cursor off the button temporarily, the blue turns to white so you can read the text.

Update: Gears Shifted

After some discussion with our contractor, he has decided to stop work on Goldenseal Pro.  He did a good job on the early parts of the project (opening files, reading resources) but did not have enough Cocoa experience to get anywhere with the GUI (graphic user interface) for Mac.

This is the second contractor who stalled out after a few months. There were two others who gave up after a few weeks.  I think it is just too large a project for most programmers to handle.

The good news is that we’ve finished the prep work and programming that we needed to do.  So, we will start work on the GUI with our own staff.  We are already very familiar with the existing code, so there won’t be any “learning curve” there.

The plan is to get the basic GUI working, and then subcontract a few remaining details (printing, networking, Custom Layouts).  Those will easier for folks to bid on and complete, and they can also be done in parallel.

One wrinkle is that the Swift programming language is currently getting a complete rewrite, with a new Swift 3.0 planned for completion in late 2016.  It is not backward-compatible, so anything written in Swift 2.0 will need to have some parts rewritten.  However, it will not take much Swift code to create the GUI, so that change will not affect us by much.

Dennis Kolva
Programming Director

Goldenseal Pro Progress Report #9 (Aug 17)

The contractor who is working on Goldenseal Pro got “stuck”.  He wrote new GUIs (graphic user interfaces) for Windows and Mac, but has not been able to connect them with the database, or our business logic.

We are reviewing his code now, to see how to fix that.  We are also discussing ways to make things go faster.  We are eager to see it finished this year.

Most likely our staff will take on a larger portion of the development work, and we will contract smaller parts of the project.  Our experience over the past two years seems to be that many programmers think they can successfully complete a large job like this, but very few actually can do it.

Dennis Kolva
Programming Director
Turtle Creek Software

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