Yes good one.

The more readable your code the easier to DEBUG and to reuse.


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Dianne Ackerman
Sent: Tuesday, September 27, 2005 11:57 AM
To: [email protected]
Subject: Re: [U2] Good Programming Practice Question.........

I like these and would add another one - Add comments to tricky-looking 
code!
-Dianne

David A. Green wrote:

>I've been teaching UniBasic for over 10 years and here are some of the
>methods I teach:
>
>* Subroutines should only have one job.
>* Subroutines should be short. (less than 10 lines)
>* Subroutines should have one entrance and one exit.
>* Use meaningful variable names and subroutine names.
>* Be consistent in your naming conventions.
>* Don't hard code Numbers, Strings, or Attributes.
>* Use CASE over IF...THEN when there are more than two options.
>* Use LOOP...WHILE/UNTIL...REPEAT over FOR...NEXT with IF Conditions.
>* Use REMOVE to traverse a dynamic array.
>* Use a Simple Variable on Conditional Statements.
>* Use UniData Internal Variables whenever possible; i.e. @AM, @VM, @DATE.
>
>Thank you,
>David A. Green
>DAG Consulting
>(480) 813-1725
>www.dagconsulting.com
>
>
>-----Original Message-----
>From: [EMAIL PROTECTED]
>[mailto:[EMAIL PROTECTED] On Behalf Of Fawaz Ashraff
>Sent: Tuesday, September 27, 2005 8:23 AM
>To: [email protected]
>Subject: [U2] Good Programming Practice Question.........
>
>Hi All,
>
>We are planning to train some of our new programmers
>to use good programming practices when using U2 Basic.
>I can remember in Unidata days us having some tech
>support documents that talked about this. Example such
>as when is the best time to use CASE instead IF & ELSE
>or not to use GOTO statments.
>
>I am sure some of you may have some input in this
>topic. If you have some documents, notes or thoughts
>on this, can you please share with us?
>
>When I get all the technical tips, I can compile this
>to a document and share with our new programmers as
>well as U2 listserver community.
>
>Thanks
>
>Mohamed
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to