<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>FatLemon &#187; Visual Studio</title>
	<atom:link href="http://www.fatlemon.co.uk/tag/visual-studio/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.fatlemon.co.uk</link>
	<description>Contemplations on software development and human factors, by Andrew Freemantle</description>
	<lastBuildDate>Sun, 29 Jan 2012 13:45:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>WTV: Automatic date-based version numbering for .Net with WhenTheVersion</title>
		<link>http://www.fatlemon.co.uk/2011/11/wtv-automatic-date-based-version-numbering-for-net-with-whentheversion/</link>
		<comments>http://www.fatlemon.co.uk/2011/11/wtv-automatic-date-based-version-numbering-for-net-with-whentheversion/#comments</comments>
		<pubDate>Sat, 05 Nov 2011 22:00:12 +0000</pubDate>
		<dc:creator>Andrew Freemantle</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[SubVersion]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[WTV]]></category>

		<guid isPermaLink="false">http://www.fatlemon.co.uk/?p=101</guid>
		<description><![CDATA[There&#8217;s a trend towards using the software build date as part of the software version number, you know the sort of thing I mean: &#8216;2011.11.4.xyz&#8216;, like in the footer over at StackOverflow.com, or MyLetts.com.. Wouldn&#8217;t it be great if we could get Visual Studio to do this for us automatically on build?  I thought so [...]]]></description>
			<content:encoded><![CDATA[<p>There&#8217;s a trend towards using the software build date as part of the software version number, you know the sort of thing I mean: &#8216;<span class="inline-code">2011.11.4.xyz</span>&#8216;, like in the footer over at <a title="StackOverflow.com - Q&amp;A for Programmers" href="http://www.stackoverflow.com">StackOverflow.com</a>, or <a title="MyLetts.com - Lettings management for private landlords" href="http://www.myletts.com">MyLetts.com</a>..</p>
<p><a href="http://www.fatlemon.co.uk/wp-content/uploads/wtv-date-version-example-myletts-com1.png"><img class="alignnone size-full wp-image-214" title="WTV Date-version example: www.MyLetts.com" src="http://www.fatlemon.co.uk/wp-content/uploads/wtv-date-version-example-myletts-com1.png" alt="" width="337" height="113" /></a></p>
<p>Wouldn&#8217;t it be great if we could get Visual Studio to do this for us automatically on build?  I thought so too, so I&#8217;ve written a little app to do it <img src='http://www.fatlemon.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<h4>Getting set up with &#8220;When The Version&#8221;</h4>
<ol>
<li>Go get a copy of &#8220;When The Version&#8221; (<span class="inline-code">WTV.exe</span>) from <a title="WhenTheVersion - Download page at GitHub" href="https://github.com/AndrewFreemantle/When-The-Version/downloads">the GitHub download page</a> (or you can <a title="When The Version - Source on GitHub" href="https://github.com/AndrewFreemantle/When-The-Version">build it from the source</a> if you prefer)</li>
<li>Drop it somewhere on your PC</li>
<li>Now, in your Visual Studio project, expand the Properties and duplicate the <span class="inline-code">AssemblyInfo.cs</span> / <span class="inline-code">.vb</span> file &#8211; I rename the duplicate to be <span class="inline-code">AssemblyInfo.Template.cs</span>:</li>
</ol>
<p><a href="http://www.fatlemon.co.uk/wp-content/uploads/wtv-date-version-solution-explorer.png"><img class="size-full wp-image-212 alignnone" title="AssemblyInfo.Template.cs - Solution Explorer" src="http://www.fatlemon.co.uk/wp-content/uploads/wtv-date-version-solution-explorer.png" alt="" width="288" height="148" /></a></p>
<ol start="4">
<li>Edit the <span class="inline-code">AssemblyInfo.Template.cs</span> file, putting in the placeholders for the date parts like so:</li>
</ol>
<pre>

// Version information for an assembly consists of the following four values:
//
//      Major Version
//      Minor Version
//      Build Number
//      Revision
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("{YYYY}.{MM}.{DD}.0")]
[assembly: AssemblyFileVersion("{YYYY}.{MM}.{DD}.0")]
</pre>
<p>The following values are currently supported:</p>
<ul>
<li><span class="inline-code">{YYYY}</span> &#8211; the year</li>
<li><span class="inline-code">{MM}</span> &#8211; the month</li>
<li><span class="inline-code">{DD}</span> &#8211; the day</li>
<li><span class="inline-code">{SVN}</span> &#8211; SubVersion revision number (more on this a bit later)</li>
</ul>
<p>&nbsp;</p>
<ol start="5">
<li>Now, open up the Project Properties &gt; Build Events, and add the following Pre-build event command line (on a single line):</li>
</ol>
<pre>

"C:\Path\To\wtv.exe"
  "$(ProjectDir)Properties\AssemblyInfo.Template.cs"
  "$(ProjectDir)Properties\AssemblyInfo.cs"
</pre>
<p>&nbsp;</p>
<ol start="6">
<li>Finally, set the Build Action for the new <span class="inline-code">AssemblyInfo.Template.cs</span> file to &#8216;None&#8217; and Build!</li>
</ol>
<p>&nbsp;</p>
<p>If you get stuck, pop open a Command Prompt and run <span class="inline-code">WTV.exe</span> without any parameters:</p>
<p><a href="http://www.fatlemon.co.uk/wp-content/uploads/wtv-date-version-command-prompt-usage1.png"><img class="alignnone size-full wp-image-223" title="WTV: Command prompt usage" src="http://www.fatlemon.co.uk/wp-content/uploads/wtv-date-version-command-prompt-usage1.png" alt="" width="632" height="342" /></a></p>
<h4>SubVersion support</h4>
<p>If you&#8217;re using SubVersion for your source control, <span class="inline-code">WTV</span> can also put the projects SVN revision number into the application version.</p>
<p><em><strong>There&#8217;s only one caveat</strong></em> &#8211; .Net Application version number values are limited to a maximum of 32,767 (i.e. they&#8217;re Int16&#8242;s). Therefore, if your SVN revision is higher <span class="inline-code">WTV</span> will only use the last 4 digits: e.g.: 32768 -&gt; 2768.</p>
<p>To use the SVN revision number, simply add the <span class="inline-code">{SVN}</span> placeholder to your <span class="inline-code">AssemblyInfo.Template.cs</span> file like so:</p>
<pre>

[assembly: AssemblyVersion("{YYYY}.{MM}.{DD}.{SVN}")]
[assembly: AssemblyFileVersion("{YYYY}.{MM}.{DD}.{SVN}")]
</pre>
<p>&nbsp;</p>
<p>.. and then add a couple of extra parameters to the Pre-build event command line so <span class="inline-code">WTV</span> knows where <span class="inline-code">SubWCRev.exe</span> is, something like this (again, on a single line):</p>
<pre>

"C:\Path\To\WTV.exe"
  "$(ProjectDir)Properties\AssemblyInfo.Template.cs"
  "$(ProjectDir)Properties\AssemblyInfo.cs"
  "C:\Program Files\TortoiseSVN\bin\SubWCRev.exe"
  "$(SolutionDir)."
</pre>
<p>&nbsp;<br />
And because the <span class="inline-code">AssemblyInfo.cs</span> is generated, you can remove it from source control (but don&#8217;t remove it from your project!)</p>
<p>&nbsp;</p>
<h4>Finally</h4>
<p>Comments and suggestions are welcome here or on the <a title="WhenTheVersion - Issue tracker at GitHub" href="https://github.com/AndrewFreemantle/When-The-Version/issues">projects issue tracker over at GitHub</a>. I hope you find it useful  <img src='http://www.fatlemon.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><script src="/wp-content/syntax-highlighter/Scripts/shCore.js"></script> <script src="/wp-content/syntax-highlighter/Scripts/shBrushVb.js"></script></p>
<p><script type="text/javascript">// <![CDATA[
  dp.SyntaxHighlighter.ClipboardSwf = '/wp-content/syntax-highlighter/Scripts/clipboard.swf'; dp.SyntaxHighlighter.HighlightAll('code');
// ]]&gt;</script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.fatlemon.co.uk/2011/11/wtv-automatic-date-based-version-numbering-for-net-with-whentheversion/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SSD, Visual Studio and improving developer productivity</title>
		<link>http://www.fatlemon.co.uk/2010/02/ssd-visual-studio-and-improving-developer-productivity/</link>
		<comments>http://www.fatlemon.co.uk/2010/02/ssd-visual-studio-and-improving-developer-productivity/#comments</comments>
		<pubDate>Sat, 27 Feb 2010 16:00:28 +0000</pubDate>
		<dc:creator>Andrew Freemantle</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Productivity]]></category>
		<category><![CDATA[SSD]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://www.fatlemon.co.uk/?p=49</guid>
		<description><![CDATA[After reading lots of reviews, articles and watching a few youtube videos comparing Solid State Drives to Hard Disk Drives, I was unsure that&#8217;d see a beneficial improvement in my day-to-day developer tools of Visual Studio, such as building and spinning up desktop and web applications. I was unsure because there is a consensus of [...]]]></description>
			<content:encoded><![CDATA[<p>After <a title="Windows SSD Performance - www.tomshardware.com" href="http://www.tomshardware.com/reviews/windows-ssd-performance,2518.html">reading</a> <a title="Why cheap SSD sucks for Visual Studio - www.exdream.com" href="http://www.exdream.com/Blog/post/2009/02/25/Why-cheap-SSD-sucks-for-Visual-Studio.aspx" target="_blank">lots</a> <a title="Corsair X64 SSD Customer Reviews - www.overclockers.co.uk" href="http://www.overclockers.co.uk/showproduct.php?prodid=HD-004-CS&amp;tool=3&amp;groupid=1657&amp;catid=1660&amp;subcat=1668" target="_blank">of</a> <a title="Corsair P128 SSD Customer Reviews - www.eBuyer.com" href="http://www.ebuyer.com/product/167203/show_product_reviews" target="_blank">reviews</a>, <a title="SSD and Programming question - www.stackoverflow.com" href="http://stackoverflow.com/questions/499889/ssd-and-programming" target="_blank">articles</a> and watching a <a title="SSD vs 7200rpm HDD - www.youtube.com" href="http://www.youtube.com/watch?v=Dt6VbOY3xE0" target="_blank">few</a> <a title="MacBook HDD vs SSD boot time - www.youtube.com" href="http://www.youtube.com/watch?v=LCBfsfzHPeY" target="_blank">youtube</a> <a title="HDD vs SSD, Windows Vista tests - www.youtube.com" href="http://www.youtube.com/watch?v=Pf_QS3mZsyU" target="_blank">videos</a> comparing Solid State Drives to Hard Disk Drives, I was unsure that&#8217;d see a beneficial improvement in my day-to-day developer tools of Visual Studio, such as building and spinning up desktop and web applications.<strong> </strong></p>
<p>I was unsure because there is a <a title="SSD Disadvantages - www.wikipedia.org" href="http://en.wikipedia.org/wiki/Solid-state_drive#Disadvantages" target="_blank">consensus of small writes to SSDs aren&#8217;t as breathtaking</a> as the reads and writes of larger files:</p>
<blockquote><p>SATA-based SSDs generally exhibit much slower write speeds. As erase  blocks on flash-based SSDs generally are quite large (e.g. 0.5 &#8211; 1  megabyte), they are far slower than conventional disks during small writes (<em>write  amplification</em> effect) and can suffer from write fragmentation.</p>
<p>- Wikipedia</p></blockquote>
<p>But these things are fast at everything else, and while mulling over the idea of upgrading for a few months, I started to notice my usage patterns of switching between lots of different supporting applications. <strong>Given that&#8217;d I&#8217;d get improvements elsewhere if not in Visual Studio, I decided to try it out for myself.</strong></p>
<p>The SSD I chose is the Corsair CMFSSD-64D1, otherwise known as the <a title="Corsair Extreme Series X64 - www.amazon.co.uk" href="http://www.amazon.co.uk/gp/product/B002HQ2JXG?ie=UTF8&amp;tag=fatl-21&amp;linkCode=as2&amp;camp=1634&amp;creative=19450&amp;creativeASIN=B002HQ2JXG" target="_blank">Corsair Extreme Series X64</a>:</p>
<p><img class="alignnone size-medium wp-image-57" title="Corsair Extreme X64 Solid State Disk" src="http://www.fatlemon.co.uk/wp-content/uploads/corsair-x64-300x267.png" alt="" width="300" height="267" /></p>
<p>Here are the timings I took with the original Samsung 80GB 7,200rpm drive, and the timings from the <a title="Corsair Extreme Series X64 - www.amazon.co.uk" href="http://www.amazon.co.uk/gp/product/B002HQ2JXG?ie=UTF8&amp;tag=fatl-21&amp;linkCode=as2&amp;camp=1634&amp;creative=19450&amp;creativeASIN=B002HQ2JXG" target="_blank">Corsair Extreme X64</a>:<br />
(all timings are in seconds, so lower numbers are better)</p>
<table class="hdd-vs-ssd">
<thead>
<tr>
<td></td>
<td>boot</p>
<div class="table-subheading">from cold to login prompt</div>
</td>
<td>logging in</p>
<div class="table-subheading">pressing enter to ready*</div>
</td>
<td>starting outlook</p>
<div class="table-subheading">to &#8216;All folders up to date&#8217;</div>
</td>
<td>loading VS2008</p>
<div class="table-subheading">to news feed loads</div>
</td>
<td>loading solution</p>
<div class="table-subheading">8 project web solution</div>
</td>
<td>rebuild solution</p>
<div class="table-subheading">until build status says &#8216;build complete&#8217;</div>
</td>
</tr>
</thead>
<tbody>
<tr class="hdd">
<td>Samsung HDD</td>
<td>42.3</td>
<td>190.8</td>
<td>14.7</td>
<td>25.2</td>
<td>72.0</td>
<td>79.0</td>
</tr>
<tr class="ssd">
<td>Corsair X64 SSD</td>
<td>32.6</td>
<td>75.8</td>
<td>5.5</td>
<td>7.9</td>
<td>19.1</td>
<td>52.5</td>
</tr>
</tbody>
<tfoot>
<tr>
<td></td>
<td>22.8%</td>
<td>60.3%</td>
<td>63.0%</td>
<td>68.4%</td>
<td>73.5%</td>
<td>33.5%</td>
</tr>
</tfoot>
</table>
<h2>Conclusion</h2>
<p><strong>Overall, the SSD performs 53.6% faster &#8211; that means my machine is twice as responsive as it was.<br />
</strong></p>
<p>However, the most important savings to me are loading, and building solutions &#8211; I&#8217;ve only been running the SSD for a couple of days, but already I have shaken the reflexive pause I felt before closing or restarting Visual Studio, or opening up different solutions.</p>
<p>Granted, building or compiling decent sized projects in Visual Studio on an SSD is not as impressively fast as spinning up applications (Outlook, Paint.Net or Dreamweaver for example), or the improvement in general system responsiveness.</p>
<p>I now get 3 complete builds for 2..  <strong>put simply, it&#8217;s almost fast enough to remove the build waiting tax</strong>. It&#8217;s fast enough that <a title="&quot;long compile time leads to distraction&quot; - answer on www.stackoverflow.com" href="http://stackoverflow.com/questions/499889/ssd-and-programming/499959#499959" target="_blank">I don&#8217;t lose my train of thought and context switch to something else</a> &#8211; which makes me more productive.</p>
<h2>Method</h2>
<p>Timings were taken manually with a stop-watch, and averaged over 3 data points on different days.</p>
<p>* The Windows logging in timings include a start-up anti-virus scan.</p>
<p>System Specification and software versions:</p>
<ul>
<li>Intel Pentium 4 HT, 3.0 GHz</li>
<li>3 GB RAM</li>
<li>Windows XP 32bit (HDD timings), Windows 7 32bit (SSD timings)**</li>
<li>Outlook 2007</li>
<li>Visual Studio 2008 Team System Developer Edition</li>
<li>The 8 project web solution is the <a title="Invoice Management Software - Scan Notify Approve and Pay (SNAP) - www.snapsystems.co.uk" href="http://www.snapsystems.co.uk/" target="_blank">fantastic invoice management software called SNAP</a>, written in C# .Net 3.5</li>
</ul>
<p>** yes, I&#8217;d have loved to have done an apples-to-apples comparison by copying the exact same Windows XP installation over to the SSD, and I was all set to do so, except the Samsung HDD had a series of faults around the ~36GB mark that resulted in an XP installation that would only boot into Safe Mode.</p>
<p>I had taken the timings the week before I found this out, and with a clean SSD it seemed crazy not to take the opportunity to upgrade to Windows 7.  I suspect that had I stayed on Windows XP, the speed improvements would have been more impressive.</p>
<p>Fortuitously, the Corsair SSD arrived the same morning that the Samsung HDD exhibited the fault. (I know what you&#8217;re thinking, and no, it definitely wasn&#8217;t sabotage.. the SSD was on order for 2 weeks prior, and wasn&#8217;t due to arrive for another 3 days)</p>
<p>The Solid State Drive upgrade is a definite improvement, and I don&#8217;t think I&#8217;ll be buying Hard Disk Drives any more  <img src='http://www.fatlemon.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.fatlemon.co.uk/2010/02/ssd-visual-studio-and-improving-developer-productivity/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

