Archive for the ‘Programming’ Category

I Need Some Motivation….

Saturday, February 14th, 2009

My previous ruminations on my attempts to learn Oberon-2 has made me think about what motivates people to program, given the native intelligence to do so.

My cohort at my place of employment provides an interesting contrast to me. He has a lot of energy and a very active mind. He started out on computers as an operator in the ’70s running the IBM machine (a System/3, I believe) at the very place we are now. Interestingly,  I found at the same time he had bought a SOL microcomputer as a kit, which he then proceded to assemble. This was while he was yet a teenager. He then learned to program it. He went on to get engineering degrees, continuing to program in whatever programming language was necessary to run the machine he was working on- not necessarily a computer per se, even. He has tweaked a text editor to do some very sophisticated things.

Obviously, he gets a charge out of making the machine that he is working on work. He was doing it before I had ever seen a real computer in person, even though he’s younger than me. I think he is the sort of person who would program even if he wasn’t being paid to do it. The more complicated the task, the better; but he seems to be drawn more to seeing what the system can do more than to any particular mundane, normal business application.

On the other hand, for me computers are an annoyance; they sometimes get in the way of computing- that is, the solving of problems. I have no patience when a computer goes belly-up in the middle of something I’m trying to accomplish. I learned programming when I was 30, past the age of youthful exuberance and loaded with family responsibilities. I would have been in trouble if the programming language available as the way I could support my family had not been RPG, or perhaps COBOL or BASIC.

My orientation has never been on the technical side of things. A simple set of instructions for assembling a bookcase throws me for a loop. Once I was trying to install a set of windshield wipers. There were no words in the instructions, only a series of diagrams. It took me about 15 or 20 minutes to figure out the instructions. My expertise is in logic. I learned to read at an early age, and I can see patterns of ideas very quickly. I can see solutions to problems very quickly; but I have a very narrow focus; sometimes this results in my missing the “forest” (solution) because of looking too closely at the path between the “trees” (the details). I can be very original in finding solutions, as long as the goal is clearly defined, preferably by someone else. I do better building on other people’s ideas than originating my own.

So I get no pleasure from the gory details of computing. The C programming language annoys me because it seems like you jump through hoops to do what you want to do. “Print” becomes an exercise in control characters; in BASIC, “PRINT” is just that, print. And C has loose ends; I don’t like a language with loose ends. C is too close to the metal- or the silicon, if you will.

So I like a programming language with clarity. C may be clear to some people; it is not to me. The same goes for C++, Java, and any number of other languages you could name. I like order; perhaps that’s why I tend to gravitate toward the Wirthian languages- Pascal, Modula, Oberon. I want a language that will help protect me from mistakes by making at least the gross mistakes illegal. I feel uncomfortable with a language that allows you make a variable numeric at one point and alphanumeric at another point in the same program, as some scripting languages do. I am not adventurous in that respect.

So when it comes to screen displays, I prefer to have the system do the work. That is not a hard and fast rule; I once built an AS/400-style data entry screen using GWBASIC because I thought line-by-line BASIC data entry was so gauche. But in general I prefer to program and let the system take care of the screens.

But sometimes I wonder. I do also like system- level things, like writing my own program-file cross reference program. I would get geeked when my partner would suggest various functions for my program, like being able to click on a file name in a program source and actually look at the data in the file or the file’s descriptions or what fields are in the file. I wanted to make my AS/400 do some things his PC could do.

So different people are motivated by different things. My partner enjoys the process. I do too. Sometimes, I guess,  it’s better not to worry about “why” and just appreciate the pleasure.

Oberon-2 Episode 2

Thursday, February 12th, 2009

One thing that has cooled somewhat my desire to learn Oberon-2 is the fact that I still want to program for Windows-styled environments. Command lines and line-by-line data entry just doesn’t cut it. To do that, I will need to go to Blackbox, a programming environment that allows you to generate programs with a Windows feel (or Gnome/KDE, if you are a Windows hater).

To that end, I wanted to find a quality way to produce such a program. I was already aware that there are a number of GUI environments available for Python, so I decided to give Python another try. The GUI package I selected, after some research, was WxPython. I downloaded Python, WxPython, even Eclipse for a good editor and Python compatibility.

After I downloaded these things, though, I became aware of one thing I should have thought of before, something I was aware of even from my IBM midrange experience.

From the very beginning, Screen Design Aid (SDA) was part of the programming experience. DDS was the language used to generate the midrange screen displays, and SDA was what you used to generate the appropriate DDS specifications, which were (and are) compiled. If you wanted a heading on your screen, you typed it where you wanted it. If you wanted a field on the screen, you prefixed a set of special characters with a + in front. For example, putting a +6666666 on the screen indicated a 7-character numeric field; +BBBB, a 4-character alphanumeric input-output field; +99999999, an 8-digit input-output numeric field. When you pressed enter, the + disappeared and the field remained. Since you would no doubt want to give the field a name so you could use it when interacting with the program the screen was associated with, you would put a ? in front of the field and press enter and a prompt screen would pop up and allow you to give the field a name and even change its length if desired. To change other field characteristics, you would put an * in front of the field; this would pop up a series of prompts that would allow you to specify such characteristics as high-intensity, blink, reverse-image (from white on black to black on white), and so on. When done, you ended SDA and it would generate DDS specifications, which you then compile as a “file” for use by your RPG program.

Now, Visual Basic it wasn’t; but it protected you from having to key in those DDS specifications line by line. You did not have to get a deep understanding of DDS to produce acceptable screen output. Of course, once you got a good understanding of DDS, you could often make changes directly to ths DDS faster than you could do it by opening up SDA; the point is, you didn’t have to.

With this in mind, you may imagine how disillusioned I was when I opened up the tutorial, and what did I see in the first lesson for WxPython? Being able to size and resize radio buttons, list boxes and pushbuttons and text boxes? No. Source code. To get a box, you type in code. To get a window, you type in code. To get any widget, you type in code, with lots of lovely parameters to enhance your programming experience.

This was not enthralling. I found that WxPython doesn’t act like Visual Basic; neither does V(isual) Python, for that matter. For every little widget, you have to grind out parameter-laden code. The result, judging from the illustrations, is very nice, but it don’t come easy. (Note: There is apparently a plugin for .NET called IronPython that allows Python to be used in the .NET environment; but I’m not sure of the details about it, particularly whether or not it is free. )

Now, whether it’s RPG, Python, or Visual Basic, there is still code to write; but it is not screen code. In fact, you have to work hard to even find the actual source code generated by VB. You are shielded from the details, even as you are (or can be) using SDA in association with the RPG program.

So I will likely shy away from learning Python and WxPython. So what will I do? An experienced Oberon-2 programmer recommended I try the POW! Oberon development environment before I tried Blackbox; but even with POW!, I will still not have the GUI widgets to work with. Since I already have a good feel, I believe, for the semantics of Oberon-2 based upon my study up to now, I may just dive into BlackBox. I am an experienced programmer, so I don’t see that I’ll need to start at “Hello World”.

The Programming Group

Sunday, February 1st, 2009

In considering the craft of programming, sometimes not enough attention is paid to the people you program with. Of course, if you program alone, this is not an issue, but it raises the issue of who is going to keep you in line.

To give a quick example: During the last couple of days, I wrote a little Visual Basic program to facilitate access to an organized group of mp3 files- more specifically, oral readings of Bible books. To make the routine somewhat generic, I put the location of the data in a record of a data file, and the next record in the file was of the location of the program used to read the data- in this case, Media Player. I would then use these pieces of information to build the command VB would use to play the mp3 files. It worked on my computer just fine, and I copied those locations and reentered them in a data file on the system the program was intended for. It didn’t work. But why?

I came back home to my computer and puzzled over it awhile. I then decided to go lay on the living room couch to relax. About ten minutes later, I bounced off the couch. “You idiot!” I said to myself. I realized that the drive location I specified was G:\Bible. This was fine for my home computer, but my destination computer only had a drive C. I went back and corrected it, and all was well.

This illustrates the value of being able to work with others. I didn’t discover the solution until I had disconnected my mind from the problem. In effect, I had created a new, objective observer to critique my code and the situation. The problem might have been easier to solve if I had had another pair of eyes to look at it, instead of having to clone a mental image of myself for the purpose.

Thinking of that reminds me of a situation of my earlier career (not sure if I already blogged about this or not). I had a problem with a piece of code. I sweated over it for hours. I finally decided to share it with my co-worker, a more experienced programmer. I started to describe my program as I spoke to him: “First I want to do this…..(Description) And then it’s supposed to do this….. (More description) And then I do this… And….Ohhhhhh Boyyyyyyy.” The solution to the problem leaped out at me, and my partner never had to say a word.

I am normally not a fan of having two programmers work together closely while coding, but sometimes having one or two people around to bounce around ideas can help. Once a group gets above three or four, the benefits of having a group seem to waste away. Too much clutter. If you can get a few very good programmers together, I think you can write almost anything. If you get a lot of programmers together, they seem to get in the way of each other. Doubling the number of programmers does not get double the work done. Of course, much better programmers than I discovered that fact a long time ago.

I think I like the group I am in better than any other group I have ever worked with. The oldest one in terms of experience is about my age, but he started when he came out of college, I believe. I think his first language was Algol. (I’m serious.) He has also worked the longest with my current employer, and he has the deepest understanding of the current system. The other programmer is a bit younger than me, but he worked for this employer when he was young as a computer operator, left for about 25 years, then came back to program RPG. Both of them have degrees, one of them with a Master’s in engineering, I believe. (Not sure what kind of engineering.)

Their styles are quite different. The older one is quite methodical, and he navigates the AS/400 with lightning-fast use of the menus. The younger one loves the AS/400, but he is definitely a PC guy. He has enhanced a PC programmer’s editor until he can cut, slice, and dice any data or program from the AS/400 he wants to, any way he wants to. He’s comfortable with Java and Rexx too, which makes his choice of programming options that much greater. I thought I had a quick mind until I met him; now I know I’m hopelessly slow. He is not afraid to make mistakes-if he makes a mistake, he fixes it -  while fear of making mistakes is my biggest fear. The only claim I have to superiority over them is my greater experience with RPGIV - but as fast as they can learn, that advantage will not last indefinitely.

And the best part is, we value each others’ abilities. Blend all this with management that points us in the right direction without being intrusive and lets us brainstorm and try fresh uses of our programming resources, and it would be hard to find a better programming group or programming environment.

Oberon-2 - Episode 1

Tuesday, January 20th, 2009

I am still trying to push myself into actually learning to put the programming language Oberon-2 into practice in an actual project. And I’m still dancing around the periphery of my programming course.

Much of the early portion of the book “Oberon-2 Programming With Windows” concerns itself with actually setting up and getting acquainted with the programming environment. An interesting aspect of this environment is that it is not exactly like the environment Niklaus Wirth created when he created the Oberon language to enable the creation of the Oberon operating system back in the 1980s. The original Oberon system did not require that modules be linked explicitly to a program. They are somewhat independent entities. How this can be so is beyond the scope of this post; but in this implementation of Oberon for Windows named Pow!, one module has to be designated as the main module, which then can be explicitly linked to other modules.

The idea of modules being integrated into a whole is hardly unique to Oberon, of course. The idea of “top-down” design goes back at least to the 1970s, where it was felt that the best way to handle complicated tasks is by breaking them down into less complicated tasks, which could also be further broken down into simpler tasks of simple resolution.

For a general purpose language, this is truly an elegant concept.

Perhaps this is where we see the main difference between elegant block structured languages and the old business languages like Cobol and RPG. I will speak of RPG, since that is what I am most familiar with. RPG IV is what might be considered a “large” language. Everything you might ever want to do in business programming is part of RPG; and when you read discussions of how RPG might be improved, you will read suggestions of features that should be ADDED to the language. You will never hear talk of modules or “libraries” or even “service programs” being able to be referenced by the language. New features must be PART of the language; and if they are implemented, they simply make the language bigger and, in most cases, more complicated.

And so we see this world-view even in the structure of RPG programs. Usually, an RPG program does not consist of a few program or procedure calls in a relatively short mainline. It usually consists of a substantial mainline with occasional calls to subroutines or procedures. There is relatively little need or use of the top-down paradigm, or conceptual model. It is possible to do it in RPG, but the very layout of the language does not encourage it. For example, I recall being amused years ago by an RPG program that had only one one line in its detail calculations; it did all its work in a subroutine named DETAIL, which was called by the calculation   EXSR    DETAIL. The very phrase “service program”, used today to refer to a collection of often-used routines into one module, suggests a servant pressed into duty of a superior routine, rather than a coequal partner in the main processing. The name “subroutine” has the same connotation, even if the subroutines do the bulk of the processing. They are subordinate, called by the main “detail” routine.

As RPG is currently constituted, I would consider this the most effective way of using the language. For example, there is the concept that all file handling operations should be consigned to a service program, which would then handle accessing, inserting, deleting, and updating records in a given file. I know I’ve seen the concept recommended, though I can’t give specific  examples offhand. But when  file handling is so easy in RPG, why bother with a service program when you can do it directly?   ACCT#    CHAIN   MASTER.

So I’m up against a wall of habit and preconceived ideas as I continue to try to expand my horizons, and perhaps my effectiveness, by learning a language built on new concepts and that can be completely described (in the official report on the language) in 16 pages of normally spaced text. Just for comparison, the report for C++ is 740 pages in length. (I am already acquainted with BASIC.)  If I can’t learn Oberon, there’s not much point in trying others.

When and How to Upgrade Code

Tuesday, December 30th, 2008

I work on code that, when I came to work for my client, was essentially RPGIII/RPG400 or older. Some of the code had been implemented way back in the 1970’s and was migrated forward as newer machines were installed. And the code showed it. (I have found interesting the large number of 80 and 96 byte files in some of the systems, remnants of old punchcard processing programs.) You haven’t lived until you’ve attempted to update a program that has grown over the years to be a 10000+ line, indicator-laden monster. If you’ve been away from the program awhile and you need to make a non-trivial change, you need to spend part of a day, at least, reviewing the program’s processing.

I am normally conservative about program changes. I generally do not rip apart code and rewrite it, especially if it is not broken. But if a program is to be revised, I do generally at least convert it to RPGIV before making even a minor change. As a phrase used by one of my favorite literary characters (Anne of Green Gables) says, doing this allows “more scope for imagination”.

I was making code changes for a conversion project I was working on when I came across a particular program I had seen before and shook my head at. But for some reason, this time something snapped. I just HAD to change a particular chunk of code, even though the code in fact worked. No errors. But how far to change it? I will explain what I did. In the end, what I do will likely be seen as good by some, too intrusive by others, and  not radical enough by still others.

(more…)

Learning Oberon-2

Tuesday, December 23rd, 2008

In a blog post on my son’s blog, I ruminated on helping young people to learn to program and what might be a good place to begin learning programming. At the end of the article, I suggested Oberon-2, a language created by Niklaus Wirth (creator of Pascal and Modula-2) and an associate. At the same time, I bemoaned the fact that I seemed to be unable to learn new languages, perhaps because of burnout or fatigue, perhaps lack of time, or even lack of a suitable project.

I have just about concluded that it is time to put up or shut up. I have a compiler, I have a book, and I have a project. It is time for me to go ahead and exercise some initiative and learn the language.

But perhaps you wonder why Oberon-2? Why not Java, which is also on the AS/400? I have commented on the steep learning curve. I have attempted Java tutorials; I have found them to be of a most forbidding nature. I don’t know if Java is supposed to be a “small” language or a “large” one; all I know is that one look at the documentation (see how long it takes you to scroll through the class list) makes me want to cringe. Of course, with any language, you usually use only subset of a language in your day-to-day programming; the problem here is finding what your subset consists of.

Why Oberon-2? It is object-oriented programming without the gobbledygook. A “method” is a procedure. A “class” is a record type. A variable of a record is an “object” or an “instance” of a “class”. A procedure call is essentially the same as “passing a message to an object”. I find the unquoted terms in the previous sentences more comprehensible than the corresponding terminology (in quotes) that has been perpetuated for the Java and C++ and Smalltalk environment. And it does not appear that it will take that long to learn how to write useful code; that is important for me.

So I propose to begin learning this language, and from time to time report on my progress. Knowing that at least a few people might be observing may also exert a certain social pressure to press on.

No MOVE to freeform

Monday, October 27th, 2008

One of the more interesting things about freeform RPG, at least currently, is its support of the MOVE/MOVEL RPG operation codes. It doesn’t.
For those not so familiar with RPG, MOVE (move right) and MOVEL (move left) are codes that you will find in almost any standard RPG program. What do you do with them?
You can:
1. Move a string into another string. If the target string is smaller, the move ends with the filling of the string. For example, assuming the field MONTH as a 9-long string with value “NOVEMBER” and a 5-long string RESULT:  MOVE MONTH RESULT results in ‘MBER ‘ ; MOVEL MONTH RESULT result is ‘NOVEM’. If the smaller field is MOVEd to the larger, what is left remains unchanged (unless the move is given a code (p) which causes it to be filled with blanks). If RESULT was ‘NOVEM’, MOVEL ‘123′ RESULT would produce ‘123EM’
2. You can MOVE strings to numeric fields, and strings to numbers. In this case, the system will try to convert the string to numbers; this is no problem, especially if the string is already a number.
3. Move strings and numbers to DATE type fields (which RPG can manipulate with other techniques, such as adding a month to the date), and vice versa.
In fact, 14 pages in the RPGIV manual is devoted to examples of how to use the MOVE opcode. (As we said above, MOVEL just starts from the left. Almost as many pages are given to MOVEL).
You would think at first that IBM would want to use this code, in view of its widespread use and of its power. Syntax would not be an issue; I deliberately did not attempt to put my example above in fixed format, just to show how obvious the syntax was.
But, what does the IBM manual say about MOVE? To quote:
“Free-Form Syntax: (not allowed - use the EVAL or EVALR operations, or built-in functions such as
%CHAR, %DATE, %DEC , %DECH, %GRAPH, %INT, %INTH, %TIME,
%TIMESTAMP , %UCS2, %UNS, or %UNSH )”
.
To this list I would add %SUBST(substring), at least.
I can think of no practical reason why the implementers did not simply allow MOVE into freeform. Perhaps it’s because I’m just an ignorant junior college grad, from when they didn’t even have CompSci courses in JC. Since I am not a computer science major, to me the implementation would be a snap; when the compiler sees “move field1 field2;” in freeform, do exactly the same thing you would if you saw MOVE FIELD1 FIELD2 in fixed format. (Copy the compiler code! What a revolutionary idea!)
I, for one, think the problem is ideological. MOVE (along with its cousins) is too powerful a code. Since high school grads (like me) know how to use it, it obviously is too difficult for CompSci graduates to understand; you must replace it with another opcode (EVAL) and one or more of at least 12 BIFs listed above. Makes it easier. Yeah, right. We must make it simple so the ignorant Java programmers can understand. Pardon me while I get ticked off by intellectual condescension. The compiler writers are evidently trying to pry us away from an operation they feel is somehow inferior. Never mind that it works reliably, precisely, and elegantly.
Never mind that you have to be very careful how you use the BIFs, since you might not end up with the exactly equivalent result. You wouldn’t have to bother if you didn’t change it in the first place. Multiply this by the millions upon millions of MOVEs and MOVELs that likely exist in existing code, and you begin to see the problem.
The code will almost certainly be longer and likely more complicated if you attempt to convert the code. You would think brevity would be prized, since it seems such a virtue when it goes the other way, when they come up with a BIF that seems to do the job more succinctly than its fixed-format equivalent. Apparently here, they are not shooting for brevity; and I find it hard to see how they enhance the clarity of the code by avoiding MOVE.
Frankly, if they are trying to promote the use of freeform, I think they are shooting themselves in the foot by not implementing MOVE. From what I have read on the RPG forums, the lack of MOVE support stands in the way of easy freeform conversion. The fixed-to-freeform converter cannot handle it, so a /END-FREE must precede it, dropping the code back into fixed-format. Many other opcodes can be handled more or less elegantly using BIFs; not using MOVE in freeform often ends up forcing the programmer to use some Rube Goldberg BIF to try to salvage the situation.

I can only wonder why they are taking an ideological stand on this subject. “Dumb” is the nicest word I can think of with reference to their decision.

Am I Getting Lazy?

Saturday, October 25th, 2008

It has been too long since my last post. What’s going on? Well, for one thing, I’ve done a couple of articles for work.com (a bit of shameless self-promotion here) , on “recovering data from a dead computer“  and another on “natural language processing” - text-to-speech and speech-to-text software.  I’m actually getting paid for my writing; and though I’m getting paid less than minimum wage (on an hourly basis) for doing it, it really is neat for your writing ability to be recognized.

But I haven’t really been all that busy writing those things. It’s kind of hard to explain. I think the problem is that I have convinced myself that everything I write must be a work of art, with detailed logic, clever phrases, and quotations. After the first flush of enthusiasm for the blog wore off, I found it not so easy to write through the brain fog that envelops your mind when you are tired at the end of the day. I have the energy to read my e-mail, surf my favorite web sites, but not enough to sustain several hours of determined composition.

But I should know better. Over and over again through the years I have read that the best way to write is to just sit down and do it. If you don’t feel like two hours of writing, do 15 minutes. That’s why this program I work with has a draft mode- what I write doesn’t immediately have to go to the Web. Just do it.

So I will try to do better. Just getting a new computer at work generates some enthusiasm. Things that took prohibitively long before now can be done so quickly. As a result, I have been enhancing and cleaning up the program and file cross-reference program I have written at work. I can track, in a nested fashion, what programs call what programs; and within a program I can click on a file name and get a file description or even display the file itself, scan the text for strings, and other neat stuff.  When it took well over an hour to generate the files necessary for the program, and now the files can be generated in under two minutes- that just gives you more of a feeling of power.

I was receiving the Web statistics on my various posts, and I found it very interesting that the articles that seemed to generate the most interest involved, in some fashion, freeform RPG. Even though I myself am not a big fan of it, it may be interesting to pursue that topic further in future posts, perhaps in a less dismissive way. I still believe in the validity of my arguments, but it may be worthwhile to analyze it to see why people are intrigued by it.

Programming in the Large

Saturday, September 27th, 2008

Before getting back to technical topics, I thought it worth a few lines to consider the programming environment and how it relates to programming technique.

When I was starting to program, the IBM Midrange (with the System/34 as its current representative) was pointed at small business. Its programming language, RPGII, was not viewed as a highly sophisticated tool. People without a Computer Science background could be expected to learn it without a great deal of fanfare. A common way to start was to begin as a computer operator and work your way up.

I suspect that those days are gone forever. The days when you would give the operator a manual and some programs to read are likely done. There are high expectations for programmers these days; if there are entry-level positions, they are well hidden; and those are probably reserved for those with at least some background in college-level courses.

The sophistication of the code also at times left something to be desired. More programmers were needed than could be generated by college, and so their techniques were not always clear. That was especially true with RPG II, which did not have structured operators (IF - ENDIF, etc.). Code was produced of the sort that positively gives me a headache today. A headache to maintain- but it worked.

And so we read today of sophisticated techniques derived from our study of other programming languages. Some are good, others not so good. But more and more sophistication is being demanded. And that can be a good thing.

But is zeal to pursue all these techniques a good thing? As always, the answer is, not always. If your needs are sophisticated, by all means, keep on pushing. But what if you don’t need these techniques? What if the business you support is profitable without them? Is it really a bad thing if you are not an early adopter?

The place I work now fits those criteria. It has been on the IBM midrange for over 30 years. Some of the programs are that old, too. Do you scrap code just because it’s “old”? No. You may try to improve it as time is available and the need arises, but first of all the business must be supported effectively. It would be a waste of time to try to shoehorn a new technique involving user spaces and message queues when it simply is not necessary. If some new technology will demonstrably advance the business, we get it.

So my job is not to be an early adopter, but to support the business, make improvements where I can, but not feel deprived if I am unable to employ some sexy new subroutine or program calling technique. The geek in me wants to try everything I read in the various technical forums, but the pragmatist in me tells me that I cannot do it. We just got a new machine with 13 times the space and over 20 times the speed of the old one; that ought to keep me interested for quite a while. We are connected to the Internet, but not directly; so many of the fancy new features of RPG that allow direct connect to the Internet simply are not needed. My co-worker does not have my RPG background, but I think he knows a lot and is learning more; his programming abilities go beyond RPG to the point that I can only envy them, not emulate them; I have neither the time nor the energy to do so. But his energy energizes me.

Updating code calls for patience. That is a virtue. I am not being paid so I can be entertained; I am being paid to create a positive business result for my employer; as long as I am constructive and keep on learning, I will be happy. I am not a small piece of a big puzzle; I am a big piece of a small one.

Multilingual?

Sunday, August 24th, 2008

Years ago, to talk about what language to use when you were going to write a program would be somewhat silly. You would use the language that came with the computer. Often, you would only have one language to work with - COBOL, RPG, BASIC, PL/I, C, or whatever. As microcomputers came on the scene, you still had few options beyond BASIC and Pascal, due to the small amounts of memory available. This, of course, changed as time went on, but if a shop had a particular language they worked with, they generally wanted to use that language only.

An interesting example of this was the situation a fellow RPG programmer once told me about. It was an engineering shop, apparently, but the only computer available was the IBM System /34 or System/36; the only language available on the machine was RPG. They had scientific calculations to do; so they got together with the programmer and described to him how sines, cosines, and suchlike things were calculated, and he proceeded to implement those calculations in RPG, which didn’t have much to work with in mathematical opcodes except ADD, SUB, MULT, DIV, and SQRT (square root). Apparently the results were acceptable.

Today, however, many more options are available. As AS/400 programmer now has RPG, COBOL (probably few installations have both, since they cover the same business programming ground), C, C++, Rexx, Java, and no doubt others. I have even come across a website that made available a Python interpreter for the iSeries (AS/400). If a person has a function for which he believes C provides a better alternative, he can, by implementing the proper subprocedure hooks, use that C function in his RPG IV program.

The problem of multiple languages, however, now is beginning to unfold. We now have the Internet, in which a whole new set of technologies are available: Java, Ruby on Rails, SOAP, AJAX, Python, Perl, Javascript, and others incorporating HTML, XML and other standard processes to get data out and available on the Internet. What is a programmer or company supposed to do?

If you are a PC programmer, the answer is clear- learn whatever you need to learn. Get a book, take a course, play with the new language and learn it. It is easier these days, because it is quite possible that the new language you wish to learn has some compiler and/or IDE (Integrated Development Environment) available free for download.

It is not so easy for the AS/400 programmer. Even mainframers needed to learn CICS, an external package, if they wanted to create interactive programs. However, on the System/34, System/36, System/38, and AS/400, the midrange had  no need to go outside the minicomputer framework to do normal processing. They had SDA(Screen Design Aid) to design screens, and the RPG program could interact with the “display files” created by SDA to handle interactive data entry. The screen was treated just like any other data file that the programmer could read.

Now, the demands of the marketplace are pushing on the IBM midrange. IBM has steadfastly refused to give the RPG programmer a tool that he could use to create Web access HTML. External tools have been produced within IBM, like CGIDEV2, but they have never been sponsored by IBM as a preferred tool; those who use it seem to be viewed almost as guerrilla warriors in a battle against… what?

Java was the first thing IBM gave us to access the Internet. They were really gung-ho on it. They  were so obtuse that they put ads in trade publications implying that if you didn’t set RPG aside and learn Java, you would end up flipping hamburgers at McDonald’s. (Hopefully, the person who designed that ad campaign was canned. But maybe he was only doing what he was told…)

But that didn’t work. Java was and is used by some adventurous and smart programmers, but for the most part it laid an egg in the AS/400 community. The learning curve was far too steep and long.

In the meantime, third-party software firms have stepped into the gap to provide solutions for the problem. But for those who don’t really want to be tied to an outside source, the problem still remains.

So now, IBM steps in and says the solution is EGL- another programming language. Even if it is easier than Java, why doesn’t IBM get the point? Why can’t they listen to the programmers who want natural access from RPG to the Internet instead of the Rube Goldberg apparatus they have been given? Why can’t they just mainstream CGIDEV2, or just create another, more direct access to create HTML? They even have an HTML keyword in DDS (the Data Description Specifications used to build data entry screens). If all they did was create a way to allow those HTML specifications to be built by SDA or something similar, it would be a step forward. The RPG programmer doesn’t need to produce HTML capable of showing an avatar of the customer running the 100 meter dash at Beijing. All the customer (or whoever) wants to do is enter data- he doesn’t need, and likely doesn’t want, anything too clever or sexy.

The real problem becomes that a company who needs to maintain its systems has to find programmers who know multiple languages, or it must find individuals who know both languages. If any other language is used but RPG, that code is going to have to be maintained by someone who knows the language. These individuals are hard to find. Non-RPGers don’t seem to care to come in and learn RPG-it is an “old” language. And RPGers have been spoiled too long in an environment that supplied all their language needs without going “outside” the AS/400 world. They want to do their job within the RPG framework, not go outside and be forced to use a new language. Aaron Bartell, a fine young RPG/Java programmer, talks about the problem of multiple languages in a blog post:

“We are reaching a point in the IT dept infrastructure where “framework evaluator/builder” is actually going to be a job description. I predict that in the next 5 to 8 years we are going to find that people will see the mess they created by adopting 5 different languages for different apps based on a variety of personnel hires, vs. sticking it out with whatever language they are most competent in (whether that be RPG, .NET, Java, EGL etc). “

So what can be done? I don’t know. Whether you talk about the RPG person reaching out, or the outsider reaching in, there is a problem. The outsider is prejudiced. The RPG programmer is getting older (and if he is my age, a little more tired; is tireder a word?), and unless his intellectual curiosity is high, he will not see the point in reaching out, especially if his shop is not reaching out to the Net or already have other personnel dedicated to that task.

It’s just a shame that IBM, for all their brain power, can’t give their AS/400 programming customers what they want- and I don’t mean another language.