Thursday, May 31, 2012

Is RPG Dead? The Autopsy

In a previous post, I promised to say more on the subject of RPG's death. But I'm finding it tougher than I expected. Don't misunderstand me, it's not for lack of content. It's just that I worked with RPG for a long time. I don't want to see RPG go away. Writing this blog posting feels like I'm kicking an old friend while he's down on the ground. On the other hand, it's just a programming language. And the facts need to be understood.

When I first learned RPG III, 31 years ago, I was impressed by a couple of things. First, I was impressed with the externally-described file. As far as I knew, no other language had such a powerful feature. Second, I was impressed with the syntax-checking source editor. At my university, some professors were just beginning to think about something like that.

But other aspects of RPG III were definitely goofy, such as the fixed-form syntax and the indicators. Fortunately, the language has grown since then. Indicators can be largely avoided, and calculations can be coded in a free-form syntax. However, although RPG has progressed, other languages have progressed faster, and new languages have cropped up with even more powerful features. More and more, RPG looks like an anachronism, rather than a modern programming language.

I'll list some features that are commonplace in other, modern programming languages that RPG still lacks:

1) Namespaces. That is, what happens when you want to import two libraries with the same name? In languages like Java and Python, imports can be put into a directory hierarchy. And if there are conflicts, things can be renamed.

2) User-defined data types. Sorry, data structures and LIKEREC just don't cut it.

3) Object-oriented programming. What language doesn't have OO support these days? It's something we now take for granted elsewhere.

4) Extensive list of built-in functions or classes. Just compare what RPG has to the Python Standard Library or PHP's Function Reference. No comparison.

5) Frameworks. Most modern programming languages have a goodly selection of frameworks that simplify programming web applications. These frameworks have various levels of functionality, however, typically they take care of a lot of nitty-gritty details. Using a framework, you should never see a query string, or XML, or JSON, or SQL.

6) Operating system independence. Programs written in languages like Java, Python, and PHP can easily be ported across different operating systems.

Some would argue that RPG could be further enhanced to address these short-comings. But why bother when there are already other languages that have these features? The planners at IBM certainly know what's lacking in RPG, and they still seem to have the resources to make the occasional enhancement. But over the past decade, there seems to have been little effort to address these specific short-comings. Looking at the situation from that perspective, one could argue that IBM itself also sees no future for RPG.

So far, I've written about 500 words, and yet there's still more to be said. Stay tuned.

(Update: Next installment: Is RPG Dead? The Wake)

Cheers! Hans

Tuesday, May 29, 2012

Is RPG Dead? Do We Still Have To Ask?

Guess what, folks? It's that time of year again when people debate the future of RPG. Is RPG dead? Think about it: Does anyone ever ask that question about any other programming language? Why do some people still insist that RPG does have a future?

To start with, let me make one assertion: Of all participants in this debate, I'm one of the very few who is both knowledgeable about RPG and who does not have a financial stake either way. Some commentators make their living by moving people off of IBM i. Others make a living doing RPG programming or training others. If anything, I don't relish the idea of RPG disappearing because of my long involvement with RPG development.

RPG is very much unlike practically all other programming languages in use for application development. It is one of the few programming languages that is available on only one operating system. That's right! If you want to do RPG programming, you need a system with the IBM i operating system. And IBM i is one of the last of the traditional proprietary operating systems.

What do I mean by that? Look back at the history of computers: In the 1950's and 1960's, there were a lot of computer companies, colloquially called "IBM and the Seven Dwarfs". After a couple of mergers, they became "IBM and the BUNCH" (Burroughs, Univac, NCR, Control Data Corporation, and Honeywell). Each one had their own mainframe computer products. And each computer ran its own proprietary operating system, each incompatible with all the others. Over time, almost all of these proprietary operating systems have disappeared. Today, there are just two left: z/OS and IBM i.

Today, most computers run either Windows, or some variant of Unix or Linux. Even the machines that run the O/S relics z/OS and IBM i now also run Linux, with significant cost savings over the dinosaurs.

So here's the current situation: The fact is that the main reason for running IBM i is to run RPG applications. And to be fair, a lot of them are still running. Without RPG, there's no reason to choose IBM i. And without IBM i, there's no way to run RPG apps.

Is there a future for IBM i? When I was looking for work back in 2007, one headhunter specifically told me that the bottom had fallen out of the i job market. Indeed, over the course of about 8 months, I saw only three listings for iSeries jobs in the greater Toronto area. If there are so few IBM i job openings in the 8th largest metropolitan area in North America, what hope is there for IBM i programmers elsewhere?

Frankly, in this day and age, if you want to develop a new application, it just doesn't make any sense at all to limit yourself to one particular operating system. Especially one that is clearly in decline. Other languages like C, C++, PHP, and Python can run on practically any operating system. If you want to protect the value of your software development investment, clearly, any of these other languages is the way to go.

I have more to say about RPG, but I'll save that for another blog post. Stay tuned!

Cheers! Hans

Thursday, May 17, 2012

OS/2 - 25 Years Later

I almost missed an anniversary. Last month was the 25th anniversary of OS/2. I suppose that's understandable. After all, who cares about OS/2 anymore?

Well, I still remember OS/2. I used it on my home computer up until June 1998. By then, the writing had been on the wall for years. But rather than turn to Windows, I put Linux on my home computer. My first reaction after booting up Red Hat 5.2 for the first time was: What the heck am I getting myself into? However, KDE version 1 was released just three weeks later, and that made Linux much easier to use. Not as easy as OS/2, but still acceptable. And unlike OS/2, interest in Linux was increasing.

At IBM, I worked with someone who was at the meeting where Microsoft effectively told IBM that their OS/2 partnership was over. And I still remember his description of the meeting. Both sides presented their status. After Microsoft presented their status, the IBM'ers present slowly began to understand the implications of Microsoft's position. Meanwhile, on the other side of the room, the Microsoft employees were smiling giddily, knowing full well that they were shafting their loyal partner.

After the "divorce", Microsoft did everything in their power to stop OS/2 from gaining any traction. But OS/2's failure in the market wasn't entirely Microsoft's fault. IBM's sales division didn't know how to sell it. And later on, Windows was adopted as the standard workstation for all IBM employees. Clearly, the OS/2 supporters within IBM were a small, albeit dedicated, minority.

There were broader implications. At the time, I was working on the AS/400. Penetration of OS/2 within AS/400 shops was practically zero. Microsoft had pretty much 100% of the desktops within that market. And yet, few people listened to the warnings that the desktop was a beachhead for Microsoft's incursion into the SMB market. And over time, as many of us predicted, Windows became more and more prevalent in that market, displacing AS/400 installations (and later, iSeries). And now, interest in IBM i is way down. Perhaps the only thing keeping IBM i alive now is the fanatical devotion of it's remaining users.

What would have happened if Microsoft didn't go their own way? Would we all be using some form of OS/2 today?

Cheers! Hans