Brian, though mixed case IS easier for reading it seems simpler to just use camelBack ..
Tuesday, September 27, 2005, 1:48:46 PM, you wrote: BL> Kevin, BL> I disagree, for a simple reason: BL> I use alpha labels that make sense and then place them in the code in BL> alphabetical order. BL> Problem solved <grin>. BL> Just a few off the top of my head (it's late here): BL> 1. If using UniVerse, use mixed case to encourage readability when scanning BL> through a program with upper case reserved for constants, common, file and BL> select variables so they stand out as different, as in: BL> Fin = @False BL> Loop BL> ReadNext Id From SLIST Else Fin = @True BL> Until Fin Do BL> Read OrderRec From ORDERS, Id Then BL> GoSub ProcessRecord BL> End BL> Repeat BL> 2. A GoSub should perform a single action. Jumping into a second label BL> inside a GoSub just sucks. BL> Return To should be banned. BL> 3. Have a single exit point from a program or subroutine. BL> 4. Separate out the business logic from the screen processing (if any): BL> that way if you want to reengineer the application or reuse the rules in BL> another context it is so much easier. BL> 5. Hold file variables in named common. BL> 6. Name record variables after the file from which they originate. BL> 7. Equate all field names (preferably automatically) in include files. BL> I use the format FILENAME.FIELDNAME to disambiguate e.g. BL> EQU CUSTOMER.SURNAME TO 1 BL> So I can reference: BL> CustomerRec<CUSTOMER.SURNAME> BL> BL> Above all, be consistent. There are many good practices out there, most of BL> them are common sense but they only work if applied consistently. BL> Brian >> -----Original Message----- >> From: [EMAIL PROTECTED] >> [mailto:[EMAIL PROTECTED] On Behalf Of Kevin King >> Sent: 27 September 2005 21:04 >> To: u2-users@listserver.u2ug.org >> Subject: RE: [U2] Good Programming Practice Question......... >> >> And here's where the conflict begins. When looking through a >> big program, I much prefer numeric labels in order with comments vs. >> alphanumeric labels. With numeric labels in order you find >> 1800 and if you're looking for 2000 you know to look farther >> down, 1000, go up. >> With alpha labels if you find SELECT.FILE and are looking for >> UPDATE.FILES, you have nothing but experience to know whether >> to look up or down from there. >> >> Numeric labels are good. Not ordering or commenting them is >> bad. And not putting comments around all labels to make them >> more easily distinguished from the rest of the program is >> near unforgiveable. >> >> -K >> >> -----Original Message----- >> From: [EMAIL PROTECTED] >> [mailto:[EMAIL PROTECTED] On Behalf Of Allen E. >> Elwood >> Sent: Tuesday, September 27, 2005 12:40 PM >> To: u2-users@listserver.u2ug.org >> Subject: RE: [U2] Good Programming Practice Question......... >> >> My addition to this would be to use alphanumeric labels, and >> to *have* a main calling section. A main calling section >> that looks like: >> >> GOSUB OPEN.AND.INIT >> GOSUB SELECT.FILE >> GOSUB PRE-PROCESS.VALIDITY.CHECKS >> GOSUB PRINT.INVOICES >> GOSUB UPDATE.FILES >> >> Looks so much better and is so easier to figure out than >> >> GOSUB 100 >> a bunch of statements >> a bunch of statements >> a bunch of statements >> GOSUB 1250 >> a bunch of statements >> a bunch of statements >> a bunch of statements >> GOSUB 1375 >> a bunch of statements >> a bunch of statements >> a bunch of statements >> GOSUB 4000 >> a bunch of statements >> a bunch of statements >> a bunch of statements >> GOSUB 9755 >> a bunch of statements >> a bunch of statements >> a bunch of statements >> >> IMNSHO - *=aee=* >> >> -----Original Message----- >> From: [EMAIL PROTECTED] >> [mailto:[EMAIL PROTECTED] Behalf Of George Gallen >> Sent: Tuesday, September 27, 2005 12:12 >> To: u2-users@listserver.u2ug.org >> Subject: RE: [U2] Good Programming Practice Question......... >> >> >> Also, how about a change log at the top of the program >> that lists, who, when and what/why a change was made. >> >> add to that a short description as to what the function >> of the program is for. >> >> * this program does ..... >> * >> * >> * date who changes made >> * date who changes made >> ******************************************** >> * >> >> George >> >> -----Original Message----- >> From: [EMAIL PROTECTED] >> [mailto:[EMAIL PROTECTED] Behalf Of >> Dianne Ackerman >> Sent: Tuesday, September 27, 2005 2:57 PM >> To: u2-users@listserver.u2ug.org >> 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: >> ------- >> u2-users mailing list >> u2-users@listserver.u2ug.org >> To unsubscribe please visit http://listserver.u2ug.org/ >> ------- >> u2-users mailing list >> u2-users@listserver.u2ug.org >> To unsubscribe please visit http://listserver.u2ug.org/ >> >> -- >> No virus found in this incoming message. >> Checked by AVG Anti-Virus. >> Version: 7.0.344 / Virus Database: 267.11.7/112 - Release Date: >> 9/26/2005 >> ------- >> u2-users mailing list >> u2-users@listserver.u2ug.org >> To unsubscribe please visit http://listserver.u2ug.org/ BL> ------- BL> u2-users mailing list BL> u2-users@listserver.u2ug.org BL> To unsubscribe please visit http://listserver.u2ug.org/ BL> __________ NOD32 1.1234 (20050927) Information __________ BL> This message was checked by NOD32 antivirus system. BL> http://www.eset.com -- DSig ````` David Tod Sigafoos ( O O ) _______oOOo__( )__oOOo_______ "...our behavior matters more than the beliefs that we profess." Elizabeth Deutsch Earle ------- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/