Old is New Again

Zinc BookIf you live long enough in IT, everything happens at least twice. The first book I ever wrote, “Zinc It! Interfacing Third Party Libraries with Cross Platform GUI’S” has become somewhat current again.

Some number of years ago I was contacted by a gentleman asking about this book. He was embarking on a journey to port a now OpenSource version of ZAF (Zinc Application Framework) to a current C++ compiler. We exchanged a few emails since then, but, I must admit I have lost is name and contact information. Against all odds, he did complete his journey. I took a quick skim of the site and am seriously impressed that he managed to get the original reference documentation.

While I bitched at the people in charge of Zinc, mostly because they didn’t care about bugs, choosing to focus on adding new features which introduced even more bugs, the approach Zinc took was unique. For the DOS functionality it had to provide everything, but, on all of the other platforms it was a wrapper class to native OS API calls and that makes it relevant today.

How so you ask?

We stand on shifting sand. Google is abandoning Android for Fuchsia. Windows will just be a GUI on top of Ubuntu in a few years, just like MAC is on top of BSD today. Cross platform tool kits writing their own low level code for things like Styles, etc. have a maintenance nightmare in front of them. Layering on top of OS level APIs protects you just a bit. If an API changes slightly from say 10.0 to 11.0, you can either conditionally compile or morph at run-time based on the current OS version.

Of course, life will always suck when they completely throw out the rule book with the API, but, as a cross platform framework tries to add support for more and more frameworks keeping support for more and more versions, the wrapper makes it a bit more doable than roll your own.

Zinc was an interesting product. Even if none of you purchase one of the limited copies I still have from the first print run, you should take some time out from your binge watching to pull down what he has done and take a good look.

I suspect this OpenSource version will gain a bit of traction at some point. Unlike most OpenSource projects with sucky documentation, this appears to have the last rev of the commercial documentation which existed at the fork so it is slick to look at. The home page claims there is already a Linux port which should make it easier to most to experiment with. (Just how many of us still have a DOS machine laying around?)

Pay them a visit. You may just want to look at doing the Android port and enabling touch support.

Expires Faster Than Milk

It’s amazing how quickly things become useless and outdated on the Internet. What is worse is people usually choose one of the first five search results and consider it Gospel no matter how horribly out of date it is. Recently I got a bit nostalgic for some of the DOS work I used to do. Greenleaf libraries were a mainstay in my development tool chest no matter what compiler I was using.

There CommLib product was awesome. Data Windows provided a rather great ASCII graphics mouse enabled user interface. The Greenleaf Database library was also quite a treasure. I never owned a copy of their Functions or Super Functions products. Part of me wonders if that isn’t what morphed into the Boost library or at least the inspiration behind it.

Kids today don’t understand. They come to C/C++ with quite an arsenal of string, date, and time functions. It wasn’t always so. In the early days we were all rolling our own. Part of it was ego, but the major part was compiler vendors didn’t provide much in the way of support and there was no standard. You also aren’t old enough to remember when Janet Reno, with Hillary Clinton whispering in her ear, committed a crime against the human species not putting Bill Gates in prison AND allowing Microsoft to trademark Windows in the software world DESPITE numerous DOS based windowing libraries predating the Microsoft claim.

The result of this was Microsoft’s lawyers sending threatening letters to each and every software vendor with “Window” or “Windows” in their product name even when that product existed years before Microsoft shipped Windows. Most of these companies were small so the threat of an 800-pound gorilla was enough to get them to pull the product. I don’t know of one which renamed their product and kept going. I don’t believe this round of Microsoft criminal activity allowed for that option.

These threats went deep. Like Jihadists trying to purge all historical artifacts which disprove their claim, the legal threats and historical destruction ran amuck with the blessings of both the Clinton’s and Janet reno.

screen shot

I clicked on some of those Dr. Dobb links and they don’t work anymore. The Dr. Dobb’s site still exists and is being archived for posterity, but those links don’t work. It appears that only Google’s blatant for profit copyright infringement has thus far escaped the purge of the Microsoft lawyers.

boosk links

I clicked on some of those books.google.com links and they worked. That EDM2 link worked as well. There they flag all GreenLeaf products as “discontinued.” That’s been both true and false over the years. Greenleaf folded up, for a few years, then, some other shop began selling at least the database library and perhaps a few others. Then I lost track of it.

Part of this mental journey came from wondering if any of the Functions or Super Functions would still serve a purpose today as well as very fond memories of CommLib, having exchanged many emails with Mark, Ruby and I believe someone named Billy back in the day. Putting it mildly, I was probably viewed as a support nightmare. I was replacing burnt EPROM embedded systems with cast-off PCs running DOS so I was pushing the libraries. I was also using the much stricter Watcom and they were using the rather lax Borland.

While, technically, CommLib is “discontinued,” I happily found Mark Nelson’s “Dr. Dobb’s” article about “Any Serial Port.” At some point I know I’m going to find myself on an embedded Linux project which isn’t using Qt and I will be more than willing to take a serious look at what the project has to offer.

If submitting stuff to the Qt project wasn’t such a royal pain in the ass, I might even be willing to hack the QSerialPort class to give it the features everyone needs. Features CommLib had back in the days of DOS. A double ring buffer which understands the concept of a record, be it a fixed length record, or one bounded by begin and end characters. Doesn’t matter if you are reading from a truck scale or some other source, everyone needs that.

Hey, while I’m on the topic, I certainly hope vendors of truck scales have finally stopped several bad practices. CommLib, at the time, didn’t recognize multiple character begin and end markers. Scale vendors would do one of two thing:

  1. Put the CRC byte in front of the ending byte without restricting the range of CRC values so it could have the same value as the ending marker.
  2. Put the CRC byte after the ending marker so your “record” logic couldn’t retrieve everything it needed to process the read without doing an extra one-byte read.

For those of you who don’t think it is a problem, try, within the limits of 16-bit DOS, the configuration information for 7 different scale brands, each one of which uses a different packet format, baud and frequency rate. Any one of these scales can be on any port.

Damn! I was a geek back then.

I do hope the Greenleaf crew has prospered in their lives after Greenleaf. I have fond memories of all the misspent hours in front of my AST Premium 286 putting their products to work.

Information, like youth, really does expire faster than milk.