This article could equally be titled “how I learned to write good software”. During the 1990’s, I rekindled my interest in shortwave and ham radio. Like many, my hobbies had been placed on hold for twenty years while we raised a family and I did the “career thing.” Sound familiar?
This video tells the story of Ergo – what it is and what it does. Basically, it is a software program that combines control of radios, databases of stations and tools to support a shortwave radio listener. Since this is well described in the video, I am going to focus this article on how a few things I learned about writing software.
During the 1990’s I experienced some heart problems. It was suggested that in addition to reducing cholesterol, I should reduce stress. One way to do this was to spend some time on hobbies rather than just work. So, I started playing with radios again. Since I also had a long interest in software, I thought I just might combine the two.
In my opinion, the best way to teach yourself software development is to have a challenging project. Projects have goals and focus your efforts. Since the 1980’s, most good shortwave and ham receivers included remote control capability. This usually involved a serial port (RS-232) so that you could connect the radio to your computer with a cable. Since radio manufacturers did not provide good software for radio control, there was an opportunity to do so. So, my project was to develop software that I could use to control my radios. Only later did this project become a product, Ergo radio software.
All of the software development I had done up to then used Microsoft GW-Basic and later QuickBasic. This was a DOS programming language adapted from mainframe BASIC by Microsoft during the 1980’s. In fact, it was Bill Gates and Paul Allen that wrote the original Basic Interpreter in 1976. I used QuickBasic to write my first radio control program, called ROAM. ROAM stood for “Radio Operation and Management”. It worked, but it wasn’t pretty. It was pretty “basic”.
When Windows 95 arrived, I knew that I had to leave DOS behind and write a program for Windows. QuickBasic had evolved into Microsoft Visual Basic by then. VB was a new type of language for something called visual programming. This was Rapid Application Development or RAD. What made RAD different was the ability to design an interface visually rather than in code. Best of all, it was designed to develop for Windows and to make that job easier. After doing the visual design of your program, you would then write the code to make things work behind the scenes.
But while Visual Basic was great for designing the user interface (GUI) it was otherwise a fairly weak programming language. It did not compile “real programs” and the performance suffered. Also, it did not do object oriented programming, the latest thing.
Then, I discovered Borland Delphi. Delphi was (and still is) a RAD tool for Windows based on the Pascal programming language. It was (and still is) as powerful and flexible as C and C++, but much easier to learn and use. It had a real compiler and did object oriented programming.
The first commercial version my software was Ergo 3 written in Delphi 1. It was a 16-bit program that I sold from 1997-2000 through Universal Radio. Then, I moved up to 32-bit programming and used Delphi 5 to develop Ergo 4. This new version paralleled the shift to Windows NT based computers, especially Windows 2000. I also launched the Ergo radio software website in 2001.
Ergo Radio Software and Windows
Some of my design decisions for Ergo radio software were not great. For example, I assumed radios would always use serial ports. This decision made sense at the time, and is baked into the Ergo radio software architecture. Unfortunately, I did not foresee the shift to USB. As another example, I put my faith in Microsoft’s Component Object Model (COM, ActiveX) as the foundation for the drivers used to connect Ergo to receivers. Unfortunately, Microsoft moved on to .NET, but at least it still supports COM.
But my really good decision was to stick meticulously to the published standards and Windows Application Programming Interface (API). At the time, it was very common for software developers to try to hack Windows and create unique solutions to OS weaknesses. Programmers had gotten really good at creating solutions that made things worked faster. They were used to creating hacks to work around the limitations of existing hardware and operating systems. This was especially true for game developers. Perhaps because of my limited knowledge, I just worked with the API and made it work for me. The one trend that I did correctly appreciate was Moore’s Law. That is, computers were becoming more powerful every year. I just had to stick to the standards and wait for the hardware to catch up. And it did.
There are many complaints about Windows, but maintaining backwards compatibility is not one of them. Ergo 4 was developed using Windows NT and Windows 2000. That is more than fifteen years and seven Windows versions ago. And Ergo 4 still runs flawlessly in Windows 10! Equally impressive, Ergo 4 was developed and is still maintained using Delphi 5, originally released in 1999. Borland sure created some amazing programming tools.