Sando project defaults and standards

Jan 18, 2012 at 7:58 PM
Edited Jan 18, 2012 at 7:58 PM

Hi guys,

Before we dig into coding, I'd like to talk a little about the rules, defaults for our project.

Code formatting (Options -> Text Editor -> C# -> Formatting) - as we are going to work together on the same projects or even files, it would be better to have the code formatting settings the same on all the machines, so that we can see the real changes while comparing different file versions (and avoid the situation, when single line change caused the whole class code to be reformatted, so that in the repo you see that all lines have been changed).  

Here's my settings - if any of you wants a change for any of them, let me know - I can adjust mine - I only think it's better when everyone have these settings the same. 

  • General tab - all checked
  • Indentation - all except "Indent open and close brackets" checked. For labels - second option selected
  • New lines - all checked
  • Spacing - after colon, comma, semicolon; before colon. before and after binary operations. All others unchecked
  • Wrapping - all checked

For the tabs settings I have smart, keep tabs and 4 as a size.

Project namespace - my proposition is to make the default namespace as Sando, i.e. Sando.Indexer as default Indexer project namespace

Unit test framework - I strongly recommend NUnit - can we make it the default one?

 

That's all for now - please feel free to add any comments on that, especially when you see any other part of the project, where we should discuss the defaults

Regards

Jan 18, 2012 at 9:44 PM

Great stuff! Thanks for bringing up these issues and helping to keep this project on the right track!

-- 

Code formatting - I've updated my code formatting settings so any new code I check in should be in the right format.

Project namespace - I agree with your suggestion for namespaces and will update my classes soon.

Unit test framework - NUnit sounds good to me!

--

Jan 18, 2012 at 10:24 PM
Edited Jan 19, 2012 at 7:37 PM

One additional thing - I've created libs folder for storing common 3rd-party libraries - I've placed nunit framework lib there - when you feel like the library you are planning to add to your project can or will be also used somewhere else, move it to this directory.

 

If you plan to use nunit for your unit tests, there is a useful VS plugin, which additional window for running Nunit tests - Visual Nunit 2010:
http://visualstudiogallery.msdn.microsoft.com/c8164c71-0836-4471-80ce-633383031099

 

Oh - and one question/sentence about the TortoiseHG - as I see in the source code tab, my changes were submitted using my name as an author. Additionally this name is a link to the profile which is not mine - is it because of the HgWorkbench setting (settings -> tab: commit, field: username)?

If so (I hope it's because of that), it will be probably good to set this on our machines using our logins - like Dave did, so that commits are described in the right way and everyone know who submitted the change.

If I'm wrong and this is because of some other setting - let me know where to change it so that my submissions are under my login name...

Jan 24, 2012 at 2:51 AM
lordlothar wrote:

Oh - and one question/sentence about the TortoiseHG - as I see in the source code tab, my changes were submitted using my name as an author. Additionally this name is a link to the profile which is not mine - is it because of the HgWorkbench setting (settings -> tab: commit, field: username)?

If so (I hope it's because of that), it will be probably good to set this on our machines using our logins - like Dave did, so that commits are described in the right way and everyone know who submitted the change.

If I'm wrong and this is because of some other setting - let me know where to change it so that my submissions are under my login name...

I finally changed my username from davidshepherd -> davidcshepherd so that the link shows up like lordlothar's does.  

FYI, others, see above comment if you want to update yours.