.         Class/object variables start with an underscore.

 

This has been discussed and there are mixed feelings in the community. I
personally dins underscores anywhere in source code painful to the eye.

 

.         Method argument variables start with an "a" (argument).

.         Local method variables start with an "l" (local).

 

I'm surprised no one spanked you over these ones, as Hungarian naming is
OUT. You must be one of the last people on the planet doing that in .NET (I
hope I'm right?!).

 

Also I switch off all auto formatting so I can do it myself better than the
machine will do it, so you will see my code looking like:

  private string _Name         ; // The name that the member is known by

  private string _MemberNumber ; // Membership number

 

Yoiiks! I don't like that much. I know they eye is good at looking for
vertical patterns, but I think this differs too much from the bulk of code
around town. We used to have arguments in the 80s about coding COBOL that
vertical alignment way.

 

I have a rule I call the 3am rule, you should be able to look at code at 3am
and immediately be able to understand what it does and how it does it.  If
you can't, you need to refactor your code for clarity.

 

I wish modern IDEs could take comments in the form of annotations and
callouts in different fonts. Imagine comments like smart tags that could be
mouse hovered and expanded and collapsed and formatted like a word
processor. This would help at 3am.

 

Greg (K)

Reply via email to