|
Antoine, Freeing up a character here and a character there goes a long way. Here are some suggestions. >IMHO, each word is important: >* App: we have both a global batch state and an application state. Updating >the global batch state can >also end in error. If there are only two states (or even if there are a couple others) and they are relatively common (many programs have variables that are named as such), the standard could possibly be modified to say "Application State - 'A' (or 'A$') prefix" and do something similar with the other states. >* State: we update both a state for error resuming and some file records. 'St' is a very common abbreviation for State. Why not use this? >* Upd: update operations are not the only one that can fail. Another likely >error cause is Not Found >while chaining. >* Fail: to distinguish success messages and failure messages. Instead of 'UpdFail' or 'NotFndFail', why not 'Err'? >* Msg: indicates a message identifier. There is also a wwAppStateUpdFail, >which is a procedure return >code. I'd keep this one. >wwAppStateUpdFailMsg could become wwAppSttUpdFlrMsg What about wwA$ErrUpdStMsg? Another suggestion, in naming, from left to right go generic to specific. That way the values will be grouped together in definition (assuming you keep them alphabetical). This allows you to possibly change an abbreviation from 'Err' to 'Er' and still make it somewhat passable (especially if you group them together _and_ give the group of field definitions a heading). There's probably all sorts of styles out there in regard to naming, but I honestly can't think of a situation where I couldn't get a field down to 15 in length (if not 14, I like a space between the D spec and the actual field name). Kurt Pour : RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx> cc : Objet : Re: Long Constant Names jstevens@xxxxxxxxxxxxxx Envoyé par : rpg400-l-bounces@xxxxxxxxxxxx 28/12/2004 14:36 Veuillez répondre à RPG programming on the AS400 / iSeries I tend to agree with Michael. Although I usually don't like names were there are several letters that represent an entire word - like wwASUFM. I prefer to see names that use a 3 character mnemonic code. Maybe something like wwAppUpdMsg. Just IMHO. Jeff Stevens Mize, Houser & Co. P.A. 913 451 1882 JStevens@xxxxxxxxxxxxxx Michael Jacobsen <MJacobsen@xxxxxxxxxxxxxxxx> Sent by: rpg400-l-bounces@xxxxxxxxxxxx 12/28/2004 07:29 AM Please respond to RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx> To RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx> cc Subject Re: Long Constant Names Personally, I agree with the convention team. Having a name that is too long is just as hard to read (within the code) as a name that is too short. The problem I have with longer names is that I often will run out of space in the extended factor 2 or other specifications where they are used. I think a good meaningful name can be created within the 15 char limit. Your example of wwASUFM is one that is too short. (7 Chars) Mike rpg400-l-bounces@xxxxxxxxxxxx wrote on 12/28/2004 05:24:52 AM: > > Hi group, > > I'm having an argument with the team that choose our shop's coding > style conventions. I'd like to have your opinion on the subject. > > The heart of the matter lies in this kind of constant declaration: > > DwwAppStateUpdFailMsg... > D C '...' > > The convention team says this name is too long. They want everybody to > keep their names within the 15-character limit -- indeed, 13 > meaningful characters after you add the two-character prefix. > > I think this name is already on the short side. Using so many abbreviations won't make newcomers' work any easier. > Still, isn't it more readable than wwASUFM for instance? -- This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/rpg400-l or email: RPG400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives Les informations contenues dans ce message sont confidentielles et peuvent constituer des informations privilegiees. Si vous n etes pas le destinataire de ce message, il vous est interdit de le copier, de le faire suivre, de le divulguer ou d en utiliser tout ou partie. Si vous avez recu ce message par erreur, merci de le supprimer de votre systeme, ainsi que toutes ses copies, et d en avertir immediatement l expediteur par message de retour. Il est impossible de garantir que les communications par messagerie electronique arrivent en temps utile, sont securisees ou denuees de toute erreur ou virus. En consequence, l expediteur n accepte aucune responsabilite du fait des erreurs ou omissions qui pourraient en resulter. --- ----------------------------------------------------- --- The information contained in this e-mail is confidential. It may also be legally privileged. If you are not the addressee you may not copy, forward, disclose or use any part of it. If you have received this message in error, please delete it and all copies from your system and notify the sender immediately by return e-mail. E-mail communications cannot be guaranteed to be timely secure, error or virus-free. The sender does not accept liability for any errors or omissions which arise as a result. $!1$! -- This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/rpg400-l or email: RPG400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l.
As an Amazon Associate we earn from qualifying purchases.
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.