Bookmark and Share
RSS

Recent Posts

SEU Was Holding Me Back

April 11, 2017

Once upon a thread on midrange.com ...

We recently ran into a fabulous description of the value of RDi as seen from the perspective of one specific RPG developer. His name is Buck Calabro. With Buck's permission we are posting his thoughts in his own words because we feel they deserve wider circulation and we certainly couldn't improve on them. His thoughts may also help others who are having trouble explaining to their management the value of modern tooling. You will have seen many "RDi is better than PDM/SEU because ..." lists in the past - including some we have authored. But as you will see, Buck has a very different and interesting perspective!

Over to Buck:

I never write optimal code on the first pass. I usually need to try several different things before I settle on what makes it to production. When I used SEU, I typically stopped with the first pass, because making changes was onerous. Now that I use RDi, I feel much freer to make changes—large changes—and try several things. The more ideas I try means that I have a better chance of choosing the right idea.

It's no surprise that when I used a primitive editor, my code was primitive.  

STRSEU QRPGLESRC NEWMBR.

That's right, open a completely empty screen. Now start working on your code. It's so hard to do that with SEU that almost no one does that. We all copy existing code, which, by definition, is code written in a past time. Older code. Which was copied from even older code all the way back to the time when someone punched the code in off of coding sheets. The result is a system chock full of old code, and more importantly, old ideas. Repeated over and over. For these developers, SEU really is perfectly usable: all they need is CC..CC  B with a few Ds sprinkled in.

This isn't a rant on SEU and it isn't a rant on RPG developers. I was exactly that person, and I'm in no position to throw stones from the top of my glass house. Rather, it's an attempt to note the ways that RDi has allowed me to become a better developer.

I often start a new function by adding a new member in RSE. Which opens a totally blank screen.  Into which I start typing.  I used to remember everything about RPG, and why not? There were only a handful of operations. Today, I get turned around trying to remember the
exact syntax for DCL-PR, or where I specify the overflow indicator on a DEV(PRINTER) file spec. With RDi, I get the manual full time, and I don't have to scan through the whole thing; RDi takes me to the exact section I need to be in (mostly). That by itself encourages me to experiment, because finding a new widget is easy.

More than that though, RDi has wizards that will actually stub out a sub-procedure for me. I don't need to remember any of the typie typie details; the IDE handles that and lets me focus on the thinking part of programming. Typing is a necessary evil, but it isn't "programming.” That's the value RDi gives to me: It lightens my mental workload. I'm not buried in administrivia; I'm in the flow.

I love RDi for the wizards, the manuals, the snippets, and even the plug-ins, which I can (cough cough) write to extend the base functionality. But even if RDi had none of those things, it would
be head and shoulders above SEU for one amazing reason: Ctrl-Z.

That's right, the lowly 'Undo' key is the best part of RDi. I would miss the pink messages (annotations now!) gently explaining that the compiler will simply not work with DCL-OR no matter how many times I type it. But when I'm in the flow, and trying X vs Y vs Z, I can try something, test it (oh how I love RPGUnit!), AND THROW IT AWAY if it's not quite what I want. The ability to discard code is exactly what's missing from SEU, and I don't mean DD..DD.

Imagine working on changes in a sub-procedure. Pop in the comments describing what you're about to do. Add several DCL-S lines, some calculations. Change a couple of other lines and delete one. All told, you've typed 100 characters scattered across two dozen lines of code. In SEU, you'd have to:
a) remember each and every one of those keystrokes, and
b) manually, one by one, re-type them back to their original form.

SEU twists your arm to make copies, do minimal changes, and have multiple versions of a source member which are virtually impossible to distinguish from each other as to the state of progress toward the end goal. It's no wonder that so many of my SEU brothers and sisters are still in RPG III chains. In RDi, I Ctrl-Z a few times and I'm ready to try a new idea. And I do. Often. OK, always.

Jon made a comment earlier in this thread to the effect that SEU stopped being enhanced in the 6.1 time frame. I respectfully submit that SEU hasn't been enhanced since the 1980s. It has been updated to accept new RPG syntax. Functionally, it provides exactly the same programmer assistance today that it did when I first used it back before the dinosaurs were turned into oil. RDi spent a long time being enhanced for the web people, but recently, oh recently we RPGers got some refactoring and it's marvelous. Now I can rename variables as I need; it's not a chore to manually plod through the code. As RDi gets older, it removes more and more of the mental minutiae from my workflow—this is huge!

A couple of days ago I had a bit of indigestion over a test script I was working on. I really wanted to generate a sequence of spreadsheets noting exceptions in my test database. But it was hard
to see how to convert my thousands of lines of SQL script into a CLP / RPG / CPYTOIMPF utility, so I opened up a new, empty member in QCLSRC and I started typing. In a minute I had a shell of a CLP that fired off a Python script, which I needed. So I opened that in RDi. Ctrl-F6 back and forth to get the parameter lists just so, a whole lot of Ctrl-Z and the working first pass was done before lunch was over. I used the PyDev plug-in to help me with the Python and it was shocking how easily it all went, given that the best anyone can say about me is that I'm a very poor Python programmer. I didn't copy/paste a single line of code from an old program—it's all new. New idea, new code.

This is key: I didn't stuff, fold, spindle, or mutilate some existing code in order to sort of, kind of, almost do what I wanted. I can't imagine doing this in SEU, and I have a really good imagination.

I think that SEU is a real factor in keeping the midrange ecosystem stuck in a rut. If RPG programmers had been using Code/400 in the 90s, who knows how advanced the state of our art would be?

I can't rewrite the past, but I can write the future, and that's why I continue to plump for RDi at every opportunity. It's why I don't complain about goofy sales channels, inscrutable cost decisions, or oddball installers. I work on an eccentric platform, and an IDE with bounce in its step fits right in. I'm very grateful that I was able to use the IDE much earlier than most. RDi has absolutely made me a better programmer.


Until we read this, we have to confess that we had not thought of the role RDi plays in helping us write better code. But everything Buck says is true, and for sure we use the same approach—no longer feeling the need to clone old code to get things started. Sure there are times when a code snippet or purpose designed program template is needed—but RDi encourages you to keep those up-to-date and make sure that the best techniques are in play. So much better than cloning a program that might have been cloned from a clone of a clone of a clone—which was originally written by your grandfather during his first week of work as an RPG programmer!

So thanks, Buck, for sharing your perspective with us all—we're sure that others will benefit from your words of wisdom.

Posted April 11, 2017 | Permalink

Post a Comment

Note: Comments are moderated and will not appear until approved

comments powered by Disqus