<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://devlicio.us/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en"><title type="html">Hadi Hariri</title><subtitle type="html" /><id>http://devlicio.us/blogs/hadi_hariri/atom.aspx</id><link rel="alternate" type="text/html" href="http://devlicio.us/blogs/hadi_hariri/default.aspx" /><link rel="self" type="application/atom+xml" href="http://devlicio.us/blogs/hadi_hariri/atom.aspx" /><generator uri="http://communityserver.org" version="4.1.31106.3070">Community Server</generator><updated>2010-12-10T12:26:00Z</updated><entry><title>Last Post</title><link rel="alternate" type="text/html" href="/blogs/hadi_hariri/archive/2012/04/10/personal-blog.aspx" /><id>/blogs/hadi_hariri/archive/2012/04/10/personal-blog.aspx</id><published>2012-04-10T18:03:00Z</published><updated>2012-04-10T18:03:00Z</updated><content type="html">&lt;p&gt;I was invited to join Devlicious a few years ago by Jak and Brendan and very thankful for the opportunity. During this time, I have cross-posted some of my posts on both my &lt;a href="http://hadihariri.com"&gt;personal site&lt;/a&gt; as well as here, and have found that as a result, conversations become segregated; somewhat expected. &lt;/p&gt;
&lt;p&gt;As grateful as I am of the the privilege of being part of this great community, I value greatly conversations that arise from posts, and prefer to keep them in one place. It is easier for me, as well as you, dear reader.&amp;nbsp;For this reason, I&amp;#39;ll no longer be posting on here. If you&amp;#39;d like to continue the conversations, &lt;a href="http://hadihariri.com"&gt;find me at my blog&lt;/a&gt;. I&amp;#39;d love for you to join&amp;nbsp;the recent one about &lt;a href="http://hadihariri.com/2012/04/09/dealing-wht-the-too-many-dependencies-problem/"&gt;Dealing with Too many dependencies&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Once again, thank you to Jak, Brendan, and the entire Devlicious community, including my fellow bloggers. And most importantly, thank &lt;i&gt;you&lt;/i&gt;.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicio.us/aggbug.aspx?PostID=69654" width="1" height="1"&gt;</content><author><name>hhariri</name><uri>http://devlicio.us/members/hhariri/default.aspx</uri></author></entry><entry><title>Submit a patch</title><link rel="alternate" type="text/html" href="/blogs/hadi_hariri/archive/2012/02/06/submit-a-patch.aspx" /><id>/blogs/hadi_hariri/archive/2012/02/06/submit-a-patch.aspx</id><published>2012-02-06T16:56:08Z</published><updated>2012-02-06T16:56:08Z</updated><content type="html">&lt;p&gt;We love to complain, and Twitter has just made is so much easier. By merely including a handle or keyword of some company or product, we can attract the attention of those we’re moaning about and have them run to try and solve our problem. The speed at which they run is proportionally direct to the number of followers we have or the ‘people we know’ (I have 10 followers but my best friend is a celebrity with 300K followers and RT’s anything I ask him to). Apparently it’s called Social Media Damage Control. &lt;/p&gt;  &lt;p&gt;When it comes to software products, we’re quite good at it too. After all, that’s why we pay for software, to have someone to hear our roar on the other end of a phone, a forum or a twitter handle. &lt;/p&gt;  &lt;p&gt;But that only applies to commercial software.&lt;/p&gt;  &lt;p&gt;When it comes to OSS however, it seems different rules apply. Specially when it&amp;#39;s free. Complaining about OSS is often viewed as ungrateful behavior. Numerous times I’ve seen reactions from OSS developers, contributors or merely a simple passer by, responding to a complaint with: &lt;strong&gt;&lt;em&gt;submit a patch &lt;/em&gt;&lt;/strong&gt;or &lt;strong&gt;&lt;em&gt;well if you can do better, write your own framework. &lt;/em&gt;&lt;/strong&gt;In other words, put up or shut up. &lt;/p&gt;  &lt;h1&gt;We’re not all Einstein&amp;#39;s&lt;/h1&gt;  &lt;p&gt;It’s not always a patch they are after. At times, when you find a bug, an OSS team member can ask you for a failing unit test. Now granted that we all strive to unit test and promote unit testing, feeling that every developer should know, understand and practice unit testing, the reality of the matter is that it’s not all green pastures out there. For one reason or another, not everyone has that knowledge, the ability or the opportunity to. So often, sending a failing unit test can seem daunting. &lt;/p&gt;  &lt;p&gt;Of course, coming back to patches, there’s the added issue of figuring out how to work with the given source control the project is using, get the right unit testing frameworks to run, creating new unit tests, making the necessary changes, submit them and wait for your pull request to be accepted.&amp;#160; And that’s if the project is using a DVCS and you can figure out what Pull, Push, Clone, Fork and Checkout mean. All this doesn’t even take into account that you need to figure out how the actual code-base works. And we all know understanding other people’s code isn’t easy.&lt;/p&gt;  &lt;p&gt;For someone that is merely using an OSS project, all this can be overwhelming, not to mention intimidating at times. &lt;/p&gt;  &lt;h1&gt;Lowering the barrier to adoption&lt;/h1&gt;  &lt;p&gt;The OSS community often complain how big “Enterprise” and “Microsoft” shops don’t buy into OSS. It seems they go for commercial software in order for their legal departments to have someone to sue in case things go wrong. A little far-fetched of course, but nonetheless something you hear often. These shops also go for commercial software because it provides them with someone to call, someone that won’t tell them to submit a patch or provide a unit test. Someone they can call when they need support and not be judged (or at least not humiliated publicly on a forum or mailing list). Of course, the somewhat sad irony of this is that often, the support provided on OSS projects outdoes commercial products by a long shot, and that’s not to mention OSS projects that offer the possibility of commercial support. &lt;/p&gt;  &lt;p&gt;However, we need to look at ourselves and see how much of this low adoption of OSS that we’re so passionately fighting for is our fault. If we expect all the users of our projects to know how to work with our source control or compile the source and deal with dependencies, submit patches or work with our testing framework, all we’re doing is raising the entry barrier to OSS.&lt;/p&gt;  &lt;p&gt;Before shouting that I’m stereotyping OSS projects, I’m not. I’m well aware that there are amazing projects out there with beautiful and thoughtful teams and communities around them that make many commercial support alternative envious. However, I’ve seen the &lt;em&gt;submit a patch &lt;/em&gt;attitude often enough, over the many years I’ve been involved in OSS to warrant mentioning it. &lt;/p&gt;  &lt;h1&gt;What about me? What about my time? &lt;/h1&gt;  &lt;p&gt;Now there is the opposite side to all this. You. The Project Lead. The Core Contributor. The guy that has spent several years of his life giving to the community, contributing to OSS projects, helping others. Why should you, despite having given so much, take more of your time to help others. The minimum, that someone that is using your project (for free might you add), owes you, is a failing unit test. No? Not just some lousy steps to reproduce… &lt;/p&gt;  &lt;p&gt;Here’s the thing. If you’re working on OSS, you’re doing it because you are benefiting from it. You benefit because you enjoy it. You benefit because you learn. You benefit because you potentially can rise to fame (albeit a micro-celebrity), and you benefit because it can ultimately provide you with potential consulting and training opportunities.&lt;/p&gt;  &lt;p&gt;Nobody owes you anything for working on OSS! &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicio.us/aggbug.aspx?PostID=69469" width="1" height="1"&gt;</content><author><name>hhariri</name><uri>http://devlicio.us/members/hhariri/default.aspx</uri></author><category term="OSS" scheme="http://devlicio.us/blogs/hadi_hariri/archive/tags/OSS/default.aspx" /></entry><entry><title>Providing Intellisense, Navigation and more for Custom Helpers in ASP.NET MVC</title><link rel="alternate" type="text/html" href="/blogs/hadi_hariri/archive/2011/12/07/providing-intellisense-navigation-and-more-for-custom-helpers-in-asp-net-mvc.aspx" /><id>/blogs/hadi_hariri/archive/2011/12/07/providing-intellisense-navigation-and-more-for-custom-helpers-in-asp-net-mvc.aspx</id><published>2011-12-07T13:47:00Z</published><updated>2011-12-07T13:47:00Z</updated><content type="html">&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You probably are aware by now that as of ReSharper 5 we added first-class support for ASP.NET MVC. This included among many things, the ability to provide Intellisense, Create from usage and Navigation to built-in methods such as &lt;i&gt;Controller.View &lt;/i&gt;or &lt;i&gt;Html.ActionLink&lt;/i&gt;:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h4&gt;Navigation&lt;/h4&gt;
&lt;p&gt;Ctrl+Left Mouse Click or F12 will navigate to the corresponding View&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img style="background-image:none;border-right-width:0px;margin:10px 0px 0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" alt="image" src="http://devlicious.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/image_5F00_0D6522DB.png" border="0" height="257" width="567" /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;or to the Action and/or Controller&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img style="background-image:none;border-right-width:0px;margin:10px 0px 0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" alt="image" src="http://devlicious.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/image_5F00_27C515F2.png" border="0" height="130" width="650" /&gt;&lt;/p&gt;
&lt;h4&gt;Intellisense and Create From Usage&lt;/h4&gt;
&lt;p&gt;Ability to have Intellisense when providing Actions/Controllers &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img style="background-image:none;border-right-width:0px;margin:10px 0px 0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" alt="image" src="http://devlicious.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/image_5F00_2A8ACAE5.png" border="0" height="98" width="600" /&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;as well as the possibility of creating from usage&lt;/p&gt;
&lt;p&gt;&lt;img style="background-image:none;border-right-width:0px;margin:10px 0px 0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" alt="image" src="http://devlicious.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/image_5F00_709B87F8.png" border="0" height="208" width="729" /&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;However, what happens when you want to use a custom function, for instance, a better ActionLink or your own View method? Did you know that you can still get all these goodies? All you need to do is use some Annotations.&lt;/p&gt;
&lt;h3&gt;Using JetBrains.Annotations&lt;/h3&gt;
&lt;p&gt;ReSharper uses annotations via the form of .NET attributes to figure out what an ASP.NET MVC View, Action or Controller is. As such, all we need to do for our custom method and extensions to leverage this, is tell ReSharper what parameter corresponds to what. &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h4&gt;Referencing the annotations&lt;/h4&gt;
&lt;p&gt;To use ReSharper annotations, we have mainly two options (with a third one hopefully coming soon):&lt;/p&gt;
&lt;p&gt;1. We can include the library JetBrains.Annotations.dll in our project and reference it.&lt;/p&gt;
&lt;p&gt;2. We can copy the annotations and include it as source in our project&lt;/p&gt;
&lt;p&gt;&lt;i&gt;[3. We can use nuget install-package JetBrains.Annotations] Coming soon!&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The first option is pretty simple. The DLL is located in the ReSharper installation &lt;i&gt;bin &lt;/i&gt;folder. For the second option, we open up &lt;b&gt;ReSharper | Options &lt;/b&gt;and select &lt;b&gt;Code Annotations&lt;/b&gt; entry&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img style="background-image:none;border-right-width:0px;margin:10px 0px 0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" alt="image" src="http://devlicious.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/image_5F00_7D293514.png" border="0" height="448" width="583" /&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;select the &lt;b&gt;Copy default implementation to clipboard &lt;/b&gt;button and paste into an empty file. &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h4&gt;Annotating custom methods&lt;/h4&gt;
&lt;p&gt;Once we&amp;rsquo;ve completed this step, all we need to do is annotate our parameters with the correct attributes. We&amp;rsquo;re interested in 3 different attributes in particular:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;AspMvcView&lt;/b&gt; which indicates the parameter is a View &lt;/li&gt;
&lt;li&gt;&lt;b&gt;AspMvcAction&lt;/b&gt; which indicates the parameter is an Action &lt;/li&gt;
&lt;li&gt;&lt;b&gt;AspMvcController&lt;/b&gt; which indicates the parameter is a Controller &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Here is the header corresponding to a base controller with a custom method named &lt;i&gt;ExtendedView &lt;/i&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img style="background-image:none;border-right-width:0px;margin:10px 0px 0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" alt="image" src="http://devlicious.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/image_5F00_46D80D05.png" border="0" height="117" width="345" /&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;and here&amp;rsquo;s the header for a custom ActionLink &lt;/p&gt;
&lt;p&gt;&lt;img style="background-image:none;border-right-width:0px;margin:10px 0px 0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" alt="image" src="http://devlicious.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/image_5F00_21DA4C8C.png" border="0" height="185" width="660" /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;(the body of both methods are omitted and are not necessary to demonstrate the functionality)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;As soon as we do this, ReSharper picks up these methods and offers us the same functionality that is provided for the methods that ship out of the box:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img style="background-image:none;border-right-width:0px;margin:10px 0px 0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" alt="image" src="http://devlicious.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/image_5F00_64D61AF9.png" border="0" height="158" width="642" /&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Notice how we still get Navigation (the underlining), Intellisense and Create from usage in our &lt;i&gt;TheOnlyActionLink &lt;/i&gt;custom method. Its much the same for the &lt;i&gt;ExtendedView &lt;/i&gt;method&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img style="background-image:none;border-right-width:0px;margin:10px 0px 0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" alt="image" src="http://devlicious.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/image_5F00_3199E190.png" border="0" height="128" width="501" /&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;That&amp;rsquo;s all there is to it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicio.us/aggbug.aspx?PostID=68809" width="1" height="1"&gt;</content><author><name>hhariri</name><uri>http://devlicio.us/members/hhariri/default.aspx</uri></author><category term="Tools" scheme="http://devlicio.us/blogs/hadi_hariri/archive/tags/Tools/default.aspx" /><category term="ASP.NET MVC" scheme="http://devlicio.us/blogs/hadi_hariri/archive/tags/ASP.NET+MVC/default.aspx" /><category term="ReSharper" scheme="http://devlicio.us/blogs/hadi_hariri/archive/tags/ReSharper/default.aspx" /></entry><entry><title>Setting up TeamCity as a native NuGet Server</title><link rel="alternate" type="text/html" href="/blogs/hadi_hariri/archive/2011/12/01/setting-up-teamcity-as-a-native-nuget-server.aspx" /><id>/blogs/hadi_hariri/archive/2011/12/01/setting-up-teamcity-as-a-native-nuget-server.aspx</id><published>2011-12-01T16:27:00Z</published><updated>2011-12-01T16:27:00Z</updated><content type="html">&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.jetbrains.com/teamcity/2011/11/24/new-teamcity-7-0-eap-build-20702/"&gt;TeamCity 7.0 EAP (Early Access Program) was recently opened&lt;/a&gt; and one of the new features is the built-in support for NuGet. I recently blogged about setting up &lt;a href="http://blogs.jetbrains.com/dotnet/2011/08/native-nuget-support-in-teamcity/"&gt;TeamCity to pack and publish NuGet packages via a plug-in&lt;/a&gt; and this plug-in is now included by default in TeamCity 7. However, the real new interesting feature is that TeamCity is now a native NuGet repository too! &lt;/p&gt;
&lt;h3&gt;Native NuGet Server? &lt;/h3&gt;
&lt;p&gt;Many of those that have been using NuGet, have most likely been using it to consume packages from nuget.org where there are currently over 3800 unique packages, most of which are open source. &lt;/p&gt;
&lt;p align="center"&gt;&lt;img style="background-image:none;border-right-width:0px;margin:10px 0px 0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" alt="image" src="http://devlicious.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/image_5F00_12197754.png" border="0" height="138" width="483" /&gt;&lt;/p&gt;
&lt;p align="justify"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p align="justify"&gt;What happens however if for some reason or another you do not want to submit packages to nuget.org? For instance, think that you want to use NuGet to modularize and distribute code inside your own organization, or create libraries for private consumption. In this case, publishing to nuget.org does not make sense. This leaves you with basically two options:&lt;/p&gt;
&lt;p align="justify"&gt;&amp;nbsp;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;div align="justify"&gt;Setup your own NuGet repository by downloading and installing the code that nuget.org for instance&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div align="justify"&gt;Copy nuget packages to a local share and have everyone read off of that&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p align="justify"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p align="justify"&gt;Both of these options come with their own share of overhead. With the local share you now require sharing of folders and permissions. Setting up your own NuGet repository also requires managing permissions and whatnot separately. At the end of the day, its another service to manage. &lt;/p&gt;
&lt;p align="justify"&gt;Fortunately, you now have a third option: TeamCity. The same server that builds your projects, runs your tests, packs and publishes your packages can now also serve them. The best part of it is that it is so simple, that I had to take up the rest of this blog with the previous nonsense just to give it some meat. &lt;/p&gt;
&lt;h3 align="justify"&gt;Enabling TeamCity as a NuGet Server&lt;/h3&gt;
&lt;p align="justify"&gt;I am not going to cover how to pack and publish packages in this post. All that is covered in detail in the &lt;a href="http://blogs.jetbrains.com/dotnet/2011/08/native-nuget-support-in-teamcity/"&gt;previous post&lt;/a&gt; I wrote, so please read that first if you&amp;rsquo;re not familiar with the process. Enabling TeamCity as NuGet and making packages available consists of two steps:&lt;/p&gt;
&lt;p align="justify"&gt;&amp;nbsp;&lt;/p&gt;
&lt;h4 align="justify"&gt;1. Enable the server to be a NuGet server&lt;/h4&gt;
&lt;p align="justify"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p align="justify"&gt;Go to &lt;b&gt;Administration | Server Configuration | NuGet&lt;/b&gt; tab&lt;/p&gt;
&lt;p align="justify"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p align="justify"&gt;&lt;img style="background-image:none;border-right-width:0px;margin:10px 0px 0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" alt="image" src="http://devlicious.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/image_5F00_1787E7F8.png" border="0" height="306" width="679" /&gt;&lt;/p&gt;
&lt;p align="justify"&gt;Click on the &lt;b&gt;Enable&lt;/b&gt; button to enable it. The same screen with then display two different feeds: a public and a private one:&lt;/p&gt;
&lt;p align="justify"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p align="justify"&gt;&lt;img style="background-image:none;border-right-width:0px;margin:10px 0px 0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" alt="image" src="http://devlicious.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/image_5F00_2F3F1F5E.png" border="0" height="269" width="628" /&gt;&lt;/p&gt;
&lt;p&gt;If by chance the Public Url is not available, you will probably see a message telling you that you &lt;b&gt;need to enable the Guest account in TeamCity&lt;/b&gt;, which can be done from the General tab.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h4&gt;2. Make your packages be your Artifacts&lt;/h4&gt;
&lt;p&gt;Since TeamCity itself is going to be a NuGet server, the step to publish a package is no longer required. However, packing the package is. In this step (&lt;b&gt;NuGet Pack Build Type&lt;/b&gt;), we can just configure the output for the package to point to some specific folder, for instance &lt;i&gt;packages&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img style="background-image:none;border-right-width:0px;margin:10px 0px 0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" alt="image" src="http://devlicious.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/image_5F00_22D0FC35.png" border="0" height="123" width="885" /&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;We need instruct TeamCity to ouput the results of this folder as artifacts. This is done in the &lt;b&gt;General Settings&lt;/b&gt; step of the Build Configuration&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img style="background-image:none;border-right-width:0px;margin:10px 0px 0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" alt="image" src="http://devlicious.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/image_5F00_4CD0FA5D.png" border="0" height="200" width="752" /&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;and with that, we&amp;rsquo;re done. Next up is to configure Visual Studio to consume from this feed.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h3&gt;Configuring Visual Studio&lt;/h3&gt;
&lt;p&gt;Although this step is optional, it is recommended to add your repositories to Visual Studio to avoid having to type long URL&amp;rsquo;s in each time you want to read from a specific package repository. To do this, click on &lt;b&gt;Options | Library Package Manager | Package Manager Settings&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img style="background-image:none;border-right-width:0px;margin:10px 0px 0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" alt="image" src="http://devlicious.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/image_5F00_4B8C617E.png" border="0" height="420" width="617" /&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;We need to add a new NuGet Repository. I&amp;rsquo;ve called it &lt;i&gt;Local TeamCity&lt;/i&gt;&amp;nbsp; and the URL corresponds to the public URL provided to me by TeamCity in Step 1:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img style="background-image:none;border-right-width:0px;margin:10px 0px 0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" alt="image" src="http://devlicious.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/image_5F00_581A0E9A.png" border="0" height="384" width="479" /&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Notice that I have another entry which is &lt;i&gt;Local TeamCity Auth &lt;/i&gt;which corresponds to the authenticated version. &lt;/p&gt;
&lt;p&gt;Once we have this, we can now easily consume packages from our repository by merely specifying it in the Package Manager Console, either via the Combobox or explicitly in each call:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img style="background-image:none;border-right-width:0px;margin:10px 0px 0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" alt="image" src="http://devlicious.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/image_5F00_56D575BB.png" border="0" height="161" width="743" /&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h3&gt;Summary&lt;/h3&gt;
&lt;p&gt;That&amp;rsquo;s all there is to it. By merely publishing our packages as artifacts, TeamCity now provides a full-fledged nuget server which opens up great possibilities when it comes to working and managing dependencies between projects. TeamCity is currently in EAP and much of what I&amp;rsquo;ve described here is in open to improvements. That is why your feedback is very important. &lt;a href="http://confluence.jetbrains.net/display/TW/TeamCity+EAP"&gt;Download 7 and start playing with it today&lt;/a&gt;. Let us know what you think. &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicio.us/aggbug.aspx?PostID=68448" width="1" height="1"&gt;</content><author><name>hhariri</name><uri>http://devlicio.us/members/hhariri/default.aspx</uri></author><category term="Tools" scheme="http://devlicio.us/blogs/hadi_hariri/archive/tags/Tools/default.aspx" /><category term="TeamCity" scheme="http://devlicio.us/blogs/hadi_hariri/archive/tags/TeamCity/default.aspx" /><category term="NuGet" scheme="http://devlicio.us/blogs/hadi_hariri/archive/tags/NuGet/default.aspx" /></entry><entry><title>Native NuGet Support in TeamCity</title><link rel="alternate" type="text/html" href="/blogs/hadi_hariri/archive/2011/08/24/native-nuget-support-in-teamcity.aspx" /><id>/blogs/hadi_hariri/archive/2011/08/24/native-nuget-support-in-teamcity.aspx</id><published>2011-08-24T20:01:00Z</published><updated>2011-08-24T20:01:00Z</updated><content type="html">&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;A few months ago, &lt;a href="http://twitter.com/shanselman"&gt;Scott Hanselman&lt;/a&gt; gave a session at TechEd US were he showed some new features we were working on for TeamCity, in order to provide first class support for NuGet. He later &lt;a href="http://www.hanselman.com/blog/NuGetForTheEnterpriseNuGetInAContinuousIntegrationAutomatedBuildSystem.aspx"&gt;blogged about it here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Instead of delaying until the next release of TeamCity, this feature (like many), has been developed as a plug-in. &lt;a href="http://twitter.com/jonnyzzz"&gt;Eugene&lt;/a&gt;, who has been working on it, announced the availability of a first build a few weeks ago. After some initial trials and changes, I decided to setup &lt;a href="http://github.com/JetBrains/YouTrackSharp"&gt;YouTrackSharp&lt;/a&gt; to automate the publishing of the NuGet package. It was surprisingly easy as you&amp;#39;ll see.&lt;/p&gt;
&lt;h3&gt;1. Installing the Plug-in&lt;/h3&gt;
&lt;p&gt;If your project is running on &lt;a href="http://teamcity.codebetter.com"&gt;TeamCity at Codebetter.com&lt;/a&gt;, you can skip to Step 3, since it&amp;#39;s already installed and configured. If not, then grab the &lt;a href="http://teamcity.jetbrains.com/viewType.html?buildTypeId=bt324&amp;amp;tab=buildTypeStatusDiv"&gt;latest build from our public TeamCity server&lt;/a&gt;. Place the zip file into the plugins folder of your TeamCity installation and restart the server.&lt;/p&gt;
&lt;h3&gt;2. Configuring the NuGet version&lt;/h3&gt;
&lt;p&gt;Once the server is running, and agents updated (automated procedure), you then need to tell TeamCity what NuGet version you want to use. The plug-in knows about the nuget.org feed to it can grab the latest version of the command line tool directly. Click on &lt;b&gt;Administration | Server Configuration&lt;/b&gt;. If the plug-in installed correctly, you should now have a new Tab called NuGet:&lt;/p&gt;
&lt;p&gt;&lt;img title="AdminPanelNuGet.png" alt="AdminPanelNuGet" src="http://blogs.jetbrains.com/dotnet/wp-content/uploads/2011/08/adminpanelnuget.png" border="0" /&gt;&lt;/p&gt;
&lt;p&gt;Click on the &amp;quot;Install additional versions of the NuGet.exe Command Line&amp;quot;. TeamCity will read from the feed and display available versions to you in the dialog box. Select the version you want and click Install:&lt;/p&gt;
&lt;p&gt;&lt;img title="NuGetVersion.png" alt="NuGetVersion" src="http://blogs.jetbrains.com/dotnet/wp-content/uploads/2011/08/nugetversion.png" border="0" /&gt;&lt;/p&gt;
&lt;h3&gt;Pull, Pack, Publish&lt;/h3&gt;
&lt;p&gt;The plug-in offers three main operations:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Pulling NuGet packages required to build your project &lt;/li&gt;
&lt;li&gt;Creating NuGet packages &lt;/li&gt;
&lt;li&gt;Publishing Packages &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In my case, I want to create the package and publish it. To give you a general idea of my build process, here&amp;#39;s the outline of the build steps:&lt;/p&gt;
&lt;p&gt;&lt;img title="BuildOverview.png" alt="BuildOverview" src="http://blogs.jetbrains.com/dotnet/wp-content/uploads/2011/08/buildoverview.png" width="600" border="0" height="235" /&gt;&lt;/p&gt;
&lt;p&gt;The NuGet related steps are 3 and 4. Step 1 simply builds the project by building the solution file. Step 2 runs the MSpec tests.&lt;/p&gt;
&lt;h3&gt;3. Building the package&lt;/h3&gt;
&lt;p&gt;This step is for building the actual package. We create a new Build Step in our project and select &lt;b&gt;NuGet Packages Pack&lt;/b&gt;. This will give us the following configuration screen:&lt;/p&gt;
&lt;p&gt;&lt;img title="Step3.png" alt="Step3" src="http://blogs.jetbrains.com/dotnet/wp-content/uploads/2011/08/step3.png" width="600" border="0" height="460" /&gt;&lt;/p&gt;
&lt;p&gt;As you can see, the configuration is pretty straightforward. Notice that in the Specification file, we can also provide a &lt;i&gt;csproj&lt;/i&gt; file as opposed to a NuGet spec file. The advantage to this is that we do not have to redefine information such as version number and copyright information in the spec file. If you&amp;#39;re not familiar with this feature, check out &lt;a href="http://blog.davidebbo.com/2011/04/easy-way-to-publish-nuget-packages-with.html"&gt;David Ebbo&amp;#39;s post&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve also checked the option to &lt;b&gt;Include Sources and Symbols&lt;/b&gt;. This is also explained in David Ebbo&amp;#39;s post and it&amp;#39;s for publishing the sources to &lt;a href="http://symbolsource.org"&gt;Symbolsource&lt;/a&gt;. Additional command line parameters (if required) can be passed in the &lt;b&gt;Additional Commandline arguments&lt;/b&gt;. If you want to make this a release build, you can also do this by defining &lt;b&gt;Configuration=Release&lt;/b&gt; in the &lt;b&gt;Properties&lt;/b&gt; field.&lt;/p&gt;
&lt;p&gt;Finally I&amp;#39;ve specified the Build number of the package using the TeamCity variable %build.number% which auto increments on each build, and is also used by another feature of TeamCity new in 6.5 which is called the AssemblyPatcher, which I&amp;#39;ll show you as the last step.&lt;/p&gt;
&lt;h3&gt;4. Publishing the package&lt;/h3&gt;
&lt;p&gt;The next step is to publish the package. As before, we need to add a Build Step and select &lt;b&gt;NuGet Packages Publish&lt;/b&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img title="BuildStep4.png" alt="BuildStep4" src="http://blogs.jetbrains.com/dotnet/wp-content/uploads/2011/08/buildstep4.png" width="600" border="0" height="374" /&gt;&lt;/p&gt;
&lt;p&gt;This step is even easier to configure. By convention it uses nuget.org as the destination to publish the package. If you have your own NuGet server then fill in the address in the &lt;b&gt;Packages Sources&lt;/b&gt; field. If you&amp;#39;re using nuget.org, leave it blank. You need to provide your API key which is stored in a password protected field and finally indicate which packages you want published. Here you can list each package individually or use wildcards. [Note: relative paths are allowed but at the time of writing this post, there was an issue and I was using the full path. This should be fixed soon].&lt;/p&gt;
&lt;p&gt;If you want to publish to multiple sources, all you need to do is add another step. Note however that we did not have to specify an extra step to publish the sources to symbolsource.org. TeamCity will follow NuGet&amp;#39;s convention and do this for you automatically.&lt;/p&gt;
&lt;h3&gt;5. AssemblyInfo Patcher&lt;/h3&gt;
&lt;p&gt;Although this step is optional I recommend you use it. The AssemblyInfo Patcher is a new Build Feature added to TeamCity which temporarily patches all your projects AssemblyInfo.cs files to update the version number, and then reverts it back after the build is complete. This allows your build number, artifacts, packages and assemblies to all have the same version number. Adding this option is as simple as selecting it from the main project configuration screen:&lt;/p&gt;
&lt;p&gt;&lt;img title="AssemblyPatcher.png" alt="AssemblyPatcher" src="http://blogs.jetbrains.com/dotnet/wp-content/uploads/2011/08/assemblypatcher.png" width="600" border="0" height="164" /&gt;&lt;/p&gt;
&lt;p&gt;That&amp;#39;s it. There&amp;#39;s nothing more to it. With a few simple build steps we have now fully automated packaging and publishing NuGet packages. As I mentioned initially, if you&amp;#39;ve got your project on CodeBetter, you already have this feature enabled. If you&amp;#39;re running your own server, just download the plugin and set it up. It&amp;#39;s very simple.&lt;/p&gt;
&lt;p&gt;Try it out and please give us your feedback!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicio.us/aggbug.aspx?PostID=68133" width="1" height="1"&gt;</content><author><name>hhariri</name><uri>http://devlicio.us/members/hhariri/default.aspx</uri></author><category term="Tools" scheme="http://devlicio.us/blogs/hadi_hariri/archive/tags/Tools/default.aspx" /><category term="TeamCity" scheme="http://devlicio.us/blogs/hadi_hariri/archive/tags/TeamCity/default.aspx" /></entry><entry><title>YouTrackSharp and YouTrackForReSharper on JetBrains GitHub</title><link rel="alternate" type="text/html" href="/blogs/hadi_hariri/archive/2011/08/17/youtracksharp-and-youtrackforresharper-on-jetbrains-github.aspx" /><id>/blogs/hadi_hariri/archive/2011/08/17/youtracksharp-and-youtrackforresharper-on-jetbrains-github.aspx</id><published>2011-08-17T14:38:00Z</published><updated>2011-08-17T14:38:00Z</updated><content type="html">&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Just a quick note to say that I&amp;rsquo;ve transferred the YouTrackSharp project from my own account over to the &lt;a href="http://github.com/JetBrains"&gt;JetBrains account on github&lt;/a&gt;. I&amp;rsquo;ve also pushed the initial spike of &lt;a href="http://github.com/JetBrains/YouTrackForReSharper"&gt;YouTrackForReSharper&lt;/a&gt; which is a plug-in for &lt;a href="http://www.jetbrains.com/resharper"&gt;ReSharper&lt;/a&gt; to talk to YouTrack. We&amp;rsquo;re looking for contributors for this project, so if you&amp;rsquo;re up to it, fork away!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicio.us/aggbug.aspx?PostID=68115" width="1" height="1"&gt;</content><author><name>hhariri</name><uri>http://devlicio.us/members/hhariri/default.aspx</uri></author><category term="Tools" scheme="http://devlicio.us/blogs/hadi_hariri/archive/tags/Tools/default.aspx" /><category term="ReSharper" scheme="http://devlicio.us/blogs/hadi_hariri/archive/tags/ReSharper/default.aspx" /></entry><entry><title>Machine.Specifications for ReSharper 6 now available</title><link rel="alternate" type="text/html" href="/blogs/hadi_hariri/archive/2011/07/20/machine-specifications-for-resharper-6-now-available.aspx" /><id>/blogs/hadi_hariri/archive/2011/07/20/machine-specifications-for-resharper-6-now-available.aspx</id><published>2011-07-20T14:16:00Z</published><updated>2011-07-20T14:16:00Z</updated><content type="html">&lt;p&gt;Many, myself included, have been eagerly awaiting the release of the ReSharper Runner of Machine.Specification (MSpec) for ReSharper 6. I&amp;rsquo;m glad to announce that this is now available, which is the result of a team-effort between &lt;a href="http://twitter.com/kropp"&gt;Victor Kropp&lt;/a&gt;, &lt;a href="http://twitter.com/#!/lucisferre"&gt;Chris Nicola&lt;/a&gt;, myself and of course &lt;a href="http://twitter.com/#!/agross"&gt;Alexander Gross&lt;/a&gt;, long-time contributor and main maintainer of the MSpec project. &lt;/p&gt;
&lt;p&gt;NuGet packages have already been updated to support ReSharper 6. The source code can also be obtained via &lt;a href="http://www.symbolsource.org/"&gt;SymbolSource.org&lt;/a&gt; if using NuGet or directly from &lt;a href="https://github.com/agross/machine.specifications"&gt;Alexander&amp;rsquo;s GitHub account&lt;/a&gt;. &lt;/p&gt;
&lt;p&gt;&lt;a href="http://devlicious.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/SNAGHTML5fd19d5_5F00_5FA3ABE7.png"&gt;&lt;img style="background-image:none;border-right-width:0px;margin:10px 0px 0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="SNAGHTML5fd19d5" alt="SNAGHTML5fd19d5" src="http://devlicious.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/SNAGHTML5fd19d5_5F00_thumb_5F00_03102A80.png" border="0" height="324" width="753" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Installing the Runner in ReSharper 6&lt;/p&gt;
&lt;p&gt;If you&amp;rsquo;re new to MSpec or have simply forgotten how to install the runner under ReSharper, here are some simple steps to use Mspec in your project and integrate it with ReSharper:&lt;/p&gt;
&lt;p&gt;&lt;b&gt;1&lt;/b&gt;. Run the command &lt;i&gt;install-package&lt;/i&gt; &lt;b&gt;Machine.Specifications &lt;/b&gt;(or &lt;b&gt;Machine.Specifications-Signed&lt;/b&gt; if you want the signed version). If this is an existing project, issue the command &lt;i&gt;update-package &lt;/i&gt;instead of &lt;i&gt;install-package&lt;/i&gt;.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;2&lt;/b&gt;. Inside the packages folder corresponding to Machine.Specifications, a &lt;i&gt;tools&lt;/i&gt; folder is created with a series of assemblies and some batch files. There are a series of batch files named InstallResharperRunner.X.X. &amp;ndash; VS20XX.bat where X&amp;rsquo;s correspond to the version of ReSharper and of Visual Studio. By executing the corresponding one, it will copy the assemblies to the ReSharper plug-in folder. &lt;/p&gt;
&lt;p&gt;You can of course do the second step manually, by copying the Machine.Specifications.ReSharperRunner.X.Y files to the ReSharper Plugins folder, located either under the ReSharper bin folder in %Program Files%\JetBrains\ReSharperX\bin (for all users) or under %APPDATA%\JetBrains\ReSharperX\bin (user-specific settings).&lt;/p&gt;
&lt;p&gt;With that you should be up and running.&lt;/p&gt;
&lt;p&gt;Enjoy.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicio.us/aggbug.aspx?PostID=68008" width="1" height="1"&gt;</content><author><name>hhariri</name><uri>http://devlicio.us/members/hhariri/default.aspx</uri></author><category term="Tools" scheme="http://devlicio.us/blogs/hadi_hariri/archive/tags/Tools/default.aspx" /><category term="ReSharper" scheme="http://devlicio.us/blogs/hadi_hariri/archive/tags/ReSharper/default.aspx" /><category term="MSpec" scheme="http://devlicio.us/blogs/hadi_hariri/archive/tags/MSpec/default.aspx" /><category term="Testing" scheme="http://devlicio.us/blogs/hadi_hariri/archive/tags/Testing/default.aspx" /></entry><entry><title>Google+: Third Strike…and it’s in!</title><link rel="alternate" type="text/html" href="/blogs/hadi_hariri/archive/2011/07/09/google-third-strike-and-it-s-in.aspx" /><id>/blogs/hadi_hariri/archive/2011/07/09/google-third-strike-and-it-s-in.aspx</id><published>2011-07-09T14:57:00Z</published><updated>2011-07-09T14:57:00Z</updated><content type="html">&lt;p&gt;Google+ is what could possibly be considered Google&amp;rsquo;s third attempt at Social networks. With the failure of Wave and Buzz, is Google+ going to make it this time? My first knee-jerk reaction to it was that it&amp;rsquo;s a Facebook AND Twitter killer, and after the short amount of time I&amp;rsquo;ve used it, and &lt;a href="http://hadihariri.com/2010/09/25/samsung-galaxy-s-from-a-recovering-iphone-user/"&gt;not knowing any better than to write about something you&amp;rsquo;ve not used long enough&lt;/a&gt;, I&amp;rsquo;ll give my opinion. If I&amp;rsquo;m right and this thing takes off, I&amp;rsquo;ll be a Social Expert. If I&amp;rsquo;m wrong, I&amp;rsquo;m not a Social Expert. And? &lt;/p&gt;
&lt;h2&gt;Why do I need Twitter AND Facebook?&lt;/h2&gt;
&lt;p&gt;One of the main reasons I use Twitter (having passed the phase of &amp;ldquo;Wheels Down/Up in AGP&amp;rdquo;) is for &amp;ldquo;&lt;i&gt;professional&amp;rdquo; &lt;/i&gt;reasons.&amp;nbsp; And I put professional reasons in quotes, in the sense that I mostly use it to interact with people regarding software development which is my field, as well as things related to my job (JetBrains and our products). These include discussions on specific topics, providing help, the occasional opinion on technologies and once in a blue moon a political or religious statement. I interact with all sorts of people on Twitter, people I follow and those I don&amp;rsquo;t. &lt;/p&gt;
&lt;p&gt;Why do I use Facebook? Primarily to interact with friends. I try and keep a low number of people on Facebook, mostly those people that I have at some point met personally. I also use Facebook when I want to say something a little longer than 140 characters, as well as topics that are not directly related to my field.&lt;/p&gt;
&lt;h2&gt;Hello Circles&lt;/h2&gt;
&lt;p&gt;&lt;a href="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/image_5F00_6EBC98ED.png"&gt;&lt;img style="background-image:none;border-right-width:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" alt="image" src="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/image_5F00_thumb_5F00_4D5CF351.png" border="0" height="68" width="664" /&gt;&lt;/a&gt;&amp;nbsp; &lt;/p&gt;
&lt;h3&gt;&amp;nbsp;&lt;/h3&gt;
&lt;p&gt;With Google+ you have the concept of Circles. You place your family, friends, acquaintances and followers in different circles. When you send a status update, you can make it public, or send it to a specific group. When you post a picture or a video, you can target specific circles or people. You can create your own circles, even a list of blocked people. What this means for me is that G+ now allows me to interact with both groups: those I talk to on Twitter and those I communicate with on Facebook. &lt;/p&gt;
&lt;p&gt;It also opens up other benefits as I&amp;rsquo;ll mention later on. &lt;/p&gt;
&lt;h3&gt;But&amp;hellip;but Facebook has lists&lt;/h3&gt;
&lt;p&gt;Yes it does. Did you know about them? I didn&amp;rsquo;t. The problem with Facebook lists was that it wasn&amp;rsquo;t staring me in the face. Now some argue that the reason for this is that Facebook aims at making it extremely easy for people to use. I think that&amp;rsquo;s nonsense. There&amp;rsquo;s a difference between creating systems that are easy to use and treating users in a condescending way.&amp;nbsp; The argument that my mother won&amp;rsquo;t understand Circles doesn&amp;rsquo;t hold. My mother is over 70 years old and she has a blog, uses Windows Live Writer and a whole bunch of other applications. If she knows how to paste an image with WLW and set tags, I&amp;rsquo;m sure she&amp;rsquo;ll understand what a Circle is. &lt;/p&gt;
&lt;p&gt;The reason for lists not being in your face in Facebook is most likely because Facebook&amp;rsquo;s policy is for you to share as much as you can, publicly. If it&amp;rsquo;s about making a simple user interface, explain to me why they make it so extremely hard to change privacy settings? In our field, we have a saying &amp;ldquo;Security through Obscurity&amp;rdquo;. It&amp;rsquo;s not about making things simple. &lt;/p&gt;
&lt;p&gt;With G+, circles are there from day one, in your face. G+ is giving you the option to choose. It also prompts you to who you want to post a status update, including defaulting to last used:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/image_5F00_72E670B2.png"&gt;&lt;img style="background-image:none;border-right-width:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" alt="image" src="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/image_5F00_thumb_5F00_63CF91D8.png" border="0" height="70" width="664" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Finally, people have &lt;b&gt;circles &lt;/b&gt;of friends, not lists of friend. Psychologically, the term &lt;b&gt;circle&lt;/b&gt; resonates.&lt;/p&gt;
&lt;h2&gt;&amp;nbsp;&lt;/h2&gt;
&lt;h2&gt;It&amp;rsquo;s missing the Charm of Twitter&lt;/h2&gt;
&lt;p&gt;Why is Twitter successful? Well if we define successful as a business generating profit, then Twitter really isn&amp;rsquo;t successful. If we talk about success in that millions of users are using it, then yes, it is. One of the the prime thing that pushes Twitter to success however is the concept of &lt;i&gt;followers. &lt;/i&gt;We are all humans and we have egos and we like to be noticed. The concept of having thousands of followers seems to attract many. That is an advantage Twitter has over Facebook. With Facebook, if you want to be loved, you either set up a Fan Page (which very rarely people do), or accept everyone has a friend, which becomes a bit too busy. &lt;/p&gt;
&lt;p&gt;G+ however allows you to have the best of both worlds. When someone adds you to their circle, you don&amp;rsquo;t need to add them back, thus allowing you to drive up your ego, while keeping the noise to a minimum. You can also follow people without being acquainted to them, by placing them in the Follower circle.&lt;/p&gt;
&lt;h3&gt;But I like 140 Characters&lt;/h3&gt;
&lt;p&gt;Please, have we stooped so low as a society that we need to express ourselves with 140 characters? Worse yet, have we become so completely and utterly mindless that we actually need that enforced by a software system. If you don&amp;rsquo;t want to type more than 140 characters, don&amp;rsquo;t! If you don&amp;rsquo;t want to read more than a 140 characters don&amp;rsquo;t. Personally however, I&amp;rsquo;m getting tired of&lt;i&gt; &lt;b&gt;&amp;ldquo;Sorry 140 chars is really hard to express myself&amp;rdquo;&lt;/b&gt;&lt;/i&gt;. It&amp;rsquo;s become the perfect excuse to run from a debate. &lt;/p&gt;
&lt;h3&gt;There is no Tweetdeck&lt;/h3&gt;
&lt;p&gt;If you&amp;rsquo;re using Tweetdeck exclusively to post to Facebook and Twitter, why are you posting to both? Won&amp;rsquo;t G+ solve that problem with Circle? If you&amp;rsquo;re using Tweetdeck like I do for instance to handle multiple accounts, yes then there&amp;rsquo;s a problem. &lt;/p&gt;
&lt;p&gt;&lt;a href="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/image_5F00_76A41582.png"&gt;&lt;img style="background-image:none;border-right-width:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" alt="image" src="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/image_5F00_thumb_5F00_606DFA30.png" border="0" height="33" width="386" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;However, G+ has no concept of Company account or Fan page as of yet, so we can cross that bridge when we get to it. &lt;/p&gt;
&lt;h2&gt;Google+ is filled with nerds only, not my friends&lt;/h2&gt;
&lt;p&gt;The argument that G+ will not be successful because it is limited to invites and nerds is quite ludicrous, yet seems to be repeated time and time again. Whatever the reason that G+ is closed currently to those with an invite (which recently also includes those with a Gmail account), is temporary. &lt;/p&gt;
&lt;p&gt;In fact, it actually even works to Google&amp;rsquo;s favor, just like it has with many other services. Everyone wants to be part of an &amp;ldquo;exclusive&amp;rdquo; club. Gmail itself for quite sometime was a closed group. As G+ grows, it will open up. &lt;/p&gt;
&lt;p&gt;Regarding the nerds, let&amp;rsquo;s not forget that many of the current social networks were initially limited to nerds and geeks.&lt;/p&gt;
&lt;p&gt;The limited group is temporary, and as more people join, it will just become bigger. Will it reach the (what 700 Million now?) users Facebook has in a year? Probably not. But I think it will grow faster than many expect it to. &lt;/p&gt;
&lt;h2&gt;G+ has no Developer Story&lt;/h2&gt;
&lt;p&gt;Another criticism I&amp;rsquo;ve read about G+ is that there&amp;rsquo;s no API. Facebook is a platform for building applications on. Twitter is also a platform for&amp;hellip;..getting screwed. Yes, this is true, G+ does not have an API story but it&amp;rsquo;s still early days. I&amp;rsquo;m sure it will come. &lt;/p&gt;
&lt;h2&gt;Some more of G+ Benefits&lt;/h2&gt;
&lt;h3&gt;Conversations&lt;/h3&gt;
&lt;p&gt;Personally I&amp;rsquo;m tired of not being able to follow a conversation on Twitter. With G+, much like Facebook, I can now do that. I can read an entire thread. I can participate. Some have mentioned that this also allows others to participate in a conversation and that it&amp;rsquo;s not really &amp;ldquo;social&amp;rdquo;, that somehow Google doesn&amp;rsquo;t get it. Let&amp;rsquo;s not forget that Twitter initially allowed you to view all conversations, not only when you were following all people involved in the conversation (as it is now). When Twitter made this change, the Internet was in uproar. People threatened to leave Twitter. They said Twitter had lost all the social aspect and that you couldn&amp;rsquo;t now discover new followers or be discovered. Yet now they defend it? &lt;/p&gt;
&lt;h3&gt;Instant Notifications&lt;/h3&gt;
&lt;p&gt;Apart from G+ benefit of combining Twitter and Facebook, it also has some other ones. It&amp;rsquo;s integrated with other Google services. If you use Gmail or Google as a search engine, you instantly get a notification icon in the top bar indicating status updates. &lt;/p&gt;
&lt;p&gt;&lt;a href="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/image_5F00_2612844F.png"&gt;&lt;img style="background-image:none;border-right-width:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" alt="image" src="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/image_5F00_thumb_5F00_79F5875D.png" border="0" height="25" width="664" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This allows you to turn off notifications via email. It also allows you to not be sent an email on EVERY single post someone else makes to a post or comment you&amp;rsquo;ve made, which can be quite annoying. The number of times I&amp;rsquo;ve not made a comment on a post so as to not be bombarded with notifications. G+ lets you fine-tune all that: &lt;/p&gt;
&lt;p&gt;&lt;a href="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/image_5F00_5F0915B7.png"&gt;&lt;br /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;Security &lt;/h3&gt;
&lt;p&gt;This is again inline with circles. How many times have we heard on the news how people have posted about going on Holiday&amp;rsquo;s or going out for the night, only to come home to find their house being burgled. If you have the desire to let your friends know when you&amp;rsquo;re leaving and coming back, you can do so by limiting it to those that you really trust by using the correct circle.&lt;/p&gt;
&lt;h3&gt;Hangouts&lt;/h3&gt;
&lt;p&gt;G+ has the concept of Hangout area, where it uses a webcam (which pretty much everyone has these days) and your microphone to allow you to speak to other people in the hangout area (think of it as a room). You can start a hangout area or join an existing one. Forgetting the social aspect of this, multi-cast video conferencing for meetings is a big win in and of itself. &lt;/p&gt;
&lt;h3&gt;It&amp;rsquo;s Google&lt;/h3&gt;
&lt;p&gt;Recently Google&amp;rsquo;s agreement with Twitter to offer real-time content in searches expired. Was this due to G+ or not, no one will know. With G+, Google doesn&amp;rsquo;t have that problem. It&amp;rsquo;s Google. It controls the searches. It will be able to provide real-time info if the case arises. In addition it can also provide other G+ features:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/image_5F00_6332ED7C.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" alt="image" src="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/image_5F00_thumb_5F00_5A62E530.png" border="0" height="254" width="792" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;not to mention &amp;ldquo;sponsored&amp;rdquo; ads.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h2&gt;&lt;/h2&gt;
&lt;h2&gt;Summary&lt;/h2&gt;
&lt;p&gt;As I mentioned previously, many of the posts reviewing G+ recently are judging it based on the fact that it&amp;rsquo;s closed, beta and also it&amp;rsquo;s too complicated for the average user. G+ is as complicated as one wants to make it, which is sometimes influenced by conflicting interests. &lt;/p&gt;
&lt;p&gt;The only potentially &amp;ldquo;complicated&amp;rdquo; or &amp;ldquo;nerdy&amp;rdquo; thing about G+ right now is Circles. In fact, I&amp;rsquo;d go as far as saying that when it comes to settings, both concerning privacy as well as general ones, G+ is far simpler and less obscure than Facebook. &lt;/p&gt;
&lt;p&gt;If our mothers and fathers learnt how to use Gmail, Twitter or even their phones, they&amp;rsquo;ll &amp;ldquo;get&amp;rdquo; G+. Let&amp;rsquo;s not be too condescending. Users are not stupid. &lt;/p&gt;
&lt;p&gt;[Update]: I updated the post in regard to the ownership of content. Apparently G+ screws up here too. The &lt;a href="http://picasa.google.com/legal_notices.html"&gt;Legal Notices&lt;/a&gt; of Picassa (which it uses for photo sharing) said that you owned all rights to content. However, as someone pointed out, the &lt;a href="http://www.google.com/accounts/TOS?hl=US"&gt;TOS&lt;/a&gt; says pretty much the same as Facebook, which in my book is a big negative to G+.&lt;/p&gt;
&lt;p&gt;* Much of the comments I&amp;rsquo;ve made in this post in reference to reviews of G+ are posts I&amp;rsquo;ve seen over the past couple of weeks. As and when I find them, I&amp;rsquo;ll add references to them. Unfortunately I didn&amp;rsquo;t keep the links, but it&amp;rsquo;s all there&amp;hellip;just Google it! &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicio.us/aggbug.aspx?PostID=67957" width="1" height="1"&gt;</content><author><name>hhariri</name><uri>http://devlicio.us/members/hhariri/default.aspx</uri></author></entry><entry><title>YouTrackSharp: A .NET Client for YouTrack</title><link rel="alternate" type="text/html" href="/blogs/hadi_hariri/archive/2011/06/26/youtracksharp-a-net-client-for-youtrack.aspx" /><id>/blogs/hadi_hariri/archive/2011/06/26/youtracksharp-a-net-client-for-youtrack.aspx</id><published>2011-06-26T10:25:00Z</published><updated>2011-06-26T10:25:00Z</updated><content type="html">&lt;p align="left"&gt;On and off I&amp;rsquo;ve been working on a .NET library that is a wrapper around &lt;a href="http://www.jetbrains.com/youtrack/"&gt;YouTrack&lt;/a&gt; ReST API&amp;rsquo;s.&amp;nbsp; If you&amp;rsquo;re not familiar with &lt;a href="http://www.jetbrains.com/youtrack/"&gt;YouTrack&lt;/a&gt;, it&amp;rsquo;s our Web-Based Issue Management system, which is currently at version 3 and recently we announced the &lt;a href="http://www.jetbrains.com/youtrack/buy/index.jsp"&gt;availability of a free version&lt;/a&gt;. If you like keyboard-centric tools (like for instance &lt;a href="http://www.jetbrains.com/resharper"&gt;ReSharper&lt;/a&gt;), you&amp;rsquo;ll love YouTrack.&lt;/p&gt;
&lt;p align="left"&gt;YouTrack offers quite a lot of possibilities when it comes to interacting with it. I&amp;rsquo;ve previously &lt;a href="http://hadihariri.com/2010/12/14/generating-graphs-for-youtrack-with-html-5-and-jquery/"&gt;blogged about how we can easily&lt;/a&gt; create some HTML 5 graphs using nothing but the ReST API and some jQuery. Of course, we could also take advantage of this API from .NET using merely an &lt;a href="http://hadihariri.com/2011/01/16/easyhttp/"&gt;HTTP client&lt;/a&gt;.&lt;/p&gt;
&lt;h2 align="left"&gt;YouTrackSharp&lt;/h2&gt;
&lt;p align="left"&gt;What YouTrackSharp brings to the table is a compact interface to work with YouTrack without worrying about things like cookies, URL&amp;rsquo;s and other HTTP concerns. It abstracts all that away to provide a simple series of classes to work with YouTrack.&lt;/p&gt;
&lt;p align="left"&gt;Here&amp;rsquo;s a sample of a command line app I just wrote to make feature logging easier for ReSharper:&lt;/p&gt;
&lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:ed07736c-dbcc-43b4-9370-bd05ee44e98c" class="wlWriterEditableSmartContent"&gt;
&lt;div style="border:#000080 1px solid;color:#000;font-family:&amp;#39;Courier New&amp;#39;, Courier, Monospace;font-size:10pt;"&gt;
&lt;div style="background-color:#ffffff;overflow:auto;padding:2px 5px;white-space:nowrap;"&gt;&lt;span style="color:#0000ff;"&gt;var&lt;/span&gt; connection = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;Connection&lt;/span&gt;(&lt;span style="color:#a31515;"&gt;&amp;quot;youtrack.jetbrains.net&amp;quot;&lt;/span&gt;);&lt;br /&gt; &lt;br /&gt; connection.Authenticate(&lt;span style="color:#a31515;"&gt;&amp;quot;username&amp;quot;&lt;/span&gt;, &lt;span style="color:#a31515;"&gt;&amp;quot;password&amp;quot;&lt;/span&gt;);&lt;br /&gt; &lt;br /&gt; &lt;span style="color:#0000ff;"&gt;var&lt;/span&gt; issueManagement = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;IssueManagement&lt;/span&gt;(connection);&lt;br /&gt; &lt;br /&gt; &lt;span style="color:#0000ff;"&gt;var&lt;/span&gt; issue = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;Issue&lt;/span&gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Assignee = &lt;span style="color:#a31515;"&gt;&amp;quot;ReSharperProjectManager&amp;quot;&lt;/span&gt;,&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Summary = summary,&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Description = description,&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ProjectShortName = &lt;span style="color:#a31515;"&gt;&amp;quot;RSRP&amp;quot;&lt;/span&gt;,&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Type = &lt;span style="color:#a31515;"&gt;&amp;quot;Feature&amp;quot;&lt;/span&gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;};&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; issueManagement.CreateIssue(issue);&lt;br /&gt; &lt;br /&gt; &lt;span style="color:#2b91af;"&gt;Console&lt;/span&gt;.WriteLine(&lt;span style="color:#a31515;"&gt;&amp;quot;Feature request logged&amp;quot;&lt;/span&gt;);&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Currently it allows you to Create Issues, Upload Attachments, Get Issues, Apply Commands to issues as well as a bunch of tasks on Projects. I&amp;rsquo;m adding features as and when I can, so if there&amp;rsquo;s something you&amp;rsquo;d like, &lt;a href="http://youtrack.codebetter.com/issues/YTSRP"&gt;log it here&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;How to use it&lt;/h2&gt;
&lt;p&gt;YouTrackSharp is available as a &lt;a href="http://www.nuget.org"&gt;NuGet package&lt;/a&gt; and source code is available on &lt;a href="http://github.com/hhariri"&gt;GitHub&lt;/a&gt;. To use it, just do:&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:courier new;"&gt;install-package YouTrackSharp &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;You first need to create a &lt;i&gt;Connection &lt;/i&gt;object (providing host) and then either a &lt;i&gt;IssueManagement &lt;/i&gt;or &lt;i&gt;ProjectManagement&lt;/i&gt;&amp;nbsp; based on what you need to do. The classes are simple and the methods should be self explanatory. The project also comes with tests using MSpec which describe many scenarios. If you have any questions, &lt;a href="http://twitter.com/hhariri"&gt;shout!&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;Ruby&lt;/h2&gt;
&lt;p&gt;If you are a Ruby developer, know that Anna Zhdan, a colleague at JetBrains, has also started working on a Ruby library for YouTrack, which is available on &lt;a href="https://github.com/anna239/youtrack-rest-ruby-library"&gt;GitHub&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicio.us/aggbug.aspx?PostID=67788" width="1" height="1"&gt;</content><author><name>hhariri</name><uri>http://devlicio.us/members/hhariri/default.aspx</uri></author></entry><entry><title>Did you just take a dump on standard versioning practices?</title><link rel="alternate" type="text/html" href="/blogs/hadi_hariri/archive/2011/05/18/did-you-just-take-a-dump-on-standard-versioning-practices.aspx" /><id>/blogs/hadi_hariri/archive/2011/05/18/did-you-just-take-a-dump-on-standard-versioning-practices.aspx</id><published>2011-05-18T11:37:00Z</published><updated>2011-05-18T11:37:00Z</updated><content type="html">&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/image_5F00_51010C7F.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" alt="image" src="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/image_5F00_thumb_5F00_1C508A77.png" border="0" height="364" width="665" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;Original source: &lt;a title="http://blogs.msdn.com/b/endpoint/archive/2011/04/18/microsoft-net-framework-4-platform-update-1.aspx" href="http://blogs.msdn.com/b/endpoint/archive/2011/04/18/microsoft-net-framework-4-platform-update-1.aspx"&gt;http://blogs.msdn.com/b/endpoint/archive/2011/04/18/microsoft-net-framework-4-platform-update-1.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Who was the genius that thought calling a 4.x update a &amp;ldquo;Platform Update 1&amp;rdquo; and referencing the knowledgebase would ever be a good idea? Does that person actually understand what he/she is doing?&lt;/p&gt;
&lt;p&gt;WTF happened to calling things by Major/Minor version? As if the Client Profile wasn&amp;rsquo;t already a really stupid idea, now you come out with this crap.&lt;/p&gt;
&lt;p&gt;Why are you messing people around like this? You realize some of us actually write software and deal with deployments? &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicio.us/aggbug.aspx?PostID=67322" width="1" height="1"&gt;</content><author><name>hhariri</name><uri>http://devlicio.us/members/hhariri/default.aspx</uri></author></entry><entry><title>Getting things done daily</title><link rel="alternate" type="text/html" href="/blogs/hadi_hariri/archive/2011/05/04/getting-things-done-daily.aspx" /><id>/blogs/hadi_hariri/archive/2011/05/04/getting-things-done-daily.aspx</id><published>2011-05-04T09:15:00Z</published><updated>2011-05-04T09:15:00Z</updated><content type="html">&lt;p&gt;For over a decade now, except for one year, I&amp;rsquo;ve been working from home. Home is kind of metaphorical considering the amount of travelling I do. However, to all effects, it means working alone, physically isolated and with no real 9-5 schedule. &lt;/p&gt;
&lt;p&gt;Personally, I love it. I find it much more productive than working in an office, since I rarely am able to concentrate when surrounded by other people or noise. Sure, it&amp;rsquo;s probably out of&amp;nbsp; habit. I know when I first started, I missed the office buzz,&amp;nbsp; so it&amp;rsquo;s all just a matter of getting used to things. But having worked in both an office and at home, I&amp;rsquo;d stick to what I have now. &lt;/p&gt;
&lt;p&gt;One of the greatest struggles of working from home, is adhering to a schedule. You need to have discipline in order to be productive. It&amp;rsquo;s far too tempting to get out of bed a bit late, watch a bit too much TV while making a coffee, or chat on the phone a bit too long. Today of course, we don&amp;rsquo;t need any of that, as Twitter and Facebook are here for our procrastination pleasures. &lt;/p&gt;
&lt;p&gt;On top of sticking to a schedule, if you&amp;rsquo;re somewhat responsible for defining your own, the feeling can be overwhelming. Often you feel lost. You feel you&amp;rsquo;ve got way too many things going on and certain days can end up resembling the most unproductive days of your life. It happens. Even if you run a tight shift. Sometimes there are just those days. The best thing to do is just get over and, well, call it a day. &lt;/p&gt;
&lt;h3&gt;Organizing your daily tasks&lt;/h3&gt;
&lt;p&gt;What I have found fundamental is organizing a list of tasks you need to do on a daily basis. Now over the years, I have tried everything. I&amp;rsquo;ve gone through all the ToDo list applications that were available on downloads.com. I&amp;rsquo;ve tried different flavors of Outlook, The Bat! (great mail client, really bad PIM), to the more recent &lt;a href="http://rememberthemilk.com"&gt;Remember the Milk&lt;/a&gt; and a bunch of other apps. And of course, none of them worked just right. And being a developer, what did I do? Write my own, which of course also failed miserably. &lt;/p&gt;
&lt;p&gt;The problems I encountered with them all were always similar, but you know what? I could never pinpoint it. Some where to simple, others too complex, ultimately having me spending more time on managing the tasks than getting them done. My last resort was just an empty text file with a list of tasks. That didn&amp;rsquo;t work either. So what did work?&lt;/p&gt;
&lt;p&gt;This:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://devlicious.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/image_5F00_2956B994.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" alt="image" src="http://devlicious.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/image_5F00_thumb_5F00_382DC2E1.png" height="518" width="387" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;Yep. A piece of paper and a pencil (or pen as Dino rightly mentioned). It seems silly doesn&amp;rsquo;t it? Having all this technology at the tip of our hands and yet the best thing I&amp;rsquo;ve found that allows me to concentrate on getting the job done and knowing what I have to do each day would be a piece of paper and a pencil. &lt;/p&gt;
&lt;p&gt;Some of the reasons for this I think can be attributed to:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;It can&amp;rsquo;t go wrong (well it can but you have an eraser). &lt;/li&gt;
&lt;li&gt;It&amp;rsquo;s simple. It won&amp;rsquo;t distract you in trying to re-organize or finding a better way to handle the tool. &lt;/li&gt;
&lt;li&gt;It allows you to focus. It removes the overwhelming lists of tasks you have pending. &lt;/li&gt;
&lt;li&gt;It&amp;#39;s staring you in the face.&lt;/li&gt;
&lt;li&gt;You know exactly what you need to get done. It&amp;rsquo;s the list. &lt;/li&gt;
&lt;li&gt;As you cross things off of the list, you see that you&amp;rsquo;re getting things done. It somehow entices you to even be more productive. It gives you a good feeling. &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now I&amp;rsquo;m not an expert in human psychology but I do believe that many of the previous points are actually psychological effects at play.&lt;/p&gt;
&lt;h2&gt;&lt;/h2&gt;
&lt;h3&gt;This is a daily Workflow&lt;/h3&gt;
&lt;p&gt;This works well on a daily basis. I still manage tasks using software. I use &lt;a href="http://www.jetbrains.com/youtrack"&gt;YouTrack&lt;/a&gt; for certain things, Thunderbird /Google Calendar for appointments and &lt;a href="http://checkvist.com"&gt;Checkvist&lt;/a&gt; for managing list that I collaborate on with others. However, when it comes down to what I need to do on a daily basis, I select items from all these sources and write them out on the sheet of paper, and I try and adhere to what&amp;rsquo;s on the paper, not deviating. So it&amp;rsquo;s important to realize that this is something I do on a daily basis. It doesn&amp;rsquo;t scale well for multiple days, weeks, months or even across teams. It&amp;rsquo;s a personal tracker for my daily routine. &lt;/p&gt;
&lt;h3&gt;It all boils down to one thing&amp;hellip;a goal&lt;/h3&gt;
&lt;p&gt;There have been many techniques, tips and tricks that try and allow people to concentrate on a task. There&amp;rsquo;s even been &lt;a href="http://www.pomodorotechnique.com/"&gt;certification programs&lt;/a&gt; for some, which I&amp;rsquo;ll refrain from making any comments on. Some tips which I&amp;rsquo;m sure you&amp;rsquo;re well aware of are things like closing down Email, Twitter, Facebook and other tools that decrease potential productivity (unless of course you&amp;rsquo;re a &amp;ldquo;Social Media Expert&amp;rdquo;). On the whole however, I think the main root of the problem here is not having a clear objective, not having a goal to reach. If we have that, you won&amp;rsquo;t procrastinate. This technique, I find, helps focus and reach that goal, daily.&lt;/p&gt;
&lt;p&gt;If you&amp;rsquo;re having issues with getting things done, I recommend you try this simple approach, which is by far my invention and I&amp;rsquo;m sure many already use.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicio.us/aggbug.aspx?PostID=67197" width="1" height="1"&gt;</content><author><name>hhariri</name><uri>http://devlicio.us/members/hhariri/default.aspx</uri></author></entry><entry><title>EasyHttp</title><link rel="alternate" type="text/html" href="/blogs/hadi_hariri/archive/2011/01/16/easyhttp.aspx" /><id>/blogs/hadi_hariri/archive/2011/01/16/easyhttp.aspx</id><published>2011-01-16T17:03:00Z</published><updated>2011-01-16T17:03:00Z</updated><content type="html">&lt;p&gt;As of late, much of the code I write, somehow or other has to communicate with an HTTP server. Be it a &amp;ldquo;ReSTful&amp;rdquo; service or a &amp;ldquo;Wanna-be-ReSTful&amp;rdquo; service, I&amp;rsquo;ve had the need to make GET, POST, PUT et al operations and work with JSON. &lt;/p&gt;
&lt;p&gt;After writing smaller wrappers around WebRequest on a few occasions, I decided it&amp;rsquo;s time to formalize the wrapper. This has given way to &lt;strong&gt;EasyHttp&lt;/strong&gt;. It&amp;rsquo;s been sitting on GitHub for quite some time and both myself and others have been using it for several projects, so I think it&amp;rsquo;s reached a point where more people can try it out if they wish. &lt;/p&gt;
&lt;p&gt;Best way to describe the features of &lt;strong&gt;EasyHttp&lt;/strong&gt; is with some code&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;div class="wlWriterEditableSmartContent" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:6bb5b1cc-287e-44e4-845b-0b21e2e185da" style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;"&gt;
&lt;div class="le-pavsc-container"&gt;
&lt;div style="background-color:#000000;overflow:auto;padding:2px 5px;white-space:nowrap;"&gt;&lt;span style="color:#dfdfbf;"&gt;&lt;/span&gt;&lt;span style="color:#efc986;"&gt;var&lt;/span&gt;&lt;span style="color:#dfdfbf;"&gt; http = &lt;/span&gt;&lt;span style="color:#efc986;"&gt;new&lt;/span&gt;&lt;span style="color:#dfdfbf;"&gt; &lt;/span&gt;&lt;span style="color:#8acccf;"&gt;HttpClient&lt;/span&gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#dfdfbf;"&gt;{&lt;/span&gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#dfdfbf;"&gt;Request = {Accept = &lt;/span&gt;&lt;span style="color:#8acccf;"&gt;HttpContentTypes&lt;/span&gt;&lt;span style="color:#dfdfbf;"&gt;.ApplicationJson}&lt;/span&gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#dfdfbf;"&gt;};&lt;/span&gt;&lt;br /&gt; &lt;br /&gt; &lt;span style="color:#dfdfbf;"&gt;&lt;/span&gt;&lt;span style="color:#efc986;"&gt;var&lt;/span&gt;&lt;span style="color:#dfdfbf;"&gt; response = http.Get(&lt;/span&gt;&lt;span style="color:#dfaf8f;"&gt;&amp;quot;http://domain.com/customer/25&amp;quot;&lt;/span&gt;&lt;span style="color:#dfdfbf;"&gt;);&lt;/span&gt;&lt;br /&gt; &lt;br /&gt; &lt;span style="color:#dfdfbf;"&gt;&lt;/span&gt;&lt;span style="color:#efc986;"&gt;var&lt;/span&gt;&lt;span style="color:#dfdfbf;"&gt; customer = response.StaticBody&amp;lt;&lt;/span&gt;&lt;span style="color:#8acccf;"&gt;Customer&lt;/span&gt;&lt;span style="color:#dfdfbf;"&gt;&amp;gt;();&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The code is self-describing: we create an instance of &lt;strong&gt;HttpClient &lt;/strong&gt;and indicate that we accept content-type application/json (since in this case the server sends us json). By specifying this Accept header, &lt;strong&gt;EasyHttp &lt;/strong&gt;knows how to decode the request. &lt;/p&gt;
&lt;p&gt;How do we obtain the response? In the code above we are using the &lt;strong&gt;StaticBody &lt;/strong&gt;method which gives us back a strongly-typed Customer. But we have other options:&lt;/p&gt;
&lt;div class="wlWriterEditableSmartContent" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:16ef8704-1a26-4ce0-886c-dafeeea4f7c1" style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;"&gt;
&lt;div class="le-pavsc-container"&gt;
&lt;div style="background-color:#000000;overflow:auto;padding:2px 5px;white-space:nowrap;"&gt;&lt;span style="color:#dfdfbf;"&gt;&lt;/span&gt;&lt;span style="color:#efc986;"&gt;var&lt;/span&gt;&lt;span style="color:#dfdfbf;"&gt; http = &lt;/span&gt;&lt;span style="color:#efc986;"&gt;new&lt;/span&gt;&lt;span style="color:#dfdfbf;"&gt; &lt;/span&gt;&lt;span style="color:#8acccf;"&gt;HttpClient&lt;/span&gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#dfdfbf;"&gt;{&lt;/span&gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#dfdfbf;"&gt;Request = {Accept = &lt;/span&gt;&lt;span style="color:#8acccf;"&gt;HttpContentTypes&lt;/span&gt;&lt;span style="color:#dfdfbf;"&gt;.ApplicationJson}&lt;/span&gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#dfdfbf;"&gt;};&lt;/span&gt;&lt;br /&gt; &lt;br /&gt; &lt;span style="color:#dfdfbf;"&gt;&lt;/span&gt;&lt;span style="color:#efc986;"&gt;var&lt;/span&gt;&lt;span style="color:#dfdfbf;"&gt; response = http.Get(&lt;/span&gt;&lt;span style="color:#dfaf8f;"&gt;&amp;quot;http://domain.com/customer/25&amp;quot;&lt;/span&gt;&lt;span style="color:#dfdfbf;"&gt;);&lt;/span&gt;&lt;br /&gt; &lt;br /&gt; &lt;span style="color:#dfdfbf;"&gt;&lt;/span&gt;&lt;span style="color:#efc986;"&gt;dynamic&lt;/span&gt;&lt;span style="color:#dfdfbf;"&gt; customer = response.DynamicBody();&lt;/span&gt;&lt;br /&gt; &lt;br /&gt; &lt;span style="color:#dfdfbf;"&gt;&lt;/span&gt;&lt;span style="color:#8acccf;"&gt;Console&lt;/span&gt;&lt;span style="color:#dfdfbf;"&gt;.WriteLine(customer.Name);&lt;/span&gt;&lt;br /&gt; &lt;span style="color:#dfdfbf;"&gt;&lt;/span&gt;&lt;span style="color:#8acccf;"&gt;Console&lt;/span&gt;&lt;span style="color:#dfdfbf;"&gt;.WriteLine(customer.Email);&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In this case we want to return a dynamic type so we call the &lt;strong&gt;DynamicBody &lt;/strong&gt;method. &lt;strong&gt;EasyHttp&lt;/strong&gt; will automatically deserialize the response to a dynamic object. This allows us to access properties without having to declare types ahead of time (quite useful when working with JSON). Finally we can also get access to the raw response via the &lt;strong&gt;RawText &lt;/strong&gt;property. &lt;/p&gt;
&lt;p&gt;If we want to stream to a file, we simply do:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;div class="wlWriterEditableSmartContent" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:a4ebf92a-1565-489d-9088-2b8a2b4381dd" style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;"&gt;
&lt;div class="le-pavsc-container"&gt;
&lt;div style="background-color:#000000;overflow:auto;padding:2px 5px;white-space:nowrap;"&gt;&amp;nbsp;&amp;nbsp;&lt;span style="color:#dfdfbf;"&gt;&lt;/span&gt;&lt;span style="color:#efc986;"&gt;var&lt;/span&gt;&lt;span style="color:#dfdfbf;"&gt; http = &lt;/span&gt;&lt;span style="color:#efc986;"&gt;new&lt;/span&gt;&lt;span style="color:#dfdfbf;"&gt; &lt;/span&gt;&lt;span style="color:#8acccf;"&gt;HttpClient&lt;/span&gt;&lt;span style="color:#dfdfbf;"&gt;();&lt;/span&gt;&lt;br /&gt; &lt;span style="color:#dfdfbf;"&gt;&lt;/span&gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&lt;span style="color:#dfdfbf;"&gt;http.GetAsFile(&lt;/span&gt;&lt;span style="color:#dfaf8f;"&gt;&amp;quot;http://hadihariri.com/header.png&amp;quot;&lt;/span&gt;&lt;span style="color:#dfdfbf;"&gt;, &lt;/span&gt;&lt;span style="color:#dfaf8f;"&gt;@&amp;quot;C:\Temp\header.png&amp;quot;&lt;/span&gt;&lt;span style="color:#dfdfbf;"&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Working with other verbs is pretty much the same process. Let&amp;rsquo;s say we want to create a customer calling a service:&lt;/p&gt;
&lt;div class="wlWriterEditableSmartContent" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:f430ef66-7331-4826-97c5-59f55dd06201" style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;"&gt;
&lt;div class="le-pavsc-container"&gt;
&lt;div style="background-color:#000000;overflow:auto;padding:2px 5px;white-space:nowrap;"&gt;&lt;span style="color:#dfdfbf;"&gt;&lt;/span&gt;&lt;span style="color:#efc986;"&gt;var&lt;/span&gt;&lt;span style="color:#dfdfbf;"&gt; http = &lt;/span&gt;&lt;span style="color:#efc986;"&gt;new&lt;/span&gt;&lt;span style="color:#dfdfbf;"&gt; &lt;/span&gt;&lt;span style="color:#8acccf;"&gt;HttpClient&lt;/span&gt;&lt;span style="color:#dfdfbf;"&gt;();&lt;/span&gt;&lt;br /&gt; &lt;br /&gt; &lt;span style="color:#dfdfbf;"&gt;&lt;/span&gt;&lt;span style="color:#efc986;"&gt;var&lt;/span&gt;&lt;span style="color:#dfdfbf;"&gt; customer = &lt;/span&gt;&lt;span style="color:#efc986;"&gt;new&lt;/span&gt;&lt;span style="color:#dfdfbf;"&gt; &lt;/span&gt;&lt;span style="color:#8acccf;"&gt;Customer&lt;/span&gt;&lt;span style="color:#dfdfbf;"&gt;()&lt;/span&gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#dfdfbf;"&gt;{&lt;/span&gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#dfdfbf;"&gt;Name = &lt;/span&gt;&lt;span style="color:#dfaf8f;"&gt;&amp;quot;Joe Smith&amp;quot;&lt;/span&gt;&lt;span style="color:#dfdfbf;"&gt;,&lt;/span&gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#dfdfbf;"&gt;Email = &lt;/span&gt;&lt;span style="color:#dfaf8f;"&gt;&amp;quot;Joe@Gmail.com&amp;quot;&lt;/span&gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#dfdfbf;"&gt;};&lt;/span&gt;&lt;br /&gt; &lt;br /&gt; &lt;span style="color:#dfdfbf;"&gt;http.Post(&lt;/span&gt;&lt;span style="color:#dfaf8f;"&gt;&amp;quot;http://domain.com/customer&amp;quot;&lt;/span&gt;&lt;span style="color:#dfdfbf;"&gt;, customer, &lt;/span&gt;&lt;span style="color:#8acccf;"&gt;HttpContentTypes&lt;/span&gt;&lt;span style="color:#dfdfbf;"&gt;.ApplicationJson);&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In this case we are posting a &lt;strong&gt;Customer&lt;/strong&gt; object and asking &lt;strong&gt;EasyHttp &lt;/strong&gt;to encode it using application/json. Similar to when receiving a response, when making a request that requires a body, we can also use dynamic objects. As such, this would also work:&lt;/p&gt;
&lt;div class="wlWriterEditableSmartContent" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:161b764d-28f5-4f3a-9bcb-72d2a183e077" style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;"&gt;
&lt;div class="le-pavsc-container"&gt;
&lt;div style="background-color:#000000;overflow:auto;padding:2px 5px;white-space:nowrap;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#dfdfbf;"&gt;&lt;/span&gt;&lt;span style="color:#efc986;"&gt;var&lt;/span&gt;&lt;span style="color:#dfdfbf;"&gt; http = &lt;/span&gt;&lt;span style="color:#efc986;"&gt;new&lt;/span&gt;&lt;span style="color:#dfdfbf;"&gt; &lt;/span&gt;&lt;span style="color:#8acccf;"&gt;HttpClient&lt;/span&gt;&lt;span style="color:#dfdfbf;"&gt;();&lt;/span&gt;&lt;br /&gt; &lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#dfdfbf;"&gt;&lt;/span&gt;&lt;span style="color:#efc986;"&gt;dynamic&lt;/span&gt;&lt;span style="color:#dfdfbf;"&gt; customer = &lt;/span&gt;&lt;span style="color:#efc986;"&gt;new&lt;/span&gt;&lt;span style="color:#dfdfbf;"&gt; &lt;/span&gt;&lt;span style="color:#8acccf;"&gt;ExpandoObject&lt;/span&gt;&lt;span style="color:#dfdfbf;"&gt;();&lt;/span&gt;&lt;br /&gt; &lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#dfdfbf;"&gt;customer.Name = &lt;/span&gt;&lt;span style="color:#dfaf8f;"&gt;&amp;quot;Joe Smith&amp;quot;&lt;/span&gt;&lt;span style="color:#dfdfbf;"&gt;;&lt;/span&gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#dfdfbf;"&gt;customer.Email = &lt;/span&gt;&lt;span style="color:#dfaf8f;"&gt;&amp;quot;Joe@Gmail.com&amp;quot;&lt;/span&gt;&lt;span style="color:#dfdfbf;"&gt;;&lt;/span&gt;&lt;br /&gt; &lt;span style="color:#dfdfbf;"&gt;&lt;/span&gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#dfdfbf;"&gt;http.Post(&lt;/span&gt;&lt;span style="color:#dfaf8f;"&gt;&amp;quot;http://domain.com/customer&amp;quot;&lt;/span&gt;&lt;span style="color:#dfdfbf;"&gt;, customer, &lt;/span&gt;&lt;span style="color:#8acccf;"&gt;HttpContentTypes&lt;/span&gt;&lt;span style="color:#dfdfbf;"&gt;.ApplicationJson);&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Internally, &lt;strong&gt;EasyHttp &lt;/strong&gt;is using the excellent &lt;strong&gt;&lt;a href="https://github.com/jsonfx/jsonfx"&gt;JsonFX&lt;/a&gt; &lt;/strong&gt;which currently provides support for JSON and XML encoding/decoding. EasyHttp extends this by adding encoding support for www-form-urlencoded. Extending it with other format should be pretty easy. &lt;/p&gt;
&lt;p&gt;As well as GET and POST, &lt;strong&gt;EasyHttp &lt;/strong&gt;also provides support for &lt;strong&gt;PUT&lt;/strong&gt;, &lt;strong&gt;DELETE &lt;/strong&gt;and &lt;strong&gt;HEAD&lt;/strong&gt;. Request and Response headers are surfaced as properties, so instead of having to add headers manually, we can just assign them individually (some of these are surfaced from the existing WebRequest). &lt;/p&gt;
&lt;h3&gt;Summary&lt;/h3&gt;
&lt;p&gt;That&amp;rsquo;s pretty much all there is to it. As I mentioned, I&amp;rsquo;ve been using it myself to talk to CouchDB, as part of &lt;a href="http://github.com/hhariri/YouTrackSharp"&gt;YouTrackSharp&lt;/a&gt; and a few other projects. It&amp;rsquo;s far from feature complete, but I&amp;rsquo;m adding things as I or the few that are using it request them. &lt;/p&gt;
&lt;p&gt;Feel free to download it and play with it. The source code is on &lt;a href="http://github.com/hhariri/EasyHttp"&gt;GitHub&lt;/a&gt; and Issue Tracker is on &lt;a href="http://youtrack.codebetter.com/issues/EHTTP"&gt;CodeBetter&lt;/a&gt;. If you are interested in running the tests, you will need CouchDB. I originally wrote this because I needed to do some things for CouchDB and it served as a good platform for testing different Http Verbs (yes, they are integrations tests and not unit tests). &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicio.us/aggbug.aspx?PostID=64631" width="1" height="1"&gt;</content><author><name>hhariri</name><uri>http://devlicio.us/members/hhariri/default.aspx</uri></author><category term="MSpec" scheme="http://devlicio.us/blogs/hadi_hariri/archive/tags/MSpec/default.aspx" /><category term="OSS" scheme="http://devlicio.us/blogs/hadi_hariri/archive/tags/OSS/default.aspx" /><category term="EasyHttp" scheme="http://devlicio.us/blogs/hadi_hariri/archive/tags/EasyHttp/default.aspx" /></entry><entry><title>That dreaded M in ASP.NET MVC</title><link rel="alternate" type="text/html" href="/blogs/hadi_hariri/archive/2011/01/02/that-dreaded-m-in-asp-net-mvc.aspx" /><id>/blogs/hadi_hariri/archive/2011/01/02/that-dreaded-m-in-asp-net-mvc.aspx</id><published>2011-01-02T16:50:00Z</published><updated>2011-01-02T16:50:00Z</updated><content type="html">&lt;p&gt;When it comes to working with Models in MVC, I&amp;rsquo;ve tried many approaches, some good, others not so much. I&amp;rsquo;ve ended up settling on ViewModels, whereby the Model I submit is dictated by the View I&amp;rsquo;m working with. This allows me the flexibility of displaying or gathering only the information I need. It also allows me to provide additional information on the view that isn&amp;rsquo;t necessarily required by my domain. &lt;/p&gt;
&lt;p&gt;It works, but it also adds a lot of friction. Be it mapping, be it validation, it&amp;rsquo;s continuously repeating same processes over and over again. Even automating some of this still requires constant set up. Every time I work with ASP.NET MVC, I dread having to deal with all this. Way too much friction. &lt;/p&gt;
&lt;p&gt;I&amp;rsquo;ve often wondered whether I&amp;rsquo;m overly complicating myself by trying to add so much flexibility. I mean if the Rails guys can work with ActiveRecord, why can&amp;rsquo;t I? Granted that maybe much of the drawbacks of ActiveRecord can be remedied in some way in Rails because of Ruby being a dynamic language and allowing for things such as Mixins, but still, what about the other stuff? The mapping to an actual domain model. What happens when they need a list of countries? What happens when they have to update only 2 out of 7 fields of their domain model? &lt;/p&gt;
&lt;p&gt;I decided to ask &lt;a href="http://twitter.com/ironshay"&gt;Shay&lt;/a&gt; how he works. As a guy who works with both ASP.NET MVC and Rails, and has written a book on &lt;a href="http://www.amazon.com/IronRuby-Unleashed-Shay-Friedman/dp/0672330784"&gt;IronRuby&lt;/a&gt;, I thought he&amp;rsquo;d be a good candidate. Plus, he&amp;rsquo;s a nice guy. &lt;/p&gt;
&lt;p&gt;I have to say I wasn&amp;rsquo;t really surprised by his answer. He binds directly to his Domain Model in ASP.NET MVC. I asked how he dealt with additional info: Html Helpers. I asked how he solved partial updates: In the controller. Although, not surprising, it was interesting. As a guy that&amp;rsquo;s worked heavily in Rails, he seems to cope fine with this approach in C#. &lt;/p&gt;
&lt;p&gt;So again I wonder, am I focusing on too much flexibility? I decided to ask others by running a quick survey on Twitter asking how people worked with M in MVC. &lt;/p&gt;
&lt;p&gt;1. First the disqualifying question. Are you using Strongly-Typed views?&lt;/p&gt;
&lt;p&gt;&lt;a href="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/image_5F00_194D66C3.png"&gt;&lt;img height="265" width="474" src="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/image_5F00_thumb_5F00_77818E31.png" alt="image" border="0" title="image" style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;98% voted they are. I&amp;rsquo;m guessing more than 2 people were not, but since the Survey was focused on strongly-typed views, they probably didn&amp;rsquo;t take part.&lt;/p&gt;
&lt;p&gt;2. Now the question to see if I am the odd one out using ViewModels&lt;/p&gt;
&lt;p&gt;&lt;a href="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/image_5F00_5C68BF23.png"&gt;&lt;img height="265" width="490" src="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/image_5F00_thumb_5F00_688A394A.png" alt="image" border="0" title="image" style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;Apparently not. 78% of people use ViewModels. &lt;/p&gt;
&lt;p&gt;3. The next question was how one deals with only partially updating some fields of a Domain Model if binding directly to them.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/image_5F00_50371F2F.png"&gt;&lt;img height="265" width="354" src="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/image_5F00_thumb_5F00_274C0A26.png" alt="image" border="0" title="image" style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;4. What about that damn list of countries? &lt;/p&gt;
&lt;p&gt;&lt;a href="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/image_5F00_33015158.png"&gt;&lt;img height="265" width="384" src="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/image_5F00_thumb_5F00_7EECB204.png" alt="image" border="0" title="image" style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;(I&amp;rsquo;ve actually found another way to solve this problem, partially based on conventions, and we might even build it in to &lt;a href="http://github.com/hhariri/AutoReST"&gt;AutoReST&lt;/a&gt;. But that&amp;rsquo;s for another post).&lt;/p&gt;
&lt;p&gt;5. Key question the following. Mappings (read friction). If you use ViewModels, do you manually map information or use something like AutoMapper? &lt;/p&gt;
&lt;p&gt;&lt;a href="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/image_5F00_2E5B20D1.png"&gt;&lt;img height="380" width="367" src="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/image_5F00_thumb_5F00_5CF129B3.png" alt="image" border="0" title="image" style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;Surprised by the number of people doing manual mapping. You would think that if AutoMapper&amp;rsquo;s only responsibility is to do mapping for you, why not use it? Could it be again the same issue? Too much friction to setup? NuGet to the rescue? Too much ceremony? &lt;/p&gt;
&lt;p&gt;6. Here&amp;rsquo;s another one. Validation.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/SNAGHTMLaa90b6d_5F00_4ED23AB6.png"&gt;&lt;img height="527" width="360" src="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/SNAGHTMLaa90b6d_5F00_thumb_5F00_75046E41.png" alt="SNAGHTMLaa90b6d" border="0" title="SNAGHTMLaa90b6d" style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;So pretty much everyone (79%), some way or other has to deal with decorating their models with attributes. &lt;/p&gt;
&lt;p&gt;7. Finally, I was curious how people felt in general with the development process. Did they also encounter friction?&lt;/p&gt;
&lt;p&gt;&lt;a href="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/image_5F00_1804B9E5.png"&gt;&lt;img height="265" width="368" src="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/image_5F00_thumb_5F00_43D50DD4.png" alt="image" border="0" title="image" style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;Not surprisingly, 70% find some level of friction in doing web development. &lt;/p&gt;
&lt;h3&gt;Conclusions&lt;/h3&gt;
&lt;p&gt;First off, this is not a stab at ASP.NET MVC. If you take it like that, you&amp;rsquo;re barking up the wrong tree. I&amp;rsquo;m sure in one way or another, any platform or language has a certain level of friction when it comes to developing applications. No, this is more of a self-stabbing. &lt;/p&gt;
&lt;p&gt;I also agree that on the whole, there&amp;rsquo;s too much friction. However, I&amp;rsquo;m not sure how much of that friction is caused by the platform vs the mentality of us developers to think big and try to build in so much unneeded flexibility. Are we really applying YAGNI? Are we really applying KISS? Maybe adding so much flexibility in terms of ViewModels because, and I quote, &amp;ldquo;&lt;em&gt;when dealing with complex scenarios, simple approaches fall apart&amp;rdquo; &lt;/em&gt;only actually solve a 5% edge case that could be remedied in a different way. &lt;/p&gt;
&lt;p&gt;Maybe we should stop being afraid of trying to be too strict and not flexible enough. Maybe we should take the concept of conventions more seriously than just what folders our Views, Controllers and Models reside in. Maybe we should push conventions to the limit and see if we actually reduce this friction. &lt;/p&gt;
&lt;p&gt;And that&amp;rsquo;s the next journey I&amp;rsquo;m going to embark on. It might be time to drop the ViewModel, it might not be. What I do know is that writing good software shouldn&amp;rsquo;t be so complex. &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicio.us/aggbug.aspx?PostID=64347" width="1" height="1"&gt;</content><author><name>hhariri</name><uri>http://devlicio.us/members/hhariri/default.aspx</uri></author><category term="Design" scheme="http://devlicio.us/blogs/hadi_hariri/archive/tags/Design/default.aspx" /><category term="ASP.NET MVC" scheme="http://devlicio.us/blogs/hadi_hariri/archive/tags/ASP.NET+MVC/default.aspx" /><category term="Architecture" scheme="http://devlicio.us/blogs/hadi_hariri/archive/tags/Architecture/default.aspx" /></entry><entry><title>SRP, as easy as 123…</title><link rel="alternate" type="text/html" href="/blogs/hadi_hariri/archive/2010/12/18/srp-as-easy-as-123.aspx" /><id>/blogs/hadi_hariri/archive/2010/12/18/srp-as-easy-as-123.aspx</id><published>2010-12-18T15:55:00Z</published><updated>2010-12-18T15:55:00Z</updated><content type="html">&lt;p&gt;&amp;hellip;of course, you&amp;rsquo;d need to have the &lt;a href="http://www.youtube.com/watch?v=i9hQIrsHaS4&amp;amp;feature=related"&gt;song ABC from the Jackson Five&lt;/a&gt; in your head for that title to be remotely amusing. &lt;/p&gt;
&lt;p&gt;Single Responsibility Principle is such a simple principle. It states that a class should only have one responsibility. One responsibility. Not two, not three, one. Such a concise and simple definition is hard to get wrong, right? Right? RIGHT??? Hmm&amp;hellip; &lt;/p&gt;
&lt;p&gt;&lt;a&gt;&lt;img height="264" width="460" src="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/clip_5F00_image001_5F00_4DFA63F8.png" alt="clip_image001" border="0" title="clip_image001" style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;h3&gt;A conversation between two friends&lt;/h3&gt;
&lt;p&gt;I&amp;rsquo;m looking at this Customer class, it does a bit too much no? &lt;/p&gt;
&lt;p&gt;&lt;i&gt;Huh? What do you mean? It&amp;rsquo;s a Customer Class. It deals with Customers. That&amp;rsquo;s all it does. Not Employees. Customers. I can fetch a customer. I can fetch a lot of customers. I can store a customer. I can calculate their age. I can check if they are VIP customers. Everything there is to do with customers. That&amp;rsquo;s all it does. Isn&amp;rsquo;t that what this Single Responsibility Principle states? To only have one responsibility? &lt;/i&gt;&lt;/p&gt;
&lt;p&gt;Well, yes, but I think you&amp;rsquo;ve kind of missed the point on what this whole responsibility thing is . &lt;/p&gt;
&lt;p&gt;&lt;i&gt;How so? It just deals with Customers right? In fact, isn&amp;rsquo;t what I&amp;rsquo;ve just described pretty much the ActiveRecord Pattern? &lt;/i&gt;&lt;/p&gt;
&lt;p&gt;Indeed it is. &lt;/p&gt;
&lt;p&gt;&lt;i&gt;So then WTF is the problem?&lt;/i&gt; &lt;i&gt;I don&amp;rsquo;t get it. &lt;/i&gt;&lt;/p&gt;
&lt;h3&gt;Digging deeper&amp;hellip;&lt;/h3&gt;
&lt;p&gt;Hmm, let&amp;rsquo;s look at this class. It reads/writes a customer(s) from/to the database. Therefore it has some code that has to do with reading from a database. It calculates age and verifies if a customer is a VIP. So it must have some business logic code in there. &lt;/p&gt;
&lt;p&gt;What happens when you need to change the persistence logic? &lt;/p&gt;
&lt;p&gt;&lt;i&gt;Well I&amp;rsquo;ll change the code. &lt;/i&gt;&lt;/p&gt;
&lt;p&gt;Which code? &lt;/p&gt;
&lt;p&gt;&lt;i&gt;The Customer class of course. &lt;/i&gt;&lt;/p&gt;
&lt;p&gt;Right. What happens when you need to change the business logic of how a customer is considered a VIP? &lt;/p&gt;
&lt;p&gt;&lt;i&gt;I&amp;rsquo;ll change it again&amp;hellip;..Sorry. What&amp;rsquo;s your point?&lt;/i&gt; &lt;/p&gt;
&lt;p&gt;So again, you&amp;rsquo;ll touch that class. What happens when Customers need some validation? You&amp;rsquo;ll again have to touch the same class. &lt;/p&gt;
&lt;p&gt;&lt;i&gt;And? &lt;/i&gt;&lt;/p&gt;
&lt;p&gt;What happens when you touch code? You usually end up breaking things. And it&amp;rsquo;s not necessarily &lt;i&gt;that &lt;/i&gt;particular thing you touch. You break other things that at that point you had no clue were somehow related. The more complicated the code, the more chances you have of breaking something. Of course, if on top of everything,&amp;nbsp; you don&amp;rsquo;t even have regression tests&amp;hellip;well I&amp;rsquo;m sure you&amp;rsquo;ve suffered the consequences. &lt;/p&gt;
&lt;p&gt;&lt;i&gt;I kind of think of myself a competent developer. I&amp;rsquo;m sure I can work with enough care to not break things. &lt;/i&gt;&lt;/p&gt;
&lt;p&gt;Right&amp;hellip;. Now while you go and convince yourself of that, let me explain another problem. You see, writing code is easy. Understanding it is hard. The more code in a class, the harder it will be to decipher. The less code, the easier it will be to comprehend. If a class does many things, it will most likely have what? More code. The less it does, you got it! Less code. Forget logic for a moment. It even has psychological impacts. Open a large class and a small one. Which one will depress you more? &lt;/p&gt;
&lt;p&gt;&lt;i&gt;I have no problem understanding my own code.&amp;nbsp; &lt;/i&gt;&lt;/p&gt;
&lt;p&gt;Sure. You&amp;rsquo;re very smart and you&amp;rsquo;ve worked on this code base and you know it well. What about other team members? Hell. Forget others. Why don&amp;rsquo;t you look at code you wrote yourself eight months ago. Do you know what it does? &lt;/p&gt;
&lt;p&gt;&lt;i&gt;Well mostly yes. But I guess that&amp;rsquo;s kind of why comments are useful&lt;/i&gt; &lt;/p&gt;
&lt;p&gt;Why do you need comments if your code is clear enough to understand? And you know why your code is hard to understand? Because you&amp;rsquo;re trying to solve too many problems at the same time. Think about it. You&amp;rsquo;re doing Customer listings, storing, reading and some business logic. It might be the case that for this particular example it&amp;rsquo;s not too hard to understand, but that&amp;rsquo;s because both of us have beaten Customer management to death (along with Authentication) so we&amp;rsquo;re experts in it. But imagine being thrown into some code that you have little knowledge of the domain. Is it easier to understand a class if it does one thing or five?&amp;nbsp; &lt;/p&gt;
&lt;p&gt;&lt;i&gt;So what are you proposing? &lt;/i&gt;&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s actually very simple. Divide and Conquer. Remember that? Back from our College days? Divide up a problem into smaller problems and solve the smaller issues. Dealing with mini-problems is easier than dealing with mega ones. &lt;/p&gt;
&lt;p&gt;When we take a class and divide it up into smaller classes, it will be easier to deal with it. And dealing can mean both understanding it and modifying it. But if your customer class is doing all that, it&amp;rsquo;s bound to be harder to understand and maintain. That&amp;rsquo;s why it&amp;rsquo;s important to get these responsibilities right. &lt;/p&gt;
&lt;p&gt;&lt;i&gt;I see. But where have I gone wrong then? I kind of thought I understood the Single Responsibility Principle. Going back to my Customer class, how do I define what the responsibility is if it&amp;rsquo;s not &amp;ldquo;dealing with customers&amp;rdquo;?&lt;/i&gt; &lt;/p&gt;
&lt;h3&gt;Getting a grip on responsibilities &lt;/h3&gt;
&lt;p&gt;The main problem in complying with SRP is defining the responsibilities. Where do we draw the line? A few things that have helped me along the way have been&amp;hellip; &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Change &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Have you ever heard people say: &lt;/p&gt;
&lt;p align="center"&gt;&lt;i&gt;&amp;ldquo;A class should only have one reason to change&amp;rdquo;&lt;/i&gt; &lt;/p&gt;
&lt;p&gt;when talking about Single Responsibility? &lt;/p&gt;
&lt;p&gt;&lt;i&gt;Yes, actually I have.&amp;nbsp; &lt;/i&gt;&lt;/p&gt;
&lt;p&gt;Well think about it. If a class changes for more than one reason, it must be because it&amp;rsquo;s doing more than one thing. Going back to your customer class, think how many reasons there is for it to change. If we have to touch the same class for changing different things, the risk of breaking something is higher, which leads to higher costs in maintainability. &lt;/p&gt;
&lt;p&gt;One way therefore of trying to figure out the responsibilities of a class is by asking the question of how many reasons are there for it to change. &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Naming &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Naming is a good way to discover the responsibilities of a class. What does your class do? Give it a name describing what it does. Does it use &lt;i&gt;And&lt;/i&gt; or &lt;i&gt;Or&lt;/i&gt;? Is it hard to explain what it does? Do you need to use suffixes like &lt;i&gt;Manager&lt;/i&gt;, &lt;i&gt;Processor &lt;/i&gt;or &lt;i&gt;Admin &lt;/i&gt;because you can&amp;rsquo;t pinpoint the exact word describing what it does? Maybe it&amp;rsquo;s because it does two things that one word can&amp;rsquo;t describe. These are all clues that your class is doing more than one thing. &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Cohesion&lt;/strong&gt; &lt;/p&gt;
&lt;p&gt;Take your class. Look at your methods. Do they have parameters or are they using instance fields? If they are using parameters, remove them. Make them instance fields. Do you end up with methods that only use one of the five instances? That most likely is a warning of the low cohesion that exists between that method and your class. Cohesion is a indication of how well related lines of code are, how well related methods are to a class.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;And you use &lt;a href="http://www.jetbrains.com/resharper"&gt;ReSharper&lt;/a&gt; right. Next time ReSharper prompts you if you want to make a method static, it&amp;rsquo;s telling you it does not use instance fields. That&amp;rsquo;s where you need to decide if that method actually belongs in that class. Sometimes it might, many times it might not. &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;i&gt;OK, that&amp;rsquo;s kind of making sense. &lt;/i&gt;&lt;/p&gt;
&lt;p&gt;Wait though. Many look at Single Responsibility Principle as something that applies only to classes. Wrong. It applies to methods too. The more things your method does, the more lines of code. The more lines of code. The harder to understand. The harder to debug. &lt;/p&gt;
&lt;p&gt;Use the same process to identify responsibilities in methods. How many reasons do I have to change the method? What do I name it? If I can&amp;rsquo;t name it on a single line, bad! If I can&amp;rsquo;t name it without using &lt;i&gt;And/Or &lt;/i&gt;, bad! &lt;/p&gt;
&lt;p&gt;Refactor your methods to smaller ones. Give each smaller method a good name. Make it descriptive. Don&amp;rsquo;t waste time trying to comment your methods and the 20 parameters it takes. If it&amp;rsquo;s well named and has one or two parameters at most, it should be self-describing. Remember, parameters are used to operate on values, not decide what path to take in the method. For that, you create two methods. &lt;/p&gt;
&lt;p&gt;(Beer enters the scene&amp;hellip;) &lt;/p&gt;
&lt;p&gt;&lt;i&gt;Hahahhaha&amp;hellip;&lt;/i&gt; &lt;/p&gt;
&lt;p&gt;What? &lt;/p&gt;
&lt;p&gt;&lt;i&gt;I remember back when I first started using non-locking source control, I was concerned about running into conflicts when merging. I was right. I did run into issues. I bitched at the SCM.&lt;/i&gt; &lt;i&gt;But now that I think of it, the problem wasn&amp;rsquo;t the SCM. It was the way I was working. It was having too much code in the same class. &lt;/i&gt;&lt;/p&gt;
&lt;p&gt;Yep, and that would lead to contention since many people would need to touch the same code. &lt;/p&gt;
&lt;p&gt;&lt;i&gt;Yep. I was fighting the wrong problem. Damn, it seems such a simple principle, but hard to get right then&amp;hellip;.&lt;/i&gt; &lt;/p&gt;
&lt;p&gt;Yes. It&amp;rsquo;s about asking the right questions. Single Responsibility Principle is about making code maintainable and understandable. That&amp;rsquo;s all there is to it really. &lt;/p&gt;
&lt;p&gt;&lt;i&gt;Right. Well dude, I guess it&amp;rsquo;s time for me to Refactor out that Class. &lt;/i&gt;&lt;/p&gt;
&lt;p&gt;Yep. Oh and do yourself a favor. If you&amp;rsquo;ve not read the book &lt;a href="http://www.amazon.com/Clean-Code-Handbook-Software-Craftsmanship/dp/0132350882"&gt;Clean Code&lt;/a&gt; by Robert C. Martin (@unclebobmartin), get it. It teaches you much of what we&amp;rsquo;ve been talking about. &lt;/p&gt;
&lt;p&gt;&lt;i&gt;Cool! &lt;/i&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicio.us/aggbug.aspx?PostID=64020" width="1" height="1"&gt;</content><author><name>hhariri</name><uri>http://devlicio.us/members/hhariri/default.aspx</uri></author><category term="Design" scheme="http://devlicio.us/blogs/hadi_hariri/archive/tags/Design/default.aspx" /><category term="Architecture" scheme="http://devlicio.us/blogs/hadi_hariri/archive/tags/Architecture/default.aspx" /></entry><entry><title>Coverage with TeamCity and dotCover with MSTest, NUnit or MSpec</title><link rel="alternate" type="text/html" href="/blogs/hadi_hariri/archive/2010/12/10/coverage-with-teamcity-and-dotcover-with-mstest-nunit-or-mspec.aspx" /><id>/blogs/hadi_hariri/archive/2010/12/10/coverage-with-teamcity-and-dotcover-with-mstest-nunit-or-mspec.aspx</id><published>2010-12-10T11:26:00Z</published><updated>2010-12-10T11:26:00Z</updated><content type="html">&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;As some of you know, we recently shipped &lt;a href="http://www.jetbrains.com/teamcity"&gt;TeamCity&lt;/a&gt; 6 which includes, out of the box, a bundled version of &lt;a href="http://www.jetbrains.com/dotcover"&gt;dotCover&lt;/a&gt;. What this means is that you can now get coverage reports for your code easily, and of course, for free if you&amp;rsquo;re using the Professional version of &lt;a href="http://www.jetbrains.com/teamcity"&gt;TeamCity&lt;/a&gt;.&amp;nbsp; The setup is quite easy if you are using MSTest and NUnit. For MSpec, you need to take a few additional steps.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h3&gt;Using MSTest / NUnit Runners&lt;/h3&gt;
&lt;p&gt;Normally build files consist of a series of tasks that involve compilation and running of tests. With TeamCity, you can separate some of these steps out into individual TeamCity Build steps, which is what we will be doing in this case (everything that we see here applies to both MSTest and NUnit). &lt;/p&gt;
&lt;p&gt;Here is our build.xml (MSBuild) file:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/image_5F00_4AF768D1.png"&gt;&lt;img height="133" width="646" src="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/image_5F00_thumb_5F00_63A69014.png" alt="image" border="0" title="image" style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;As we can see, other than compiling a solution, which in this case consists of the actual application and the test assemblies, not much else going on. &lt;/p&gt;
&lt;p&gt;[Note: this could have been done using the SLN as the Runner Type under TeamCity since this example build script does not do much else. In real scenarios however, build scripts do more than just call a solution (in fact normally you&amp;rsquo;d call projects not solutions)]. &lt;/p&gt;
&lt;p&gt;In TeamCity, we create a new build project and setup the VCS root. We then add a new Build Step which calls this MSBuild file:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/image_5F00_534B185B.png"&gt;&lt;img height="499" width="642" src="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/image_5F00_thumb_5F00_61C61480.png" alt="image" border="0" title="image" style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;Notice that all we are doing here is calling our MSBuild script. No coverage settings yet. &lt;/p&gt;
&lt;p&gt;Next thing is to add an additional build step in TeamCity. This time, we are going to call MSTest as opposed to MSBuild:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/SNAGHTML1e386e79_5F00_2B947664.png"&gt;&lt;img height="265" width="664" src="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/SNAGHTML1e386e79_5F00_thumb_5F00_6DD768DA.png" alt="SNAGHTML1e386e79" border="0" title="SNAGHTML1e386e79" style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/SNAGHTML1e3d642d_5F00_3CF4B16F.png"&gt;&lt;img height="355" width="664" src="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/SNAGHTML1e3d642d_5F00_thumb_5F00_0EBAB5B5.png" alt="SNAGHTML1e3d642d" border="0" title="SNAGHTML1e3d642d" style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;(the sections cut out are blank). &lt;/p&gt;
&lt;p&gt;In the &lt;strong&gt;.NET Coverage tool &lt;/strong&gt;section we select JetBrains dotCover and then&amp;nbsp; add the assemblies we want coverage for (just the name of the assembly) prefixing them with &lt;strong&gt;+:&lt;/strong&gt; and filtering out those we do not want coverage for with &lt;strong&gt;&amp;ndash;:&lt;/strong&gt;. &lt;/p&gt;
&lt;p&gt;That&amp;rsquo;s all there is to it. Once we run the Build, we should now see a new tab with Coverage Reports as well as a new Artifact which contains the Coverage files zipped up. &lt;/p&gt;
&lt;p&gt;&lt;a href="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/image_5F00_4B230492.png"&gt;&lt;img height="227" width="650" src="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/image_5F00_thumb_5F00_13F97699.png" alt="image" border="0" title="image" style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;The Code Coverage tab goes into more detail:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/image_5F00_06B2ED86.png"&gt;&lt;img height="219" width="664" src="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/image_5F00_thumb_5F00_3D4098CA.png" alt="image" border="0" title="image" style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" /&gt;&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;We can even drill down into individual classes and examine the code coverage:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/image_5F00_45E0F156.png"&gt;&lt;img height="376" width="648" src="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/image_5F00_thumb_5F00_5770DC21.png" alt="image" border="0" title="image" style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;If we are using NUnit instead of MSTest, the only difference is there test runner we select when adding a new Build Step in TeamCity. Instead of MSTest we choose NUnit along with the version:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/image_5F00_3962A860.png"&gt;&lt;img height="284" width="659" src="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/image_5F00_thumb_5F00_00F48188.png" alt="image" border="0" title="image" style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h3&gt;What about MSpec or my Specific Test Runner?&lt;/h3&gt;
&lt;p&gt;If we are using MSpec or a different test runner that is not supported directly by TeamCity, we can still get coverage reports; we just need to do a little bit of additional configuration. TeamCity has an API which allows us to send it messages when we want to interact with it (this is actually quite a powerful feature but out of scope for this post so please leave a comment if you&amp;rsquo;d like me to cover it in more detail). We can leverage this API to tell it when to start coverage and where to get the results from. &lt;/p&gt;
&lt;p&gt;Here is the build script for MSpec: &lt;/p&gt;
&lt;p&gt;&lt;a href="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/image_5F00_5D77DD22.png"&gt;&lt;img height="240" width="664" src="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/image_5F00_thumb_5F00_20933583.png" alt="image" border="0" title="image" style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;We have created two targets. The second one (TeamCity) is the one we are interested in. This does a couple of things:&lt;/p&gt;
&lt;p&gt;1. The first &lt;strong&gt;&amp;lt;Exec&amp;gt; &lt;/strong&gt;runs all MSpec tests so that we can see the test results inside TeamCity. This is not strictly necessary for Code Coverage but usually build processes do display these results. The --&lt;strong&gt;teamcity &lt;/strong&gt;option we are passing in to MSpec is for it to generate the system messages that are then fed to TeamCity (see point 3)&lt;/p&gt;
&lt;p&gt;2. The second &lt;strong&gt;&amp;lt;Exec&amp;gt; &lt;/strong&gt;is the one that runs dotCover. This uses a configuration file called dotCover.xml which we will examine further down. We pass in the c (or coverage) option when calling dotCover. &lt;/p&gt;
&lt;p&gt;3. This is a message we send to TeamCity to tell it that we have run coverage. We indicate the tool we are using (&lt;strong&gt;dotcover &lt;/strong&gt;in this case) and where the results are located. TeamCity uses this information to then display the results in the UI. This is one of the API messages mentioned earlier. &lt;/p&gt;
&lt;p&gt;Finally we need to define the dotcover.xml file with out configuration for running dotCover (for detailed information on creating &lt;a href="http://www.jetbrains.com/dotcover"&gt;dotCover&lt;/a&gt; configuration files, see &lt;a href="https://hhariri.wordpress.com/2010/07/28/running-code-coverage-from-the-console-with-dotcover/"&gt;here&lt;/a&gt; and &lt;a href="https://hhariri.wordpress.com/2010/08/05/advanced-scenarios-with-dotcover-console-runner/"&gt;here&lt;/a&gt;):&lt;/p&gt;
&lt;p&gt;&lt;a href="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/image_5F00_7180D3DE.png"&gt;&lt;img height="581" width="673" src="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/image_5F00_thumb_5F00_6476CE00.png" alt="image" border="0" title="image" style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;In terms of TeamCity, we then just define our build step that calls out to the build script:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/image_5F00_7C1DDF99.png"&gt;&lt;img height="472" width="588" src="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/image_5F00_thumb_5F00_553FA38C.png" alt="image" border="0" title="image" style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;Notice how we do not specify &lt;strong&gt;.NET Coverage &lt;/strong&gt;options explicitly. And if all goes well, we can see the coverage output just as before: &lt;/p&gt;
&lt;p&gt;&lt;a href="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/image_5F00_113BBF75.png"&gt;&lt;img height="296" width="684" src="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hadi_5F00_hariri/image_5F00_thumb_5F00_0793513F.png" alt="image" border="0" title="image" style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;h3&gt;Summary&lt;/h3&gt;
&lt;p&gt;We can see that running code coverage is now pretty straightforward when using MSTest, NUnit or even a custom test runner. Most of what we have covered for MSpec will work with pretty much any test runner in terms of coverage (feel free to vote &lt;a href="http://youtrack.jetbrains.net/issue/TW-14864"&gt;here for MSpec support&lt;/a&gt;). &lt;/p&gt;
&lt;p&gt;With any build process, there are numerous ways of doing the same thing. I&amp;rsquo;m going to show you one of them. Based on your setup and needs you might want to do things differently. Fortunately TeamCity is flexible enough to allow for many scenarios. &lt;/p&gt;
&lt;p&gt;One thing to be aware of is that dotCover creates some temporary files for the XmlSerailizer in the Temp profile folder. This normally is not a problem unless the folder does not exist. If you are running TeamCity under the SYSTEM account, make sure that the folder C:\Windows\system32\config\systemprofile\AppData\Local\&lt;strong&gt;Temp &lt;/strong&gt;exists. This will probably change in future versions so to avoid any possible issues. &lt;/p&gt;
&lt;p&gt;Enjoy!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicio.us/aggbug.aspx?PostID=63891" width="1" height="1"&gt;</content><author><name>hhariri</name><uri>http://devlicio.us/members/hhariri/default.aspx</uri></author><category term="Tools" scheme="http://devlicio.us/blogs/hadi_hariri/archive/tags/Tools/default.aspx" /><category term="MSpec" scheme="http://devlicio.us/blogs/hadi_hariri/archive/tags/MSpec/default.aspx" /><category term="dotCover" scheme="http://devlicio.us/blogs/hadi_hariri/archive/tags/dotCover/default.aspx" /><category term="TeamCity" scheme="http://devlicio.us/blogs/hadi_hariri/archive/tags/TeamCity/default.aspx" /></entry></feed>