Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Re: Linugistics & COBOL design
james8049 wrote:

> FLAMEBAIT

Okay, I'll bite.  ;)

> Badly written if statements can be totaly ambiguous.

You can say that about any language.  I've seen an If that took some
time to dissect, but I've never seen one that, upon close examination,
couldn't be discerned.  :)

> A western reader's brain is hard wired to process periods in "firmware"
> - you simply do not "see" them, which is why nearly every language since
> has picked the semi-colon or something equaly big and obviuous as a
> statement terminator.

There is a style of coding where the usage of periods is greatly
reduced.  (Of course, that leads to what my English teacher would call a
"run-on sentence", but the compiler doesn't seem to care...)

> A sentence with lots of long words does not make good reading in
> English, and, a convulted Perform or Inspect with 30 character
> qualified field names make some COBOL programs harder to read then the
> small print in an insurance contract.

I agree that qualification sucks.  I understand its usefulness in
certain situations, but it does lead to longer-than-necessary code
throughout the program, just to be able to say "move corr a-group to
b-group".

However, I was also taught that variable names such as "x", "y", "c",
"n", etc., were to be eschewed in favor of more meaningful names.  I've
got to say that, in my maintenance experience, I agree with this
whole-heartedly.  I shudder when I think about the program that had a
3-D table, and six variables named "sub", "sub-2", "sub-3", "sub-4",
"sub-5", and "sub-6".  It took execution analysis just to figure out
what that spaghetti was doing!  (I was also under a severe time-crunch,
and I had never worked on the program before.)

Meaningful names are a must.  I've found that by dropping the dashes and
using mixed case, COBOL's 30 characters are usually enough to make
something meaningful.  :)

(I'll own up to using "x" as a loop counter only in tightly-defined
loops, where the inside of the loop is only a few lines.  But, if I'm in
a larger loop, it's "charIdx" or "customerTableEntry" or something like
that.)


--
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~
~   /   \  /         ~        Live from Montgomery, AL!       ~
~  /     \/       o  ~                                        ~
~ /      /\   -   |  ~          LXi0007@Netscape.net          ~
~ _____ /  \      |  ~ http://www.knology.net/~mopsmom/daniel ~
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
~         I do not read e-mail at the above address           ~
~    Please see website if you wish to contact me privately   ~
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~

Report this thread to moderator Post Follow-up to this message
Old Post
LX-i
07-21-04 01:55 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Cobol archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 08:16 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.