On Mar 4, 6:10 pm, Simon Verona <[email protected]> wrote:
> Agreed about the long term benefits of rewriting!
>
> Also whilst we're at it - fire any programmer that uses goto, return
> to, undescriptive variable names or seems incapable of writing
> comments. Though I did work with a programmer who claimed comments
> were unnecessary because the code was"self-documenting"!! Strangely
> enough he also was a big "goto" user....
>
> Simon
>
Perhaps controversially, I believe that comments are often a result of
somewhat shabby work. We ought to think twice. Look at the code you've
written and see if there are changes you could make to it that would
make it self explanatory. That little bit of extra effort is, in my
opinion, better than taking the easy way out by throwing in a comment
or two. One argument in favour of this approach is that comments can
end up misleading or extraneous after a code change. It'd be easy for
a programmer to get in and fix or change something, get the code
working as it should, and overlook that the comment should also have
been changed.
And - to add some extra heat to this discussion - GO can sometimes
(although very rarely) have its place. I've seen code that has a flag
set where a GO could have been employed, with multiple subsequent
tests on that flag scattered through the code. In this particular
example, use of a GO would have removed the need for the flag and
simplified the code. OK - the alternative would be to rewrite the
code, but that can be (and usually is) nowhere near cost-effective.
Mike.
--~--~---------~--~----~------------~-------~--~----~
Please read the posting guidelines at:
http://groups.google.com/group/jBASE/web/Posting%20Guidelines
IMPORTANT: Type T24: at the start of the subject line for questions specific to
Globus/T24
To post, send email to [email protected]
To unsubscribe, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/jBASE?hl=en
-~----------~----~----~----~------~----~------~--~---