× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: Re: More cycle rants
  • From: Jim Welsh <jimwelsh@xxxxxxxxxxxxx>
  • Date: Wed, 07 Apr 1999 00:40:51 -0400

rbbaird@premsys.com wrote:

> I can't resist.  Lord forgive me ;)
>
> I'll say it again, just another tool in my tool box, that has served me very
> well for many many years.
>
> To all those who refuse to learn the cycle, what do you do when you run 
>across a
>       large WORKING cycle program that needs modifications?
>
> Do you just guess, poke and prod, and hope it works?  Do you rewrite it?  Are
>       either of these options acceptable where you work?  They aren't in my
>       business.
>
> I don't condemn anyone for not using the cycle, as long as their control break
> logic is clean, documented and easily maintained.   All I ask is that I not be
> condemned for wanting and encouraging its use.  Using the cycle forces
> programming standards and when used appropriately and with discretion 
>decreases
> progam complexity.  It's nearly always used the same way, and always works the
> same way no matter who wrote it.
>
> I can sit down with an mediocre to average RPG programmer and in 10 or 15
> minutes explain the major functions of cycle programming to the point that
> he/she can use them effectively.  It's really not that hard!  Remember the rpg
> debuging templates we all used to carry around (years ago) that had that handy
> little flow chart showing the cycle?  Those 10 or 15 flow steps contained all
> you ever really needed to know about the cycle to use it effectively.
>
> The following words were used by someone to describe cycle programs.  Patched,
> modified, cloned, changed, monolithic total hell to maintain etc. These words
> are not inherent to cycle or non-cycle programs.  They are inherent to bad
> programming standards and bad programmers.  Nothing more, nothing less.
>
> 5 hail marys, 10 our fathers....
>
> Rick
>
>

When I run across a large working cycle program that i have been asked to 
"enhance"
Step 1
Determine the effects of this enhancement on the final output..what do we want 
this
program to produce now.

Step 2
Study the program to determine if this modification can be done within the 
confines
of FIXED rpg logic...more specifially...this particular programs version of 
fixed
rpg logic.

Step 3
If change can be made to this program as is
Then
Determine degree of difficulty with this method.
If determined that change can be made while taking minimal medication to ease 
the
pain
then proceed with caution to make adjustments
If determined that making change to this program may be hazerdous to my health
Then
a) make plans for group therapy session immediately after work today
b) make plans to see my girlfriend ( leave work early for this one )
c) deal with it, make the changes, but let recuiters know that i am available
d) scream obsenities...quit job...take vacation...rejoin slave labor force 
after r&r

e) don't have girlfriend...make plans to get one, pronto!
f) see how management feels about a rewrite of this program
g) deal with it, make changes, think of the positive aspects of this job
h) upload source code to this group and let you cycle code knuckleheads fix it
i) become a cycle code guru...( ok but this is not my idea of fun )
j) ponder the possibilities

most likely the choice would be
f and then g

invariably if it can be done...i can do it

but make no mistake
if this program is written in some of the moronic fashion that has been thrust 
upon
me in the past
choice d is always an option, however choice c is the wiser

choice e is a good one although it's when you stop looking that you find one
how ironic

in any case i think most of us at least attempt to do whatever it takes to get 
the
job done
sometimes we do it just for the challenge
sometimes we find making the change wasn't all that painfull but the program 
still
has a very
strange look and feel about it no matter how you slice it...and we just wish it 
had
not been written
that way in the first place

if it is a large but well written cycle program...i honestly can't say i have 
seen
many of those
i certainly have not authored any large cycle programs well written or otherwise

i have writtem many large full procedural programs and it only makes sense to
continue refining that technique with RPG IV taking advantage of even newer op
codes.

I hear we now have a LeaveSR ( leave subroutine ) op code...yet another 
advancement
to the language designed to further exploit the style of structured coding
principles

i would agree that the rpg cylce could be referred to as the first event driven
model
does that make it a Visual Basic ?

my experience with the cycle programs that i have worked with has always been 
that
1. they were not written well regardless of technique
2. the mere fact that the files were not full procedural made many of the
requirements for modification impossible to acheive no matter who the programmer
( maybe julian moneypenny could come up with a way )
3. there have even been times where the program was straightforward and easy to
understand
   but somebody is now requesting some new twists to the printed output...things
that you don't see everyday and things that do not adhere to fixed logic
4. no matter how it is written...some fool will clone a bad program becasue 
THEY are
too lazy
    to write clean code from scratch

do i think all cycle code programs are bad?
if the main advantage the programmer sees is fewer lines of code then yes

if it's just a one shot deal then no

would i ever want to write a cycle program that is to be kept around for a long 
time
?
why would i want to do that ? because i can ? so i can save a few minutes up 
front ?

because it's just a short little program ?
if it's just a short little program then how much effort do you think it would 
take
to
READ
PRINT
SETON LR

another thing
all of the job interveiws i've been to in the last few years they are telling me
a) if you know the cycle that's a plus because we have some old stuff
b) yes we have some old stuff but we dont write new stuff with the cycle
c) how do you code RPG ?
    answer: i write structured code, do my owns reads, chains etc...
    response: great jim, that's what wer'e looking for
d) can you write in RPGIV ?
    answer: learning more everyday...try to write everything in IV now
e) we have a bunch of RPG II Style stuff and we are looking for people who can 
write

    structured code...our systems are falling apart and we want to convert
everything to IV.

i have absolutey zero interest in writing new code using the antiquated, 
outdated,
mythical benefits of the rpg fixed logic cycle.

however i am open to working anywhere that has this stuff around if the aim is 
to
upgrade

i do whatever it takes to get the job done...i'll even maintain cycle code if 
the
job has other benefits that outweigh this big negative

aside from anything else...programming should have a certain degree of pleasure 
and
fun to go along with the work

i don't have any pleasure and fun writing cycle coded rpg
there are more places to work that offer me that which i enjoy doing than those 
that
require me
to do something i find repugnant

so knowing the cylce is a good thing, i agree
but like someone else on this list mentioned
it ain't makin no comeback!


--
Jim Welsh
Programmer/Analyst
Halkey-Roberts Corporation - St. Pete FL
727-577-1300 x279
http://www.netcom.com/~jimwelsh/welcome/welcome.html
mailto:jimwelsh@ix.netcom.com
whatever makes you happy


+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.