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



-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of James Lampert
Sent: Thursday, July 03, 2008 1:18 PM
To: RPG programming on the AS400 / iSeries
Subject: Re: Standards question: What is yourfeeling about
%found&%eofvs.%found(file) & %eof(file) ?

Funny: I have a Bachelor of Science degree in computer science, and I'm

<snip>

To repeat myself:

I. Have. Never. Once. Heard. Of. Such. A. Notion.


Funny, I have a BS in CS also, and I _have_ heard of such a notion.
http://en.wikipedia.org/wiki/Don%27t_repeat_yourself

From above, the OP may have been confusing DRY (Don't Repeat Yourself) with OAOO (Once And Only Once).
DRY generally covers data, documentation, and other information; while OAOO generally covers the code
itself.

On the other hand, some see DRY and OAOO as two different terms for the same thing:
(http://www.artima.com/intv/principles.html)
"Once and only once" is the Extreme Programming phrase. The authors of The Pragmatic
Programmer (October 1999; by Andrew Hunt and David Thomas) use "don't repeat yourself," or the
DRY principle.

Interesting discussions here:
http://c2.com/cgi/wiki?OnceAndOnlyOnce
http://c2.com/cgi/wiki?DontRepeatYourself

Surprising enough, Computer Science has changed in the 28 yrs since you got your degree James. New
terms, new ideas, and old ideas repackaged.

In any event, while the DYR and OAOO terms are new, as is the (attempt to?) formalize what exactly is
included; the idea, don't duplicate, is of course not all that new.

I'd agree that %eof(filename) doesn't violate DRY and/or OOAO.


Charles Wilt
--
Software Engineer
CINTAS Corporation - IT 92B
513.701.1307

wiltc@xxxxxxxxxx



john e wrote:
I don't think this is purely style, like indenting two or four
spaces. It's about a quite important principle and that is "don't
repeat yourself".

Funny: I have a Bachelor of Science degree in computer science, and I'm
fluent (or at least was fluent at one time) in (depending on whether or
not you count traditional BASIC and the QBASICs as separate languages) a
dozen HLLs and three different assemblers. I've probably forgotten more
HLLs than most programmers seem to have any interest in learning. By the
time I got out of high school, I knew BASIC (3 dialects) and FORTRAN
(WATFIV and IBM G1). The class I took almost 28 years ago (my freshman
year at the University), in structured programming was taught in Pascal,
and many of the more advanced classes were taught in PL/I. I've dealt
with COBOL, and I've dealt with LISP, and I've written recursive descent
parsers (including two in ILE RPG!).

Not once in two years of high school programming, five years at the
University, or the over two decades since I got my sheepskin have I ever
heard of any "quite important principle" of "don't repeat yourself."

I've certainly heard that if you're going through the same non-trivial
steps, in the same order, two or more times, you should probably
consider a subroutine, but I've never once heard of the notion that
explicitly referring to the same file more than once constitutes
"repeating oneself," or that doing so was in any way undesirable.



This e-mail transmission contains information that is intended to be confidential and privileged. If you receive this e-mail and you are not a named addressee you are hereby notified that you are not authorized to read, print, retain, copy or disseminate this communication without the consent of the sender and that doing so is prohibited and may be unlawful. Please reply to the message immediately by informing the sender that the message was misdirected. After replying, please delete and otherwise erase it and any attachments from your computer system. Your assistance in correcting this error is appreciated.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.