On Wed, Feb 27, 2008 at 6:43 PM, Dave Watts <[EMAIL PROTECTED]> wrote:

>>> My problem with comments in general is that I often see them used to
describe things that are self-describing,

I tend to agree with Dave. IMO comments should tell ppl the what and why you
are doing something.

I have been a long time advocate of self documenting code. Even if it is as
simple as including the data type on database column or variable names

UserID
strUserName
curTotalCost
bitIsActive
lkpTblStatesID (lkp being my shorthand for a lookup).

OR for naming data structures
StructUsersAddress
listCategoryIds
qrytblUsers

Or for table names and PK's for a Lookup table
lkpTblStates
lkpTblStatesID

Or function names:
GetUserRightsStruct()
GetIDListofHippiesWhoHateWater()

I have gotten flak about this before because it can get rather verbose. But
I can walk into code I wrote years ago and know what is what on sight.


-- 
"I get up every morning determined to both change the world and have one
hell of a good time. Sometimes this makes planning my day difficult."
 - E. B. White


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:300038
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to