× 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: what is unclear about 01 02 03 -Reply
  • From: Hans Boldt <boldt@xxxxxxxxxx>
  • Date: Wed, 6 May 1998 12:36:16 -0400

Scott:  While good comments are a requirement of any readable and
maintainable program, most modern coding guidelines recommend
against comments that just echo what the code already says.  The best
code is written in such a way that you don't need to read the comments
to understand what it does.  Techniques such as modularization and
meaningful variable and procedure names help to achieve readable
programs.

Having too many comments results in the following:
1) Comments can easily get out of synch with the code
2) It is not immediately clear which comments offer useful and
   meaningful insight into the logic.

Cheers!  Hans

Hans Boldt, ILE RPG Development, IBM Toronto Lab, boldt@ca.ibm.com




owner-midrange-l@midrange.com on 98-05-06 10:03:20
Please respond to MIDRANGE-L@midrange.com
To: MIDRANGE-L@midrange.com
cc:
Subject: Re: what is unclear about 01 02 03 -Reply


This is a multi-part message in MIME format.
--------------------------------------------------------------------------------
    I have followed this thread from the beginning.  I have only one question
about any of the coding that has been displayed.  Wouldn't it be better if the
code looked like this?


C            If           (Amt$ > Warn$) AND                        Check
Amount against Warn
C                        (Custcd < BestCD) AND                    Check Cust
Crd against Best crd
C                        (Region = Midwest)                           Check
region
C            Exsr      Warn
Warning subroutine
C            Endif
End Amt$, Custcd, Region


    With all of this talk about proper coding I have not seen one mention of
comment your code for "Others".
    This is just an observation.


Scott Swaim
scott71@hpnc.com
         C        If         (Amt$ > Warn$) and
      C                     (CustCd < BestCD) and
      C                     (Region = MidWST
      C        Exsr       Warn
      C        Endif



--------------------------------------------------------------------------------

+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@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
+---


 - x

x


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.