× 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: Commenting Code Was ->(Re: IBM pushing Java)
  • From: John Carr <74711.77@xxxxxxxxxxxxxx>
  • Date: Wed, 31 Mar 1999 23:14:01 -0500


RE:     Commenting Code   Was ->(Re: IBM pushing Java)
Jeff,  Larry ,  etc

I'm of the persuasion that,  all that should be in the code is the 
"Active" code.  

What you were attempting Jeff is a very needed function; ie Version Control.

Ultimately the ideal would to be able to "Roll back" one version ago, two
versions ago, etc.  
Or Date specific.  Like "Make it like it was Last Friday the xxth" .

All other mechanisms fall short of that ideal, and cause numerous problems.   

After a short while,  the code is unreadable because of the "History"
contained within it.  

What is of the most concern is whether the code reflects the business
reality or not(what is currently executing).  The other considerations
should be handled though the Testing, Documenting(in a separate document)
Version archiving, and the movement into production. 

We all have see a programs that you literally have to move to a 
"New" member,  delete out all the commented out dead wood, then 
after all of that you can actually start reading the code to see 
what it is doing.  (Not what it did 5 years ago, when Bob/Mary 
last modified it to not do .....(whatever)....)

Who cares in 90% of the time.  
Is it doing what it is suppose to?  No? Then change it to emulate the
"Current" business reality.

Use some other tool that was designed to do your version control 
function for you .

(If commented-out code is a shop standard,  It's a bad one)

Not that I'm shy about my opinions.  They are just that, My opinions. 
But they were formed after 20 years and Lots of code, and lots of 
shops(each with their own standards)

Just a thought.

John Carr  (running and ducking)





Okay,

        Just a quick jump in here.  When I have to remove large blocks of
code, rather than comment them, I rename the subroutine, to oldnnn, add and
exsr within my *INLR IFNE *INLR condition, and the rewrite the subroutine
with all the new code.  Of course I tend to write in subroutines with very
minimal mainlines so this makes this method of coding easy.  Old routines
stay active for 1 iteration of the code, then the whole routine gets
commented intact, so the next programmer can easily see what it did verses
what it does, and can even back out the changes by updating the exsr
statements.

        An yes I also code C and C++ so I am very use to putting as much
logic as possible into functions/subroutines, and keeping a though/function
to a single screen full of code.

        JMS...


-----Original Message-----
From: Larry Bolhuis <lbolhui@ibm.net>
To: MIDRANGE-L@midrange.com <MIDRANGE-L@midrange.com>
Date: Wednesday, March 31, 1999 9:03 AM
Subject: Re: IBM pushing Java


>> Our company's standards -insist- that the old code be commented out and
>> left in place, noted with the Assigned Task Number so everyone knows when
>> the code was changed.
>>
>> It makes some programs almost impossible to read.
>
>  I have a customer who is a blind programmer.  He has a laptop that reads the
>screens to him.    Have someone read you a 20 line RPG subroutine where 15 of
>them are commented out (be sure to have them read the entire line even with '*'
>in column 7) and see if YOU can say what the subroutine does!  If for no one
>else but him,  I no longer leave code commented out in my programs.
>  - Larry
>Larry Bolhuis         |
+---
| 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 ...


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.