× 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.



I have been silently following this thread and, Alan, you hit the nail on
the head.  Readability isn't as much for me to go back and figure out what I
was doing a few weeks, months, years ago.  It's more for the next guy (or
gal).

Personally, I had never seen this particular RPG grammar and couldn't figure
out what it was trying to do until about a dozen emails in.  I studied
computer science in college in the mid 1980's and we were told then that
structured techniques and readability was most important.  Prior to that,
when memory and processing time was more expensive than payroll, short
efficient code was preferred.  Now that payroll costs more than the computer
time, it's most cost effective for all the developers to be able to read and
understand one another's code as quickly as possible.

I'd really like to know how many bugs are introduced into applications
simply because a coder didn't fully understand an obscure programming
technique.

Rick Weber  |  TOYS 'Я' US International 


-----Original Message-----
From: Cassidy, Alan [mailto:CassidyA@xxxxxxxxxx] 
Sent: Thursday, December 14, 2006 8:36 AM
To: RPG programming on the AS400 / iSeries
Subject: RE: Quick question on readability




It seems clear to me, I was delighted when I saw Guthrie's pointer on
iseriesnetwork that you could do that. I might avoid it for the next guy,
though, a lot of times I do things for clarity in maintenance.

Like: 

select 
when Field1 = 'A'
...do this....
when Field1 <> 'A'
...do something else...
endsl 

--Alan
______________________________


Subject: RE: Quick question on readability
Adam Glauser wrote:
var1   = (eval var2 = value)

That little eval is rather important, and I'm in agreement as well that 
this is not something that should be used frequently.

Roger Harman wrote on 13/12/2006 02:11:19 PM:

Or maybe not used at all.  The nested eval is not all intuitive.  I'll
take repetitive lines of code over that any day.

From the classic  "The Elements of Programming Style"..
   Write clearly - don't be too clever

I agree.  The only reason I could see to use the nested structure is that 
it might save a few cycles.  Sometimes that is the case with similar 
constructs in C.  Of course, if you really need uber-efficiency that 
badly, C is probably a better bet anyway.



As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.