JamesBowen
19+ years progress programming and still learning.
HI All.
In my job there are three developers and we have all our own coding style, methodology and best practice. But we don't have a in house Coding Standards and I would like to write one.
If any body has already written one, which I could use a base template that world be great.
I am not a code Nazi, it just sometimes a spend hours looking a someone else code only to be more confused and not being very productive.
One thing I do preach is variable naming. For example variables should have and meaningful name like for "Transaction Number" would become iTransactionNumber
. Where other developers would use vtranum
.
I like to use prefixes for variables depending on there datatype/prarmeter/global. Example:
c character/longchar
i integer/int64
d decimal
m memptr
rd raw
r rowid
da date
dt datetime
dz datetime-tz
s stream
If it's a input parameter prefix it with 'p' Example:
define input parameter pcUserName as character no-undo.
Also if it and output or input/ouput parameter prefix it with 'op' Example:
define output parameter opcUserName as character no-undo.
define input-output parameter opcUserName2 as character no-undo.
Anyway you hopefully you get my point.
Many Thanks.
In my job there are three developers and we have all our own coding style, methodology and best practice. But we don't have a in house Coding Standards and I would like to write one.
If any body has already written one, which I could use a base template that world be great.
I am not a code Nazi, it just sometimes a spend hours looking a someone else code only to be more confused and not being very productive.
One thing I do preach is variable naming. For example variables should have and meaningful name like for "Transaction Number" would become iTransactionNumber


I like to use prefixes for variables depending on there datatype/prarmeter/global. Example:
c character/longchar
i integer/int64
d decimal
m memptr
rd raw
r rowid
da date
dt datetime
dz datetime-tz
s stream
If it's a input parameter prefix it with 'p' Example:
define input parameter pcUserName as character no-undo.
Also if it and output or input/ouput parameter prefix it with 'op' Example:
define output parameter opcUserName as character no-undo.
define input-output parameter opcUserName2 as character no-undo.
Anyway you hopefully you get my point.
Many Thanks.