*Hi Greg* Check out the new Power Tools for VS2010 http://visualstudiogallery.msdn.microsoft.com/en-us/d0d33361-18e2-46c0-8ff2-4adea1e34fef
Especially the "*Align Assignments*" feature Turns this into You will love that one!! ;-) .peter.gfader. http://blog.gfader.com/ http://twitter.com/peitor On Mon, Apr 26, 2010 at 11:53 PM, Greg Harris < [email protected]> wrote: > > My 2c worth... > > > > As we spend so much time looking at code, it should be as clear as > possible, to help us understand what we are looking at, to achieve that I > follow a strong naming standard on all projects I have control over. > > · Class/object variables start with an underscore. > > · Method argument variables start with an “a” (argument). > > · Local method variables start with an “l” (local). > > > > 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: > > // Instance private data > > private string _Name ; // The name that the member is known by > > private string _MemberNumber ; // Membership number > > private int _expiryMonth ; // Month that the membership expires > range = 1..12 > > private int _expiryYear ; // Year that the membership expires > > // (four digit years, so 2010 is 2010, > not 10) > > > > Our brains are very good a pattern matching, so we should help them with > this sort of layout style. > > > > 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. > > > > All the best > > Greg Harris >
