tag:blogger.com,1999:blog-53199033244566876602024-03-05T15:03:28.558-06:00The Code ConnectionA blog about technology and programming, focusing on .NET, C#, and iOS.Johnhttp://www.blogger.com/profile/05647043768103600647noreply@blogger.comBlogger34125tag:blogger.com,1999:blog-5319903324456687660.post-82656304232988996232014-01-20T14:18:00.001-06:002014-01-20T14:18:20.045-06:00Listicle<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXtvy0L7xHj2TRJGN3Hl7Wl2_MgtmNwVYNlo51UjpZN8XXm7qDg_7myA6xYqRLHqiBEwukoQTHq_xKAbM8S_swZW59Hx-NNAe40V14HdiKqblixRAfohLDAaozqVv9KMiEeXiGTs6FcxwP/s1600/Logo.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXtvy0L7xHj2TRJGN3Hl7Wl2_MgtmNwVYNlo51UjpZN8XXm7qDg_7myA6xYqRLHqiBEwukoQTHq_xKAbM8S_swZW59Hx-NNAe40V14HdiKqblixRAfohLDAaozqVv9KMiEeXiGTs6FcxwP/s1600/Logo.png" height="125" width="200" /></a></div>
Have you ever wanted to use something like Pinterest, but felt out of place? Kind of like that "single-dad-hanging-out-with-soccer-moms" out of place? If you think the idea of keeping and sharing lists of stuff that interests you is a good idea, but you're looking for a more professional site, <a href="http://www.listicle.co/">Listicle </a>might interest you. In many ways, Listicle seems better thought out than something like Pinterest, in that it has more customization options and is less targeted to one particular demographic.<br />
<br />
Starting with your profile, I like that you can connect with a large variety of social networking sites (Facebook, Twitter, LinkedIn, Reddit, Google+, Instagram, Pinterest, Tumblr, Youtube, and Vimeo). But the nice thing is, you don't <i>have</i> to connect to any of them if you don't want to. Thank you for that, because I hate it when sites require you to login with Facebook or Google. I like to keep my world separate sometimes...<br />
<br />
Creating lists in Listicle is pretty satisfying. I can pick different types of lists (plain, numbered, or a countdown). Then I can pick four types of presentations for it (list, slideshow, flipbook, and grid). Also, all lists have 5 major categories to choose from when you create them (photos, videos, links, text, and audio. There is also a list of around 25 categories to place your list under. All in all, I like the customization options, because not all lists are created equal (if you don't agree, perhaps you're not OCD enough!). There are enough options to offer a large variety of lists. You can even upload your own cover photo for your lists, and control permissions for who can see them, which is a nice bonus.<br />
<br />
I started out by creating a list of <a href="http://www.listicle.co/list/user/post.php?listid=5758">interesting future technologies</a> that science is working on. While exploring the site, I also came across some interesting lists that others had created:<br />
<br />
<ul>
<li><a href="http://www.listicle.co/list/user/post.php?listid=5717">Google Research Projects</a></li>
<li><a href="http://www.listicle.co/list/user/post.php?listid=5165">10 Cool & Interesting Websites</a></li>
<li><a href="http://www.listicle.co/list/user/post.php?listid=1849">19 Muslim Inventions That Changed the World</a></li>
<li><a href="http://www.listicle.co/list/user/post.php?listid=5711">Things Not to Say During a Job Interview</a></li>
</ul>
<div>
I like that someone is catering to those of us that like to make, use, and share lists, without feeling out of place by being surrounded by crafting, making kids lunches, and fashion. Us geeks need an obsessive list-making outlet too, and I'm glad someone is providing!</div>
Johnhttp://www.blogger.com/profile/05647043768103600647noreply@blogger.com1Austin, TX, USA30.267153 -97.74306079999996729.828484 -98.388507799999971 30.705822 -97.097613799999962tag:blogger.com,1999:blog-5319903324456687660.post-47323836121977980822013-02-06T12:41:00.002-06:002013-02-06T12:41:34.078-06:00Adding Metadata to Generated ClassesIf you work with generated classes at all, especially with frameworks like <a href="http://msdn.microsoft.com/en-US/data/ef">Entity Framework</a>, you've inevitably faced the issue of putting metadata on a generated class. This is easier to do than you might think. For example, let's say you have the following generated class:<br />
<br />
<pre style="background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9b15Zlnz7v3RD7vZORu6uYjA2SgZ5bmhTqKGFPOe7yqWY3BCjwZGcZodcn4YjfFDaP0lQ5Q3TU4Ojr7BBJ_aZ3cWCd8lTJXJ8c9TNbv0s0xdn9MUu6CPrgGeST1EPCAHgknqilgTypwRp/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"><code style="color: black; word-wrap: normal;">1: public partial class GeneratedClass
2: {
3: // some code here
4: }
</code></pre>
<br />
If your generated class is a partial class and you're trying to add class-level metadata, simply create another partial class and add the property as follows:
<br />
<br />
<pre style="background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9b15Zlnz7v3RD7vZORu6uYjA2SgZ5bmhTqKGFPOe7yqWY3BCjwZGcZodcn4YjfFDaP0lQ5Q3TU4Ojr7BBJ_aZ3cWCd8lTJXJ8c9TNbv0s0xdn9MUu6CPrgGeST1EPCAHgknqilgTypwRp/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"><code style="color: black; word-wrap: normal;">1: [MyClassMetadata]
2: public partial class GeneratedClass
3: {
4: }
</code></pre>
<br />
<br />
On the other hand, if you want to add metadata to a property, you can use the MetadataType attribute as follows. Again, create a second partial class to do this.
<br />
<br />
<pre style="background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9b15Zlnz7v3RD7vZORu6uYjA2SgZ5bmhTqKGFPOe7yqWY3BCjwZGcZodcn4YjfFDaP0lQ5Q3TU4Ojr7BBJ_aZ3cWCd8lTJXJ8c9TNbv0s0xdn9MUu6CPrgGeST1EPCAHgknqilgTypwRp/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"><code style="color: black; word-wrap: normal;">1: [MetadataType(typeof(GeneratedClassValidation))]
2: public partial class GeneratedClass()
3: {
4: }
5: public class GeneratedClassValidation
6: {
7: [MyPropertyAttribute]
8: public string MyProperty { get; set; }
9: }
</code></pre>
Johnhttp://www.blogger.com/profile/05647043768103600647noreply@blogger.com1Austin, TX30.267153 -97.74306079999996729.828484500000002 -98.388507799999971 30.7058215 -97.097613799999962tag:blogger.com,1999:blog-5319903324456687660.post-14200882701951715932012-10-17T11:42:00.001-05:002012-10-17T11:42:37.838-05:00Compiling Moles Projects After VS2010 SP1 UpdateIf you have a Visual Studio 2010 project that uses the Moles framework, you may be getting an error similar to this when you try to compile:<br />
<br />
<strong style="background-color: white; border: 0px; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; line-height: 18px; margin: 0px; padding: 0px; vertical-align: baseline;">The type or namespace name 'XXXXXXXXXXX' does not exist in the namespace 'YYYYYYYYYY' (are you missing an assembly reference?)</strong><br />
<strong style="background-color: white; border: 0px; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; line-height: 18px; margin: 0px; padding: 0px; vertical-align: baseline;"><br /></strong>
This is due to the fact that Windows stores the assembly that you have moled in two different places. The SP1 update for Visual Studio 2010 updated one of these assemblies, but not the other. The simplest fix is to replace the old assembly with a copy of the new assembly (make a backup first).<br />
<br />
The old assembly should be in:<br />
<br />
"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0"<br />
<br />
While the new assembly should be in:<br />
<br />
C:\Windows\Microsoft.NET\Framework64\v4.0.30319<br />
<br />
<br />Johnhttp://www.blogger.com/profile/05647043768103600647noreply@blogger.com2Austin, TX, USA30.267153 -97.743060830.047727000000002 -98.058917799999989 30.486579 -97.4272038tag:blogger.com,1999:blog-5319903324456687660.post-5889245670277025382011-11-29T11:41:00.001-06:002011-11-29T11:45:00.998-06:00Fixing Stuck Builds in TFS 2010Sometimes builds will get stuck in TFS 2010 and no build with a priority of "Normal" will build. You'll find that you have to change to priority to something higher in order to actually trigger the build. This usually happens because of an unhandled build failure on a build with "Normal" priority. TFS thinks there is another "Normal" build ahead in the queue, and therefore holds off on building your new request.<br />
<br />
So how do you fix it? This requires going into the database. Open that database for the collection that is having the problem and look in the <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;">tbl_BuildQueue </span>table. Check the Status column in this table. Anything with a "2" means it is still queued (and therefore blocking any new builds). Change these to a "16", which means "Cancelled". That should fix your problem!Johnhttp://www.blogger.com/profile/05647043768103600647noreply@blogger.com4Austin, TX, USA30.267153 -97.743060830.047727000000002 -98.058917799999989 30.486579 -97.4272038tag:blogger.com,1999:blog-5319903324456687660.post-45994407902874149342011-11-21T22:50:00.001-06:002011-11-22T10:39:11.366-06:00Set Image as Wallpaper in Google Chrome<div class="separator" style="clear: both; text-align: center;">
<img border="0" src="http://news.cnet.com/i/tim/2011/03/08/Chrome-274px-high-logo.jpg" style="float: left; margin: 10px;" width="100" /></div>
I love Google Chrome. It's my go-to browser, whether I'm on a Windows or a Mac OS X system. But there's one thing that annoys me about it: there's no way to set an image as a desktop background. IE does it. Firefox does it. Why doesn't Chrome? Well, because Google says that this is a rarely used feature and therefore they don't plan to ever support it. Google, <i>you're wrong</i>.
<br />
<br />
Fortunately, there's a simple workaround. Just go get the "<a href="https://chrome.google.com/webstore/detail/ddkmiidlgnkhnfhigdpadkaamogngkin">Set Image as Background</a>" Chrome extension. It's free and works great. When you right-click on an image, you simply get a new menu option that says "Set image as wallpaper". It's that easy. The only downside is that it only works on Windows, though I hear that Mac and Linux versions are in the works.Johnhttp://www.blogger.com/profile/05647043768103600647noreply@blogger.com2Cedar Park, TX30.505198 -97.820288830.450475 -97.8992528 30.559921 -97.7413248tag:blogger.com,1999:blog-5319903324456687660.post-34907745884420352982011-11-15T10:31:00.000-06:002011-11-22T08:42:10.830-06:00Branching in TFS 2010: Part V (Sharing Common Libraries)<br />
In the previous four parts<span class="Apple-style-span"> of this article (start with <a href="http://www.thecodeconnection.com/2011/10/branching-in-tfs-2010-part-i.html">Part I here</a>), I covered the theory behind branching and the three main patterns that use in our projects. The only detail to wrap up is how to share common library code between projects. We do this with a combination of build events and branching. Note that this method only works if both projects are in the same collection. You can't branch between two projects if they are in separate collections. So plan accordingly.</span><br />
<span class="Apple-style-span"><br /></span><br />
<span class="Apple-style-span" style="font-size: 24px; font-weight: bold;">Sharing Common Code</span><br />
In order to share common code, we need to take care of a few preliminaries first. The common library project needs to contain a "Deploy" folder that contains the final binary assembly. This assembly will be stored in the TFS source control repository. We'll make use of pre-build and post-build events to help automate the process of keeping this assembly up-to-date. Then, each End-User project will have a "Lib" folder. When a project needs a common assembly, we will branch from the "Deploy" folder of a particular release branch into the "Lib" folder of the referencing project. TFS keeps track of all this in the file history, so we can see who branched what assembly to what project and when. This is also handy when something needs to be rolled back.<br />
<br />
This is how the folder structure looks for the common library, showing the "Deploy" folder:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUha-1syoUCvhwyfHUhgAqAvIsUW9E2Xcv99l591oO2dsq9flFGrSsBwgFDbGxPL-jUbn5sep85Hp52mk_LWEBYG4GSNFPykreJ9aSmurue6JzdxDDdTSXCx856AuyVzmehC8kbhyqsn0Y/s1600/Shared+Code+-+Folder+Structure.png" /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Once the folder structure is set up, the build events need to be set up. Right-click on the project and choose "Properties". In the Properties window, select the "Build Events" tab. In the "Post-build event command line:" box, enter the following:</div>
<blockquote class="tr_bq" style="font-family: courier; font-size: 10pt;">
copy /Y "$(TargetPath)" "$(SolutionDir)Deploy"</blockquote>
It looks like this:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4KHMP5wvSgFBbqDKq-ZONWejxvJUsjUd0tArmtWY798b_KBHQHxor83ybRLGXSs8g2IUG5ScTEEn5IVxP42MLJldR73107D1vcTXW2RroVWzzhpmAJHK-a-TXIk2esAGgjG7moguH_nBJ/s1600/Post-build+Events.png" width="550" /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Make sure you have the "Deploy" folder created, and then build the solution once and make sure it copies the assembly correctly. If not, check your paths and make sure everything is in the right place. Once you get it built, create a solution folder in your solution, and add assembly into it. This will ensure that the assembly gets stored in TFS. Then check everything in.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Now at this point, if you try to build again it will fail because the assembly in the "Deploy" folder is read-only, since it's stored in TFS and checked in. One solution is to remember to check out the assembly each time before you build, but honestly....who wants to do that? Instead, we can automate that task, too.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
For this, we're going to use a pre-build event. Into the "Pre-build event command line:" box, enter the following:</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
For 64-bit Windows, use:</div>
<blockquote class="tr_bq" style="font-family: courier; font-size: 10pt;">
"C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\tf.exe" checkout "$(SolutionDir)Deploy\$(TargetFileName)"</blockquote>
<br />
<div class="separator" style="clear: both; text-align: left;">
For 32-bit Windows, use:</div>
<blockquote class="tr_bq" style="font-family: courier; font-size: 10pt;">
"C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\tf.exe" checkout "$(SolutionDir)Deploy\$(TargetFileName)"</blockquote>
<div>
It should look like this (this screenshot is from the 64-bit version):</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCXGoGygVg0Wm7Q3C6CLY5miBPxsifqYEKF5Wc_Lvl1XMlzUMx8ZCtzzjZd3XO6DbbDbWZ07fZEbqU5RNx3as07qJpaH7NQXsnEdvfhYt6v94yOlsWgvrWx2XCDuvg1jAINBJZ3HkNS0Qo/s1600/Pre-build+Events.png" /></div>
<div>
<br />
This pre-build event will now check out the assembly from TFS before each build, which will allow the post-build event to copy over it after the build is done. It's still up to you to remember to check it in once you're finished.<br />
<br />
This is all that's needed on the common library side of things. You do your releases as I've described in the previous parts of this article, and each release branch will then contain the "Deploy" folder with the binary assembly.<br />
<br />
On the other side, make sure each project that needs a reference has a "Lib" folder in its solution and references all shared libraries from there. All that's left now is to get the assembly from the "Deploy" folder of the common library project to the "Lib" folder of the End-User project.<br />
<br />
Note that you can put your "Lib" folder at the project level, or at the solution level. The choice is yours. Putting it at the solution level will keep you from having duplicate assemblies in each project's separate "Lib" folder. On the other hand, having a "Lib" folder per project gives you the added flexibility of allowing you to have a different version of the same assembly for each project. You need to decide which approach works best for your needs.<br />
<br />
Once the "Lib" folder is set up, the only thing left is to branch a specific version of the common library into that "Lib" folder. Do that by right-clicking on the actual assembly (the .dll file) from the "Deploy" folder of a particular release, and branching it into the "Lib" folder of the other project.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjo67SWiy7nVpecn3v0MCJw5cqlIUCD1kOXyPrZnjR25xAriPG3YTT5vjLF_vMP5eGOAvNmQSOq4pCI-h-C04G9LxEv1edBjZB_kPEosxhNUZqLOTt8SNMl7CcmGoJam9ZSiZkz0UTcXQzr/s1600/Branch+Assembly.png" /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Note below that the Source and Target are two different projects. This is the key to this type of sharing.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvls75xwZD3t8qpV3gGECSCaosyaGT5DvWJ7RFDOlKnkPTYBJjPkgSa01k1U2BTl40pytoj_L_tQOhjIi_hxLQWvNed7FOg1CB4hdf9PRj9gJIslRAL6S68oAEAtnOK_PFjSu9yi0zYY0B/s1600/Branch+Assembly+Details.png" width="550" /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
This method of sharing is superior to simply copying the assemblies manually as needed, because it allows tracking and rolling back of changes through TFS. The version history of the files will show what projects a specific assembly has been branched into, and what versions of various assemblies are included in a given project.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Here is a slideshow that contains the information in this article:</div>
<div align="center">
<div id="__ss_10172366" style="width: 425px;">
<strong style="display: block; margin: 12px 0 4px;"><a href="http://www.slideshare.net/jvaran/branching-in-tfs-2010-part-v-sharing-code" title="Branching in TFS 2010 Part V (Sharing Code)">Branching in TFS 2010 Part V (Sharing Code)</a></strong><object height="355" id="__sse10172366" width="425"><param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=branchingintfs2010partv-111115105156-phpapp01&stripped_title=branching-in-tfs-2010-part-v-sharing-code&userName=jvaran" />
<param name="allowFullScreen" value="true"/>
<param name="allowScriptAccess" value="always"/>
<embed name="__sse10172366" src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=branchingintfs2010partv-111115105156-phpapp01&stripped_title=branching-in-tfs-2010-part-v-sharing-code&userName=jvaran" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"></embed></object><br />
<div style="padding: 5px 0 12px;">
View more <a href="http://www.slideshare.net/">presentations</a> from <a href="http://www.slideshare.net/jvaran">jvaran</a>.</div>
</div>
</div>
<div class="separator" style="clear: both; text-align: left;">
That concludes my overview of branching and sharing code in TFS. I hope it is useful, and feel free to leave feedback on how I can improve this, or future, articles.</div>
</div>Johnhttp://www.blogger.com/profile/05647043768103600647noreply@blogger.com13Austin, TX, USA30.267153 -97.743060830.047727000000002 -98.058917799999989 30.486579 -97.4272038tag:blogger.com,1999:blog-5319903324456687660.post-43710544662923188442011-11-13T16:44:00.000-06:002011-11-13T16:44:26.423-06:00iCloud Photo Stream<div class="separator" style="clear: both; text-align: center;">
<img border="0" height="217" width="512" src="http://www.applebitch.com/wp-content/uploads/2011/10/Photostream-iOS.jpg" /></div><br />
Photo Stream is one of the many iCloud services available for iOS devices, as well as for Windows, Mac OS X, and even Apple TV. The idea behind Photo Stream is that pictures you take on any of your devices are shared, via iCloud, to all of your other devices. Simple, and useful, enough. However, here are seven things you may not know about iCloud Photo Stream:
<ol>
<li>On iOS devices, photos are uploaded as soon as you leave the Camera app, as long as you are on wifi. Photos will not be uploaded over a cellular connection.</li>
<li>Photos are only stored on iCloud for 30 days. Normally this is plenty of time for each of your devices to download the photo. But if this is a problem based on your usage patterns, make sure each device is connected to wifi at least once every 30 days.</li>
<li>iOS devices are limited to the last 1000 photos in the Photo Stream. Mac and Windows systems will keep all photos, however.</li>
<li>While Mac and Windows systems keep the native resolution of the photo, iOS devices may resize to photos to a resolution optimized for the specific device.</li>
<li>Photo Stream does not support videos.</li>
<li>Photo Stream photos do not count toward your iCloud storage limit.</li>
<li>You cannot delete individual photos from the Photo Stream, only all of them at once. Doing so will not delete the photos from the individual devices.</li>
</ol>Johnhttp://www.blogger.com/profile/05647043768103600647noreply@blogger.com0tag:blogger.com,1999:blog-5319903324456687660.post-41964439462927262482011-11-11T13:11:00.000-06:002011-11-11T13:11:01.978-06:0011/11/11 11:11:11It's 11/11/11 11:11:11...I know, it's geeky. But I had to post something!<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<img border="0" height="228" src="http://www.darrenlynnbousman.com/wp-content/uploads/2011/01/11-11clock.jpg" width="320" /></div>
<br />Johnhttp://www.blogger.com/profile/05647043768103600647noreply@blogger.com0Cedar Park, TX, USA30.505198 -97.820288830.450475 -97.8992528 30.559921 -97.7413248tag:blogger.com,1999:blog-5319903324456687660.post-10510827915779109402011-11-09T11:59:00.000-06:002011-11-18T13:17:05.589-06:00Branching in TFS 2010: Part IV (Internal Pattern)In <a href="http://www.thecodeconnection.com/2011/11/branching-in-tfs-2010-part-iii-end-user.html">Part III</a><span class="Apple-style-span"> of this article, I discussed the End-User branching pattern and how to create it in TFS 2010. In this part, I'll be talking about the Internal pattern. The End-User pattern was a hybrid of the Branch by Quality pattern and the Branch by Feature pattern. The Internal pattern is also a hybrid of the same two patterns, but a somewhat different hybrid to meet the specific needs of the Internal projects.</span><br />
<span class="Apple-style-span"><br /></span><br />
<span class="Apple-style-span" style="font-size: 24px; font-weight: bold;">Internal Projects</span><br />
<br />
What we call Internal projects are those that are never directly used by customers. The most common example of an Internal project is a common library that is shared by multiple End-User projects. As a result, there can be multiple different versions of an Internal project in production at any given time. Another key difference between End-User and Internal projects is that Internal projects do not go through a formalized testing process like UAT. In some ways the Internal pattern is simpler than the End-User pattern, but in other ways it's more complex.<br />
<br />
The Internal branching pattern looks like this (click for a larger view):<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglWFAdsGcULW46xjMGkfJkj0bdL67ZRaKFaytOT38jGmMON84q3w0krgRACkrwX_CvbKh-xJt-00ZqOlilmKyvIXp1cK35vfZ9-x95Z0UWftqYcn_Hsp49PUD1rCj8p9_hbJtY7SfMKgAU/s1600/TxDMV+Internal+Pattern.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglWFAdsGcULW46xjMGkfJkj0bdL67ZRaKFaytOT38jGmMON84q3w0krgRACkrwX_CvbKh-xJt-00ZqOlilmKyvIXp1cK35vfZ9-x95Z0UWftqYcn_Hsp49PUD1rCj8p9_hbJtY7SfMKgAU/s1600/TxDMV+Internal+Pattern.png" width="550" /></a></div>
<br />
This pattern only has two main branches, Development and Bug Fix. Development is the main branch where all day-to-day coding occurs. Bug Fix is used for coding bug fixes to released code, and also as a staging ground for production releases.<br />
<br />
The first step is to create the folder and branching structure. This is done just like in <a href="http://www.thecodeconnection.com/2011/11/branching-in-tfs-2010-part-iii-end-user.html">Part III</a>, except for the obvious changes in the number of branches. It should look like this when done:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjku_NqCs1s6ggXvlkxnT15kGFRI7cI5WabmW3vBl_hVEIvUp61BVSENkcnWGpW9SPRH81oCds1cYrRFQJRrt0r6U2QtkZIQfWH6MArltGpVIMVYSwURLJI9OthDxeXPTxWDEb4yGnWkLef/s1600/Internal+Pattern+-+Folder+and+Branching+Structure.png" /></div>
<br />
<br />
The branching hierarchy is quite simple, like this:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbHDD_8QZHbT37eaeSrdGGyABWTB0GjloCkBvv5yEJ5JsJ3B9vqRpfwoP4s5Z1ZxkD2beG4nE737IgN7afZEQPavSi3Z_IU_tC9R0tx_LzX9huw-OoNoAJXIiA9Loj78OK6dCeptoY_y4n/s1600/Internal+Pattern+-+Branch+Hierarchy.png" /></div>
That completes the basic set up. There are four main processes that can happen during an Internal project:<br />
<ol>
<li>Development Cycle</li>
<li>Major Release</li>
<li>Incremental Release of the Latest Version (bug fix to the latest released version)</li>
<li>Incremental Release of an Old Version (bug fix to an older released version)</li>
</ol>
The first part of this, the Development Cycle, is exactly the same as what I covered in <a href="http://www.thecodeconnection.com/2011/11/branching-in-tfs-2010-part-iii-end-user.html">Part III</a> for the End- User pattern, so I won't go over that again.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjm4xfxbTj9gMW9ADT_mH4Na9QiVfjTWgBT1TqpP2Bn6RlLqJBlfFyRVuYGv1NiM84L-rvptDcGNCwOb3cXKZPfAxGc8tLpHl520vws7N5pYMZJ3aA6r0UuArdGsweJZ50Xdvbu9BDxW2rY/s1600/TxDMV+Internal+Pattern+-+Development+Cycle.png" width="550" /></div>
The next part, a Major Release, is slightly different. It looks like this:<br />
<div class="separator" style="clear: both; text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfpGPTxwQDiSUPJg8TgECI_4AwjMD0Nstv-40zwemEFB2YYKf5-QYQceGD6qXrV7Sw92gXRsMjMlJq_yn9sHS-FWwgOPAdaH7_RIE3hESYAGw-VmHfLnFYkm6OxbjRxGjNLKOHQKyAsBJu/s1600/TxDMV+Internal+Pattern+-+Major+Release.png" /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
The biggest difference here compared to what we've done before is the presence of the label. The label comes in handy for making bug fixes to older releases, as we'll see in a little bit. To apply the label, right-click on the Bug Fix branch and choose "Apply Label...":</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRdld10-GQtW4BYmOMNA9ODOFPlKPGk8yZbXNnZo558VvbFLjnhQAdcnoY4OtWIXeWvnidNiPalSFkCFBBb7q3lKfOpHkWYNTArrcuDNMoGQ4rrS_Z7TaWIkelWu3_CUToarNtSuOg1b_4/s1600/Apply+Label.png" /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
After that, give the label a meaningful name, like "Release 1.0":</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLOUYaTEUOjr9oCD2QZjWTGofcqRHDmS6OSYcuNXH4005vbAO0DQxxkniSSJkmZ5LvprLdtTMvWto5BLjD0S8rmZNxKnxDfQic1eLFKKMy-Mvy7WtDNbvClctjl9xuzocIVRNRKOd-2aO8/s1600/New+Label.png" width="550" /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Finally, create a read-only branch for the release, just like before. That's all there is to it for a Major Release.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
An Incremental Release is similar, except the bug fix coding is done in the Bug Fix branch, and not in the Development branch. And just like with the Major Release, don't forget to label the code in the Bug Fix branch.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhT_IdAKNt_TXbwAdO0H6Lk-EmAeHImZh8WJVz3W_y3n22VJk3G39uff0BQ-x3vCnW34pvJEUVQD0u5u_KmFPY9wG61jXenCuaaKO62RgZ0lPfzpLDPyLJGd-fVKV7C5XUxWzMpVUrb8Xjz/s1600/TxDMV+Internal+Pattern+-+Incremental+Release+%2528Latest+Version%2529.png" /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
The only other thing left is an Incremental Release, and this is where we'll finally make use of the labels we've been creating. So far up to this point, we've released version 1.0 and a subsequent version 1.1, which contained a bug fix to 1.0. Let's say that now we have a bug in 1.0 that needs to be fixed, but we don't want that fix to be incorporated into 1.1. This is how you do it.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6TSamqF7o65Bco1sBl49bZ2BBXXUlHlCjj_AlFjHZNy3ub0s3yXyUIZvFFT3jCAWGCvsUEgbTlRaY12BS6xiJhE8Dwl0naLjCZED9U0MfwB8M_o0mdUXlnjauwStLlH73b02j1XdoBtGn/s1600/TxDMV+Internal+Pattern+-+Incremental+Release+%2528Old+Version%2529.png" /></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
First, rollback the code in the Bug Fix branch to Label 1.0. Do this by right-clicking on the Bug Fix branch, and selecting "Rollback..."</div>
<div>
<br /></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGN0p5WGkK1VgNuLeRMVtXzIZvEhHH3lb1Ua2Jl97rpsdmht-UTHeNBB6s8CnboGlojp7RacTsXAjLWnHAteKMdZyeTVDEI6IdfuSaNc4OEjSa0ZqdIt7JTxq85eh9JkSbO04ydnRWvz9j/s1600/Rollback.png" /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Then make sure you choose the correct label in the correct project (by default Visual Studio searches labels in <i>all</i> projects, not just the current one).</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlKdZGl-JEAiMRNjYwlp_6tPI3beCRhcqRrLE_yuv0y4MURnL8RCKUVONHXqYav8bBwYFZL4Q_t0bE54VoayBfRzYelI_zoF4NHNpcc0Pdu58NehTLEfo1j2z9Yq42q1kJgyxXzJrbjQcI/s1600/Rollback+Details.png" width="550" /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Once this is done, all the code in the Bug Fix branch has been reset back to the Release 1.0 state. At this point, follow the same procedures as a normal Incremental Release - make your bug fix code changes, test them, and release them into production as Release 1.0.1. Also, merge your changes back down to the Development branch if you want - this step is optional. Note that Development contains 1.1 (or possibly later, unreleased) code. If you want this bug fix incorporated into those version, merge your changes down to Development. For example, if you didn't want this bug fix in 1.1 for some reason, but do want it to appear in a future 2.0 release, go ahead and merge. If you don't, and this bug fix is solely intended for Release 1.0, then don't merge your changes down to Development.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
The final step is to rollback the code in the Bug Fix branch (which currently contains 1.0.1) to 1.1. This will ensure that the Bug Fix branch is always left in the state containing the latest released code. Doing this will simplify future releases, both Major and Incremental.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
</div>
<div style="text-align: -webkit-auto;">
<div>
That completes an overview of all the major tasks involved with Internal projects. In the next part, I'll finish up with explaining how to share these common Internal projects across multiple End-User projects.<br />
<br /></div>
</div>
<div style="text-align: -webkit-auto;">
Here's a slideshow that covers the information in this article:</div>
<div align="center">
<div id="__ss_10090602" style="width: 425px;">
<strong style="display: block; margin: 12px 0 4px;"><a href="http://www.slideshare.net/jvaran/branching-in-tfs-2010-part-iv-internal-pattern" target="_blank" title="Branching in TFS 2010 Part IV (Internal Pattern)">Branching in TFS 2010 Part IV (Internal Pattern)</a></strong> <iframe frameborder="0" height="355" marginheight="0" marginwidth="0" scrolling="no" src="http://www.slideshare.net/slideshow/embed_code/10090602" width="425"></iframe> <br />
<div style="padding: 5px 0 12px;">
View more <a href="http://www.slideshare.net/" target="_blank">presentations</a> from <a href="http://www.slideshare.net/jvaran" target="_blank">jvaran</a> </div>
</div>
</div>Johnhttp://www.blogger.com/profile/05647043768103600647noreply@blogger.com3Austin, TX, USA30.267153 -97.743060830.047727000000002 -98.058917799999989 30.486579 -97.4272038tag:blogger.com,1999:blog-5319903324456687660.post-64597816330688758682011-11-09T11:22:00.000-06:002011-11-09T11:26:17.275-06:00iCloud Control Panel for Windows<div class="separator" style="clear: both; text-align: left;">
<br /></div>
I just downloaded the <a href="http://support.apple.com/kb/DL1455">iCloud Control Panel for Windows</a>. This is a nice little that lets you manage your iCloud account and check available storage space directly from a Windows computer. Note that after you install it, there is no program to run. Instead, it shows in your Windows Control Panel. It took me a few minutes to discover that!<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhT3-bPqjLWwCF2ZRnpWFYcGqTeFFJrCXgopN8V8NJxqxKmNTUjdRO9s2F9WcJ8qNK7Qz3Ba6MyMNLvnW7joYz_q7TLz6FeArh-BiIBuJLel2JuP0MN-ABoiRrAT8rbeY4wgSFtEmkHrzPU/s1600/iCloud+Control+Panel.png" width="550" /></div>Johnhttp://www.blogger.com/profile/05647043768103600647noreply@blogger.com1Austin, TX, USA30.267153 -97.743060830.047727000000002 -98.058917799999989 30.486579 -97.4272038tag:blogger.com,1999:blog-5319903324456687660.post-16143719174533091582011-11-08T09:11:00.000-06:002011-11-18T13:52:58.353-06:00Branching in TFS 2010: Part III (End-User Pattern)In <a href="http://www.thecodeconnection.com/2011/11/branching-in-tfs-2010-part-ii.html" style="text-align: -webkit-auto;">Part II</a><span class="Apple-style-span" style="text-align: -webkit-auto;"> of this article, I discussed the Third Party branching pattern and how to create it in TFS 2010. In this part, I'll be talking about the End-User pattern. Whereas the Third Party pattern was a variation of the Branch by Release pattern, the End-User pattern is a hybrid between Branch by Feature and Branch by Quality.</span><br />
<span class="Apple-style-span" style="text-align: -webkit-auto;"><br /></span><br />
<span class="Apple-style-span" style="font-size: 24px; font-weight: bold;">End-User Projects</span><br />
<br />
What we call End-User Projects are typically web applications. This means that only a single version is ever in production at a time, and each of these goes through customer UAT before being deployed into production. Therefore, we needed the ability to promote the code through various quality stages. But given the complexity of some of the applications, we also wanted to incorporate feature branching. This was accomplished using the following model (click on the image for a larger view):<br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_pCKwx_NA6-0CwbMfbTmwOk8KDKf1Fby2QNHktShDbsatth_vAWTHiohf-fHLqatVUumETieITsvPpEwMFSWrK4NFIrhpjSP4sd09Gg1Lu-b2PWCrTyenoclz9YGz6C7NYBdAVexBNLml/s1600/TxDMV+End-User+Pattern.png"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_pCKwx_NA6-0CwbMfbTmwOk8KDKf1Fby2QNHktShDbsatth_vAWTHiohf-fHLqatVUumETieITsvPpEwMFSWrK4NFIrhpjSP4sd09Gg1Lu-b2PWCrTyenoclz9YGz6C7NYBdAVexBNLml/s1600/TxDMV+End-User+Pattern.png" width="550" /></a>
<br />
This pattern consists of 5 primary branches:<br />
<ol>
<li><b>Production</b> - this is the top of the hierarchy, as all branches are child branches or below of this one. The code in here represents "production ready" code which is ready to be deployed. Typically code in the Production branch is released immediately after merging into this branch.</li>
<li><b>Test </b>- the Test branch represents release testing, meaning code testing prior to its release. This is to be distinguished from testing bug fixes to code that is already in production.</li>
<li><b>Development</b> - this is the main branch, and where almost all development occurs. It contains the latest code with the most up-to-date feature set.</li>
<li><b>Bug Fix Test</b> - this branch is used for testing bug fix releases. Normal deployments from Development to Production will never pass through this branch.</li>
<li><b>Bug Fix</b> - the Bug Fix branch is the development branch for coding bug fixes. This has to be distinctly different from the Development branch because new code in the Development branch shouldn't be merged into production along with a bug fix. Without this branch (and Bug Fix Test), there would need to be a code freeze while fixing bugs, and that's a cardinal no-no in the world of branching.</li>
</ol>
<div>
In addition to the above five branches, there are individual feature branches off the Development branch. There is also an individual read-only branch for each release, which are branched off the Production branch.</div>
<div>
<br /></div>
<div>
In order to create this pattern in TFS, we first create the folder structure. The structure is similar to what was in <a href="http://www.thecodeconnection.com/2011/11/branching-in-tfs-2010-part-ii.html">Part II</a>, with the addition of a Features folder. It should look like this when completed:</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicF65z5SiaSmajGVOLSY1-Sx4iSxzQ8Kxl3oYfcp31Sy2Fa-59cZS5tIJCcknmQTfsWmWQf8EOD-dz0PRkyybmwsvG8NnNuqTYZeMWw78YdgL49qu2sHygimZVRFICFPxsQrfBUndxf34u/s1600/End-User+Folder+Structure.png" /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Once the basic folder structure is created, it's time to create the branches. </div>
<div class="separator" style="clear: both; text-align: left;">
</div>
<ol>
<li>First, convert the Production folder to a branch.</li>
<li>Branch the Production branch into a Test branch and place it in the root folder.</li>
<li>Branch Test into a Development branch and place it in the root folder.</li>
<li>Branch Production into a Bug Fix Test branch and place it in the root folder.</li>
<li>Branch Bug Fix Test into a Bug Fix branch and place it in the root folder.</li>
</ol>
<div>
When you're done, it should look like this:</div>
<div>
<br /></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2SXospPZ-xYAx5vzFr1smWvSiZtXf0vddVqcKIJm_-iv1tc5kItu5YftWvQ1hRGInNPLEIVvjXA_gBhyphenhyphenk0qq86hLTdfpxR4uk6HHyNpXm8qocFsoV4YRptOswi9MtFe-BvgnEPPK-9Ttj/s1600/End-User+Basic+Branch+Structure.png" /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
The branch hierarchy should look as follows (you can view this by right-clicking on the Production branch, going to "Branching and Merging" and choosing "View Hierarchy"):</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3rSyqumhtmEg3YfnIkzLj6876i6rVAj1ACpwmK83y98WCGeIMH5OrMi5jAb7sdu5YhyphenhyphenWhj8i4BSxqx2yUgSZOtmtCm38iUDsSPusgO3xAHlWxXbZpSqkC4br6f_f7N8wVWqnQFUSopHPn/s1600/End-User+Basic+Branch+Hierarchy.png" /></div>
<div class="separator" style="clear: both; text-align: left;">
Finally, check in your project code into the "source" folder of the Development branch. This can simply be an empty project at this point.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Now that the basic branch structure is all set up, I'll go through a typical development process including feature development, testing, deployment, and bug fixes. Let's start with the development cycle, which is entirely contained to the Development branch and its child Feature branches:</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQQZvjtl3B91aT_ojvpo5KNSuoH5X7MxbWPionLSwgG49IFvEr9hJhNwHHFG1YXcDhpBnvWebDOex3qFv9VflhzOrrReh4JJlyNgCcB1fSXETCxdP2exnQgM4XdwTge1lkYUPvOADtJTBU/s1600/TxDMV+End-User+Pattern+-+Development+Cycle.png" width="550" /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
To create these branches:</div>
<div class="separator" style="clear: both; text-align: left;">
</div>
<ol>
<li>Branch Development into a "Feature 1" branch, located in the "Features" folder.</li>
<li>Branch Development into a "Feature 2" branch, also in the "Features" folder.</li>
</ol>
<div>
It should look as follows:</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtgD9oCYz0NWxP2Ye6XsclL3cHBbez2S931SWLe3BVgKU8fBVrJOx5_nPjd3CpgqIJMzKylvdfoynaCECYcL03h_vZMp8g9AtMSoX5MCC9wzW5gRAAZS9LEImUTnWHADGgJBywKmVykwW6/s1600/End-User+Basic+Feature+Branch+Structure.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtgD9oCYz0NWxP2Ye6XsclL3cHBbez2S931SWLe3BVgKU8fBVrJOx5_nPjd3CpgqIJMzKylvdfoynaCECYcL03h_vZMp8g9AtMSoX5MCC9wzW5gRAAZS9LEImUTnWHADGgJBywKmVykwW6/s1600/End-User+Basic+Feature+Branch+Structure.png" /></a></div>
<div>
<br /></div>
Initially, this pattern will keep feature development independent. I say "initially" because it won't stay that way for the entire life of the project. This isn't necessarily a big deal, but it is important to be aware of it. While each feature is being developed, neither is "aware" of the other. After Feature 1 is merged into the Development branch, upon completion, then it becomes part of the mainline code. As soon Development is merged into the Feature 2 branch just prior to unit testing Feature 2, the Feature 2 branch will contain Feature 1. After this point there is no easy way to go back to a purely-Feature 2 branch. Normally this is okay and not a problem. If for some reason you need to revert, you can rollback the changeset from the merge operation.<br />
<div>
<br />
Once all of the features have been completed, unit tested, and merged into the Development branch, it's time for a deployment.<br />
<div class="separator" style="clear: both; text-align: center;">
<img border="0" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPJZZ05LV6DODaAdJdCfzV9AV9OOFQ2Bd3s-k8469o9vh61dHY5g-AHRsqUiw53pGS1HUbaGVJZdXpNgc4B2cDmsbkGRA7eyuRaNee2Ip6iid9TdAl1E93JhTDtJc3383Lxj83DnkbLzeQ/s640/TxDMV+End-User+Pattern+-+Major+Release.png" width="324" /></div>
<br />
As you can see, the first step is to promote the code from Development to Test by merging the Development branch into the Test branch (and checking in the Test code afterward). After that, integration testing is performed on the code in the Test branch. Once that is done, merge code down from Production to Test, to make sure any potential conflicts are resolved. You might want to do additional testing at this point, too. After that, merge the code in the Test branch into Production (and check in). Finally, create a read-only branch from Production for the release. The process for doing this is the same as in <a href="http://www.thecodeconnection.com/2011/11/branching-in-tfs-2010-part-ii.html">Part II</a>.<br />
<br />
Now let's say after Release 1.0 has been deployed, we discover a bug in production that needs to be fixed right away and can't wait until the 2.0 release. No problem!<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8F2u6chh5mDpdYkdxRP0y3hHx2JqrXLeqLzWwuu9VObz1ZRWRHjdQ1kvJRezrewodbm-uBwLvpP_7I7BxLTOXzQUMf0ZZ4iCdDzjRqL8HI18iFI-tHezeQ4jIy2BV-DBo9W0WQ0WaSaH-/s1600/TxDMV+End-User+Pattern+-+Incremental+Release.png" width="550" /></div>
<br />
Here are the steps for creating an incremental bug fix release:<br />
<ol>
<li>Merge code from Production to Bug Fix Test.</li>
<li>Check in Bug Fix Test code.</li>
<li>Merge code from Bug Fix Test to Bug Fix.</li>
<li>Check in Bug Fix code.</li>
<li>Code the bug fix in the Bug Fix branch.</li>
<li>Merge code from Bug Fix Test to Bug Fix prior to unit testing (in case any other bug fixes were going on at the same time).</li>
<li>Unit test the bug fix code in Bug Fix.</li>
<li>Merge code from Bug Fix to Bug Fix Test.</li>
<li>Check in Bug Fix Test code.</li>
<li>Merge code from Production to Bug Fix Test (in case any other bug fixes were deployed while this one was being worked on).</li>
<li>Perform integration testing of the bug fix code in Bug Fix Text.</li>
<li>Merge code from Bug Fix Test to Production.</li>
<li>Check in Production code.</li>
<li>Create a read-only branch from Production for the incremental release.</li>
<li>Now we need to merge the bug fix into our mainline code. Merge the Production code into the Test branch.</li>
<li>Check in Test code.</li>
<li>Finally, merge the code from Test down into Development.</li>
<li>And, of course, don't forget to check in the Development code.</li>
</ol>
<div>
That completes an overview of all the major tasks involved with End-User projects. In the <a href="http://www.thecodeconnection.com/2011/11/branching-in-tfs-2010-part-iv-internal.html">next part</a>, I'll cover the Internal project pattern.<br />
<br /></div>
</div>
Here's a slideshow that covers the information in this article:
<br />
<div align="center">
<div id="__ss_10075392" style="width: 425px;">
<strong style="display: block; margin: 12px 0 4px;"><a href="http://www.slideshare.net/jvaran/branching-in-tfs-2010-part-iii-enduser-pattern" target="_blank" title="Branching in TFS 2010 Part III (End-User Pattern)">Branching in TFS 2010 Part III (End-User Pattern)</a></strong> <iframe frameborder="0" height="355" marginheight="0" marginwidth="0" scrolling="no" src="http://www.slideshare.net/slideshow/embed_code/10075392" width="425"></iframe> <br />
<div style="padding: 5px 0 12px;">
View more <a href="http://www.slideshare.net/" target="_blank">presentations</a> from <a href="http://www.slideshare.net/jvaran" target="_blank">jvaran</a> </div>
</div>
</div>Johnhttp://www.blogger.com/profile/05647043768103600647noreply@blogger.com0Austin, TX, USA30.267153 -97.743060830.047727000000002 -98.058917799999989 30.486579 -97.4272038tag:blogger.com,1999:blog-5319903324456687660.post-2163977845624977072011-11-07T11:46:00.000-06:002011-11-18T13:47:05.567-06:00Branching in TFS 2010: Part II (Third Party Pattern)In <a href="http://www.thecodeconnection.com/2011/10/branching-in-tfs-2010-part-i.html" style="text-align: -webkit-auto;">Part I</a><span class="Apple-style-span" style="text-align: -webkit-auto;"> of this article, I discussed the theory behind branching, some key points to keep in mind, and several of the most popular branching patterns. In this part, I'll be talking about the specific patterns we use on our team and how to actually implement those patterns in TFS 2010.</span>
<br />
On our team, we have three main types of projects. The first is what we call <b>End-User</b> projects. These are web applications and we would only ever have one version running in production at any given time. These projects all require UAT testing by our customers. The second kind of project is what call <b>Internal </b>projects. These are never directly used by end-users, so they never go through UAT. Internal projects are usually things like common class libraries that are shared by several End-User projects. This means that several different versions of an Internal project could be in production at the same time. The third type of project we use are <b>Third-Party</b> projects. These are third-party libraries that we usually don't have the source code for, so they are simply versioned and stored. However, in some cases we will have the source code (open source libraries, jQuery scripts, <i>etc</i>.) and we will make customizations to them. Because of the different requirements for the three types of projects, we needed three different branching patterns.<br />
<br />
<h2>
Third-Party Projects</h2>
I'll cover the Third-Party branching pattern first. In our environment, we have two types of releases when it comes to third party libraries. What we call a <i>third party release</i>, which is simply what is released by the developers of the library and a <i>customized release</i>, which is where we make small custom modifications to the library (usually for jQuery libraries). We don't go through a formal testing phase for either of these, so we just need basic branching support for tracking the releases and allowing for customization. We achieve this by using a variation of the Branch by Release pattern (click the picture for a larger view).<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-Nd-Lfy7Gus-8t_M-FLBgyioy5b5gELKhYeQQA1X30ckL6XD9b7KN_OauTzlgXENjSgoZLzPPPjJ4dBoQVYTGs5zxMn0aMRa3_OVLAYyAJgOMhn4UKMss-5d0YzaAGe_T-2tS9ba4GUFu/s1600/TxDMV+Third-Party+Pattern.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-Nd-Lfy7Gus-8t_M-FLBgyioy5b5gELKhYeQQA1X30ckL6XD9b7KN_OauTzlgXENjSgoZLzPPPjJ4dBoQVYTGs5zxMn0aMRa3_OVLAYyAJgOMhn4UKMss-5d0YzaAGe_T-2tS9ba4GUFu/s1600/TxDMV+Third-Party+Pattern.png" width="550" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: -webkit-auto;">
In this pattern, all code is initially checked into the Enhancement branch, then released into individual read-only Release branches from there. Note that these "check ins" are actually complete replacements of the code. So the changeset would consist of a deletion of everything, then the addition of the new files. This can also be handled by two separate changesets. Note that before creating the Release branch, we label the code in the Enhancement branch. This will come in handy later, because we may have to rollback the code in order to enhance an older release.</div>
<div class="separator" style="clear: both; text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgxkGvZc_fqdqJxpAt6rm-UCNonxRD3cZllScFqK-WPQU-JS0Xghp78sKHEa0oSqAn0G23LCbugqcN7ptVDqpj_vrCbyhRy_IN2m4rmTOaq_m5zdD2-rM-HNJJVh0RBCEd8G_G41pOfy3u/s1600/TxDMV+Third-Party+Pattern+-+Major+Release.png" width="550" /></div>
<div class="separator" style="clear: both; text-align: -webkit-auto;">
If we want to customize something, we merge from the Release branch down to the Enhancement branch and make our changes there. Then we release it by creating a new Release branch for the customized version, and finally merge those changes back into our Main branch. Again, don't forget the labels.</div>
<div class="separator" style="clear: both; text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirYCmYxewEZmn4aoie9tGlUGmpY7EjNp1Y5o-PaWEcJgJQWn-adS_vid4sKXWPz-8i94zuaXOFe0jc7cWmYr8g4w17odKn7JoHyNWxBhOA84eUKnPxVJy91Clh1N-ABrLB9giJloLc-Jg1/s1600/TxDMV+Third-Party+Pattern+-+Incremental+Release+%2528Latest+Version%2529.png" width="550" /></div>
<div style="text-align: left;">
If we want to make an enhancement to an older Release (not the latest release), then we have to first rollback the Enhancement branch to the label for that version. Then we make our changes and release as normal, but when we're done we rollback the Enhancement branch back to the latest release version. This ensures that we always leave the Enhancement branch with the latest version.</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXzXT7l8x-Js7H8v3JrYUx9uX-KbczEhJjmltnUgK7m6RH8E8BTfRhn7UNWnJDBdamaSKIJIXIjw1BNhgOv1uKfsez6yE5gwJd9e_YQsRYGzJWD7WbFa9zVTROuBCn86jfyEcvKRIqfew7/s1600/TxDMV+Third-Party+Pattern+-+Incremental+Release+%2528Old+Version%2529.png" width="550" /></div>
<div style="text-align: left;">
The other case we have to handle is when we want to propagate enhancements we've made to a later release. First off, be careful when doing this because you never know what may have changed in third-part code from release-to-release. So automatically patching a later release isn't recommended. But assuming you've done your due diligence, this is how you do it.</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
First, you do your major release of the new version as before. Then you <i>merge </i>the previous release (which contains your enhancements) into the Enhancement branch. After you're satisfied that the result is working, create your new customized release branch. Don't forget to label everything.</div>
<div style="text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTihVpElGk3QNoqCIY4YJYSst-gJWED7jkdqkdmKwg_0QG-uj4qmVaWDy42rL9rQEHtDIRzIzG30mp9n45aLnb8G8o1ZHMmDE3IcjomwfcoRTu0_au7_c4dBH6dBVeKGTepO2Gy845lWij/s1600/TxDMV+Third-Party+Pattern+-+Propagate+Enhancements.png" width="550" /></div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
In order to create this in TFS 2010, first create the basic folder structure. The design of the folder structure can vary depending on your needs, but we tend to use something like below. Normally we would also have a "Features" folder, but that doesn't apply for this pattern. It will be used in the the later patterns, though.</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvnA7OORR-tDFyY9unA396oNjGTlA_ulHo5pIJugMw89Zy6L2SLxOts_Pi3oR3WNOcG6fsBYmpQy7uypTILd77p-ed9ylNFYxHxiqNVyLrbPMqMNPfj7DTvwp7DXa8Y_y9Kx6xSHenU75I/s1600/Third+Party+folder+structure.png" /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Next, create your project and check it in to the source folder under Enhancement (or just check in the library assemblies). After that, convert the Enhancement folder to a branch. Do this by right-clicking on the folder, then going into the "Branching and Merging" menu.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<img border="0" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifQhdt1ifcG5dpFNvSeAExuBSUwQYddqkm7Xa76vGRfmGQ39DREotklbhUb0QfX7MJzfsA0iBFaXI_1rYL6C1UBp42Tz7bGowiMHxz2IWp8YxLcNciXrZov6iG69Cgyk8qFUs_-u7A1Qmn/s640/Convert+Folder+to+Branch.png" width="420" /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Finally, create a release from the Enhancement branch. Go to the same "Branching and Merging" menu by right-clicking on the Enhancement branch, and choose "Branch..." Fill out the dialog as shown below:</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4ntyHuRnFpS9HJ12BigKTVMa6ylI5a7X46_JEsMv-qaK53rO5VyXPPBL-hH5EoBWkzx6V_Ii9h_ldkSHk9le8GQypehpfQxQR0O_SKInOeXeFJkcUJDFuEKlf-im1Rxxoi-5wZDq-B-eh/s1600/Create+Third+Party+Release+Branch.png" width="550" /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
This newly created "Release 1.0" branch needs to be made read-only. To do that, right-click on the branch, choose "Properties", and select the "Permissions" tab. In the top "Users and Groups" section, choose "Contributers". Uncheck the "Inherit security settings" checkbox, and then check "Allow" for the "Read" permission, and "Deny" for all of the others. It should look like this:</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiamywc1pkhN9L8IIq8ydPn_w9EKbWGi7d8ZyPNoSau-ixQ5iZhp_LNXcWAc0vBccqmuUDI1XJ5wXdyvuzKjvI6iOmjKIjk_SE98nrzl4KdsMvmrjnp2tT82U9ZFBJRHRYSbJ9dVJv_4F0y/s1600/Make+Read-Only.png" width="550" /></div>
<br />
Congratulations! You've just finished the process of creating a basic release. Next, we're going to make an enhancement to it and release it as a customized release.<br />
<br />
To start off the enhancement process, merge from the Release 1.0 branch down into the Enhancement branch. Ideally, there should be nothing to merge because these two branches should contain the exact same code. However, this is good practice in case someone, somewhere broke process and made a change directly to Release 1.0 (note that they would have had to first change the permissions in order to do so). Do this using the "Branching and Merging" menu, just like before.<br />
<br />
At this point, check out the code from the Enhancement branch and make the changes you want. Once everything has been completed and tested to your satisfaction, check it back into the Enhancement branch.<br />
<br />
Once this is done, create a new release branch called "Custom Release 1.1" from the Enhancement branch and make it read-only. Make sure you create this new branch in the "Releases" folder.<br />
<br />
The final step is to merge the new changes down into the Main branch. To this by right-clicking on the Enhancement branch and merging it into the Main branch.<br />
<br />
That completes the Third Party pattern. In <a href="http://www.thecodeconnection.com/2011/11/branching-in-tfs-2010-part-iii-end-user.html">Part III</a>, I'll cover our End-User pattern.<br />
<br />
Here is a slideshow that covers the information in this article:<br />
<div align="center">
<div id="__ss_10061947" style="width: 425px;">
<strong style="display: block; margin: 12px 0 4px;"><a href="http://www.slideshare.net/jvaran/branching-in-tfs-2010-part-ii-third-party-pattern" target="_blank" title="Branching in TFS 2010 Part II (Third Party Pattern)">Branching in TFS 2010 Part II (Third Party Pattern)</a></strong> <iframe frameborder="0" height="355" marginheight="0" marginwidth="0" scrolling="no" src="http://www.slideshare.net/slideshow/embed_code/10061947" width="425"></iframe> <br />
<div style="padding: 5px 0 12px;">
View more <a href="http://www.slideshare.net/" target="_blank">presentations</a> from <a href="http://www.slideshare.net/jvaran" target="_blank">jvaran</a> </div>
</div>
</div>Johnhttp://www.blogger.com/profile/05647043768103600647noreply@blogger.com0Austin, TX, USA30.267153 -97.743060830.047727000000002 -98.058917799999989 30.486579 -97.4272038tag:blogger.com,1999:blog-5319903324456687660.post-88328384660692147532011-10-26T11:37:00.000-05:002011-11-07T14:43:56.926-06:00Branching in TFS 2010: Part I (Branching Theory)<i>NOTE: Part I of this article covers the theory behind branching and design patterns associated with it. Future parts will cover the specifics of how to implement this in TFS 2010.</i><br />
<br />
The topic of branching is something most development teams tend to shy away from. It sounds scary and unknown. But it can also be quite useful, when treated with respect. As Eric Sink put it on his excellent “<a href="http://www.ericsink.com/scm/source_control.html" target="_blank">Source Control HOWTO</a>”, “<em>…you need to develop just the right amount of fear of branching. This delicate balance seems to be very difficult to find. Most people either have too much fear or not enough.</em>” Eric is absolutely correct.<br />
<br />
<img border="0" src="http://www.dailygalaxy.com/.a/6a00d8341bf7f753ef014e881c2299970d-500wi" style="float: left; margin-bottom: 10px; margin-left: 10px; margin-right: 10px; margin-top: 10px;" width="80" />
So what exactly is branching? Branching is taking a snapshot of your code and isolating it for a specific purpose. It essentially creates a “parallel universe” of your code. Think of the main universe as the one we live in and this alternate universe as a child universe that spawned off the main one (keep this in mind, because this parent-child relationship will become important later). From the point in time where the code branches off, that child universe will evolve differently from the main universe.<br />
<br />
<div align="center">
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgoxg4lhMZ0M2bSQEtyqYe8A1tBUETm5Fru4nuvWBo2GvUxXJm0iQgTWgl_j6dMbg93UyxU4o3LnSYos5gwDxYPhRHBK8PtKh5wlDoOFct_pKtmCi1brcW5rMSvQ5vK5bYLp5EMHqWRE65r/s640/parent-child.png" style="margin-left: auto; margin-right: auto;" width="550" /></td></tr>
<tr><td class="tr-caption" style="text-align: center;">A simple parent-child branch</td></tr>
</tbody></table>
</div>
<span style="color: red;"><br /></span><br />
In short, <strong>branching is for isolation</strong>. If you’ve ever found yourself calling for a <em>code freeze</em>, you need branching. If you ever wanted to know what code was included in a release, you need branching. If you want to avoid releasing code that isn't ready, you need branching. If you want to allow developers to have a playground to experiment in without corrupting the real code, you need branching. If you've ever found yourself putting everything on hold to take on a massive refactoring effort, you need branching. Convinced yet? :)<br />
<br />
Before we go further, here are some useful terms used in branching:<br />
<ul>
<li><strong>Main Branch </strong>– also called a <em>trunk</em> or <em>mainline</em> branch. This is the primary branch that all changes are eventually merged into. In continuous integration environments, continuous builds should usually run against this branch. </li>
<li><strong>Development Branch</strong> – this is the branch that contains all active development. In many branching strategies, this can be one and the same as the main branch. </li>
<li><strong>Release Branches </strong>– each release of the product should create a new branch, as a child branch of the main branch, in order to isolate what’s in that release. </li>
<li><strong>Forward Integration</strong> – the act of merging changes from a parent to a child branch. For example, if you had a branch for a specific feature, merging the latest from the main branch into that feature branch would be of <em>forward integration</em>.<br />
</li>
</ul>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFhUdil682lRRd0xMFZbZgWREwKOO7F0gq1ztK56dl-OAbzrxb8TcYu46hSPWz8nP1i_QKQiDYwfJrNlKLNWQZH84cF8FQMXmoOmthGwbaSBBUC-3To2Wap7_e8r_k9Rnawp6P-7xz5JqP/s640/forward+integration.png" width="550" /></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Forward Integration</td></tr>
</tbody></table>
<ul>
<li><strong>Reverse Integration</strong> – the act of merging changes from a child to a parent branch. For example, merging the changes in a feature branch back to the main branch would be <em>reverse integration</em>.<br />
</li>
</ul>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6mLTJNNTEHKTcUvFQOj63zMfFWhZ0vG7M_6_N4FdM9G__hgea4o6b4cdwy5d61aq6tiFeUx8yA_6cy-6iKwbUNVIVnUZ_XDNu3YgICNkDWiEBln3uAOgl874tUurn6uIld37-V528_VLj/s640/reverse+integration.png" width="550" /></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Reverse Integration</td></tr>
</tbody></table>
<ul>
<li><strong>Baseless Merge</strong> – the act of merging changes from one branch to another where the two branches are not in a parent-child relationship. An example would be merging changes from one feature branch into another feature branch. In general practice, it isn’t a good idea to use baseless merges.</li>
</ul>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhahzaFNLwfyx51A8lfnPV50RmJFAjICumENFJBoc9ZAgJcH68Go8CYGQVyo7Ymwz5paSAmTnoaJxHxvJfMkVBgYgfD2wHJojsRhFGknTLlNhqYGFzXmq4mL9OBTBMTFwHMftIgNrMd7Glo/s640/baseless+merge.png" width="550" /></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Baseless Merge</td></tr>
</tbody></table>
Branching can be tricky and it does require some skill. Here are some tips to hopefully make it easier on you:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<img border="0" src="http://i3.squidoocdn.com/resize/squidoo_images/-1/lens12543841_1285387167success-inspire.png" width="100" /></div>
<div class="separator" style="clear: both; text-align: center;">
<strong>Five Keys to Making Branching Successful</strong></div>
<ol>
<li>Branching requires discipline. Stick to the correct process, even if you think something will be “quick” or “easy”. </li>
<li>Whenever possible, avoid branches off of other branches (cascading branches). </li>
<li>Merge with forward integration and reverse integration often. The more often you do it, the less problems you will have. </li>
<li>Do not confuse branching/merging with shelving. Shelving doesn’t create a branch, it is for temporary storage for work that you haven’t finished yet but needs to be backed up in TFS. Shelve when appropriate. Branch when appropriate. </li>
<li>Never have code freezes! Create a branch instead. </li>
</ol>
<div>
<b><br /></b></div>
<div>
<div class="separator" style="clear: both; text-align: center;">
<img border="0" src="http://blippitt.com/wp-content/uploads/2009/10/Homer-Oh-No.jpg" width="125" /></div>
<div class="separator" style="clear: both; text-align: center;">
<b>Seven Behaviors That Indicate Something is Wrong</b></div>
</div>
<div>
<ol>
<li>Merging is put off to the end, so it becomes a nightmare to do properly.</li>
<li>Merging happens too often, so much so that it gets in the way of actual development.</li>
<li>Merging never happens, usually because people are too afraid of the consequences.</li>
<li>The purpose of each branch isn't clear, or nobody remembers why a branch was created.</li>
<li>You find yourself having to freeze development efforts.</li>
<li>Branches are used to isolate developers instead of code changes.</li>
<li>A change is merged to an older release.</li>
</ol>
<div>
<b>Common Branching Patterns</b></div>
</div>
<div>
<ul>
<li><b>Stairstep Release Branching</b> - there are two different variations to this pattern. One is the Stairstep Release, which is the process of working on a single release at a time, and when that release goes into test, a new branch is created for the next release. You continue to "stairstep" down like that from release to release. This is the simplest pattern and requires the least amount of branching. It is also the least flexible pattern, and can require multiple test and build environments, and makes it very difficult to do concurrent release development.</li>
</ul>
<div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnUgs7cdcnveH0WYmFs8sS9gjd6AIJenMceTZFECUUuNuq0BUsL1xp4Oah3_-iNHrK_KUksofhVcqzdyN0iuqZud5FBy5Xl_dvgcfg6oukS6DjzVTivQ5FGABciHxPC74uwQ2Jc45u27Kj/s640/Branch+by+Release+%2528Staircase%2529.png" style="margin-left: auto; margin-right: auto;" width="550" /></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Staircase Release Branching</td></tr>
</tbody></table>
</div>
<ul>
<li><b>Mainline Release Branching</b> - this pattern consists of a single main branch that continues indefinitely, and each release branches off of it as development starts on each one. This version makes it easier to do concurrent release development, but at a cost. The branching with this pattern can be quite complex and integrating hotfixes can sometimes be a problem. It can also require multiple test environments.</li>
</ul>
<div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSwIuLtmoC1GVQcpub8kx-qFeDh46chrBPka-JAq5r1b-4cVdTNWz6DDfs7V5qGgDpp0kkdVTZ_idBQ0P12hPBBGHrA41V-glGuy7UBWhCsCGE4-A9JQhXC42pdOTqEAyGOwVBmYvtKazU/s640/Branch+by+Release+%2528Mainline%2529.png" style="margin-left: auto; margin-right: auto;" width="550" /></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Mainline Release Branching</td></tr>
</tbody></table>
</div>
<ul>
<li><b>Quality/Environment Branching</b> - this pattern has, usually, three separate branches named something like Development, Test, and Production. Changes are essentially "promoted" from the Development branch into the Test branch, and eventually to the Production branch. This pattern is much more flexible than Release Branching, but can also get very complicated when bugs are discovered in production. For large projects, this pattern may require a dedicated person to manage the branching and merging process.</li>
</ul>
<div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2PX-OmZNJ2EDHhGjO_UVDJUwRSiblxH_rmg-EiI4OcgBF6gLLkw8aIz8sFt-6V2bSxF746PpyRURsgWbRrhyfV-3Joi0t9opvfGQQXDLzQq5Am0UX85zlhS15zc_ED5rQQA6siXB5rhgX/s640/Branch+by+Quality.png" style="margin-left: auto; margin-right: auto;" width="550" /></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Quality Branching</td></tr>
</tbody></table>
</div>
<ul>
<li><b>Feature Branching</b> - this pattern involves creating a separate branch for each major feature. I say "major" because you don't want to do this for correcting a typo on a web page, for example. Ideally, each feature would be completely independent of the other features. This pattern is the most flexible in terms of choosing what code should be released. It can also get complicated and could also require a separate test environment per feature (however, this can be mitigated - we'll see how later).</li>
</ul>
<div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDfTETDhB2vZ3-Pl-eyJw88vnJVXYhG9GjpXWL1BfFQ-FfmkT5bdts-WZJMN-Mi-PqNaHsjnT0kU_LanDBte1i4TOFOY4BAgow8Pw2YVJ21uNq3d2pQcg-D6mDltydnjLgZaEIPuNnJ4T8/s640/Branch+by+Feature.png" style="margin-left: auto; margin-right: auto;" width="550" /></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Feature Branching</td></tr>
</tbody></table>
Hybrid patterns that combine different aspects of the above are also possible. For example, some teams combine Quality and Feature branching and allow each feature to move through Development, Test, and Production.</div>
</div>
<div>
<br /></div>
<div>
<b>Agile and Continuous Integration</b></div>
<div>
In theory, whether you use Agile methodologies, such as continuous integration, or not should have no bearing on branching and merging. However in practice, sometimes it can make a difference. For example, if you use feature branching, technically each feature branch would need its own build and test environment, in order to keep them isolated. Needless to say, this is overkill and completely unnecessary for most development teams.<br />
In reality, once development of your feature branch is complete, you should merge the latest changes from the main branch into your feature branch (forward integration). Then run your unit tests locally, as these should not hit a database. Once you are satisfied that everything is working, merge your feature branch back to the main branch (reverse integration). At this point, your continuous build should run (because it should only be configured to run on the main branch, not each feature branch). If you have them, you can run integration tests at this point, too (which <i>will</i> hit the database, but only one is needed by this point). This process will keep your continuous build from running unnecessarily, and will also solve the aforementioned problem of needing a separate test environment when using the feature branching pattern.</div>
<div>
<br /></div>
<div>
<b>Shared Code</b></div>
<div>
<div class="separator" style="clear: both; text-align: center;">
<img border="0" src="http://solidmobiles.com/wp-content/uploads/2011/02/sharing-is-caring1.jpg" style="float: left; margin: 10px;" width="100px" /></div>
We all learned in kindergarten that sharing is caring. That may be so, but it can come with its own set of problems. For example, how do you structure TFS to allow for shared code? There are many approaches to solving this problem, but in general trying to share the actual source code isn't worth the effort. Not only does it become complex, it is also less flexible. Instead, it's better to share the compiled binary assemblies.<br />
<br />
One way to do this is to keep shared code in a separate Team Project and Visual Studio project. Store the binary assembly that is the output of the project in TFS. Then, when another project needs to reference the assembly, branch the folder that the assembly is in into a "Lib" folder in the referencing project. This method will allow each referencing project a choice in when to upgrade to a later version of the shared assembly. Requested updates to the assembly can then be done through forward integration from the main branch of the shared project.<br />
<br />
That's all for Part I, which should give you a working knowledge of the basic principles behind branching and merging. Next time, we'll discuss which solution our team uses (hint: it's a hybrid pattern) and how to set the whole thing up in TFS. Go to Part II <a href="http://www.thecodeconnection.com/2011/11/branching-in-tfs-2010-part-ii.html">here</a>.<br />
<br />
Here is a slideshow that covers the information in this article:<br />
<br /></div>
<div align="center">
<div id="__ss_9906548" style="width: 510px;">
<strong style="display: block; margin: 12px 0 4px;"><a href="http://www.slideshare.net/jvaran/branching-in-tfs-2010-part-i" target="_blank" title="Branching in TFS 2010 Part I (Branching Theory)">Branching in TFS 2010 Part I</a></strong> <iframe frameborder="0" height="426" marginheight="0" marginwidth="0" scrolling="no" src="http://www.slideshare.net/slideshow/embed_code/9906548" width="510"></iframe> <br />
<div style="padding: 5px 0 12px;">
View more <a href="http://www.slideshare.net/" target="_blank">presentations</a> from <a href="http://www.slideshare.net/jvaran" target="_blank">jvaran</a></div>
</div>
</div>Johnhttp://www.blogger.com/profile/05647043768103600647noreply@blogger.com1Austin, TX, USA30.267153 -97.743060830.047727000000002 -98.058917799999989 30.486579 -97.4272038tag:blogger.com,1999:blog-5319903324456687660.post-40906800509571948092011-10-19T09:01:00.000-05:002011-10-19T09:01:48.663-05:00My Experience with Team Foundation Server 2010<div class="separator" style="clear: both; text-align: center;">
<a href="http://4leaf.eu/wp-content/uploads/2010/10/tfs.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="180" src="http://4leaf.eu/wp-content/uploads/2010/10/tfs.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
Over a year ago, I wrote an <a href="http://www.blogger.com/blogger.g?blogID=5319903324456687660#editor/target=post;postID=8976198577509138411">article</a> about comparing Team Foundation Server to Subversion, which turned out to be one of the most popular posts on my blog. That comparison was based on TFS 2008, and due to a variety of circumstance, we ended not implementing either TFS or Subversion, but rather stuck with good old SourceSafe (yay). A couple of months ago, however, we finally got the traction we needed to proceed with a full-fledged source control system, and set up TFS 2010. Here's a brief overview of how it went.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<b><span class="Apple-style-span" style="font-size: large;">Installation</span></b></div>
<div class="separator" style="clear: both; text-align: left;">
Compared to TFS 2008, the installation of TFS 2010 was a breeze. In 2008, the installer was very fickle and would constantly error out during various steps if everything wasn't configured ideally before starting (at least in my experience). TFS 2008 was also invasive into Active Directory and tried to make some changes to the AD configuration, which was not allowed at my client's site. In 2010, however, the Active Directory invasiveness is gone and the installer was no more complicated than a standard installer, on par with installing something like SQL Server. And for anything that wasn't configured correctly before installation, it just gave me a reminder to do it later instead of crashing. That's always a plus.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
</div>
<div class="separator" style="clear: both; text-align: left;">
<b><span class="Apple-style-span" style="font-size: large;">Configuration</span></b></div>
<div class="separator" style="clear: both; text-align: left;">
General configuration was easy and done through a series of wizards - no more manually editing XML files like you sometimes had to do in 2010. After you set up your collections in the TFS Administration console, pretty much everything else can be done via Team Explorer (Visual Studio 2010). I configured several Team Projects and created Team Build configurations without a hitch. Modifying the build process is also done visually, using Windows Workflow activities. I modified a few of them to publish a website upon a successful build, and had no difficulties with it.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
</div>
<div class="separator" style="clear: both; text-align: left;">
<b><span class="Apple-style-span" style="font-size: large;">User Experience</span></b></div>
<div class="separator" style="clear: both; text-align: left;">
The end-user experience isn't really that different from 2008. Most of the improvements in terms of usability are on the administrator side of things. That being said, it works well. We've been using it for a few months to manage about 15 different projects and builds, and are also using it for all defect and issue tracking, and our Agile Scrum process. I actually installed it on a 3 year old workstation running Windows 2008 Server R2, and the performance hasn't even been an issue (though we have a small team of 5).</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Overall I was very pleased with the level of improvement from TFS 2008 to TFS 2010. TFS 2008 was daunting and made you feel like you had to be a dedicated expert in order to use it, the way I feel about most Oracle products. By contrast, TFS 2010 is very accessible to the average developer and much easier to support and maintain. Looks like Microsoft's pattern of hitting their stride with the third release of a product is still going strong.</div>
<br />
<br />
<br />Johnhttp://www.blogger.com/profile/05647043768103600647noreply@blogger.com0Austin, TX, USA30.267153 -97.743060830.047727000000002 -98.058917799999989 30.486579 -97.4272038tag:blogger.com,1999:blog-5319903324456687660.post-24097604568730691612011-10-18T13:05:00.000-05:002011-10-18T13:13:13.229-05:00This isn't about coding or technology, but it is something near and dear to me. If you can spare a little bit of your time or money, please go help two kids get their first bikes: <a href="http://ridetoabetterlife.blogspot.com/">ridetoabetterlife.blogspot.com</a>.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwN0mX-knqvfgTIrkfKQtWtCxtbjxEqDtymEctcbuF3fXaxL98bSwGRGpMzL0cEceDko4T_W3mMMnmqXwnRC0TnTGpzc8uyxFO_oBzXLArDYUe8ZsqViBOdr9o2XfhwfaUreDfFbAhWIpi/s1600/suziebike.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwN0mX-knqvfgTIrkfKQtWtCxtbjxEqDtymEctcbuF3fXaxL98bSwGRGpMzL0cEceDko4T_W3mMMnmqXwnRC0TnTGpzc8uyxFO_oBzXLArDYUe8ZsqViBOdr9o2XfhwfaUreDfFbAhWIpi/s200/suziebike.JPG" width="149" /></a></div>
<br />Johnhttp://www.blogger.com/profile/05647043768103600647noreply@blogger.com0tag:blogger.com,1999:blog-5319903324456687660.post-34354696567776019182011-10-13T22:28:00.000-05:002011-10-13T22:28:13.608-05:00iOS 5 Resources<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiaqi_VXOhju2hWXCcnTj81pqBpseVx6yudrbvEv42U7aNMeodA01xxEFckhMcChyphenhyphendfESWCQ36HDrfnwkS5mwW7blEpIaFkYUs2Sm2sG2KKpRpwk73Usf_JJN58nAhWtDaL7jNlICL_hTly/s1600/ios5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiaqi_VXOhju2hWXCcnTj81pqBpseVx6yudrbvEv42U7aNMeodA01xxEFckhMcChyphenhyphendfESWCQ36HDrfnwkS5mwW7blEpIaFkYUs2Sm2sG2KKpRpwk73Usf_JJN58nAhWtDaL7jNlICL_hTly/s200/ios5.png" width="183" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
iOS 5 just came out and it contains a <i>lot</i> of new features. Here are some resources that will hopefully help to make sense of all of them.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<b>1. Overview of Features (from Apple)</b></div>
<div class="separator" style="clear: both; text-align: left;">
This is a summary of the major new features, straight from the source. Click the picture to jump to Apple's site.</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://www.apple.com/ios/features.html"><img border="0" height="141" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSKDqz3flAT-z6ZsGBpUWP0odFssLpqJDFuLDRiptmBZMG6aHQ1wpZmcoq2xd8AWQatWa5m2NMoeLvpARGImisBcDF9_-f_JzpBB5lajtZZy_8DNud54D-VokeAouIlCdxQ5oUdxN8NVDt/s400/Features.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<b><br /></b></div>
<div class="separator" style="clear: both; text-align: left;">
</div>
<div class="separator" style="clear: both; text-align: left;">
<b>2. Overview of Features (from Apple)</b></div>
<div class="separator" style="clear: both; text-align: left;">
Once you've got the overview, you can read more details at 148Apps's "<a href="http://www.148apps.com/news/ios-5-feature-roundup/">Full Feature Roundup</a>".</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://www.148apps.com/wp-content/uploads/2010/06/148Apps_LargeLogo-300x105.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://www.148apps.com/wp-content/uploads/2010/06/148Apps_LargeLogo-300x105.png" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: left;">
<b>3. CNet Tutorials</b></div>
<div class="separator" style="clear: both; text-align: left;">
CNet has some great video tutorials on using some of the major features of iOS 5. Check them out below.</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://upload.wikimedia.org/wikipedia/en/1/11/Cnetlogo.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="200" src="http://upload.wikimedia.org/wikipedia/en/1/11/Cnetlogo.gif" width="200" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
</div>
<ul>
<li><a href="http://howto.cnet.com/8301-11310_39-20084239-285/how-to-use-the-ipads-split-keyboard-on-ios-5/">Using the iPad's Split Keyboard</a></li>
<li><a href="http://howto.cnet.com/8301-11310_39-20120214-285/how-to-use-the-new-mail-app-in-ios-5/?tag=mncol;posts">Using the New Mail App</a></li>
<li><a href="http://howto.cnet.com/8301-11310_39-20107458-285/how-to-get-started-with-imessage/">Using iMessage</a></li>
<li><a href="http://howto.cnet.com/8301-11310_39-20112361-285/how-to-get-started-with-ios-5s-notification-center/">Using Notification Center</a></li>
<li><a href="http://howto.cnet.com/8301-11310_39-20083074-285/how-to-keep-your-web-browsing-private-on-ios-5/">Private Web Browsing on Safari</a></li>
<li><a href="http://howto.cnet.com/8301-11310_39-20070407-285/how-to-set-custom-vibration-alerts-on-ios-5/">Custom Vibration Alerts</a></li>
<li><a href="http://howto.cnet.com/8301-11310_39-20105442-285/how-to-use-the-ios-5-reminders-app/">Using the Reminders App</a></li>
<li><a href="http://howto.cnet.com/8301-11310_39-20079181-285/make-custom-iphone-ringtones-alerts-with-garageband/">Making Custom Ringtones</a></li>
<li><a href="http://howto.cnet.com/8301-11310_39-20100407-285/control-access-to-your-twitter-account-on-ios-5/">Controlling Access to Your Twitter Account</a></li>
<li><a href="http://howto.cnet.com/8301-11310_39-20079665-285/control-location-access-by-system-services-on-ios-5/">Controlling Location Access</a></li>
<li><a href="http://howto.cnet.com/8301-11310_39-20071403-285/how-to-view-the-hourly-weather-forecast-on-ios-5/">Hourly Weather Forecasts</a></li>
<li><a href="http://howto.cnet.com/8301-11310_39-20069771-285/how-to-customize-autotext-shortcuts-on-ios-5/">AutoText Shortcuts</a></li>
<li><a href="http://howto.cnet.com/8301-11310_39-20088644-285/mirror-ipad-2-on-your-tv-with-ios-5-airplay/">AirPlay Mirror for iPad 2</a></li>
</ul>
<br />
<div class="separator" style="clear: both; text-align: left;">
I'm sure I'll be posting more info about iOS 5 in the coming days, as I get to play with it more. My install is currently running...</div>
<br />
<div class="separator" style="clear: both; text-align: left;">
<br /></div>Johnhttp://www.blogger.com/profile/05647043768103600647noreply@blogger.com0Cedar Park, TX, USA30.505198 -97.820288830.450475 -97.8992528 30.559921 -97.7413248tag:blogger.com,1999:blog-5319903324456687660.post-36655269389935218662011-10-12T14:57:00.000-05:002011-10-13T18:58:49.406-05:00Hello Blogger!I'm moving from <a href="http://wordpress.com/">Wordpress.com</a> to <a href="http://blogger.com/">Blogger.com</a>, and so far it looks like the transfer of content and the remapping of the domain names worked fairly well. Just a couple of minor things I need to clean up. But the template and cosmetics of the site need to be redone, so please bear with me until I get that completed.<br />
<a href="http://www.mediabistro.com/10000words/files/2011/08/blogger-template.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" src="http://www.mediabistro.com/10000words/files/2011/08/blogger-template.png" width="100" /></a>
<a href="http://www.bloggingpro.com/wp-content/uploads/2009/12/wordpress_logo.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="http://www.bloggingpro.com/wp-content/uploads/2009/12/wordpress_logo.png" width="100" /></a>Johnhttp://www.blogger.com/profile/05647043768103600647noreply@blogger.com17tag:blogger.com,1999:blog-5319903324456687660.post-78464140256891446962011-10-06T04:25:00.000-05:002011-10-18T13:18:00.697-05:00Steve Jobs Passed AwaySteve Jobs passed away yesterday. He was way too young, but still managed to live more than most of us ever will. This is what it must have felt like when Leonardo da Vinci died.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKlQOav8k9dmUPOdoL3OhdQBmZLidufFTBUjMXkZZxm87Gf8ZD91EpKdtFI1ltiDfvErQgor8bJdeePxW6Q8MH4gdD-Ra_JdHUax8fINgXrY9FhTae1zEAc6J18Nn7PuE7vDPKr94XRHxb/s1600/Steve_Jobs_300.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKlQOav8k9dmUPOdoL3OhdQBmZLidufFTBUjMXkZZxm87Gf8ZD91EpKdtFI1ltiDfvErQgor8bJdeePxW6Q8MH4gdD-Ra_JdHUax8fINgXrY9FhTae1zEAc6J18Nn7PuE7vDPKr94XRHxb/s320/Steve_Jobs_300.jpg" width="266" /></a></div>
<br />Johnhttp://www.blogger.com/profile/05647043768103600647noreply@blogger.com1tag:blogger.com,1999:blog-5319903324456687660.post-41215938650233940342011-09-28T05:56:00.000-05:002011-10-12T22:53:20.342-05:00Quickly, run!! It's the Cyclomatic!<strong>Cyclomatic</strong>....the first time I saw that word pop up in a Visual Studio Code Analysis warning, I thought I was seeing things. It sounded like some cheesy killer robot from a bad 1950's sci-fi movie. But no, it's a real thing. And it's not nearly as complicated as it sounds (no pun intended).<br />
<br />
<em>Cyclomatic Complexity</em> is, simply put, a single number that represents the number of independent paths through your code. The idea is that the higher the cyclomatic complexity, the less maintainable and more error-prone your code will be. Generally, cyclomatic complexity is classified as follows:<br />
<table border="1" cellpadding="0" cellspacing="0"><tbody>
<tr style="background-color: #555555; color: white;"> <td><strong>Complexity</strong></td> <td><strong>Description</strong></td> </tr>
<tr> <td>1 - 10</td> <td>simple code, low risk</td> </tr>
<tr style="background-color: #dddddd;"> <td>11 - 20</td> <td>moderately complex code, moderate risk</td> </tr>
<tr> <td>21 - 50</td> <td>complex code, high risk</td> </tr>
<tr style="background-color: #dddddd;"> <td>51+</td> <td>overly complex code, virtually untestable and unmaintainable, unacceptable risk</td> </tr>
</tbody> </table>
<br />
So what should you do with this? Try to keep you cyclomatic complexity as low as possible, that's what. A good rule of thumb is to keep it at 10 or lower, although code analysis tools like Visual Studio and FxCop won't usually complain until you hit 25 or so. Visual Studio will calculate this for you (right-click on a project, choose "Code Metrics"). However, it doesn't work for websites. There is a third-party alternative that will called <a href="http://www.ndepend.com/" target="_blank" title="NDepend">NDepend</a>, but it isn't free for commercial use. And even for academic or non-commercial use, you have to renew the free license about every month. If anyone knows of any good free alternatives, please share!Johnhttp://www.blogger.com/profile/05647043768103600647noreply@blogger.com3tag:blogger.com,1999:blog-5319903324456687660.post-90443580309653883122011-09-28T05:42:00.000-05:002011-10-14T13:24:36.123-05:00Code Coverage and Strongly Signed AssembliesI had a problem the other day that stumped me for a while. We just started a new project and immediately dove in to start coding. A few days later, I decided it was time to clean up the code before it got out of hand, so I ran Code Analysis and started cleaning up the problems. One I came across was this on:<br />
<br />
<span style="color: #3366ff;"><em>System.IO.FileLoadException: Could not load file or assembly ‘xxxxxx’ or one of its dependencies. Strong name validation failed. (Exception from HRESULT: 0x8013141A). </em></span><span class="Apple-style-span" style="color: #3366ff;"><em>File name: ‘xxxxxx’ ---> System.Security.SecurityException: Strong name validation failed. (Exception from HRESULT: 0x8013141A)</em></span><br />
<br />
This puzzled me, because I had <em>just</em> finished signing the assembly with a strong name. After some Googling, I realized that it was due to the code coverage I had recently configured. After running code coverage, Visual Studio needs to re-sign the assemblies, and there is a separate place to define the key for that re-signing process. To get to it, open up your .testsettings file, go to the "Data and Diagnostics" section, click on "Code Coverage", then click the "Configure" button above.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2i21yhGL-39zAKtSLBuFUYUk186GNDE_RXBVV-lZybq6DE-DGFsqd_-36m6GTmRABIoaIIaLx9nT9twBybBEA2gJAdrGk2Lv_UZ_CB4ENX-_w0aXT-lKO6d3eD4rT_JKaPCc-AjGxrILR/s1600/re-signing4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2i21yhGL-39zAKtSLBuFUYUk186GNDE_RXBVV-lZybq6DE-DGFsqd_-36m6GTmRABIoaIIaLx9nT9twBybBEA2gJAdrGk2Lv_UZ_CB4ENX-_w0aXT-lKO6d3eD4rT_JKaPCc-AjGxrILR/s640/re-signing4.png" width="550" /></a></div>
<a href="http://codeconnection.files.wordpress.com/2011/09/re-signing3.png"><br />
</a>Johnhttp://www.blogger.com/profile/05647043768103600647noreply@blogger.com3tag:blogger.com,1999:blog-5319903324456687660.post-34985830719133549792011-09-11T05:58:00.000-05:002011-11-07T10:38:04.776-06:00iPad Business Apps, Part IAs promised, here are some of the apps we've been using to help us run an "iPad only" project at work. I'm not listing the price for any of these, because they can change from month to month, but you can click on the icon for each app to read more about the it in the iTunes App Store.<br />
<br />
Before I get to the apps, though, I want to mention the most indispensable part for using an iPad at work - the wireless keyboard. This thing is simply wonderful. It is light, yet sturdy, easy to set up, and easy to transport. And it works flawlessly. You can even wake up your iPad by tapping a key.<br />
<br />
<div align="center">
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEheIZfd3c7hPGNV7BPOv0PzA_Qwf2qkW2OaH5EHgJupjQCYUrjCbtgQhR12SntOfMzxQB7-ydW2ok6-4JzppXadZqVZdVwhG9uu18MKklFum84Lo7tRaULtOzDjekv62CB0mx01yyqCuRQT/s1600/ipad-wireless-keyboard.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="180" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEheIZfd3c7hPGNV7BPOv0PzA_Qwf2qkW2OaH5EHgJupjQCYUrjCbtgQhR12SntOfMzxQB7-ydW2ok6-4JzppXadZqVZdVwhG9uu18MKklFum84Lo7tRaULtOzDjekv62CB0mx01yyqCuRQT/s320/ipad-wireless-keyboard.jpg" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Apple Wireless Keyboard</td></tr>
</tbody></table>
</div>
Okay, enough of that, onto the apps! In this post, I'm only going to cover one project management app and several note taking apps. I'll cover other types of apps in the next post.<br />
<br />
<strong>1. SG Project/Project Pro/Project Go</strong><br />
<br />
<br />
<div class="separator" style="clear: both; float: left; margin: 10px;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeiFk4ky9A27_BRiqzmjFfRSUR3WCdBH7Hh7t_3gz2whvB3yDxVmDoApARTCHOs1LBCVnpmNr9rrtxE8QdvFKiibntynTbHSlcRcDN2epzawcve-r39Y_zcOxNRA2tvp1EMVSR1vgWKXI-/s200/sg+project.jpg" width="100px" /></div>
<br />
First up for any business setup is a project management app. The best one we found is SG Project, which is essentially a clone of Microsoft Project for the iPad. There is also a Pro version that adds a lot of reporting functionality, and a SG Project Go version specifically for iPhones. SG Project is a pretty good app that can do most of the common project management tasks, such as dependencies, Gantt charts, and resource leveling. It can also import and export from Microsoft Project, which was a big plus when we selected this app.<br />
<br />
A critical part of using an iPad for business is the ability to take notes on it. There are many good note-taking apps, but here are some of my favorites.<br />
<br />
<strong>2. Note Taker HD</strong><br />
<br />
<div class="separator" style="clear: both; float: left; margin: 10px;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgpL2ZlYncjVvY7k0Uq6_CjuF9bTRk_imwgypX7iAYMKwzhCL9Bu1uH-j_jGDQY2EblMWBlnGICPmaSVKn-zCMGKk3CVbLFeXB4Xusrx_h9dxbIl_qz_QuJCdVULVgWdasmgPzCLhQEkAx/s1600/note+taker+hd.jpg" width="100px" /></div>
Note Taker HD is a great app for everyday note taking. It supports multiple notebooks and multiple pages per notebook. You can type with the keyboard or write notes by hand using your finger or a stylus. The great part is that you can use large handwriting, and it will automatically shrink it to fit on the page. This works surprisingly well and the result is very legible. Note Taker HD also has support for diagrams and works great for simple flowcharts and org charts.<br />
<br />
<strong>3. PhatPad for iPad</strong><br />
<br />
<div class="separator" style="clear: both; float: left; margin: 10px;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjyC2B7Tewh8BQJq3bb0pwpI0eygvOcmE7ZvKUCYvSWfTPB-Kr46hn_5ftXDzZbcoA7T6h2eHneo_jrP4B3UFwEgOCgker-U4W8f0d8alVvXZn4koty04L5A5R2QPQVu0MET49vQ2E4rJ9y/s1600/phatpad.jpg" width="100px" /></div>
While Note Taker HD is a great app, one thing it lacks is digital ink technology. Digital ink technology is the ability to write notes by hand (or a stylus) and then having the app convert it to text for you. This is where PhatPad comes in. Not only does it have digital ink technology for handwriting, but also for <em>drawing</em>. You can draw geometric shapes by hand and it will automatically convert them to perfect shapes! This is a great feature, and is more useful than you might think.<br />
<br />
<strong>4. WritePad for iPad</strong><br />
<br />
<div class="separator" style="clear: both; float: left; margin: 10px;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqAavWikDajuLeqPqiGMbTWYgAZN3aYXxHn7bVzT4D8_MiK5CBLZeJWeuYNvvn0SU9xh2uAPi_Xoy9qXGgxQH3SEyVivj43L5z3cyXA9ZZ47BGXD2rCRE6ZV1l-I2uD5ImsnVZsgawKj1X/s1600/writepad.jpg" width="100px" /></div>
WritePad is sort of like the big brother of PhatPad. I say "sort of" because it adds some features that PhatPad doesn't have, but it also doesn't have all of the features of PhatPad. WritePad is more focused on the writing aspect, and therefore doesn't have the drawing recognition that PhatPad has. But instead of that, it provides a much more powerful hand writing recognition system that can learn and adapt to your handwriting. It also has a Shorthand editor that lets you use gestures and abbreviations for frequently used words and phrases, and WritePad will automatically fill those in for you. Both PhatPad and WritePad allow you to share and collaborate over a local Wi-Fi, too.<br />
<br />
<strong>5. iThoughtsHD</strong><br />
<div class="separator" style="clear: both; float: left; margin: 10px;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5MPJB0M5KvqJdWZYfMChto5pgYF2Qj6Fnlfu1jTpMF5k0O1sH4RVLHlbXDgdS0uYV5JBg8tqdM37RbfxdP1bkJqPMnX35T9CH4-mGGeQ6kZzl6OSo20LeMWJKXcSNWyOgECwkJG-pRu-o/s1600/ithoughtshd.jpg" width="100px" /></div>
<br />
iThoughtsHD is a different kind of note taking app. Instead of the normal notebook/page paradigm, it allows you to organize your thoughts using <a href="http://en.wikipedia.org/wiki/Mind_map" title="Mind Maps">Mind Maps</a>. If you're not familiar with mind maps, I'll cover them in a later post. But basically they are visual outlines that help you organize information in a way that's optimized for comprehension and retention. There are many mind mapping apps for the iPad, but iThoughtsHD is probably one of the better ones, if not <em>the</em> best one. Here is a sample mind map generated by iThoughtsHD:<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgslyMRutwsXl1IUsXfftj2nKOI1u0IH7EeMA3H5mVl6js47hZiP6y65PvT86OMbzC3HiJgU71m5hhKnMjDSFm8gOSQAx-XwUPv2NhLbS0UHg3xlHAWnDgd-_hXPULmDBmzlzAo6Z0IlLPK/s1600/mindmap.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgslyMRutwsXl1IUsXfftj2nKOI1u0IH7EeMA3H5mVl6js47hZiP6y65PvT86OMbzC3HiJgU71m5hhKnMjDSFm8gOSQAx-XwUPv2NhLbS0UHg3xlHAWnDgd-_hXPULmDBmzlzAo6Z0IlLPK/s640/mindmap.png" width="550" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Sample Mind Map Created By iThoughtsHD</td></tr>
</tbody></table>
That's it for this time. In the next post, I'll cover some other apps including those geared toward Agile development, UI mockups, defect/issue tracking, and others.Johnhttp://www.blogger.com/profile/05647043768103600647noreply@blogger.com0tag:blogger.com,1999:blog-5319903324456687660.post-54462811973921287762011-08-26T13:48:00.000-05:002011-10-14T13:00:25.282-05:00iPad Project Management<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLJD8aazQ_LCLOAD7LVH1e12qPL_b8aSz07kYXbiz3CXFhKLiGnhTeF-7VevdkNM_3BPqKy8ECY6OGvncWfs24698ja0ouK89hDBtaVyMZhUEZIE-KV-wfgX5dM0s34m88mRCigL2aN8El/s1600/ipad.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLJD8aazQ_LCLOAD7LVH1e12qPL_b8aSz07kYXbiz3CXFhKLiGnhTeF-7VevdkNM_3BPqKy8ECY6OGvncWfs24698ja0ouK89hDBtaVyMZhUEZIE-KV-wfgX5dM0s34m88mRCigL2aN8El/s1600/ipad.jpg" /></a></div>
<br />
We're trying something new at work - using the iPad as much as possible for day-to-day project management tasks. The goal is to use it pretty much for everything except for the actual coding. We'll see how it goes!<br />
<br />
Soon I'll post about the apps we've decided to use, along with some other tools that are handy. But in the meantime, post about your favorite business apps for the iPad!Johnhttp://www.blogger.com/profile/05647043768103600647noreply@blogger.com2tag:blogger.com,1999:blog-5319903324456687660.post-43982109414303417092010-07-04T02:27:00.000-05:002011-10-14T13:25:10.216-05:00Activate the Hidden Administrator Account in Windows VistaWhen you install Microsoft Windows Vista, it asks you to create an account which it gives administrator rights to. However, behind the scenes it also creates an account called “Administrator”, but by default it is locked out. It also doesn’t tell you what the password is for this account.<br />
<br />
If you ever need to activate the hidden Administrator account, here’s how you do it.<br />
<ol>
<li>Log in as a user with administrative privileges.</li>
<li>Click on the Start Button, then in the “Start Search” box type “cmd”.</li>
<li>When “cmd.exe” pops up in the list of search results, right-click on it and choose “Run as administrator”.</li>
<li>In the command prompt window, type “net user Administrator <em>password”</em> and hit return, where <em>password</em> is the new password you want to assign to the Administrator account.</li>
<li>Type “net user Administrator /active:yes” and hit return.</li>
<li>Log off from the current user, and now you should be able to sign in as the Administrator account.</li>
</ol>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOEeIDjvbQLGTTkWedcOplb2c6B81424eOF9S1jes9_Z3EbnOBATuegyjs39sXXXEPqwcUvrmRaBSxhfB4yoBT7ScUKPXLV_TomYQsWfut6QlM_QAzImBVbuIobO9eS8yoATxdUZnc2WH_/s1600/adminaccount.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOEeIDjvbQLGTTkWedcOplb2c6B81424eOF9S1jes9_Z3EbnOBATuegyjs39sXXXEPqwcUvrmRaBSxhfB4yoBT7ScUKPXLV_TomYQsWfut6QlM_QAzImBVbuIobO9eS8yoATxdUZnc2WH_/s1600/adminaccount.png" width="550px" /></a></div>
<br />
<ol><div>
</div>
</ol>Johnhttp://www.blogger.com/profile/05647043768103600647noreply@blogger.com0tag:blogger.com,1999:blog-5319903324456687660.post-87751323465433300042010-06-30T02:51:00.000-05:002011-10-12T09:34:58.553-05:00Home Antivirus ComparisonUp until recently, I used to run several servers at home to support my personal consulting business. I had a Windows domain controller, an Exchange 2007 server, SQL Server, plus a few Linux <a href="http://www.centos.org/" target="_blank" title="CentOS">CentOS</a> systems that hosted virtual machines under the <a href="http://www.xen.org/" target="_blank" title="Xen">Xen hypervisor</a>. Recently I had a couple of hardware failures that made me re-evaluate the wisdom of maintaining these servers myself. It just takes too much of my time, so I started looking for other alternatives. The first to go was the Exchange server, which was replaced by <a href="http://www.google.com/a" target="_blank" title="Google Apps">Google Apps</a>. In short, it is simply awesome. Next to go was my antivirus setup, which is the point of this post.<br />
<br />
Previously, I had been using <a href="http://en.wikipedia.org/wiki/Symantec_Endpoint_Protection" target="_blank" title="Symantec Endpoint 11">Symantec Endpoint 11</a>. Now I hate Symantec and Norton antivirus products as much as anyone else, but the main reason I was using it was because it worked on Windows server operating systems (I had both 2003 and 2008 servers running). Many of the more popular (and frankly, better) systems wouldn’t run on server OS’s. But now that I’m getting rid of my servers, it’s time to look for something better.<br />
<br />
There are dozens upon dozens of antivirus products and I’m not going to do a comparison of all of them. Just the top 3 or 4 that meet my needs. My criteria for these are:<br />
<ul><li>Must have a proven track record</li>
<li>Easy to use, stable system</li>
<li>Free or relatively inexpensive</li>
<li>Needs to run on Vista and Windows 7 (64-bit for both)</li>
<li>Not interested in peripheral features, like firewalls, because I already have other solutions in place for those needs</li>
<li>I need at least 3 licenses to cover my laptops and workstation</li>
</ul><br />
<ul>In order to determine what the top 3-4 are, I looked at two main websites that rate antivirus products: <a href="http://www.av-comparatives.org/" target="_blank" title="AV Comparatives">AV Comparatives</a> and <a href="http://www.virusbtn.com/" target="_blank" title="Virus Bulletin">Virus Bulletin</a>. Both of these websites are well-respected in the antivirus community and they both use different methods and criteria to rate products. It is also worth noting that the rankings change quite often so I wasn’t too worried about which one was #1 at any given moment. But my choices are based on the rankings as of June 2010.</ul><br />
AV Comparatives gave the highest ratings to TrustPort, G DATA, Kaspersky, Microsoft, AntiVir (Avira), NOD32, F-Secure, BitDefender, and eScan. According to Virus Bulletin, the top-rated products were by AntiVir (Avira), avast!, and AVG. I picked 3-4 that were pretty high on both lists and were popular with most users. My picks were:<br />
<ul><li><a href="http://www.avira.com/en/pages/index.php" target="_blank" title="AntiVir (Avira)">AntiVir (Avira)</a></li>
<li>a<a href="http://www.avast.com/" target="_blank" title="Avast!">vast!</a></li>
<li><a href="http://www.kaspersky.com/" target="_blank" title="Kaspersky">Kaspersky</a></li>
<li><a href="http://free.avg.com/" target="_blank" title="AVG">AVG</a></li>
</ul><br />
Keep in mind, I wasn’t out to evaluate the actual effectiveness of these products, because I trust AV Comparatives and Virus Bulletin to do that for me. All I needed was to compare the feature sets and prices.<br />
<br />
<strong>Avira</strong><br />
<br />
Avira has three products targeted at the home market: <strong>Avira AntiVir Personal</strong>, <strong>Avira AntiVir Premium</strong> and <strong>Avira Premium Security Suite</strong>. These break down as follows:<br />
<ul><li><strong>Personal</strong> – basic antivirus, spyware, and rootkit protection. Cost: <em><strong>FREE</strong></em></li>
<li><strong>Premium</strong> – adds protection against phishing and protection for web browsing and emails. Cost: <strong>$26.95</strong> for one license, <strong>$67.95</strong> for three licenses.</li>
<li><strong>Security Suite</strong> – adds backups, network bot protection, spam filter, firewall, and parental controls Cost: <strong>$53.95</strong> for one license, <strong>$79.95</strong> for three licenses</li>
</ul><br />
<strong>avast!</strong><br />
<br />
avast! comes in three versions as well:<br />
<ul><li><strong>Free</strong> – basic antivirus and spyware protection. Cost: <em><strong>FREE</strong></em></li>
<li><strong>Pro</strong> – adds the Sandbox, which uses Process Virtualization to run a web browser or other app in a safe, isolated environment. Also adds protection against scripts and “suspicious websites”, as opposed to the free version which only provides protection against “common websites”. This version also allows scheduling of scans, whereas the free version only supports manual scans. Cost: <strong>$39.95</strong> for one license, <strong>$54.95</strong> for three licenses</li>
<li><strong>Internet Security</strong> – adds firewall and spam filters. Cost: <strong>$44.95</strong> for one license, <strong>$59.95</strong> for three licenses.</li>
</ul><br />
<ul><strong>AVG</strong></ul><br />
Much like the previous two products, AVG also comes in three different versions:<br />
<ul><li><strong>AVG Anti-virus Free</strong> – basic antivirus, spyware, and web page protection. COST: <em>FREE</em></li>
<li><strong>AVG Anti-virus 9.0</strong> – adds rootkit and phishing protections. COST: <strong>$27.99</strong> for one license, <strong>$83.97</strong> for three licenses</li>
<li><strong>AVG Internet Security 9.0</strong> – adds identity protection, firewall, and spam filter. COST: <strong>$43.99</strong> for one license, <strong>$131.97</strong> for three licenses.</li>
</ul><br />
<strong>Kaspersky</strong><br />
<br />
Kaspersky breaks the mold by offering only two versions of their product instead of three. Most notably, there is no free version. While they do offer a free trial of their two products, it’s only good for 30 days so there is no long-term free solution if you go with Kaspersky. Their two products are:<br />
<ul><li><strong>Anti-virus 2010</strong> – basic antivirus, spyware, email and website protection. Also includes a virtual keyboard for entering sensitive data, privacy tools to clean up browsing history, and parental controls. COST: <strong>$49.95</strong> for 3 licenses. They don’t have a way to buy just a single license.</li>
<li><strong>Internet Security 2010</strong> – adds protection against hacker attacks, phishing, and identity theft. Also includes a spam filter and a firewall. COST:<strong> $59.95</strong> for 3 licenses. Again, there is no way to purchase just a single license.</li>
</ul><br />
For me personally, I chose to go with the Pro version of avast!, because it rated high on both surveys and had the lowest price. I couldn’t go for the free version because their free license only covers non-commercial use and my computers are used for business. Plus I like some of the extra features, like scheduling and protection against scripts.<br />
<br />
But at the end of the day, I think any of these products would work well. They are all highly regarded. Even many other products not on this list are quite good, and even ones that aren’t would still be vastly superior to not having any antivirus protection at all.Johnhttp://www.blogger.com/profile/05647043768103600647noreply@blogger.com1tag:blogger.com,1999:blog-5319903324456687660.post-89761985775091384112010-06-25T17:48:00.000-05:002011-10-19T08:44:50.464-05:00Team Foundation Server vs. Subversion – An Objective ComparisonI was asked by my client to write up a comparison of Microsoft Team Foundation Server (TFS) and one other SCM (Software Configuration Management) system, so they could evaluate whether TFS was a goof solution or not. I picked Subversion as the other one to compare to, because it is one of the most popular systems out there. I tried to stay away from most of the “religious wars” about TFS vs. Subversion and tried to look at it objectively in several key areas.<br />
<br />
<strong>Ease of Use and Learning Curve</strong><br />
<br />
<em>TFS</em>: For developers with a background in using Visual SourceSafe and Microsoft development tools, TFS is much more familiar.<br />
<br />
<em>Subversion</em>: This requires more of a learning curve for developers familiar with Microsoft environments. Instead of the more familiar check-in/check-out paradigm, Subversion uses the edit/merge/commit concept.<br />
<br />
<strong>IDE Integration</strong><br />
<br />
<em>TFS: </em>By far the best integration into the Visual Studio IDE, and the best choice for programming in .NET languages. Not the best choice if you’re not developing in Visual Studio.<br />
<br />
<br />
<br />
<em>Subversion: </em>Fairly good integration into Visual Studio, especially with additional third-party tools and plug-ins, but not as good as TFS. This is probably the better choice if you’re not programming in a .NET language, though, especially if you’re not using Visual Studio.<br />
<br />
<br />
<br />
<strong>Scope and Productivity</strong><br />
<br />
<em>TFS:</em> In addition to source control, TFS also has features that help with project management, especially Agile development, test driven development (TDD), managing test scripts, and defect tracking. TFS is not marketed as a pure source control product, it is an application lifecycle management product.<br />
<br />
<em>Subversion:</em> Subversion is only a source control tool, and doesn’t include any project management, testing, or defect tracking functionality.<br />
<br />
<br />
<br />
<strong>Management</strong><br />
<br />
<em>TFS:</em> TFS is integrated with Active Directory, and users are Active Directory users. Has a nice GUI interface for management. TFS also has better support for implementing overall corporate or project check-in policies, and better support for measuring metrics.<br />
<br />
<em>Subversion:</em> Subversion can be made to work with Active Directory, but it can be tricky to set up.<br />
<br />
<br />
<br />
<strong>Features Unique to Each System:</strong><br />
<br />
<em>TFS (not available on Subversion): </em><br />
<ul>
<li><strong>Shelving</strong> – Shelving is a way of saving all of the changes from your local development workstation to the TFS server without actually checking in. At a later time you, or anyone else, can “un-shelve” them to a workstation. This can be useful in a variety of situations:<br />
<ul>
<li>Allowing others to review your code on their own machine</li>
<li>Switching tasks, for example to fix a defect, before you’re done with the code you have checked out.</li>
<li>Saving your progress onto a server, which is backed up.</li>
</ul>
<br />
</li>
<li><strong>Work Item Integration</strong> – associating a check-in to a work item, such as a defect or task. That code can then be tracked along with that work item.</li>
<li><strong>Merge History Tracking</strong> – stores history of all merges and allows you to query it. This is great for collaborative team environments.</li>
</ul>
<br />
<em>Subversion (not available on TFS):</em><br />
<ul>
<li><strong>Anonymous Access</strong> – Anyone can grab a read-only copy of the code to look at it. This is a bigger advantage for open source development environments than it is for the typical corporate IT environment.</li>
<li><strong>Patch Submission</strong> – Subversion can compare two completely different builds of the code and generate a patch to update one version to the other. While TFS can do something like this, it is much easier to do in Subversion.</li>
<li><strong>Offline Support</strong> – Subversion allows for offline work, when the user is not connected to the network or is not on-site. Again, this isn’t a big deal for most corporate IT environments but can be important for open source development.</li>
</ul>
<br />
<br />
<br />
<strong>Web Server</strong><br />
<br />
<em>TFS:</em> TFS requires IIS as a web server.<br />
<br />
<em>Subversion:</em> Subversion is designed to work with Apache, not IIS. It can be made to work with IIS, but most of those solutions still require Apache to be installed and proxies to be created between the two.<br />
<br />
<br />
<br />
<strong>Software Requirements</strong><br />
<br />
<em>TFS:</em> Windows Server 2003 or 2008, IIS, Active Directory, SQL Server.<br />
<br />
<em>Subversion:</em> Apache, MySQL<br />
<br />
<strong>Cost</strong><br />
<br />
<em>TFS:</em><br />
<ul>
<li>Visual Studio 2010 Ultimate (7 licenses) – retail is $6900/license, but the price varies greatly on volume of licenses and contracts or agreements previously existing with Microsoft. It also depends if you have an MSDN Subscription or not (or if you buy one along with Visual Studio). Other editions of Visual Studio 2010 will have more limited functionality with TFS, but will also cost less.</li>
</ul>
<br />
<ul>
<li>Team Foundation Server 2010 - $500</li>
</ul>
<br />
<ul>
<li>TFS Client Access License - $500 for first 5 developers, plus $500/developer after that.</li>
</ul>
<br />
<em>Subversion:</em> Free (open source)<br />
<br />
All in all, I think both systems are quite capable. Currently we use Visual SourceSafe 2005, so pretty much <em>anything</em> would be an improvement. However, TFS is a better choice for us overall because:<br />
<ol>
<li>We’re exclusively in a .NET development environment.</li>
<li>We’re working at a large government agency, so the cost isn’t a huge obstacle.</li>
<li>The client likes the support that comes with TFS.</li>
<li>The client already has contracts in place with Microsoft, thus lowering their initial cost of adoption for TFS.</li>
</ol>
<br />
For open source projects, or small projects either at home or at start-ups, I think Subversion would be an excellent alternative.Johnhttp://www.blogger.com/profile/05647043768103600647noreply@blogger.com26