Hi,
This is more of a brainstorming question, rather than anything technical. I'd like to stop using my variant of hungarian notation, because it doesn't really look presentable, and it doesn't fit in with standard modern practice.
The way I write variables is like
Account_Number_n
Customer_Name_edt (Customer Name Edit box)
Customer_Name_s
IsNative_b
IsSenior_b
Transactions_n
nth_Transaction_n (This is used as a counter variable inside a loop)
nth_Transaction_Desc_s
I'd like to settle on a more standard style, but still wish to leave behind a reference telling a future developer what type of variable it is, with an arbitrary level of detail as needed.
Let's say the name of the module is calendar.prg.
Should I write a doc called calendar_vars.txt or calendar_vars.ini that is structured to reveal the type of variable, what function it's contained in, the scope, and some comments?
Or should I put it in a dbf table, like Calendar_vars.dbf, with fields like VARTYPE, SOURCEFIL, PROCNAME, SCOPE, DESC?
Or should this be approached differently? If you wanted to document your variables, so that a future developer (including yourself) would understand its purpose - but you DIDN'T want to mess up the variable name, and you didn't want to rely on short comments in your source file, how would you approach it?
I'd prefer not to depend on the standard method of documenting the variable inside the source, because that can get messy, as well. I'd like to include the docs in a separate document that's associated with the source file.