<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.stevesmithblog.com/~d/styles/itemcontent.css"?><rss version="2.0"><channel><title>Blog</title><link>http://ardalis.com:80/</link><description>Blog</description><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.stevesmithblog.com/StevenSmith" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="stevensmith" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">StevenSmith</feedburner:emailServiceId><feedburner:feedburnerHostname xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">http://feedburner.google.com</feedburner:feedburnerHostname><item><title>Laptop Rebuild - Essential Apps</title><link>http://ardalis.com:80/Laptop-Rebuild-ndash-Essential-Apps</link><description>&lt;p&gt;&lt;em&gt;When we last saw our hero, he had &lt;/em&gt;&lt;a href="http://stevesmithblog.com/blog/vista-cleanup-may-corrupt-os-and-prevent-boot/"&gt;&lt;em&gt;fallen victim to an evil plot to disable his computer&amp;rsquo;s ability to boot up&lt;/em&gt;&lt;/a&gt;&lt;em&gt;.&amp;nbsp; After great efforts at recovery, eventually he was forced to concede defeat to Vista and reinstall everything from scratch.&amp;nbsp; Let&amp;rsquo;s return now to see what&amp;rsquo;s in store in the next chapter of our story, already in progress&amp;hellip;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;So, day 2 after my issue with Vista and I&amp;rsquo;m now at least able to use my laptop again for real work.&amp;nbsp; However, it still is missing dozens of little things that I find useful, so I thought I&amp;rsquo;d catalog those here in the spirit of &lt;a href="http://www.hanselman.com/blog/ScottHanselmans2007UltimateDeveloperAndPowerUsersToolListForWindows.aspx"&gt;Scott&lt;/a&gt; and &lt;a href="http://silverlight.net/blogs/jesseliberty/archive/2008/11/02/my-favorite-utilities.aspx"&gt;Jesse&amp;rsquo;s&lt;/a&gt; posts on useful tools and utilities.&amp;nbsp; In my case, this is a running list of things I&amp;rsquo;m installing, &lt;strong&gt;in order&lt;/strong&gt;, along with some commentary.&amp;nbsp; Feel free to comment on anything you think I&amp;rsquo;ve left out.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Day 1 Basics&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Windows Vista Ultimate SP1&lt;/strong&gt; &amp;ndash; Followed by about 40 immediate updates.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Visual Studio Team Suite 2008 SP1&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Microsoft Office 2007 Ultimate SP1 &amp;ndash; &lt;/strong&gt;Followed by a bunch of updates, and switching from Windows Update to Microsoft Update so that Office automatically gets updated.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href="http://www.mozilla.com/en-US/firefox/"&gt;FireFox 3&lt;/a&gt;&lt;/strong&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href="https://addons.mozilla.org/en-US/firefox/search?q=firebug&amp;amp;cat=all"&gt;FireBug&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href="https://addons.mozilla.org/en-US/firefox/addon/5369"&gt;YSlow&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Basic Utilities&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href="http://www.codeplex.com/Terminals"&gt;Terminals&lt;/a&gt; &amp;ndash; &lt;/strong&gt;For all remote connection needs.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Visio Professional 2007&lt;/strong&gt; &amp;ndash; Often handy, and it&amp;rsquo;s on the same MSDN disc as Office 2007.&lt;/li&gt;
&lt;li&gt;&lt;a href="https://addons.mozilla.org/en-US/firefox/addon/3615"&gt;Del.icio.us Bookmarks FireFox Addin&lt;/a&gt; &amp;ndash; Makes &lt;a href="http://del.icio.us/"&gt;Del.icio.us&lt;/a&gt; easy to use.&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;p&gt;The following tools just stay in my C:\Util folder and get restored from my backup.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://technet.microsoft.com/en-us/sysinternals/bb896647.aspx"&gt;DebugView&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.fiddlertool.com/fiddler/version.asp"&gt;Fiddler&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx"&gt;ProcessMonitor&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.red-gate.com/products/reflector/"&gt;Reflector&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.sixty-five.cc/sm/v1x.php"&gt;SpaceMonger&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://linqpad.net"&gt;LINQPad&lt;/a&gt; &amp;ndash; xcopyable LINQ and SQL and Code Snippet Editor/Manager.&amp;nbsp; Awesome!&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Social Software (IM and Twitter)&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.pidgin.im/download/"&gt;Pidgin&lt;/a&gt; &amp;ndash; supports multiple IM clients and has some cool features like detecting when someone is writing an IM to you before they finish typing it.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.tweetdeck.com/beta/"&gt;TweetDeck&lt;/a&gt; &amp;ndash; Current favorite Twitter app.&amp;nbsp; Follow me at &lt;a href="http://twitter.com/ardalis"&gt;@ardalis&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;More Apps&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.foldershare.com/"&gt;Foldershare&lt;/a&gt; &amp;ndash; Awesome for sharing files between computers.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.adobe.com/products/acrobat/readstep2_servefile.html?option=full&amp;amp;order=1&amp;amp;type=rs2_main&amp;amp;language=English&amp;amp;platform=WinVIS&amp;amp;hasjavascript=1&amp;amp;dlm=nos&amp;amp;rdr_ver=reader9&amp;amp;alt_offer_d=0"&gt;Adobe Reader&lt;/a&gt; (or &lt;a href="http://www.foxitsoftware.com/pdf/rd_intro.php"&gt;Foxit Reader&lt;/a&gt;) &amp;ndash; for PDFs.&amp;nbsp; Foxit installs and opens documents MUCH faster but occasionally has compatibility issues with Adobe.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://clearcontext.com/"&gt;ClearContext&lt;/a&gt; &amp;ndash; Makes filing things a breeze in Outlook.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.flickr.com/tools/"&gt;Flickr Uploadr&lt;/a&gt; &amp;ndash; Makes uploading photos a breeze w/Flickr.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.slysoft.com/en/download.html"&gt;Virtual CloneDrive&lt;/a&gt; &amp;ndash; Trying this instead of Daemon Tools for ISO mounting.&amp;nbsp; So far I like it.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;SQL Server 2008&lt;/strong&gt; &amp;ndash; Had 2005 before, but figure now&amp;rsquo;s as good a time as any to upgrade.&amp;nbsp; We&amp;rsquo;ll see if I still need SQLPrompt with it.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I still have a lot more to go but this is where I am with reinstalling by day 3.&amp;nbsp; I still need an FTP client (FileZilla) and a bunch of other apps.&amp;nbsp; Debating whether to install Plaxo again.&amp;nbsp; Outlook is actually quite fast now that I just had it start with a fresh PST file, and I&amp;rsquo;m hoping to keep it that way since previously it was the slowest thing on my machine.&amp;nbsp; We&amp;rsquo;ll see.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/uxsgBqW1KTXz3kg8RCkPmBTb9vU/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/uxsgBqW1KTXz3kg8RCkPmBTb9vU/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/uxsgBqW1KTXz3kg8RCkPmBTb9vU/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/uxsgBqW1KTXz3kg8RCkPmBTb9vU/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.stevesmithblog.com/~ff/StevenSmith?a=-p6mcx81Ngw:BsFjGXxHlX8:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/StevenSmith?i=-p6mcx81Ngw:BsFjGXxHlX8:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.stevesmithblog.com/~ff/StevenSmith?a=-p6mcx81Ngw:BsFjGXxHlX8:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/StevenSmith?i=-p6mcx81Ngw:BsFjGXxHlX8:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.stevesmithblog.com/~ff/StevenSmith?a=-p6mcx81Ngw:BsFjGXxHlX8:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/StevenSmith?i=-p6mcx81Ngw:BsFjGXxHlX8:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/StevenSmith/~4/-p6mcx81Ngw" height="1" width="1"/&gt;</description><pubDate>Thu, 02 Feb 2012 02:27:50 GMT</pubDate><guid isPermaLink="true">http://ardalis.com:80/Laptop-Rebuild-ndash-Essential-Apps</guid></item><item><title>Stories Too Big - Vertical Slices</title><link>http://ardalis.com:80/Stories-Too-Big-ndash-Vertical-Slices</link><description>&lt;p&gt;I have a client who lists as one of the key challenges with implementing agile practices with their teams as managing to define user stories that are &lt;strong&gt;&lt;em&gt;valuable but not too big.&amp;nbsp; &lt;/em&gt;&lt;/strong&gt;This is actually a very common challenge, and one that we run into frequently ourselves at &lt;a href="http://lakequincy.com/"&gt;Lake Quincy Media&lt;/a&gt; and with other clients of &lt;a href="http://NimblePros.com/"&gt;NimblePros&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Naturally there are many books available on the subjects of extreme programming, agile software development, user stories, etc. and these are certainly worth reading.&amp;nbsp; Additionally, &lt;a href="http://www.headspringsystems.com/services/training/"&gt;an agile boot camp like HeadSpring&amp;rsquo;s&lt;/a&gt; can be an excellent way to fully immerse yourself in how things should be done, without the daily distractions of regular work.&amp;nbsp; My first word of advice is that you read what the experts suggest, and consider attending a class from a well-respected trainer if you can do so.&lt;/p&gt;
&lt;p&gt;That said, here is some simple, practical advice I&amp;rsquo;ve collected (from others) on the subject of writing useful stories.&amp;nbsp; First, there&amp;rsquo;s an acronym that you can use as a test to measure how effective a particular user story is.&amp;nbsp; This is taken from Bill Wake&amp;rsquo;s &lt;a href="http://www.amazon.com/exec/obidos/ASIN/0201733978/aspalliancecom"&gt;eXtreme Programming Explored&lt;/a&gt; book.&amp;nbsp; He suggests that you &lt;a href="http://www.agile-software-development.com/2008/03/invest-in-good-user-stories_11.html"&gt;INVEST in good user stories&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Good User Stories should be:&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Independent &lt;br /&gt;Negotiable &lt;br /&gt;Valuable &lt;br /&gt;Estimatable (or Estimable) &lt;br /&gt;Small (&lt;a href="http://www.agile-software-development.com/2008/04/user-stories-should-be-small.html"&gt;more on small user stories&lt;/a&gt;) &lt;br /&gt;Testable&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I would further suggest that these attributes are most important only when the time comes to plan for the story in an iteration.&amp;nbsp; That is, once it comes time to estimate the story and prioritize it as part of an iteration, it needs to exhibit the INVEST qualities.&amp;nbsp; Prior to that point, it&amp;rsquo;s perfectly acceptable as a placeholder even if it&amp;rsquo;s big and vague &amp;ndash; it can be broken down further when it&amp;rsquo;s closer to actually being done.&amp;nbsp; This exemplifies the lean principle of putting off decisions until the last responsible moment.&amp;nbsp; If you&amp;rsquo;re not going to get to the story next week, there&amp;rsquo;s no sense wasting time trying to estimate it or otherwise make it perfect. &lt;strong&gt; Things will change&lt;/strong&gt; before you start work on it, which will make at least some of your work &lt;strong&gt;waste&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Large, vague user stories are known as &lt;a href="http://kw-agiledevelopment.blogspot.com/2008/01/thats-not-user-story-thats-epic.html"&gt;Epics&lt;/a&gt;.&amp;nbsp; It&amp;rsquo;s fine (even efficient) to have Epic stories in the backlog &amp;ndash; it stops being fine once you begin an iteration.&amp;nbsp; That&amp;rsquo;s when the rubber meets the road and the actual stories need to be extracted from the larger epic.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;How Do You Break Up an Epic into Stories?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;There are a lot of different ways one could attack this problem &amp;ndash; and certainly more than one &amp;ldquo;right&amp;rdquo; way.&amp;nbsp; If we take the &amp;ldquo;epic / story&amp;rdquo; metaphor too far, we could say that every story arc has an introduction, a climax, and a prologue and that in between there are many chapters and character development, etc.&amp;nbsp; However, this viewpoint naturally imposes a serial constraint on the stories we develop, and would tend to lead to Story 1 which is required for Story 2 which is required for Story 3.&amp;nbsp; This violates the first attribute in our INVEST acronym, which is that the stories should be Independent.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Bad Example&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;A real world example of this serial approach that delivers nothing until everything is in place would be to create stories based on logical tiers in the software.&amp;nbsp; For instance, if you have a data-driven application consisting of UI, business tier, data access layer, and database (quite common), and for the sake of argument you have a hard dependency on each layer from the one above it (bad design, but quite common), then you might opt to write stories like this:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://stevesmithblog.com/files/media/image/WindowsLiveWriter/StoriesTooBigVerticalSlices_C0A6/AppArchitecture-HorizontalStories_2.png"&gt;&lt;img style="display: inline; margin-left: 0px; margin-right: 0px; border: 0px;" title="AppArchitecture-HorizontalStories" border="0" alt="AppArchitecture-HorizontalStories" align="right" src="http://stevesmithblog.com/files/media/image/WindowsLiveWriter/StoriesTooBigVerticalSlices_C0A6/AppArchitecture-HorizontalStories_thumb.png" width="246" height="166" /&gt;&lt;/a&gt;Story 1: Create the new DB Table &lt;br /&gt;Story 2: Create the stored procedures &lt;br /&gt;Story 3: Create the DAL to access the sprocs &lt;br /&gt;Story 4: Create the business layer code that references the DAL &lt;br /&gt;Story 5: Write the UI screen&lt;/p&gt;
&lt;p&gt;You can think of each of these stories as addressing a &lt;em&gt;horizontal&lt;/em&gt; layer in the application architecture.&amp;nbsp; The problem with this is that it&amp;rsquo;s very difficult to start Stories 2-4 without the previous story being done.&amp;nbsp; About the only parallelization you can easily achieve here would be the UI, and with strong coupling it would also be very difficult to test things along the way.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;An Alternate Approach &amp;ndash; Vertical Slices&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;An alternate approach is to break down the epic into stories that very small yet still valuable bits of &lt;em&gt;vertical&lt;/em&gt; functionality.&amp;nbsp; For instance, let&amp;rsquo;s say the initial story is for a user registration page that collects a lot of different data.&amp;nbsp; There&amp;rsquo;s name data.&amp;nbsp; There&amp;rsquo;s room for multiple addresses.&amp;nbsp; There&amp;rsquo;s email and phone info.&amp;nbsp; There&amp;rsquo;s some validation logic.&amp;nbsp; Using the horizontal approach, someone might have generated the Registration Page user interface, and from there a data model, tables, sprocs, etc.&amp;nbsp; If at any point someone got stuck, nothing would be ready to deliver and so none of the stories would be providing value until all of them were produced.&amp;nbsp; Using vertical slices, this might break down like so:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://stevesmithblog.com/files/media/image/WindowsLiveWriter/StoriesTooBigVerticalSlices_C0A6/AppArchitecture-VerticalStories_2.png"&gt;&lt;img style="display: inline; margin-left: 0px; margin-right: 0px; border: 0px;" title="AppArchitecture-VerticalStories" border="0" alt="AppArchitecture-VerticalStories" align="right" src="http://stevesmithblog.com/files/media/image/WindowsLiveWriter/StoriesTooBigVerticalSlices_C0A6/AppArchitecture-VerticalStories_thumb.png" width="246" height="166" /&gt;&lt;/a&gt; Story 1: User can register and provide username and password. &lt;br /&gt;Story 2: User can provide name data. &lt;br /&gt;Story 3: User can provide an address. &lt;br /&gt;Story 4: User can manage multiple addresses. &lt;br /&gt;Story 5: User can add additional contact fields (phone, email, etc).&lt;/p&gt;
&lt;p&gt;All of the stories most likely still depend on the first one in this case, and you&amp;rsquo;ll rarely be able to completely eliminate all dependencies between stories in an epic.&amp;nbsp; But now it would be possible to develop all 5 stories independently.&amp;nbsp; They might even be written using some kind of control (web, WPF, AJAX, doesn&amp;rsquo;t matter what UI technology) such that they would be simple to stitch together on a single UI page or kept separated to form some kind Registration Wizard multi-step process.&amp;nbsp; And if the iteration ends and only Stories 1 and 2 are done?&amp;nbsp; &lt;strong&gt;You ship it&lt;/strong&gt; (or at least demo it to the customer) and &lt;strong&gt;get feedback earlier&lt;/strong&gt; than you otherwise would have, which helps ensure that what you&amp;rsquo;re driving toward really is the correct solution.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Summary&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;As I mentioned, there are many ways to split epics into individual stories.&amp;nbsp; The details of your application and other variables will influence what technique is best for the given situation.&amp;nbsp; However, if you remember the key attributes of good user stories and focus on being able to deliver &lt;em&gt;something&lt;/em&gt;, however small, of value to the customer as quickly as possible, you&amp;rsquo;ll very likely end up with stories that are about the right size.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/p4r6DX-St78bK5dDUTmKJQ0aIVo/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/p4r6DX-St78bK5dDUTmKJQ0aIVo/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/p4r6DX-St78bK5dDUTmKJQ0aIVo/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/p4r6DX-St78bK5dDUTmKJQ0aIVo/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.stevesmithblog.com/~ff/StevenSmith?a=y66K8OSrdLI:EZCG4K5DKPg:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/StevenSmith?i=y66K8OSrdLI:EZCG4K5DKPg:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.stevesmithblog.com/~ff/StevenSmith?a=y66K8OSrdLI:EZCG4K5DKPg:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/StevenSmith?i=y66K8OSrdLI:EZCG4K5DKPg:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.stevesmithblog.com/~ff/StevenSmith?a=y66K8OSrdLI:EZCG4K5DKPg:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/StevenSmith?i=y66K8OSrdLI:EZCG4K5DKPg:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/StevenSmith/~4/y66K8OSrdLI" height="1" width="1"/&gt;</description><pubDate>Thu, 02 Feb 2012 02:27:03 GMT</pubDate><guid isPermaLink="true">http://ardalis.com:80/Stories-Too-Big-ndash-Vertical-Slices</guid></item><item><title>XBox 360 - Home Media Center</title><link>http://ardalis.com:80/XBox-360-ndash-Home-Media-Center</link><description>&lt;p&gt;Recently I picked up an &lt;a href="http://www.amazon.com/gp/product/B000UY1WSK?ie=UTF8&amp;amp;tag=aspalliancecom&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=B000UY1WSK"&gt;HP MediaSmart EX470 Windows Home Server&lt;/a&gt; to help consolidate my files at home and to provide a simple backup solution.&amp;nbsp; It&amp;rsquo;s been great and it&amp;rsquo;s an extremely economical way to get backups.&amp;nbsp; You can hook it up with Amazon S3 using &lt;a href="http://jungledisk.com/homeserver/index.aspx"&gt;JungleDisk&lt;/a&gt; and get simple offsite backup of the files (but not the backups) easily and cheaply as well, and JungleDisk is just one of many plugins available.&amp;nbsp; I recommend the 500GB version for the price, as &lt;a href="http://www.amazon.com/gp/product/B00066IJPQ?ie=UTF8&amp;amp;tag=aspalliancecom&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=B00066IJPQ"&gt;you can pick up a 1.5TB hard drive to plug into one of the extra bays for under $150&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;One of the many plugins for the WHS is a media streaming one that makes it very easy to use the WHS from your XBox 360.&amp;nbsp; With this, it becomes trivial to use the XBox to browse pictures, watch slideshows, watch video clips, and play music.&amp;nbsp; Sometimes the lag is pretty bad when the XBox is trying to load a list of items, but this is likely just due to my wireless network and the significant distance between my XBox and my router and WHS.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Suggestion 1: Support Streaming Video&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;As much as I love this, there is certainly room for improvement around the XBox&amp;rsquo;s media capabilities.&amp;nbsp; First of all, as I mentioned in my previous post, you can download HD content for the XBox from the video marketplace, but the files are (as you would expect) quite large, and unfortunately you can&amp;rsquo;t start watching the movie until it&amp;rsquo;s been downloaded (or at least, I wasn&amp;rsquo;t able to start playing it after it had downloaded 20% over the course of half an hour the other day &amp;ndash; I went to bed before it reached 100%).&amp;nbsp; It would be great if the XBox video marketplace supported streaming downloads, &lt;a href="http://stevesmithblog.com/blog/online-media-and-the-death-of-drm/#comment-377"&gt;as one of my commenters on another post reports the AppleTV does&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Suggestion 2: Consolidate XBox 360, WMP, Zune into Unified Media Story&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;d also like to improve the music playing experience.&amp;nbsp; Currently, there is no way to save a playlist using the XBox interface unless the songs are stored on the XBox.&amp;nbsp; It does support playlists on the media server it&amp;rsquo;s connecting to, but not Zune playlists.&amp;nbsp; So if you&amp;rsquo;re a Zune user, you have to duplicate your playlists using Windows Media Player so that the XBox can use them, and you have to do all of this from your computer, not your XBox because the XBox can&amp;rsquo;t store playlists that include songs that aren&amp;rsquo;t on the XBox.&amp;nbsp; It&amp;rsquo;s very uncoordinated in its current state, and not the kind of seamless application sharing that Microsoft is well-known for in other areas, such as Office.&amp;nbsp; I&amp;rsquo;d really like to see some consolidation between Zune, Windows Media Player, and the XBox so that it&amp;rsquo;s much easier for these technologies to work together.&amp;nbsp; Microsoft needs one ring to rule them all (and not the RROD).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Suggestion 3: Allow Upgrades to the XBox at Market Value&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I can get a &lt;a href="http://www.amazon.com/gp/redirect.html?ie=UTF8&amp;amp;location=http%3A%2F%2Fwww.amazon.com%2Fs%3Fie%3DUTF8%26x%3D0%26ref%255F%3Dnb%255Fss%255Fgw%26y%3D0%26field-keywords%3Dhard%2520drive%26url%3Dsearch-alias%253Daps&amp;amp;tag=aspalliancecom&amp;amp;linkCode=ur2&amp;amp;camp=1789&amp;amp;creative=390957"&gt;1.5 TB hard drive for under $150&lt;/a&gt;.&amp;nbsp; I can get a &lt;a href="http://www.amazon.com/gp/product/B000ERAON2?ie=UTF8&amp;amp;tag=aspalliancecom&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=B000ERAON2"&gt;2GB flash memory drive for $1.85&lt;/a&gt;!&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Market Hard Drive Cost: $0.10 per GB &lt;br /&gt;Market Flash Drive Cost: $0.92 per GB&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Now, how much is for an XBox Hard Drive?&amp;nbsp; Retail for the 120GB unit is $150, &lt;a href="http://www.newegg.com/Product/Product.aspx?Item=N82E16874103062&amp;amp;nm_mc=OTC-Froogle&amp;amp;cm_mmc=OTC-Froogle-_-Xbox+360+-+Accessories-_-Microsoft-_-74103062"&gt;NewEgg has it right now for $135&lt;/a&gt;.&amp;nbsp; How about a 2GB memory unit?&amp;nbsp; Oh, wait, they don&amp;rsquo;t have those.&amp;nbsp; 1GB?&amp;nbsp; Nope.&amp;nbsp; But you can get a state-of-the-art &lt;a href="http://www.newegg.com/Product/Product.aspx?Item=N82E16874103061"&gt;512MB unit for just $40&lt;/a&gt;.&amp;nbsp; My *phone* has more memory on its MicroSD card (300% more), and the MicroSD card is about 1/20th the size of the XBox memory card.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;XBox Hard Drive Cost: $1.13 per GB (more than 10x market price) &lt;br /&gt;XBox Flash Drive Cost: $80 per GB (more than 80x market price)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Apparently &lt;a href="http://www.pcworld.com/article/150970/upgrade_your_xbox_360s_hard_drive_on_the_cheap.html"&gt;you can upgrade your hard drive yourself without being limited to a mere 120GB overpriced unit, as this PCWorld article shows&lt;/a&gt;.&amp;nbsp; I&amp;rsquo;m not aware of a similar way to create a cheaper memory unit.&amp;nbsp; Oh, and it&amp;rsquo;s also annoying that the XBox supports up to 4 players but only 2 memory units.&amp;nbsp; What if all 4 people have XBox Live Accounts they want to use, with the profiles on their memory units?&lt;/p&gt;
&lt;p&gt;Either Microsoft should put out supported upgrades for the hard drives and memory units that are at least in the same ballpark as market values (even 2x as expensive would be fine w/me, honestly, but 10x and 80x is a bit extreme), or, better yet, they should allow the use of standard electronics like USB flash drives and USB hard drives.&amp;nbsp; I understand part of the reluctance to do this is to make hacking and cheating more difficult, so I would settle for the first option (and I&amp;rsquo;m sure Microsoft&amp;rsquo;s sales of these peripherals would be quite good, too).&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/VDj-3eTJ-_gLIPuma95DgU75iGk/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/VDj-3eTJ-_gLIPuma95DgU75iGk/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/VDj-3eTJ-_gLIPuma95DgU75iGk/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/VDj-3eTJ-_gLIPuma95DgU75iGk/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.stevesmithblog.com/~ff/StevenSmith?a=DxT0wXQ48rA:3yl_9-0OR4g:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/StevenSmith?i=DxT0wXQ48rA:3yl_9-0OR4g:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.stevesmithblog.com/~ff/StevenSmith?a=DxT0wXQ48rA:3yl_9-0OR4g:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/StevenSmith?i=DxT0wXQ48rA:3yl_9-0OR4g:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.stevesmithblog.com/~ff/StevenSmith?a=DxT0wXQ48rA:3yl_9-0OR4g:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/StevenSmith?i=DxT0wXQ48rA:3yl_9-0OR4g:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/StevenSmith/~4/DxT0wXQ48rA" height="1" width="1"/&gt;</description><pubDate>Thu, 02 Feb 2012 02:26:17 GMT</pubDate><guid isPermaLink="true">http://ardalis.com:80/XBox-360-ndash-Home-Media-Center</guid></item><item><title>Learning To Code with the Azure SDK - Show Me The Code</title><link>http://ardalis.com:80/Learning-To-Code-with-the-Azure-SDK-ndash-Show-Me-The-Code</link><description>&lt;p&gt;I&amp;rsquo;ve been working with Azure off and on since last summer, and like any new API or platform, there are hurdles involved with the learning curve.&amp;nbsp; This is especially true for pre-release software that is rapidly changing and of course has neither official documentation nor much in the way of info on blogs or &lt;a href="http://aspalliance.com/"&gt;developer community sites like ASPAlliance.com&lt;/a&gt;.&amp;nbsp; One of the ways I like to learn about projects these days is through testing.&amp;nbsp; Ideally, the project will already have a suite of unit tests that I can run to confirm that it actually works at least as well as its creators expect it to, and then I can look at individual tests to discover how the creators of the API expect others to use it.&amp;nbsp; Like many other developers, I usually don&amp;rsquo;t bother to read the official documentation (I&amp;rsquo;ve come to expect it will be lacking), preferring instead a &amp;ldquo;Show Me The Code (SMTC)&amp;rdquo; approach.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Show Me The Code&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The big benefit of SMTC is that you don&amp;rsquo;t have to worry about whether or not the documentation was properly updated between the previous CTP release and the preview alpha CTP pre-release daily build you&amp;rsquo;re using now.&amp;nbsp; You run the code, and if it does what it&amp;rsquo;s supposed to do, then you know you have a system that is more-or-less working and you can go from there.&amp;nbsp; Most SDKs include samples to help you get started, with full source code, as obviously this is one of the best ways developers can quickly get up to speed with a new set of tools.&lt;/p&gt;
&lt;p&gt;Azure&amp;rsquo;s SDK as of the January CTP ships with about 9 folders worth of samples, including a couple of HelloWorld projects, a PersonalWebSite, a CloudDrive demo that lets you map a drive to cloud storage, and more.&amp;nbsp; If you want to take advantage of Azure Storage on your local machine, then you&amp;rsquo;ll most likely run the sample storage client API sample so you can get up to speed with it.&amp;nbsp; It&amp;rsquo;s comprised of a console application that basically runs through a bunch of API exercises that demonstrate how to perform operations against Azure&amp;rsquo;s Blog, Queue, and Table storage options.&amp;nbsp; If you run it, you end up with something like this:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://stevesmithblog.com/files/media/image/WindowsLiveWriter/LearningToCodewiththeAzureSDKShowMeTheCo_EAEE/image_2.png"&gt;&lt;img style="display: inline; border: 0px;" title="image" border="0" alt="image" src="http://stevesmithblog.com/files/media/image/WindowsLiveWriter/LearningToCodewiththeAzureSDKShowMeTheCo_EAEE/image_thumb.png" width="432" height="455" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Coupled with the actual source code, this is a great example of how to use Azure Storage.&amp;nbsp; However, it&amp;rsquo;s not the best output and unless you watch it as it runs, you don&amp;rsquo;t really know what all this program actually did.&amp;nbsp; Or if some pieces maybe failed.&amp;nbsp; Or how to run just the part on deleting table entries.&amp;nbsp; This is a good example of SMTC, but it falls short of being as expressive and approachable as it could be.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Unit Tests&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m probably preaching the choir here when it comes to unit tests, but there are still about a bazillion developers out there who simply don&amp;rsquo;t get them.&amp;nbsp; They don&amp;rsquo;t write them, they don&amp;rsquo;t run them, and they certainly don&amp;rsquo;t see the value in them.&amp;nbsp; This is just one instance where I think unit tests are valuable, and that is as documentation.&amp;nbsp; As a developer trying to learn an API or going through an SDK, I would much rather have an exhaustive suite of unit (and integration) tests than a .chm file or PDF with standard documentation (though of course having both would be ideal).&amp;nbsp; With the unit tests, I have documentation I can &lt;em&gt;execute&lt;/em&gt;.&amp;nbsp; And I can do it for the whole system or just a tiny piece that interests me at the moment.&amp;nbsp; I don&amp;rsquo;t have to try and set up a huge solution that came as a sample with the SDK &amp;ndash; I can run just one test.&amp;nbsp; Or I can look at just one test and, if it was written well, I can come quickly grasp how the System Under Test (SUT) is meant to be used.&lt;/p&gt;
&lt;p&gt;Going back to the Azure SDK example with the StorageClientAPISample project, the Program.cs file in that project is 972 lines long.&amp;nbsp; Here&amp;rsquo;s a small example of some of the code, showing how to create a Blob of text:&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: consol; font-size: x-small;" face="consol" size="2"&gt;// write some text blobs &lt;br /&gt;NameValueCollection nv1 = new NameValueCollection(); &lt;br /&gt;nv1["m1"] = "v1"; &lt;br /&gt;nv1["m2"] = "v2"; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: consol; font-size: x-small;" face="consol" size="2"&gt;StringBlob hello1 = new StringBlob("hello.txt", "Hello World"); &lt;br /&gt;hello1.Blob.Metadata = nv1; &lt;br /&gt;Console.WriteLine("Creating blob hello.txt"); &lt;br /&gt;PutTextBlob(container, hello1); &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: consol; font-size: x-small;" face="consol" size="2"&gt;BlobProperties prop = container.GetBlobProperties("hello.txt"); &lt;br /&gt;Console.WriteLine("hello.txt content length = " + prop.ContentLength);&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m sure the unit testers among you will agree that this would be a good candidate for a unit test (or in this case, since it really is talking to the storage service, an integration test).&amp;nbsp; It&amp;rsquo;s possible that some future version of the Azure SDK (it&amp;rsquo;s not even Beta yet, I realize) will include a suite of unit tests, but Microsoft faces some challenges here with deployment.&amp;nbsp; MSTest still is not xcopy deployable, and to date they&amp;rsquo;ve shown a fair amount of reluctance to use alternative open source tools like &lt;a href="http://nunit.org/"&gt;NUnit&lt;/a&gt; (though the ASP.NET MVC team has been more open in this regard than most other teams).&amp;nbsp; Since I&amp;rsquo;m not on the Azure team but I do think such tests would be a valuable addition, I&amp;rsquo;ve suggested this to the team but I&amp;rsquo;ve also gone ahead and started an &lt;a href="http://codeplex.com/azurecontrib"&gt;Azure Contrib project on CodePlex&lt;/a&gt; that will include such tests among its samples, as well as other Azure add-ons that don&amp;rsquo;t ship with the official SDK.&amp;nbsp; Naturally I&amp;rsquo;ll be looking for additional project members as well as ideas for things to include in the project, though for now I don&amp;rsquo;t even have these tests set up so I don&amp;rsquo;t want to get too far ahead of myself.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Summary&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Show Me The Code (SMTC) is a great way to learn.&amp;nbsp; Tests are a great way to break up a lot of code into bite-sized pieces that are both easy to learn and easy to evaluate whether or not they&amp;rsquo;re working correctly.&amp;nbsp; Microsoft should consider shipping tests instead of monolithic console applications with the SDK samples, for Azure as well as other frameworks they are developing, and they should consider making MSTest distributable or accepting the fact that tools like NUnit can serve this space well.&amp;nbsp; &lt;a href="http://codeplex.com/azurecontrib"&gt;Azure Contrib&lt;/a&gt; will soon provide some additional components of interest to Azure developers which are not part of the official SDK.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/JIcblcdC_8B0a82Bkde28LFRg_o/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/JIcblcdC_8B0a82Bkde28LFRg_o/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/JIcblcdC_8B0a82Bkde28LFRg_o/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/JIcblcdC_8B0a82Bkde28LFRg_o/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.stevesmithblog.com/~ff/StevenSmith?a=AqZKxlb96tQ:AQ9jYMESe2A:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/StevenSmith?i=AqZKxlb96tQ:AQ9jYMESe2A:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.stevesmithblog.com/~ff/StevenSmith?a=AqZKxlb96tQ:AQ9jYMESe2A:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/StevenSmith?i=AqZKxlb96tQ:AQ9jYMESe2A:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.stevesmithblog.com/~ff/StevenSmith?a=AqZKxlb96tQ:AQ9jYMESe2A:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/StevenSmith?i=AqZKxlb96tQ:AQ9jYMESe2A:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/StevenSmith/~4/AqZKxlb96tQ" height="1" width="1"/&gt;</description><pubDate>Thu, 02 Feb 2012 02:25:15 GMT</pubDate><guid isPermaLink="true">http://ardalis.com:80/Learning-To-Code-with-the-Azure-SDK-ndash-Show-Me-The-Code</guid></item><item><title>Outlook Send Mail Infinite Loop - Message in Outbox</title><link>http://ardalis.com:80/Outlook-Send-Mail-Infinite-Loop-ndash-Message-in-Outbox</link><description>&lt;p&gt;Last week I encountered a problem with Outlook that I&amp;rsquo;m happy to report I&amp;rsquo;ve just solved.&amp;nbsp; I found a bunch of things on the Interwebs that looked like they might be useful, but none of the fixes there did the trick for me (of the ones I tried &amp;ndash; some fixes were more extreme than I wanted to attempt).&amp;nbsp; Here are some resources that may help you if my fix does not:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://buhjillions.spikecurtis.com/outlook-send-mail-infinite-loop/"&gt;Outlook Send-Mail Infinite Loop&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.howto-outlook.com/faq/messagestuckinoutbox.htm"&gt;Message stuck in Outbox&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://support.microsoft.com/?id=195922"&gt;How to troubleshoot mail stuck in Outbox in Outlook 2000&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.howto-outlook.com/howto/deletereadreceipt.htm"&gt;Delete a stuck Read Receipt&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=3D1C7482-4C6E-4EC5-983E-127100D71376&amp;amp;displaylang=en"&gt;Download MDBVU32.EXE&lt;/a&gt; (see previous link for why)&lt;/li&gt;
&lt;li&gt;&lt;a href="http://forums.majorgeeks.com/showthread.php?t=154379"&gt;Forum with some tips for trying to delete messages&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;The Problem&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I tried to send an email on Sunday and for whatever reason it got stuck in my outbox.&amp;nbsp; It was italicized, and if I tried to open or delete it, it would inform me that Outlook was already trying to send the message and thus I couldn&amp;rsquo;t do anything to it.&amp;nbsp; This was a minor annoyance, at first.&lt;/p&gt;
&lt;p&gt;However, this became much more of an annoyance when Outlook would, from time to time, get into some kind of an infinite loop while trying to send messages.&amp;nbsp; It would generate &amp;ldquo;Successful&amp;rdquo; account synchonrization messages over and over again (racking up hundreds of such messages per minute).&amp;nbsp; Some of my online research suggested this might mean that my &lt;a href="http://buhjillions.spikecurtis.com/outlook-send-mail-infinite-loop/"&gt;Address Book was out of sync with my contacts, but following the steps in that post&lt;/a&gt; revealed that this wasn&amp;rsquo;t my issue.&amp;nbsp; While this loop was going on, Outlook was unusable and the Send/Receive dialog would flicker, taking focus from other windows, which basically forced me to close OULOOK.EXE from Task Manager.&lt;/p&gt;
&lt;p&gt;I downloaded MDBVU32.EXE on the advice of some other blogs, which let me view my PST file and attempt to manipulate its contents.&amp;nbsp; I was able to see the message in the outbox but attempting to delete it did nothing, and attempts to abort sending the message resulted in an error.&lt;/p&gt;
&lt;p&gt;I tried switching to Offline mode, but that didn&amp;rsquo;t help.&amp;nbsp; In fact, the infinite loop still occurred (I wasn&amp;rsquo;t really sure why it was still trying to connect to anything, but it was).&amp;nbsp; Some of the possible solutions I&amp;rsquo;d found online suggested that I create a new PST file and delete all of my accounts and re-create them in the new PST file, and then move over my messages.&amp;nbsp; That definitely seemed like overkill and really at that point I was starting to consider just giving up on Outlook altogether.&amp;nbsp; Luckily, I found the solution today before resorting to anything that drastic.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The Solution&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Thanks to Outlook guru Alon Brown, the solution was pretty straightforward.&amp;nbsp; Restart Outlook in safe mode, switch to Offline mode, then &lt;strong&gt;restart Outlook in safe mode again (while still offline),&lt;/strong&gt; and delete the message. &lt;strong&gt; This worked!&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;d tried safe mode, and I&amp;rsquo;d tried offline mode, but I hadn&amp;rsquo;t tried restarting Outlook with these settings in place.&amp;nbsp; I&amp;rsquo;m not sure if it was necessary to be in safe mode each time or not, but those are the steps that worked for me.&amp;nbsp; To get outlook into safe mode, simply browse to the path where OUTLOOK.EXE is located (e.g. C:\Program Files\Microsoft Office\Office12\OUTLOOK.EXE) and run it from the command prompt with the /safe switch.&amp;nbsp; Then you should be able to navigate to the Outbox and delete any messages found there.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/v6uNc4hfI_JJdfqW8PYjnlhha40/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/v6uNc4hfI_JJdfqW8PYjnlhha40/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/v6uNc4hfI_JJdfqW8PYjnlhha40/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/v6uNc4hfI_JJdfqW8PYjnlhha40/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.stevesmithblog.com/~ff/StevenSmith?a=mRR7qTR5BRk:rIZ5ITStHqU:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/StevenSmith?i=mRR7qTR5BRk:rIZ5ITStHqU:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.stevesmithblog.com/~ff/StevenSmith?a=mRR7qTR5BRk:rIZ5ITStHqU:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/StevenSmith?i=mRR7qTR5BRk:rIZ5ITStHqU:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.stevesmithblog.com/~ff/StevenSmith?a=mRR7qTR5BRk:rIZ5ITStHqU:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/StevenSmith?i=mRR7qTR5BRk:rIZ5ITStHqU:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/StevenSmith/~4/mRR7qTR5BRk" height="1" width="1"/&gt;</description><pubDate>Thu, 02 Feb 2012 02:24:09 GMT</pubDate><guid isPermaLink="true">http://ardalis.com:80/Outlook-Send-Mail-Infinite-Loop-ndash-Message-in-Outbox</guid></item><item><title>DevReach Online 2010 - Software Fundamentals</title><link>http://ardalis.com:80/DevReach-Online-2010-ndash-Software-Fundamentals</link><description>&lt;p&gt;&lt;a href="http://stevesmithblog.com/files/media/image/WindowsLiveWriter/DevReachOnline2010SoftwareFundamentals_9399/image_2.png"&gt;&lt;img style="margin: 0px 0px 0px 10px; display: inline; border: 0px;" title="image" border="0" alt="image" align="right" src="http://stevesmithblog.com/files/media/image/WindowsLiveWriter/DevReachOnline2010SoftwareFundamentals_9399/image_thumb.png" width="240" height="193" /&gt;&lt;/a&gt;&amp;nbsp; I just finished my &lt;a href="http://www.devreach.com/Event/devreach-online.aspx" rel="nofollow"&gt;DevReach Online&lt;/a&gt; presentation, A Whirlwind Tour of Software Development Fundamentals.&amp;nbsp; In this 45-minute talk, I covered what I consider to be fundamental principles, patterns, and practices of software development, with a little bit of time for a demo at the end.&amp;nbsp; The session was recorded and will be available on the DevReach Online web site soon.&amp;nbsp; You can get my slides and demos from the talk here, though.&amp;nbsp; I&amp;rsquo;ve also included some of the links from the talk to save you the trouble of hunting through the PowerPoint file.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://devreach.com/" rel="nofollow"&gt;&lt;img style="display: inline; margin-left: 0px; margin-right: 0px; border: 0px;" title="image" border="0" alt="image" src="http://stevesmithblog.com/files/media/image/WindowsLiveWriter/DevReachOnline2010SoftwareFundamentals_9399/image_5.png" width="180" height="77" /&gt;&lt;/a&gt; 18-19 October 2010, Sofia, Bulgaria&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;References&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;A Whirlwind Tour of Software Development Fundamentals - &lt;a href="http://stevesmithblog.s3.amazonaws.com/SteveSmith-DevReachOnline-WhirlwindTourSoftwareFundamentals.zip" rel="nofollow"&gt;Slides and Demos&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://amzn.to/Clean-Code" rel="nofollow"&gt;Clean Code&lt;/a&gt; by Robert C. Martin&lt;/p&gt;
&lt;p&gt;&lt;a href="http://amzn.to/agilepppcsharp" rel="nofollow"&gt;Agile Principles, Patterns, and Practices in C#&lt;/a&gt; by Robert C. Martin and Micah Martin&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.pluralsight-training.net/microsoft/olt/member.aspx" rel="nofollow"&gt;Pluralsight On Demand Training&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://nimblepros.com/"&gt;NimblePros agile consulting, training, and mentoring&lt;/a&gt; (virtual mentoring and training available)&lt;/p&gt;
&lt;p&gt;&lt;a href="http://devreach.com" rel="nofollow"&gt;DevReach&lt;/a&gt; | &lt;a href="http://facebook.com/DevReach" rel="nofollow"&gt;Facebook&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://twitter.com/ardalis"&gt;Follow Steve on Twitter&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/GtpVwOdagQfkwVnryCjms-iB8xk/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/GtpVwOdagQfkwVnryCjms-iB8xk/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/GtpVwOdagQfkwVnryCjms-iB8xk/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/GtpVwOdagQfkwVnryCjms-iB8xk/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.stevesmithblog.com/~ff/StevenSmith?a=YMfUudxkU5M:goIcZIavCXc:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/StevenSmith?i=YMfUudxkU5M:goIcZIavCXc:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.stevesmithblog.com/~ff/StevenSmith?a=YMfUudxkU5M:goIcZIavCXc:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/StevenSmith?i=YMfUudxkU5M:goIcZIavCXc:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.stevesmithblog.com/~ff/StevenSmith?a=YMfUudxkU5M:goIcZIavCXc:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/StevenSmith?i=YMfUudxkU5M:goIcZIavCXc:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/StevenSmith/~4/YMfUudxkU5M" height="1" width="1"/&gt;</description><pubDate>Thu, 02 Feb 2012 02:22:50 GMT</pubDate><guid isPermaLink="true">http://ardalis.com:80/DevReach-Online-2010-ndash-Software-Fundamentals</guid></item><item><title>Code Review Singleton Pattern Issues</title><link>http://ardalis.com:80/Code-Review-ndash-Singleton-Pattern-Issues</link><description>&lt;p&gt;One of my applications relies on a singleton pattern to create a single instance of a server which processes requests from many different ASP.NET handlers.&amp;nbsp; It is created using pretty much standard Singleton code:&lt;/p&gt;
&lt;div&gt;
&lt;div style="line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: consolas, 'Courier New', courier, monospace; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;
&lt;pre style="line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: consolas, 'Courier New', courier, monospace; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #0000ff;"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;static&lt;/span&gt; Context CreateContext()&lt;/pre&gt;
&lt;pre style="line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: consolas, 'Courier New', courier, monospace; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;{&lt;/pre&gt;
&lt;pre style="line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: consolas, 'Courier New', courier, monospace; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;    &lt;span style="color: #0000ff;"&gt;return&lt;/span&gt; CreateContext(&lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; ConfigurationFileSettings());&lt;/pre&gt;
&lt;pre style="line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: consolas, 'Courier New', courier, monospace; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;}&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Recently, this server needed to be made aware of whether requests were coming into it via SSL or standard HTTP.&amp;nbsp; The solution that was checked in (and which worked and passes local tests) is to create a new property of Context called IsSecureConnection, and to allow this to be passed into its public constructor like this:&lt;/p&gt;
&lt;div&gt;
&lt;div style="line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: consolas, 'Courier New', courier, monospace; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;
&lt;pre style="line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: consolas, 'Courier New', courier, monospace; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #0000ff;"&gt;public&lt;/span&gt; Context(ISettings settings, &lt;/pre&gt;
&lt;pre style="line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: consolas, 'Courier New', courier, monospace; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;    &lt;span style="color: #0000ff;"&gt;bool&lt;/span&gt; isSecureConnection)&lt;/pre&gt;
&lt;pre style="line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: consolas, 'Courier New', courier, monospace; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;{&lt;/pre&gt;
&lt;pre style="line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: consolas, 'Courier New', courier, monospace; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;    &lt;span style="color: #0000ff;"&gt;this&lt;/span&gt;.Settings = settings;&lt;/pre&gt;
&lt;pre style="line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: consolas, 'Courier New', courier, monospace; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;    &lt;span style="color: #0000ff;"&gt;this&lt;/span&gt;.IsSecureConnection = isSecureConnection;&lt;/pre&gt;
&lt;pre style="line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: consolas, 'Courier New', courier, monospace; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;}&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;This is pretty much classic &lt;a href="http://en.wikipedia.org/wiki/Dependency_injection"&gt;Dependency Injection&lt;/a&gt; and most of the time is what I would consider the right approach to the problem.&amp;nbsp; However, in this case it fails to take into account how this object is used, because of the fact that it&amp;rsquo;s using a Singleton.&amp;nbsp; And in this case nothing ever calls this constructor anyway &amp;ndash; the actual solution that was applied instead only made use of the IsSecureConnection property (which was read/write).&lt;/p&gt;
&lt;p&gt;The client code in the ASP.NET handlers that invokes the Context class looks like this (before adding any support for SSL):&lt;/p&gt;
&lt;div&gt;
&lt;div style="line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: consolas, 'Courier New', courier, monospace; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;
&lt;pre style="line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: consolas, 'Courier New', courier, monospace; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;Context engineContext = Context.CreateContext();&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;After adding support for SSL, this code became:&lt;/p&gt;
&lt;div&gt;
&lt;div style="line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: consolas, 'Courier New', courier, monospace; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;
&lt;pre style="line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: consolas, 'Courier New', courier, monospace; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;Context engineContext = Context.CreateContext();&lt;/pre&gt;
&lt;pre style="line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: consolas, 'Courier New', courier, monospace; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;engineContext.IsSecureConnection = isSecureConnection;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Looks fine, right?&amp;nbsp; Run it through some tests &amp;ndash; things behave as expected.&amp;nbsp; SSL requests get routed to the Context object with IsSecureConnection = true.&amp;nbsp; Regular HTTP requests get routed with IsSecureConnection = false.&amp;nbsp; Stick a fork in it and ship it&amp;hellip;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Global State and Static / Singleton Objects&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The problem of course is that many different ASP.NET handlers are talking to the same exact instance of Context.&amp;nbsp; In this particular application, this is taking place tens of times each second.&amp;nbsp; So if you imagine that 49 requests come in during a given second over HTTP and 1 comes in over HTTPS, it&amp;rsquo;s quite likely that while the Context has had its IsSecureConnection property set to one value, it&amp;rsquo;s in the middle of processing another request.&lt;/p&gt;
&lt;p&gt;The other issue here is that whether or not a given request is using SSL is a lower level concern to the Context object which is in essence a request manager.&amp;nbsp; The only call that the handlers ever send to Context is something like this:&lt;/p&gt;
&lt;div&gt;
&lt;div style="line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: consolas, 'Courier New', courier, monospace; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;
&lt;pre style="line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: consolas, 'Courier New', courier, monospace; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;Response myResponse = engineContext.GetResponse(_myParamsDTO);&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;This is the level of detail where the HTTP/HTTPS information is important, and the value should be passed at the method level into the GetResponse() method either as a separate parameter or as part of the DTO currently used.&amp;nbsp; Then, even if many requests are being handled concurrently, none of them will be setting the global state of the singleton Context object, so all of them will be processed correctly.&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;strong&gt;Recommendation&lt;/strong&gt;&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;In general, I&amp;rsquo;m not a big fan of the &lt;a href="http://en.wikipedia.org/wiki/Singleton_pattern"&gt;Singleton pattern&lt;/a&gt;, and even less so of static objects and methods.&amp;nbsp; They&amp;rsquo;re extremely difficult to test and prone to problems with synchronization and multiple threading like the one shown here.&amp;nbsp; In development, things that work just fine often end up failing in production under load.&amp;nbsp; If you think your application really needs a static or singleton, consider whether or not this is a premature optimization, and build the application using standard object creation semantics until you have proof that this will not be capable of meeting your design&amp;rsquo;s needs.&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;If you do use static methods, you should be careful not to new up objects in them.&amp;nbsp; That is, they should be leaf nodes in your object/call graph, operating only on their parameters and instantiating nothing on their own.&amp;nbsp; In this way, they remain testable and do not introduce nasty dependencies into your application.&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/PSZ6fDp5qCdHkgXh1NR8gWY_AY4/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/PSZ6fDp5qCdHkgXh1NR8gWY_AY4/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/PSZ6fDp5qCdHkgXh1NR8gWY_AY4/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/PSZ6fDp5qCdHkgXh1NR8gWY_AY4/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.stevesmithblog.com/~ff/StevenSmith?a=G1ZNUez4cQs:OELaIS4tLhU:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/StevenSmith?i=G1ZNUez4cQs:OELaIS4tLhU:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.stevesmithblog.com/~ff/StevenSmith?a=G1ZNUez4cQs:OELaIS4tLhU:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/StevenSmith?i=G1ZNUez4cQs:OELaIS4tLhU:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.stevesmithblog.com/~ff/StevenSmith?a=G1ZNUez4cQs:OELaIS4tLhU:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/StevenSmith?i=G1ZNUez4cQs:OELaIS4tLhU:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/StevenSmith/~4/G1ZNUez4cQs" height="1" width="1"/&gt;</description><pubDate>Thu, 02 Feb 2012 02:22:02 GMT</pubDate><guid isPermaLink="true">http://ardalis.com:80/Code-Review-ndash-Singleton-Pattern-Issues</guid></item><item><title>Reviewing Scrumban the Book</title><link>http://ardalis.com:80/reviewing-scrumban-the-book</link><description>&lt;p&gt;&lt;a href="http://amzn.to/wJJMBR"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" align="right" src="http://ardalis.com/Media/Default/Windows-Live-Writer/Reviewing-Scrumban-the-Book_E09F/image_3.png" width="240" height="240"&gt;&lt;/a&gt;I’ve been reading a bunch of kanban and lean books recently as I work on my Pluralsight course on Introducing Kanban (not published yet – will link to it when it is).&amp;nbsp; The most recent one I’ve finished is &lt;em&gt;&lt;a href="http://amzn.to/wJJMBR"&gt;Scrumban, Essays on Kanban Systems for Lean Software Development&lt;/a&gt;&lt;/em&gt;, by Corey Ladas (I’m doing the reviews in LIFO order).&amp;nbsp; I made a bunch of notes while reading this book, and it has a great deal of useful information.&amp;nbsp; I read &lt;a href="http://amzn.to/zlzuKg"&gt;David Anderson’s Kanban book&lt;/a&gt; first, followed by &lt;a href="http://amzn.to/zmlnVg"&gt;Benson and Barry’s Personal Kanban&lt;/a&gt;.&amp;nbsp; I think reading Scrumban last was definitely the right choice, though if I were recommending these books today I would most likely suggest someone start with Personal Kanban, as it’s the lightest weight of the three.&lt;/p&gt; &lt;p&gt;One thing that sets Scrumban apart from the other books is the narrative style and organization of the book.&amp;nbsp; As it says in the title’s byline, this book is a collection of essays – there isn’t a great deal of cohesion or a consistent narrative guiding you through the book.&amp;nbsp; It also tends to assume a fair bit of of knowledge on the part of the reader, which is one reason why I wouldn’t start off with this book if you’re just starting to learn about kanban and lean software development.&amp;nbsp; I also don’t think the title is particularly fitting, since there is only one essay that deals with scrum and mentions the term scrumban in the whole book.&amp;nbsp; I have a feeling the title was chosen mainly because it was short and would leverage the popularity of scrum to drive up book sales – whether this was the case or was successful I can’t say.&lt;/p&gt; &lt;p&gt;I found a great deal of value in the book, and it is certainly no rehash of the other two kanban titles listed above.&amp;nbsp; There are some very important, basic concepts covered here such as the analogy of kanban tokens to money in one of the first essays.&amp;nbsp; Corey does a great job of examining multiple different approaches to processes and showing their pros and cons.&amp;nbsp; Things like methods for synchronizing different handoffs between related up- and downstream collaborators in a process are explained clearly and are honestly things I’d never given much thought previously.&amp;nbsp; The book also does a great job of reinforcing the notion that time-boxed iterations are a stepping stone to an even more streamlined process.&amp;nbsp; If you’ve ever considered the logical progression of moving from infrequent software builds, to having a daily build, to having continuous integration, you can see the same logic being applied to moving from large project phases and handoffs (e.g. &lt;a href="http://deviq.com/waterfall"&gt;waterfall&lt;/a&gt;) to many smaller and iterative iterations (sprints), to continuous software delivery and one piece flow (ideal).&lt;/p&gt; &lt;p&gt;One criticism I do have of the book is that it often didn’t define new terms and acronyms as they were introduced.&amp;nbsp; I noted a bunch of them:&lt;/p&gt; &lt;p&gt;&lt;a href="http://en.wikipedia.org/wiki/Analytic_Hierarchy_Process"&gt;AHP prioritization&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://en.wikipedia.org/wiki/Takt_time"&gt;takt time&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;em&gt;&lt;a href="http://en.wikipedia.org/wiki/Heijunka"&gt;heijunka board&lt;/a&gt;&lt;/em&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.signalguys.com/c/Andon_Lights.html"&gt;andon lights&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://en.wikipedia.org/wiki/Axiomatic_design"&gt;axiomatic design&lt;/a&gt;&lt;/p&gt; &lt;p&gt;There were probably more that I missed because I was already familiar with the term, and of course it’s possible some of these were covered somewhere in the book and I missed them, but these were my “google these later” notes.&amp;nbsp; The links above are the result of my google-fu after-the-fact.&lt;/p&gt; &lt;p&gt;The latter 2/3 of the book shows a bunch of different ways to model processes using task boards, and the effects of each of these designs.&amp;nbsp; The analysis from these areas of the book are easily worth the price of the whole book, considering how much time they’ll save you if you’re just getting started.&amp;nbsp; The book doesn’t propose one right way to go about implementing such systems, but it does a very good job of showing the pros and cons of a number of approaches.&lt;/p&gt; &lt;p&gt;Overall, I thought the book had some great information, but could have been organized better.&amp;nbsp; I would give it 3 or 4 stars on Amazon and would recommend other books first, but if you’ve read the others and still want to learn more, there’s some great information here.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/o9Q3f8aldniFbJ7HX30J5MF02sE/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/o9Q3f8aldniFbJ7HX30J5MF02sE/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/o9Q3f8aldniFbJ7HX30J5MF02sE/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/o9Q3f8aldniFbJ7HX30J5MF02sE/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.stevesmithblog.com/~ff/StevenSmith?a=3VnQgsWzwhI:XtkPAe1GubM:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/StevenSmith?i=3VnQgsWzwhI:XtkPAe1GubM:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.stevesmithblog.com/~ff/StevenSmith?a=3VnQgsWzwhI:XtkPAe1GubM:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/StevenSmith?i=3VnQgsWzwhI:XtkPAe1GubM:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.stevesmithblog.com/~ff/StevenSmith?a=3VnQgsWzwhI:XtkPAe1GubM:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/StevenSmith?i=3VnQgsWzwhI:XtkPAe1GubM:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/StevenSmith/~4/3VnQgsWzwhI" height="1" width="1"/&gt;</description><pubDate>Fri, 27 Jan 2012 21:25:38 GMT</pubDate><guid isPermaLink="true">http://ardalis.com:80/reviewing-scrumban-the-book</guid></item><item><title>Updating Blog to Orchard and Switching Domains</title><link>http://ardalis.com:80/updating-blog-to-orchard-and-switching-domains</link><description>&lt;p&gt;&lt;a href="http://ardalis.com/Media/Default/Windows-Live-Writer/87ac6128314d_D3CC/image_2.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; margin: 0px 0px 5px 5px; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" align="right" src="http://ardalis.com/Media/Default/Windows-Live-Writer/87ac6128314d_D3CC/image_thumb.png" width="376" height="323"&gt;&lt;/a&gt;So, yesterday I posted &lt;a href="http://ardalis.com/Asus-Zen-Ultrabook-First-Impressions"&gt;a review of the new Asus Ultrabook&lt;/a&gt; and, as has become rather predictable lately, the virtual web server hosting my Graffiti-powered blog started having 100% CPU for quite a while after the post went live.&amp;nbsp; Now, I don’t get *that* much traffic, but apparently something with my configuration of Graffiti, the server, and the traffic that I do get is enough for it to bring that server to its knees.&amp;nbsp; And Graffiti, great though it was years ago, just had to go.&lt;/p&gt; &lt;p&gt;I opted to go with &lt;a href="http://www.orchardproject.net/"&gt;Orchard&lt;/a&gt; for several reasons.&amp;nbsp; I’d been on the fence between Orchard and WordPress, but after using WordPress for some other one-off projects over the last 18 months, I’ve grown disenchanted with it.&amp;nbsp; While I did find that it was very cheap to find hosting for WordPress, I also found that these cheaper hosts were (shockingly) not as responsive as I was used to, and also since WordPress is to blogging as Windows has been to PCs, it also is the target of loads of automated hacks, and it didn’t take long before the WordPress accounts I had set up on these shared hosts were compromised.&amp;nbsp; After cleaning them up multiple times only to have the problems recur, I decided I’d just avoid the whole problem by using Orchard (the blogging equivalent of buying a Mac).&amp;nbsp; I’m hosting my new blog with &lt;a href="http://cytanium.com"&gt;Cytanium.com&lt;/a&gt;, which is run by the same awesome folks who run &lt;a href="http://orcsweb.com/"&gt;ORCSWEB&lt;/a&gt; hosting, but is set up better for a personal site like this.&lt;/p&gt; &lt;p&gt;Orchard is incredibly easy to get set up, has loads of extensions, and also happens to use the platform, language, and design approach that I prefer (in this case, .NET, C#, and MVC).&amp;nbsp; There’s &lt;a href="http://www.pluralsight-training.net/microsoft/players/PSODPlayer?author=kevin-kuebler&amp;amp;name=introduction-to-orchard&amp;amp;mode=live&amp;amp;clip=0&amp;amp;course=orchard-fundamentals"&gt;a great introductory course on Pluralsight (intro module is free)&lt;/a&gt; by my fellow NimblePros employee Kevin Kuebler, too, if you’d like some help getting started.&amp;nbsp; Migrating to Orchard was fairly straightforward.&amp;nbsp; I used &lt;a href="http://johnpapa.net/orchardpart1"&gt;John Papa’s blog series on migrating from Graffiti to Orchard&lt;/a&gt; as my primary guide, and it was a huge help.&amp;nbsp; The data migration involved pulling the data out of Graffiti into BlogML, and then sucking in the BlogML back into Orchard.&amp;nbsp; I &lt;a href="https://bitbucket.org/jonsagara/graffititoblogml/pull-request/1/pull-please"&gt;cleaned up the code for doing this a bit&lt;/a&gt;, though the comments are still all wrapped in &amp;lt;p&amp;gt;…&amp;lt;/p&amp;gt;, so use &lt;a href="http://johnpapa.net/orchardpart2"&gt;John’s script&lt;/a&gt; to fix that.&amp;nbsp; The latest version of the &lt;a href="https://bitbucket.org/jonsagara/graffititoblogml/overview"&gt;GraffitiToBlogML code should be here&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;I’m hoping to get Disqus set up for my comments soon (using &lt;a href="http://ithoughthecamewithyou.com/post/Convert-BlogML-comments-to-XWR-for-Disqus.aspx"&gt;this tool to import from BlogML to WXR&lt;/a&gt;), as well as to migrate my old blog data from AspAdvice.com, ArmyAdvice.com, and asp.net/blogs, so that all of my blogging for the last decade can all live here.&amp;nbsp; And hopefully this new account will perform better than the old one – I know I was losing visitors who came to my old site and found it unresponsive and left.&amp;nbsp; If you’re reading this, thanks for sticking with me!&amp;nbsp; :)&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/rtBHv65DYWNBMYyws21wZ1IRRwE/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/rtBHv65DYWNBMYyws21wZ1IRRwE/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/rtBHv65DYWNBMYyws21wZ1IRRwE/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/rtBHv65DYWNBMYyws21wZ1IRRwE/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.stevesmithblog.com/~ff/StevenSmith?a=FrBYjD_UF9Q:Fr9TnEVrArs:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/StevenSmith?i=FrBYjD_UF9Q:Fr9TnEVrArs:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.stevesmithblog.com/~ff/StevenSmith?a=FrBYjD_UF9Q:Fr9TnEVrArs:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/StevenSmith?i=FrBYjD_UF9Q:Fr9TnEVrArs:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.stevesmithblog.com/~ff/StevenSmith?a=FrBYjD_UF9Q:Fr9TnEVrArs:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/StevenSmith?i=FrBYjD_UF9Q:Fr9TnEVrArs:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/StevenSmith/~4/FrBYjD_UF9Q" height="1" width="1"/&gt;</description><pubDate>Thu, 26 Jan 2012 20:43:53 GMT</pubDate><guid isPermaLink="true">http://ardalis.com:80/updating-blog-to-orchard-and-switching-domains</guid></item><item><title>About Steve</title><link>http://ardalis.com:80/About</link><description>&lt;p&gt;Hi, I'm Steve Smith.&amp;nbsp; I go by Ardalis online because, well, you'd understand if your name was &lt;a href="http://en.wikipedia.org/wiki/Steven_Smith"&gt;Steve Smith&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;This is now the fifth place I've had a blog, if you don't count my initial home page and articles on ASPAlliance.com, which were somewhat blog-like but preceded the term.&amp;nbsp; Unlike my past blog moves (from the ASP.NET/blogs site to AspAdvice.com/blogs and my ArmySteve.com / ArmyAdvice.com/blogs/ArmySteve blogs, and then from there to SteveSmithBlog.com), this time I'm pulling everything into one place.&amp;nbsp; So far I only have the most recent stuff here, but soon you should see content dating back to 10 years ago, all in one easy to find location.&lt;/p&gt;
&lt;p&gt;If you're here, you've found my blog.&amp;nbsp; You may also wish to stalk me via other means:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://twitter.com/ardalis"&gt;Twitter (@ardalis)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.facebook.com/StevenAndrewSmith"&gt;Facebook&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.linkedin.com/in/stevenandrewsmith"&gt;LinkedIn&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://plus.google.com/108098990198986419468/posts"&gt;Google+&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://flickr.com/photos/lakequincy/"&gt;Flickr&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Here's some more info on me, which is slightly outdated at the moment (Jan 2012).&lt;/p&gt;
&lt;p&gt;Steve Smith is currently a Senior Architect with &lt;a href="http://codeproject.com/"&gt;The Code Project&lt;/a&gt; and CTO of &lt;a href="http://lakequincy.com/"&gt;Lake Quincy Media&lt;/a&gt;, which he co-founded in 2005.&amp;nbsp; He also founded and continues to run &lt;a href="http://aspalliance.com/"&gt;ASPAlliance.com&lt;/a&gt;, a popular resource for Microsoft programmers.&amp;nbsp; He is a Microsoft &lt;a href="http://theregion.com/profile.aspx?rd=1322"&gt;Regional Director&lt;/a&gt;, an ASP.NET MVP (&lt;a href="https://mvp.support.microsoft.com/profile=179854D4-7379-472E-A6BD-ECD2687C7F47"&gt;profile&lt;/a&gt;), an &lt;a href="http://ineta.org/Speakers/Speakers.aspx"&gt;INETA Speaker&lt;/a&gt;, and an &lt;a href="http://aspinsiders.com/"&gt;ASPInsider&lt;/a&gt;.&amp;nbsp; He's written or contributed to several books on ASP.NET and related topics and is a frequent speaker at industry conferences such as DevConnections and TechEd.&amp;nbsp; Steve also founded and organizes the &lt;a href="http://hudsonsc.com/"&gt;Hudson Software Craftsmanship&lt;/a&gt; group in Hudson, Ohio, where he and his wife Michelle also own &lt;a href="http://distinctivespacesllc.com"&gt;office space&lt;/a&gt; and she manages their agile consulting company, &lt;a href="http://nimblepros.com/"&gt;NimblePros.com&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Steve is a US Army veteran who served in Iraq as a combat engineer platoon leader tasked with finding and destroying unexploded ordnance and clearing IEDs.&amp;nbsp; He received his honorable discharge as an army Captain in 2005 and is now happy to be 100% a civilian.&lt;/p&gt;
&lt;p&gt;Steve lives in Ohio with his wife and business partner Michelle, their daughter Ilyana, and son Nikita.&amp;nbsp; When he's not trying to keep up with his business or technology, Steve enjoys games, bicycling, and karate.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;History&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;In January 2012 I moved my blog from SteveSmithBlog.com to Ardalis.com, which is shorter, more memorable, and lines up with my twitter alias.&lt;/p&gt;
&lt;p&gt;In July 2008 I moved my blog from &lt;a href="http://aspadvice.com/blogs/ssmith"&gt;AspAdvice.com/blogs/ssmith&lt;/a&gt; to my own domain, SteveSmithBlog.com.&amp;nbsp; I'm keeping all the old content at the old blog, as well as my previous &lt;a href="http://armyadvice.com/blogs/armysteve/"&gt;Army blog that I kept while I was in Iraq in 2004&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/URQUfKTmxjNMKDC9Zt2uLaNiVbQ/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/URQUfKTmxjNMKDC9Zt2uLaNiVbQ/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/URQUfKTmxjNMKDC9Zt2uLaNiVbQ/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/URQUfKTmxjNMKDC9Zt2uLaNiVbQ/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.stevesmithblog.com/~ff/StevenSmith?a=unUEibo1wKA:0qdIBWipETI:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/StevenSmith?i=unUEibo1wKA:0qdIBWipETI:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.stevesmithblog.com/~ff/StevenSmith?a=unUEibo1wKA:0qdIBWipETI:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/StevenSmith?i=unUEibo1wKA:0qdIBWipETI:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.stevesmithblog.com/~ff/StevenSmith?a=unUEibo1wKA:0qdIBWipETI:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/StevenSmith?i=unUEibo1wKA:0qdIBWipETI:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/StevenSmith/~4/unUEibo1wKA" height="1" width="1"/&gt;</description><pubDate>Wed, 25 Jan 2012 23:13:46 GMT</pubDate><guid isPermaLink="true">http://ardalis.com:80/About</guid></item><item><title>Asus Zen Ultrabook First Impressions</title><link>http://ardalis.com:80/Asus-Zen-Ultrabook-First-Impressions</link><description>&lt;p&gt;Last week a received a new &lt;a href="http://amzn.to/yEuObA"&gt;Asus UX31E Zenbook Ultrabook laptop computer&lt;/a&gt;, which I’ve been putting through the paces.&amp;#160; I’d like to write up my thoughts on the unboxing and my initial impression of the machine, and I’ll write more in a few weeks once I’ve had some more time to use it.&amp;#160; Overall, I really like it so far.&amp;#160; It’s thin, light, shiny, and feels solidly put together.&amp;#160; It’s also extremely fast to start up and has a very reasonable active use battery life and a better sleep/standby battery life than any laptop I’ve ever owned.&lt;/p&gt;  &lt;h2&gt;Unboxing&lt;/h2&gt;  &lt;p&gt;I got my &lt;a href="http://amzn.to/yEuObA"&gt;Asus Zenbook Ultrabook on Amazon&lt;/a&gt;, so of course it came in an Amazon box.&amp;#160; Inside the Amazon box was the Asus box:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://stevesmithblog.com/files/media/image/Windows-Live-Writer/Asus-Zen-Ultrabook-First-Impressions_EBCB/WP_000091_2.jpg"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="WP_000091" border="0" alt="WP_000091" src="http://stevesmithblog.com/files/media/image/Windows-Live-Writer/Asus-Zen-Ultrabook-First-Impressions_EBCB/WP_000091_thumb.jpg" width="644" height="484" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;And inside the Asus shipping box is the actual Zenbook packaging:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://stevesmithblog.com/files/media/image/Windows-Live-Writer/Asus-Zen-Ultrabook-First-Impressions_EBCB/WP_000094_2.jpg"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="WP_000094" border="0" alt="WP_000094" src="http://stevesmithblog.com/files/media/image/Windows-Live-Writer/Asus-Zen-Ultrabook-First-Impressions_EBCB/WP_000094_thumb.jpg" width="644" height="484" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;After removing a bit of shrink wrap, this box opens to reveal the Zenbook and its accessories:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://stevesmithblog.com/files/media/image/Windows-Live-Writer/Asus-Zen-Ultrabook-First-Impressions_EBCB/WP_000096_2.jpg"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="WP_000096" border="0" alt="WP_000096" src="http://stevesmithblog.com/files/media/image/Windows-Live-Writer/Asus-Zen-Ultrabook-First-Impressions_EBCB/WP_000096_thumb.jpg" width="644" height="484" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;After a bit of unpacking and cleaning up some of the Russian nesting doll style boxes, the components look like this:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://stevesmithblog.com/files/media/image/Windows-Live-Writer/Asus-Zen-Ultrabook-First-Impressions_EBCB/WP_000097_2.jpg"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="WP_000097" border="0" alt="WP_000097" src="http://stevesmithblog.com/files/media/image/Windows-Live-Writer/Asus-Zen-Ultrabook-First-Impressions_EBCB/WP_000097_thumb.jpg" width="644" height="484" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The laptop is incredibly thin.&amp;#160; Here it is compared to a thin Bic pen on my desk:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://stevesmithblog.com/files/media/image/Windows-Live-Writer/Asus-Zen-Ultrabook-First-Impressions_EBCB/WP_000102_2.jpg"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="WP_000102" border="0" alt="WP_000102" src="http://stevesmithblog.com/files/media/image/Windows-Live-Writer/Asus-Zen-Ultrabook-First-Impressions_EBCB/WP_000102_thumb.jpg" width="644" height="484" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;It comes with a magnetic clasp carrying sleeve, which I really like.&amp;#160; It’s handy to slide the Zenbook in and out of, and it has a nice texture and feel to it, in addition to feeling pretty durable (though it’s too early to say how well it holds up to real usage).&amp;#160; Because it’s so thin, the Zenbook doesn’t have ports for Ethernet and VGA, opting instead to support only thinner ports like USB and micro-HDMI.&amp;#160; It comes with a small accessory bag and two adapters:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;A USB to Ethernet/RJ-45 adapter &lt;/li&gt;    &lt;li&gt;A micro-HDMI to VGA adapter &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://stevesmithblog.com/files/media/image/Windows-Live-Writer/Asus-Zen-Ultrabook-First-Impressions_EBCB/WP_000100_2.jpg"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="WP_000100" border="0" alt="WP_000100" src="http://stevesmithblog.com/files/media/image/Windows-Live-Writer/Asus-Zen-Ultrabook-First-Impressions_EBCB/WP_000100_thumb.jpg" width="644" height="484" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;I do have two small complaints about the accessories.&amp;#160; Firstly, I wish it came with an HDMI adapter, since our office projector supports HDMI.&amp;#160; That said, I wouldn’t want to give up the VGA adapter, since that’s still the universal standard for projectors everywhere.&amp;#160; Secondly, the accessory bag, while compact and stylishly a match for the larger Zenbook sleeve, does not actually fit into the sleeve.&amp;#160; Likewise, the power adapter certainly doesn’t fit into the sleeve, so you’ll certainly still need some kind of proper laptop bag or backpack to hold these things.&amp;#160; It would have been nice if the sleeve somehow could be just as slick and portable as it is now while still somehow being able to hold the adapters and/or the accessory bag, but I suspect those two desires are simply incompatible with real-world space constraints.&lt;/p&gt;  &lt;p&gt;To support standard HDMI output from the Zenbook, I’ll most likely pick up one of these &lt;a href="http://amzn.to/wA3lhK"&gt;HDMI Female to Micro HDMI Mail Adapters for under $3&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;The front and back of the Zenbook are very simple.&amp;#160; The smooth finish is great to look at and has a nice, slick feel to it.&amp;#160; The sleeve, again, is a nice addition to the package, as I’m sure it will protect the Zenbook from fingerprints and accidentally slipping from my fingers in transit.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://stevesmithblog.com/files/media/image/Windows-Live-Writer/Asus-Zen-Ultrabook-First-Impressions_EBCB/WP_000101_2.jpg"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="WP_000101" border="0" alt="WP_000101" src="http://stevesmithblog.com/files/media/image/Windows-Live-Writer/Asus-Zen-Ultrabook-First-Impressions_EBCB/WP_000101_thumb.jpg" width="244" height="184" /&gt;&lt;/a&gt;&lt;a href="http://stevesmithblog.com/files/media/image/Windows-Live-Writer/Asus-Zen-Ultrabook-First-Impressions_EBCB/WP_000104_2.jpg"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="WP_000104" border="0" alt="WP_000104" src="http://stevesmithblog.com/files/media/image/Windows-Live-Writer/Asus-Zen-Ultrabook-First-Impressions_EBCB/WP_000104_thumb.jpg" width="244" height="184" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The power adapter is light and the connector the the Zenbook itself is tiny.&amp;#160; I think it’s smaller than a standard 3.5mm headphone jack, though I haven’t measured it or tried to plug my headphones into the power port of the laptop (yet).&amp;#160; I certainly appreciate having a light power supply, since I’ve had laptops in the past with power bricks that weighed (literally) more than the Zenbook itself (I’m looking at you, Alienware).&lt;/p&gt;  &lt;p&gt;&lt;a href="http://stevesmithblog.com/files/media/image/Windows-Live-Writer/Asus-Zen-Ultrabook-First-Impressions_EBCB/WP_000105_2.jpg"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="WP_000105" border="0" alt="WP_000105" src="http://stevesmithblog.com/files/media/image/Windows-Live-Writer/Asus-Zen-Ultrabook-First-Impressions_EBCB/WP_000105_thumb.jpg" width="644" height="484" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Once you open up the machine, it has a nice-sized screen, a huge trackpad, built-in speakers on the inside of the screen’s hinge, a webcam, and the same smooth metal finish found on the outside case.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://stevesmithblog.com/files/media/image/Windows-Live-Writer/Asus-Zen-Ultrabook-First-Impressions_EBCB/WP_000106_2.jpg"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="WP_000106" border="0" alt="WP_000106" src="http://stevesmithblog.com/files/media/image/Windows-Live-Writer/Asus-Zen-Ultrabook-First-Impressions_EBCB/WP_000106_thumb.jpg" width="644" height="484" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;h2&gt;Starting For The First Time&lt;/h2&gt;  &lt;p&gt;The Zenbook comes with Windows 7 Home Premium 64-bit.&amp;#160; It also has the Bing Bar installed automatically, but this is the only “crapware” that seems to come preinstalled on the device.&amp;#160; I left the Bing Bar running for almost a day before it annoyed me enough to remove it (I did try to give it a fair chance).&lt;/p&gt;  &lt;p&gt;&lt;a href="http://stevesmithblog.com/files/media/image/Windows-Live-Writer/Asus-Zen-Ultrabook-First-Impressions_EBCB/WP_000108_2.jpg"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="WP_000108" border="0" alt="WP_000108" src="http://stevesmithblog.com/files/media/image/Windows-Live-Writer/Asus-Zen-Ultrabook-First-Impressions_EBCB/WP_000108_thumb.jpg" width="244" height="184" /&gt;&lt;/a&gt;&lt;a href="http://stevesmithblog.com/files/media/image/Windows-Live-Writer/Asus-Zen-Ultrabook-First-Impressions_EBCB/WP_000109_2.jpg"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="WP_000109" border="0" alt="WP_000109" src="http://stevesmithblog.com/files/media/image/Windows-Live-Writer/Asus-Zen-Ultrabook-First-Impressions_EBCB/WP_000109_thumb.jpg" width="244" height="184" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Once you’ve started, you’ll see some information about Instant On, which theoretically is a unique Asus technology that saves power and speeds boot time for the computer.&amp;#160; I turned it on and the default desktop widget that displays expected Standby Time doubled as a result.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://stevesmithblog.com/files/media/image/Windows-Live-Writer/Asus-Zen-Ultrabook-First-Impressions_EBCB/WP_000111_2.jpg"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="WP_000111" border="0" alt="WP_000111" src="http://stevesmithblog.com/files/media/image/Windows-Live-Writer/Asus-Zen-Ultrabook-First-Impressions_EBCB/WP_000111_thumb.jpg" width="244" height="184" /&gt;&lt;/a&gt;&lt;a href="http://stevesmithblog.com/files/media/image/Windows-Live-Writer/Asus-Zen-Ultrabook-First-Impressions_EBCB/WP_000112_2.jpg"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="WP_000112" border="0" alt="WP_000112" src="http://stevesmithblog.com/files/media/image/Windows-Live-Writer/Asus-Zen-Ultrabook-First-Impressions_EBCB/WP_000112_thumb.jpg" width="244" height="184" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Asus also has an automatic update service running, which is set up nearly identically to Windows Update.&amp;#160; You’ll want to make sure you get the latest drivers via Asus Update, as I have heard of others having issues that were resolved by these updates.&amp;#160; One common issue I’ve seen relates to the trackpad.&amp;#160; It’s different from others I’ve used, as it is both more sensitive to touch and by default somewhat slower (in terms of how fast the mouse pointer moves on the screen based on how far you move your finger – adjustable in Windows).&amp;#160; The left and right “buttons” are actually just regions on the touchpad, too, and so occasionally I’ve accidentally dragged things as I was trying to click.&amp;#160; These are I’m sure just things I need to get used to.&amp;#160; I’ve also read others’ complaints about the keyboard.&amp;#160; It, too, is different from most laptop keyboards I’ve used, but I haven’t had any problems with it, and I’m a relatively fast touch typist.&amp;#160; It requires some getting used to, just like riding a new and unfamiliar bicycle, but once you’re acclimated to it, it’s fine in my so far limited experience.&lt;/p&gt;  &lt;p&gt;The one other oddity I noticed so far is that the power button is placed where the Delete button usually goes (and the delete key is just to the left of the power key).&amp;#160; I almost, once, hit the power button while going for the delete key.&amp;#160; I’m pretty sure it just would have gone to sleep (which it does quite quickly) and I’d have simply had to wake it back up (also very quick), but I caught myself and have had no issue with remembering where the del key is since.&lt;/p&gt;  &lt;p&gt;&lt;em&gt;Disclosure of Material Connection: I received one or more of the products or services mentioned above for free in the hope that I would mention it on my blog. Regardless, I only recommend products or services I use personally and believe my readers will enjoy. I am disclosing this in accordance with the &lt;a href="http://www.access.gpo.gov/nara/cfr/waisidx_03/16cfr255_03.html"&gt;Federal Trade Commission’s 16 CFR, Part 255: “Guides Concerning the Use of Endorsements and Testimonials in Advertising.”&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;Here’s another &lt;a href="http://reviews.cnet.com/laptops/asus-zenbook-ux31e-dh52/4505-3121_7-35033683.html"&gt;review of the Zenbook on CNET&lt;/a&gt; you may find interesting if you read this far.&amp;#160; I agree with their sentiment, “who doesn't want a thin, unibody metal lightweight laptop that starts fast and has a great battery life?”&lt;/p&gt;  &lt;div class="lqm_ad" lqm_format="1x1" lqm_zone="ron" lqm_publisher="lqm.stevesmith.site"&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/kY9QkY-ge81PC9kde6I9tZfJb7Q/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/kY9QkY-ge81PC9kde6I9tZfJb7Q/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/kY9QkY-ge81PC9kde6I9tZfJb7Q/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/kY9QkY-ge81PC9kde6I9tZfJb7Q/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.stevesmithblog.com/~ff/StevenSmith?a=X-YKDQrPXhU:NXOs6hSHZp4:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/StevenSmith?i=X-YKDQrPXhU:NXOs6hSHZp4:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.stevesmithblog.com/~ff/StevenSmith?a=X-YKDQrPXhU:NXOs6hSHZp4:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/StevenSmith?i=X-YKDQrPXhU:NXOs6hSHZp4:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.stevesmithblog.com/~ff/StevenSmith?a=X-YKDQrPXhU:NXOs6hSHZp4:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/StevenSmith?i=X-YKDQrPXhU:NXOs6hSHZp4:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/StevenSmith/~4/X-YKDQrPXhU" height="1" width="1"/&gt;</description><pubDate>Wed, 25 Jan 2012 09:18:11 GMT</pubDate><guid isPermaLink="true">http://ardalis.com:80/Asus-Zen-Ultrabook-First-Impressions</guid></item><item><title>Run Your Unit Tests in Parallel to Maximize Performance</title><link>http://ardalis.com:80/Run-Your-Unit-Tests-in-Parallel-to-Maximize-Performance</link><description>&lt;p&gt;If you’re at all serious about testing, at some point you’re going to have a rather large suite of tests that need to run, and you’ll find that your builds are taking longer than you would like because of how long the tests run.&amp;#160; For example, consider this suite of 24 tests, each one of which looks like this one:&lt;/p&gt;  &lt;p&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://stevesmithblog.com/files/media/image/Windows-Live-Writer/b42b44dd7c37_12B1D/image_3.png" width="246" height="106" /&gt;&lt;/p&gt;  &lt;p&gt;If you run 24 of these, it’s going to take about 24 seconds, by default:&lt;/p&gt;  &lt;p&gt;&lt;img style="display: inline" title="image" alt="image" src="http://stevesmithblog.com/files/media/image/Windows-Live-Writer/b42b44dd7c37_12B1D/image_6.png" width="640" height="123" /&gt;&lt;/p&gt;  &lt;p&gt;Now of course &lt;a href="http://stevesmithblog.com/blog/unit-test-or-integration-test-and-why-you-should-care/"&gt;it’s important to keep your unit tests and integration tests separate and to know which is which&lt;/a&gt;, but even once you’ve done that, anything you can do to speed up your test execution times is going to be a big help to your productivity.&amp;#160; Slow builds due to slow tests kill productivity:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://xkcd.com/303/"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://stevesmithblog.com/files/media/image/Windows-Live-Writer/b42b44dd7c37_12B1D/image_11.png" width="244" height="213" /&gt;&lt;/a&gt;&lt;a href="http://stevesmithblog.com/files/media/image/Windows-Live-Writer/b42b44dd7c37_12B1D/image_10.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://stevesmithblog.com/files/media/image/Windows-Live-Writer/b42b44dd7c37_12B1D/image_thumb_3.png" width="244" height="213" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;One simple way you can speed up your tests is to run them in parallel.&amp;#160; Doing so with MSTest is actually extremely easy to do, although it’s not at all obvious how to do it, since the setting you need to adjust is hidden away and has no user interface exposed.&amp;#160; The really cool thing is that, after you make the change, even if you don’t use the Visual Studio built-in test runner, your tests will run in parallel.&lt;/p&gt;  &lt;h2&gt;Enabling Parallel Testing in MSTest&lt;/h2&gt;  &lt;p&gt;Like most of the settings used by MSTest, the setting you need to tweak to enable parallel unit test execution is in the .testsettings file that you’re using.&amp;#160; In a brand new test project, you should have a Local.testsettings file, like this one:&lt;/p&gt;  &lt;p&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://stevesmithblog.com/files/media/image/Windows-Live-Writer/b42b44dd7c37_12B1D/image_14.png" width="244" height="197" /&gt;&lt;/p&gt;  &lt;p&gt;If you open this file and click through the various settings boxes, you won’t find anything there related to test parallization.&amp;#160; Go ahead and look.&amp;#160; Ok, satisfied now?&amp;#160; Good, let’s move on.&lt;/p&gt;  &lt;p&gt;Now, if you right-click on the file and open it with an XML Editor, you’ll find some more interesting settings.&lt;/p&gt;  &lt;p&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://stevesmithblog.com/files/media/image/Windows-Live-Writer/b42b44dd7c37_12B1D/image_17.png" width="244" height="150" /&gt;&lt;/p&gt;  &lt;p&gt;Here’s the default XML file:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://stevesmithblog.com/files/media/image/Windows-Live-Writer/b42b44dd7c37_12B1D/image_19.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://stevesmithblog.com/files/media/image/Windows-Live-Writer/b42b44dd7c37_12B1D/image_thumb_6.png" width="644" height="144" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;If you go click on the &amp;lt;Execution&amp;gt; element, and attempt to add an attribute to it, you should get some Intellisense/statement completion, showing you what the acceptable attributes are:&lt;/p&gt;  &lt;p&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://stevesmithblog.com/files/media/image/Windows-Live-Writer/b42b44dd7c37_12B1D/image_22.png" width="244" height="83" /&gt;&lt;/p&gt;  &lt;p&gt;In this case, the option you want is parallelTestCount.&amp;#160; If you simply set it to 0, the system will automatically choose a number of parallel tests equal to the number of cores detected on your system.&amp;#160; In my case, I have a 4-core machine, so it will use 4 cores.&amp;#160; Save the file. &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: Typically at this point if you re-run your tests, they will continue to run one-at-a-time.&amp;#160; The .testsettings files are cached and are not read immediately when you make changes to them.&amp;#160; I’ve had success getting them to update by going to the Test View window and hitting the Refresh button there, but if that fails you could simply try closing Visual Studio and re-opening it and your project.&lt;/p&gt;  &lt;p&gt;Run your tests again.&amp;#160; Here’s a screenshot showing them running in the Visual Studio test runner.&amp;#160; You can see there are 4 tests In Progress at the same time:&lt;/p&gt;  &lt;p&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://stevesmithblog.com/files/media/image/Windows-Live-Writer/b42b44dd7c37_12B1D/image_25.png" width="244" height="170" /&gt;&lt;/p&gt;  &lt;p&gt;Of course, you can also set the value to a number that exceeds the number of (apparent) cores on your system.&amp;#160; I’ve gotten it to work with as many as 16 on one machine, but on the one I’m working on now, it fails once it exceeds 5 cores.&amp;#160; According to a friend of mine, there is a hotfix available that fixes this bug and allows VS2008/VS2010 to use this setting with a parallelTestCount &amp;gt; 5, and apparently this already works in some environments without this hotfix (such as my laptop).&amp;#160; Likewise, I was able to run tests in parallel using ReSharper’s test runner on my laptop, but on this desktop machine running the latest 6.1 version of R# it is only running one test at a time.&lt;/p&gt;  &lt;p&gt;Nonetheless, if you set the value to 5 and run my suite of 24 1s tests, the entire suite executes in about 5 seconds.&amp;#160; That’s an 80% reduction in total test time, which is pretty amazing, and of course this number gets even bigger if you make it larger (assuming you have the hardware to support it).&lt;/p&gt;  &lt;h2&gt;Caveats&lt;/h2&gt;  &lt;p&gt;You need to be using MSTest.&amp;#160; This doesn’t work with NUnit.&lt;/p&gt;  &lt;p&gt;You may need to be using the Visual Studio built-in test runner.&amp;#160; I had it working with the ReSharper test runner, but it’s not working now on this machine, so YMMV.&lt;/p&gt;  &lt;p&gt;You may not be able to exceed &amp;lt;Execution parallelTestCount=&amp;quot;5&amp;quot;&amp;gt;.&amp;#160; If you need to do so, contact Microsoft support for the hotfix.&amp;#160; If it’s a publicly available link, please link to it in the comments below.&lt;/p&gt;  &lt;p&gt;Your tests should be thread-safe and side effect free.&amp;#160; This rules out most integration tests (&lt;a href="http://stevesmithblog.com/blog/unit-test-or-integration-test-and-why-you-should-care/"&gt;what’s the difference between unit tests and integration tests?&lt;/a&gt;).&amp;#160; You also need to be very careful about any use of global state.&amp;#160; Here’s simple example of a test suite that passes when run sequentially but fails when run in parallel (click to open in new window):&lt;/p&gt;  &lt;p&gt;&lt;a href="http://stevesmithblog.com/files/media/image/Windows-Live-Writer/b42b44dd7c37_12B1D/image_27.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://stevesmithblog.com/files/media/image/Windows-Live-Writer/b42b44dd7c37_12B1D/image_thumb_9.png" width="644" height="432" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;h2&gt;Summary&lt;/h2&gt;  &lt;p&gt;Especially as CPUs continue to ship with greater and greater numbers of cores, rather than faster clock speeds, the ability to take advantage of the potential performance of these systems will depend on our ability to perform operations in parallel.&amp;#160; One area in which MSTest currently has the lead on alternatives like NUnit is in parallel test execution, and I hope that the next version of Visual Studio improves upon this feature and makes it more discoverable and addresses some of the current issues it suffers from.&amp;#160; I have confirmed that the XML attribute and test runner behavior in the Visual Studio 11 CTP distributed at the BUILD conference in September 2011 work just as they do today in VS2010.&lt;/p&gt;  &lt;p&gt;You can view and &lt;a href="https://bitbucket.org/ardalis/paralleltests"&gt;download the sample code from its BitBucket Mercurial Repository here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/FHgN63iP6bVAD6-RvrPJ5Mbb2bs/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/FHgN63iP6bVAD6-RvrPJ5Mbb2bs/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/FHgN63iP6bVAD6-RvrPJ5Mbb2bs/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/FHgN63iP6bVAD6-RvrPJ5Mbb2bs/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.stevesmithblog.com/~ff/StevenSmith?a=uWZPU7gPhgc:sWSeYsOllKs:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/StevenSmith?i=uWZPU7gPhgc:sWSeYsOllKs:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.stevesmithblog.com/~ff/StevenSmith?a=uWZPU7gPhgc:sWSeYsOllKs:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/StevenSmith?i=uWZPU7gPhgc:sWSeYsOllKs:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.stevesmithblog.com/~ff/StevenSmith?a=uWZPU7gPhgc:sWSeYsOllKs:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/StevenSmith?i=uWZPU7gPhgc:sWSeYsOllKs:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/StevenSmith/~4/uWZPU7gPhgc" height="1" width="1"/&gt;</description><pubDate>Thu, 19 Jan 2012 02:05:09 GMT</pubDate><guid isPermaLink="true">http://ardalis.com:80/Run-Your-Unit-Tests-in-Parallel-to-Maximize-Performance</guid></item><item><title>Unit Test or Integration Test and Why You Should Care</title><link>http://ardalis.com:80/Unit-Test-or-Integration-Test-and-Why-You-Should-Care</link><description>&lt;p&gt;There remains a fair bit of confusion about what constitutes which kind of test.&amp;#160; Many developers are fairly new to testing, and tend to call any tests of their code “unit tests” even when they’re dealing with something substantially larger than a unit.&amp;#160; The tools don’t really help much here, since the various test runner frameworks all call themselves unit test frameworks, and the various test runners themselves almost universally refer to the tests they run as “unit tests” whether they are or not.&amp;#160; For instance, Visual Studio 2010 starts every new Test Project with a class called UnitTest1 and lets you add a new Unit Test, but nowhere does it mention Integration Tests, Acceptance Tests, Smoke Tests, etc, as you use the same code templates to create each of these.&lt;/p&gt;  &lt;h3&gt;Visual Studio 2010&lt;/h3&gt;  &lt;p&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://stevesmithblog.com/files/media/image/Windows-Live-Writer/57c036e98a36_12C55/image_6.png" width="644" height="251" /&gt;&lt;/p&gt;  &lt;p&gt;ReSharper and most other add-in test runners follow the same convention – if you ran run it as a test on your code, it’s probably going to be referred to as a &lt;em&gt;Unit Test&lt;/em&gt;.&lt;/p&gt;  &lt;h3&gt;ReSharper 6.1&lt;/h3&gt;  &lt;p&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://stevesmithblog.com/files/media/image/Windows-Live-Writer/57c036e98a36_12C55/image_5.png" width="644" height="342" /&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;So what constitutes a &lt;em&gt;unit test&lt;/em&gt;, and what constitutes an &lt;em&gt;integration test&lt;/em&gt;?&amp;#160; What about other kinds of tests beyond these two?&amp;#160; There’s a decent &lt;a href="http://stackoverflow.com/a/520116"&gt;StackOverflow answer related to this topic&lt;/a&gt;, which lists several kinds of tests and their definitions.&amp;#160; Here is what it has to say about Unit Tests and Integration Tests, specifically:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;     &lt;p&gt;&lt;strong&gt;Unit test&lt;/strong&gt;: Specify and test one point of the contract of single method of a class. This should have a very narrow and well defined scope. Complex dependencies and interactions to the outside world are &lt;a href="http://martinfowler.com/articles/mocksArentStubs.html"&gt;stubbed or mocked&lt;/a&gt;.&lt;/p&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;p&gt;&lt;strong&gt;Integration test&lt;/strong&gt;: Test the correct inter-operation of multiple subsystems. There is whole spectrum there, from testing integration between two classes, to testing integration with the production environment.&lt;/p&gt;   &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;I have my own definition of a unit test, which is that it’s a test that only tests a single path through a single method.&amp;#160; More importantly, it’s a test that has zero dependencies on infrastructure, or on code outside of your control.&amp;#160; Unit tests should run fast – as in very, very fast – because they aren’t touching file systems, databases, networks, email servers, system clocks, etc.&amp;#160; They run your code.&amp;#160; Period.&amp;#160; If you have code that has dependencies, you need to remove them when running your unit tests, typically by using mocks, fakes, or stubs.&amp;#160; I’ve written before about dependencies, if you’re not sure what I mean:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://stevesmithblog.com/blog/avoiding-dependencies/"&gt;Avoiding Dependencies&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://stevesmithblog.com/blog/insidious-dependencies/"&gt;Insidious Dependencies&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://stevesmithblog.com/blog/avoid-entrenched-dependencies/"&gt;Avoid Entrenched Dependencies&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;If you have a test that depends on any of the dependencies listed in the above posts, then you have an integration test.&amp;#160; Integration tests are great and necessary, but they’re generally at least an order of magnitude slower than unit tests, and as such you’re going to be able to run far fewer of them in a given amount of time.&amp;#160; Therefore, you want to write as many &lt;em&gt;unit&lt;/em&gt; tests as you can, and write &lt;em&gt;integration&lt;/em&gt; tests for things unit tests can’t do (like actually testing your infrastructure and interactions between components).&amp;#160; Basically, you want to follow the Test Pyramid, just like in the United States people are encouraged to eat based on the &lt;a href="http://www.nal.usda.gov/fnic/Fpyr/pmap.htm"&gt;Food Pyramid&lt;/a&gt; (with one key difference being that the Test Pyramid is probably better advice and is less controversial).&lt;/p&gt;  &lt;p&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://stevesmithblog.com/files/media/image/Windows-Live-Writer/57c036e98a36_12C55/image_9.png" width="646" height="433" /&gt;&lt;/p&gt;      &lt;p&gt;Basically, you want a lot more servings of Unit Tests in your daily diet than Integration Tests, and remember that UI tests, being the most expensive and usually the most brittle, are a &lt;a href="http://www.youtube.com/watch?v=iH9IO6iMO78"&gt;sometimes food&lt;/a&gt;.&lt;/p&gt;  &lt;h2&gt;How Can You Tell if a Test is a Unit Test or an Integration Test?&lt;/h2&gt;  &lt;p&gt;Here are some quick questions you can use to qualify your tests.&amp;#160; There may be some exceptions to these rules, but these are generally good guidelines.&amp;#160; It’s usually a good idea to separate your unit and integration tests, either as separate projects/assemblies, or at least using separate categories, so that you can run them separately.&amp;#160; You’ll want to run the unit tests all the time, and they should be fast enough that doing so isn’t too painful.&amp;#160; You’ll want to run the integration tests as often as you can bear to do so, but often these take long enough to run that you don’t want to run them with every compile or before every check-in.&lt;/p&gt;  &lt;p&gt;Q: Does the System Under Test (SUT) require an installed and configured and available database in order to run the test successfully?&lt;/p&gt;  &lt;p&gt;A: If yes, then it’s an Integration Test&lt;/p&gt;  &lt;p&gt;Q: Does the SUT talk to the file system?&lt;/p&gt;  &lt;p&gt;A: If yes, then it’s an Integration Test&lt;/p&gt;  &lt;p&gt;Q: Does the SUT reference configuration files directly?&lt;/p&gt;  &lt;p&gt;A: See previous question.&amp;#160; It’s an Integration Test.&lt;/p&gt;  &lt;p&gt;Q: Does the SUT reference a service over the network?&lt;/p&gt;  &lt;p&gt;A: If yes, then it’s an Integration Test&lt;/p&gt;  &lt;p&gt;Q: Does the test take more than 10ms to execute?&lt;/p&gt;  &lt;p&gt;A: If yes, it’s very likely an Integration Test, or at the very least it may be possible to refactor it to run faster.&lt;/p&gt;  &lt;p&gt;Q: Does the SUT send emails as part of the test execution, even via a local SMTP server like &lt;a href="http://smtp4dev.codeplex.com"&gt;smtp4dev&lt;/a&gt;?&lt;/p&gt;  &lt;p&gt;A: If yes, then it’s an Integration Test.&lt;/p&gt;  &lt;p&gt;Q: Does the SUT depend on the system clock?&amp;#160; Are there certain days of the week or times of day when it would behave differently?&lt;/p&gt;  &lt;p&gt;A: If yes, then it’s an Integration Test.&lt;/p&gt;  &lt;p&gt;Q: Does the test make use of a mocking framework?&lt;/p&gt;  &lt;p&gt;A: If yes, then it’s likely a Unit Test.&amp;#160; Generally you shouldn’t need to mock much in your integration tests, or you risk not actually testing your system.&lt;/p&gt;  &lt;h2&gt;References&lt;/h2&gt;  &lt;p&gt;MSDN describes &lt;a href="http://msdn.microsoft.com/en-us/library/aa292197"&gt;Unit Testing&lt;/a&gt; and &lt;a href="http://msdn.microsoft.com/en-us/library/aa292128%28v=vs.71%29.aspx"&gt;Integration Testing&lt;/a&gt; if you’d like an “official” Microsoft source&lt;/p&gt;  &lt;p&gt;&lt;a href="http://stackoverflow.com/questions/520064/what-is-unit-test-integration-test-smoke-test-regression-test"&gt;“What is Unit Test, Integration Test, Smoke test, Regression Test?”&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://stackoverflow.com/questions/437897/what-are-unit-testing-and-integration-testing-and-what-other-types-of-testing-s"&gt;“What are unit testing and integration testing, and what other types of testing should I know about?”&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/fgHc0lyEvozrOMIhPLqIu9XG_sI/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/fgHc0lyEvozrOMIhPLqIu9XG_sI/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/fgHc0lyEvozrOMIhPLqIu9XG_sI/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/fgHc0lyEvozrOMIhPLqIu9XG_sI/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.stevesmithblog.com/~ff/StevenSmith?a=L49x29dsQO0:PXJ7beU_Apw:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/StevenSmith?i=L49x29dsQO0:PXJ7beU_Apw:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.stevesmithblog.com/~ff/StevenSmith?a=L49x29dsQO0:PXJ7beU_Apw:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/StevenSmith?i=L49x29dsQO0:PXJ7beU_Apw:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.stevesmithblog.com/~ff/StevenSmith?a=L49x29dsQO0:PXJ7beU_Apw:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/StevenSmith?i=L49x29dsQO0:PXJ7beU_Apw:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/StevenSmith/~4/L49x29dsQO0" height="1" width="1"/&gt;</description><pubDate>Thu, 19 Jan 2012 00:37:06 GMT</pubDate><guid isPermaLink="true">http://ardalis.com:80/Unit-Test-or-Integration-Test-and-Why-You-Should-Care</guid></item><item><title>CodeMash 2012 Sessions</title><link>http://ardalis.com:80/CodeMash-2012-Sessions</link><description>&lt;p&gt;&lt;a href="http://codemash.org/"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px 0px 5px 5px; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" align="right" src="http://stevesmithblog.com/files/media/image/Windows-Live-Writer/CodeMash-Sessions_CBB8/image_3.png" width="206" height="209" /&gt;&lt;/a&gt;Last week I presented two half-day workshops at &lt;a href="http://codemash.org/"&gt;CodeMash’s&lt;/a&gt; PreCompiler on Wednesday (with Brendan Enrick), and a session on ASP.NET MVC 4 on Thursday.&amp;#160; CodeMash 2012 was an amazing conference and I’d like to personally thank the organizers as well as the attendees of my own events for making it such a great event.&amp;#160; I’ll post a separate write-up with my experiences shortly – for now I just need to get my slides and demos posted for folks who want them.&lt;/p&gt;  &lt;h2&gt;Beginning Software Craftsmanship&lt;/h2&gt;  &lt;p&gt;The morning PreCompiler was on Beginning Software Craftsmanship, and included some presentations on software craftsmanship, deliberate practice, testing, and pairing.&amp;#160; We had about 25 people in attendance, which was just about perfect for the room we had.&amp;#160; Unfortunately, we had a tiny little 6’ screen to present on, but we made it work and thankfully most of this workshop involves hands-on coding, not watching slides.&amp;#160; The group worked through the &lt;a href="http://nimblepros.com/katas"&gt;Prime Factors kata&lt;/a&gt; several times, and then the &lt;a href="http://nimblepros.com/katas"&gt;String Calculator kata&lt;/a&gt;.&amp;#160; You can &lt;a href="http://ssmith-presentations.s3.amazonaws.com/CodeMash2012BeginningSoftwareCraftsmanship.zip"&gt;download the Beginning Software Craftsmanship slides, katas, and the FizzBuzz demo that Brendan and I worked through here&lt;/a&gt;.&lt;/p&gt;  &lt;h2&gt;Intermediate Software Craftsmanship&lt;/h2&gt;  &lt;p&gt;In the afternoon PreCompiler, we continued delving into software craftsmanship and practice, with an emphasis on writing quality code.&amp;#160; There was a quick repeat presentation on why software craftsmanship and practice are important, which was good since the afternoon session was standing room only with over 50 people in it at one point, so there were many new faces in addition to folks from the morning session.&amp;#160; Brendan and I presented one lecture on refactoring and SOLID principles to set up the next kata, the &lt;a href="http://nimblepros.com/katas"&gt;Gilded Rose refactoring kata&lt;/a&gt;.&amp;#160; This kata starts with some existing working code, which we provided in several different languages from online sources:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://github.com/professor/GildedRose"&gt;http://github.com/professor/GildedRose&lt;/a&gt; Ruby&lt;/li&gt;    &lt;li&gt;&lt;a href="http://github.com/NotMyself/GildedRose"&gt;http://github.com/NotMyself/GildedRose&lt;/a&gt; C#&lt;/li&gt;    &lt;li&gt;&lt;a href="http://github.com/wouterla/GildedRose"&gt;http://github.com/wouterla/GildedRose&lt;/a&gt; Java&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;The intent of this kata is to practice your refactoring skills, and also to practice working with legacy code that has no test coverage and is in fact very difficult to get under test.&amp;#160; Working in pairs, the teams sought to implement the new feature requested in the kata while following the constraints and attempting to improve the overall design of the code (by, for instance, making it more &lt;a href="http://deviq.com/don-t-repeat-yourself"&gt;DRY&lt;/a&gt; and applying the &lt;a href="http://deviq.com/solid"&gt;SOLID principles&lt;/a&gt;).&lt;/p&gt;  &lt;p&gt;Following the Gilded Rose kata, we worked through the Greed kata, which implements the rules of a simple dice game.&amp;#160; Included in the download below are several implementations of this kata in C#, including one that uses a rules engine that allows new rules to be added while following the &lt;a href="http://deviq.com/open-closed-principle"&gt;Open/Closed Principle&lt;/a&gt; (no changes need to be made to the scoring logic classes).&lt;/p&gt;  &lt;p&gt;&lt;a href="http://ssmith-presentations.s3.amazonaws.com/CodeMash2012IntermediateSoftwareCraftsmanship.zip"&gt;Download the Intermediate Software Craftsmanship slides, katas, and demos here&lt;/a&gt;.&lt;/p&gt;  &lt;h2&gt;A Lap Around ASP.NET MVC 4&lt;/h2&gt;  &lt;p&gt;On Thursday I gave a morning session on ASP.NET MVC 4.&amp;#160; Unfortunately, I wasn’t able to talk about some of the new features that were under development due to NDA restrictions.&amp;#160; However, that kind of changed about 30 minutes before my talk when Scott Hanselman announced several of the previously private features that were coming to MVC 4, namely integration of Web API directly into MVC and a few new project templates, including a single-page application template.&amp;#160; Look for more info on these topics on &lt;a href="http://hanselman.com/"&gt;Scott’s blog&lt;/a&gt; and/or from &lt;a href="http://weblogs.asp.net/scottgu/"&gt;the Gu himself&lt;/a&gt;, soon.&lt;/p&gt;  &lt;p&gt;My session focused on the new mobile features, recipes, and async features of MVC 4.&amp;#160; You can find my &lt;a href="http://ssmith-presentations.s3.amazonaws.com/CodeMash2012LapAroundASPNETMVC4.zip"&gt;Lap Around ASP.NET MVC 4 slides and demos here&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Hope you enjoyed &lt;a href="http://codemash.org/"&gt;CodeMash&lt;/a&gt; and I look forward to seeing you again soon.&amp;#160; Feel free to follow me on &lt;a href="http://twitter.com/ardalis"&gt;twitter (@ardalis)&lt;/a&gt; to join the conversation!&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/LH9Lq0Furf-UTSaeol0GOg-P1So/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/LH9Lq0Furf-UTSaeol0GOg-P1So/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/LH9Lq0Furf-UTSaeol0GOg-P1So/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/LH9Lq0Furf-UTSaeol0GOg-P1So/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.stevesmithblog.com/~ff/StevenSmith?a=XlIOOiZncG4:7ZV20gvLbVA:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/StevenSmith?i=XlIOOiZncG4:7ZV20gvLbVA:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.stevesmithblog.com/~ff/StevenSmith?a=XlIOOiZncG4:7ZV20gvLbVA:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/StevenSmith?i=XlIOOiZncG4:7ZV20gvLbVA:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.stevesmithblog.com/~ff/StevenSmith?a=XlIOOiZncG4:7ZV20gvLbVA:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/StevenSmith?i=XlIOOiZncG4:7ZV20gvLbVA:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/StevenSmith/~4/XlIOOiZncG4" height="1" width="1"/&gt;</description><pubDate>Mon, 16 Jan 2012 15:23:53 GMT</pubDate><guid isPermaLink="true">http://ardalis.com:80/CodeMash-2012-Sessions</guid></item><item><title>Silverlight 5</title><link>http://ardalis.com:80/Silverlight-5</link><description>&lt;blockquote&gt;   &lt;p&gt;&lt;img style="display: inline; float: right" alt="Microsoft Silverlight" align="right" src="http://www.microsoft.com/silverlight/fw/logoSilverlight.jpg" width="242" height="79" /&gt;“The reports of my death have been greatly exaggerated.” – Mark Twain&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Today, &lt;a href="http://blogs.msdn.com/b/silverlight/archive/2011/12/09/silverlight-5-available-for-download-today.aspx"&gt;Silverlight 5 is released and available for download&lt;/a&gt;!&amp;#160; The Release Candidate has been around for some time, and many of us were expecting the release in November.&amp;#160; Well, here it is, November 39th, and it’s here!&amp;#160; Here are some of the things that are &lt;a href="http://10rem.net/blog/2011/09/04/the-big-list-of-whats-new-or-improved-in-silverlight-5"&gt;New or Improved in Silverlight 5&lt;/a&gt;:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Binding Improvements, including ICustomTypeProvider, Binding in Style Setters, DataContextChanged Event, and Custom Markup Extensions&lt;/li&gt;    &lt;li&gt;Support for the XNA 3D API for 3D graphics&lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;3D Render Targets&lt;/li&gt;      &lt;li&gt;3D surface composition settings&lt;/li&gt;      &lt;li&gt;3D multi-sample anti-aliasing&lt;/li&gt;   &lt;/ul&gt;    &lt;li&gt;Other improvements to the Graphics Stack&lt;/li&gt;    &lt;li&gt;Hardware decoding for H.264 media&lt;/li&gt;    &lt;li&gt;Low-latency sound effects (good for games)&lt;/li&gt;    &lt;li&gt;Variable Speed Playback and Trick-play (great if you want to listen to podcasts at high speed)&lt;/li&gt;    &lt;li&gt;Text Improvements&lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;Text Tracking and Leading&lt;/li&gt;      &lt;li&gt;Linked and Multi-column Text&lt;/li&gt;      &lt;li&gt;OpenType Support&lt;/li&gt;   &lt;/ul&gt;    &lt;li&gt;Better OS integration&lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;P/Invoke support&lt;/li&gt;      &lt;li&gt;Multiple Window support&lt;/li&gt;      &lt;li&gt;Full file system access (in full trust)&lt;/li&gt;      &lt;li&gt;Default Filename support in Open/Save FileDialogs&lt;/li&gt;      &lt;li&gt;64-bit browser support in Windows&lt;/li&gt;      &lt;li&gt;Power awareness (don’t sleep while movie is playing, for instance)&lt;/li&gt;   &lt;/ul&gt;    &lt;li&gt;Performance Improvements&lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;Faster Parser&lt;/li&gt;      &lt;li&gt;Multi-Core JIT compilation (improved start-up time)&lt;/li&gt;   &lt;/ul&gt;    &lt;li&gt;Double-Click (and n-click) support&lt;/li&gt;    &lt;li&gt;PivotViewer control&lt;/li&gt;    &lt;li&gt;ComboBox type-ahead search&lt;/li&gt;    &lt;li&gt;Printing improvements&lt;/li&gt;    &lt;li&gt;Tasks from Task Parallel Library&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;a href="http://10rem.net/blog/2011/09/04/the-big-list-of-whats-new-or-improved-in-silverlight-5"&gt;Pete Brown has a great write-up of these and more features&lt;/a&gt;.&amp;#160; There is another, official list of &lt;a href="http://www.silverlight.net/learn/overview/what%27s-new-in-silverlight-5"&gt;What’s New in Silverlight 5 available on the Silverlight.net site&lt;/a&gt;.&amp;#160; You can learn more at &lt;a href="http://silverlight.net/learn"&gt;http://silverlight.net/learn&lt;/a&gt;, or from Pete’s book, &lt;a href="http://www.amazon.com/gp/product/1617290319/ref=as_li_ss_tl?ie=UTF8&amp;amp;tag=aspalliancecom&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=1617290319"&gt;Silverlight 5 in Action&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/sZn7p51_VEr9boyWaxBxe5dsi9k/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/sZn7p51_VEr9boyWaxBxe5dsi9k/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/sZn7p51_VEr9boyWaxBxe5dsi9k/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/sZn7p51_VEr9boyWaxBxe5dsi9k/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.stevesmithblog.com/~ff/StevenSmith?a=biOV9BjK1tE:IxA5OR86uj8:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/StevenSmith?i=biOV9BjK1tE:IxA5OR86uj8:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.stevesmithblog.com/~ff/StevenSmith?a=biOV9BjK1tE:IxA5OR86uj8:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/StevenSmith?i=biOV9BjK1tE:IxA5OR86uj8:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.stevesmithblog.com/~ff/StevenSmith?a=biOV9BjK1tE:IxA5OR86uj8:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/StevenSmith?i=biOV9BjK1tE:IxA5OR86uj8:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/StevenSmith/~4/biOV9BjK1tE" height="1" width="1"/&gt;</description><pubDate>Fri, 09 Dec 2011 15:00:16 GMT</pubDate><guid isPermaLink="true">http://ardalis.com:80/Silverlight-5</guid></item><item><title>Handy EnumerableExtensions</title><link>http://ardalis.com:80/Handy-EnumerableExtensions</link><description>&lt;p&gt;There’s a great site for finding extension methods, &lt;a href="http://extensionmethod.net/"&gt;ExtensionMethod.net&lt;/a&gt;.&amp;#160; I don’t believe either of these came from there, and I’ve not (yet) submitted them there, but here are a couple of extensions on IEnumerable&amp;lt;T&amp;gt; that I’ve found useful recently.&lt;/p&gt;  &lt;h2&gt;ForEach&amp;lt;T&amp;gt;&lt;/h2&gt;  &lt;p&gt;The first one is simply a method that allows you to easily iterate over a sequence and perform an action on it.&amp;#160; This is a pretty commonly useful extension method, so much so that it’s now included in .NET 4.0 out of the box.&amp;#160; But if you’re using an older version of the framework, this is one you can roll yourself.&lt;/p&gt;  &lt;div id="codeSnippetWrapper"&gt;   &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;     &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;static&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; ForEach&amp;lt;T&amp;gt;(&lt;span style="color: #0000ff"&gt;this&lt;/span&gt; IEnumerable&amp;lt;T&amp;gt; items, Action&amp;lt;T&amp;gt; action)&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;{&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;foreach&lt;/span&gt; (T item &lt;span style="color: #0000ff"&gt;in&lt;/span&gt; items)&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        action(item);&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;}&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;h2&gt;ContainsAny&amp;lt;T&amp;gt;&lt;/h2&gt;

&lt;p&gt;If you have a collection, you can test for whether it contains an item by using the .Contains(T item) extension method.&amp;#160; However, this only works for single instances of an item.&amp;#160; What if you have a set of items and you need to know if that set contains any elements of a second set of items?&amp;#160; For that, you want to use ContainsAny(), which you can use with either a params collection (specify each item inline) or with an enumerable parameter.&amp;#160; Here are the methods:&lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;static&lt;/span&gt; &lt;span style="color: #0000ff"&gt;bool&lt;/span&gt; ContainsAny&amp;lt;T&amp;gt;(&lt;span style="color: #0000ff"&gt;this&lt;/span&gt; IEnumerable&amp;lt;T&amp;gt; sequence, &lt;span style="color: #0000ff"&gt;params&lt;/span&gt; T[] matches)&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;{&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; matches.Any(&lt;span style="color: #0000ff"&gt;value&lt;/span&gt; =&amp;gt; sequence.Contains(&lt;span style="color: #0000ff"&gt;value&lt;/span&gt;));&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;}&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&amp;#160;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;static&lt;/span&gt; &lt;span style="color: #0000ff"&gt;bool&lt;/span&gt; ContainsAny&amp;lt;T&amp;gt;(&lt;span style="color: #0000ff"&gt;this&lt;/span&gt; IEnumerable&amp;lt;T&amp;gt; sequence, IEnumerable&amp;lt;T&amp;gt; matches)&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;{&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; matches.Any(&lt;span style="color: #0000ff"&gt;value&lt;/span&gt; =&amp;gt; sequence.Contains(&lt;span style="color: #0000ff"&gt;value&lt;/span&gt;));&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;}&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;And here are some passing unit tests that demonstrate how these are used:&lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;[TestFixture]&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; ContainsAnyShould&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;{&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    [Test]&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; ReturnTrueGivenMatchInItemCollection()&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        var testList = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; List&amp;lt;&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;&amp;gt;() { &lt;span style="color: #006080"&gt;&amp;quot;A&amp;quot;&lt;/span&gt;, &lt;span style="color: #006080"&gt;&amp;quot;B&amp;quot;&lt;/span&gt;, &lt;span style="color: #006080"&gt;&amp;quot;C&amp;quot;&lt;/span&gt; };&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        var filterList = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; List&amp;lt;&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;&amp;gt;() { &lt;span style="color: #006080"&gt;&amp;quot;C&amp;quot;&lt;/span&gt;, &lt;span style="color: #006080"&gt;&amp;quot;D&amp;quot;&lt;/span&gt;, &lt;span style="color: #006080"&gt;&amp;quot;E&amp;quot;&lt;/span&gt; };&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&amp;#160;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        Assert.IsTrue(testList.ContainsAny(filterList));&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&amp;#160;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    [Test]&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; ReturnFalseGivenNoMatchInItemCollection()&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        var testList = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; List&amp;lt;&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;&amp;gt;() { &lt;span style="color: #006080"&gt;&amp;quot;A&amp;quot;&lt;/span&gt;, &lt;span style="color: #006080"&gt;&amp;quot;B&amp;quot;&lt;/span&gt;, &lt;span style="color: #006080"&gt;&amp;quot;C&amp;quot;&lt;/span&gt; };&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        var filterList = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; List&amp;lt;&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;&amp;gt;() { &lt;span style="color: #006080"&gt;&amp;quot;D&amp;quot;&lt;/span&gt;, &lt;span style="color: #006080"&gt;&amp;quot;E&amp;quot;&lt;/span&gt; };&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&amp;#160;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        Assert.IsFalse(testList.ContainsAny(filterList));&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&amp;#160;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    [Test]&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; ReturnTrueGivenMatchInParamCollection()&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        var testList = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; List&amp;lt;&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;&amp;gt;() { &lt;span style="color: #006080"&gt;&amp;quot;A&amp;quot;&lt;/span&gt;, &lt;span style="color: #006080"&gt;&amp;quot;B&amp;quot;&lt;/span&gt;, &lt;span style="color: #006080"&gt;&amp;quot;C&amp;quot;&lt;/span&gt; };&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&amp;#160;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        Assert.IsTrue(testList.ContainsAny(&lt;span style="color: #006080"&gt;&amp;quot;C&amp;quot;&lt;/span&gt;, &lt;span style="color: #006080"&gt;&amp;quot;D&amp;quot;&lt;/span&gt;, &lt;span style="color: #006080"&gt;&amp;quot;E&amp;quot;&lt;/span&gt;));&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&amp;#160;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    [Test]&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; ReturnFalseGivenNoMatchInParamCollection()&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        var testList = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; List&amp;lt;&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;&amp;gt;() { &lt;span style="color: #006080"&gt;&amp;quot;A&amp;quot;&lt;/span&gt;, &lt;span style="color: #006080"&gt;&amp;quot;B&amp;quot;&lt;/span&gt;, &lt;span style="color: #006080"&gt;&amp;quot;C&amp;quot;&lt;/span&gt; };&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&amp;#160;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        Assert.IsFalse(testList.ContainsAny(&lt;span style="color: #006080"&gt;&amp;quot;D&amp;quot;&lt;/span&gt;, &lt;span style="color: #006080"&gt;&amp;quot;E&amp;quot;&lt;/span&gt;));&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    }&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;


Hope these help!
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/2Us42qv_c1uo4Q81ZcePbaasY5o/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/2Us42qv_c1uo4Q81ZcePbaasY5o/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/2Us42qv_c1uo4Q81ZcePbaasY5o/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/2Us42qv_c1uo4Q81ZcePbaasY5o/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.stevesmithblog.com/~ff/StevenSmith?a=9VIiLMATNJU:IHhJ-MImcHY:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/StevenSmith?i=9VIiLMATNJU:IHhJ-MImcHY:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.stevesmithblog.com/~ff/StevenSmith?a=9VIiLMATNJU:IHhJ-MImcHY:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/StevenSmith?i=9VIiLMATNJU:IHhJ-MImcHY:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.stevesmithblog.com/~ff/StevenSmith?a=9VIiLMATNJU:IHhJ-MImcHY:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/StevenSmith?i=9VIiLMATNJU:IHhJ-MImcHY:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/StevenSmith/~4/9VIiLMATNJU" height="1" width="1"/&gt;</description><pubDate>Thu, 10 Nov 2011 15:50:32 GMT</pubDate><guid isPermaLink="true">http://ardalis.com:80/Handy-EnumerableExtensions</guid></item><item><title>View HTML Source of Email in GMail and Google Apps</title><link>http://ardalis.com:80/View-HTML-Source-of-Email-in-GMail-and-Google-Apps</link><description>&lt;p&gt;If you’re working on creating a pleasant-looking HTML email template for your site’s newsletter, you’ll want to test it out on the major email clients, including Outlook and GMail.&amp;#160; For instance, if you get &lt;a href="http://www.codeproject.com/Feature/Insider/"&gt;The Code Project’s Insider Daily News&lt;/a&gt; in your GMail inbox, it will look something like this:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.codeproject.com/script/Mailouts/View.aspx?mlid=9368"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://stevesmithblog.com/files/media/image/Windows-Live-Writer/View-HTML-Source-of-Email-in-GMail-and-G_8804/image_3.png" width="644" height="269" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Now, if you view the source for this page, you’ll get something that’s less than useful.&amp;#160; The whole thing looks like a giant &amp;lt;script&amp;gt; block and has no relation to the HTML that was in your email template.&amp;#160; Of course, the interface uses frames (iframes), and depending on your browser you can also view the frame source:&lt;/p&gt;  &lt;p&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://stevesmithblog.com/files/media/image/Windows-Live-Writer/View-HTML-Source-of-Email-in-GMail-and-G_8804/image_17.png" width="468" height="484" /&gt;&lt;/p&gt;  &lt;p&gt;Which will yield this:&lt;/p&gt;  &lt;p&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="SNAGHTML3f56ac0" border="0" alt="SNAGHTML3f56ac0" src="http://stevesmithblog.com/files/media/image/Windows-Live-Writer/View-HTML-Source-of-Email-in-GMail-and-G_8804/SNAGHTML3f56ac0_1.png" width="644" height="191" /&gt;&lt;/p&gt;  &lt;p&gt;How useful!&lt;/p&gt;  &lt;p&gt;If you *actually* want to see the HTML markup for an email as it was received by the mail server, the way to do that in GMail or Google Apps is to click the triangle icon in the upper right of the message, and select Show Original:&lt;/p&gt;  &lt;p&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://stevesmithblog.com/files/media/image/Windows-Live-Writer/View-HTML-Source-of-Email-in-GMail-and-G_8804/image_16.png" width="644" height="275" /&gt;&lt;/p&gt;  &lt;p&gt;This will open up a new browser window or tab, with the full email content, including the headers.&amp;#160; Something like this, perhaps:&lt;/p&gt;  &lt;p&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://stevesmithblog.com/files/media/image/Windows-Live-Writer/View-HTML-Source-of-Email-in-GMail-and-G_8804/image_15.png" width="515" height="484" /&gt;&lt;/p&gt;  &lt;p&gt;All that and *still* no HTML!&amp;#160; But we’re almost there.&amp;#160; If you look at the last line of the headers in the image above, you can see that in this case the message says it has Content-Transfer-Encoding: base64.&amp;#160; That means that long mess of characters in the body of the message is base64-encoded, which further means that we can easily decode it using any base64 decoder.&amp;#160; You can write your own, but there are numerous online tools that will decode base64 for you, including &lt;a href="http://www.opinionatedgeek.com/dotnet/tools/Base64Decode/"&gt;this one I found after a quick search&lt;/a&gt;.&amp;#160; Simply cut and paste everything below (but not including) the Content-Transfer-Encoding: base64 line into the box on the page and click the button and you should see your decoded, beautiful, actual HTML of your email message.&amp;#160; What could be easier than that?&lt;/p&gt;  &lt;p&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://stevesmithblog.com/files/media/image/Windows-Live-Writer/View-HTML-Source-of-Email-in-GMail-and-G_8804/image_14.png" width="336" height="484" /&gt;&lt;/p&gt;          &lt;p&gt;Now just copy the output to Notepad or your HTML editor of choice and you should be ready to make whatever tweaks you and your design team would like.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/JP7qL_zA5-xl9nPbjDxDIyMtr8A/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/JP7qL_zA5-xl9nPbjDxDIyMtr8A/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/JP7qL_zA5-xl9nPbjDxDIyMtr8A/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/JP7qL_zA5-xl9nPbjDxDIyMtr8A/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.stevesmithblog.com/~ff/StevenSmith?a=YatCD3vMf6Q:864mc3CKGgI:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/StevenSmith?i=YatCD3vMf6Q:864mc3CKGgI:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.stevesmithblog.com/~ff/StevenSmith?a=YatCD3vMf6Q:864mc3CKGgI:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/StevenSmith?i=YatCD3vMf6Q:864mc3CKGgI:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.stevesmithblog.com/~ff/StevenSmith?a=YatCD3vMf6Q:864mc3CKGgI:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/StevenSmith?i=YatCD3vMf6Q:864mc3CKGgI:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/StevenSmith/~4/YatCD3vMf6Q" height="1" width="1"/&gt;</description><pubDate>Thu, 10 Nov 2011 09:54:06 GMT</pubDate><guid isPermaLink="true">http://ardalis.com:80/View-HTML-Source-of-Email-in-GMail-and-Google-Apps</guid></item><item><title>Inner Fields and Lazy Initialization in C#</title><link>http://ardalis.com:80/Inner-Fields-and-Lazy-Initialization-in-C%23</link><description>&lt;p&gt;Using lazy initialization in C#, a class’s state is set up such that each property’s get method performs a check to see if the underlying field is null.&amp;#160; If it is, then it calculates or populates the field before returning it.&amp;#160; This is a very simple and common approach, but it requires that the class follows a convention of only accessing the field via the property.&amp;#160; Unfortunately, there are no language features that can enforce this, so it’s possible for errors to creep in.&amp;#160; Here’s an example of this approach working correctly:&lt;/p&gt;  &lt;div id="codeSnippetWrapper"&gt;   &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;     &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; Order&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;{&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #008000"&gt;// other properties&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&amp;#160;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;private&lt;/span&gt; Customer _customer;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; Customer Customer&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        get&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;            &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (_customer == &lt;span style="color: #0000ff"&gt;null&lt;/span&gt;)&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;            {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;                _customer = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; Customer();&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;            }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;            &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; _customer;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&amp;#160;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; PrintLabel()&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; Customer.CompanyName + &lt;span style="color: #006080"&gt;&amp;quot;\n&amp;quot;&lt;/span&gt; + Customer.Address;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;}&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;Now here’s where this approach can break down.&amp;#160; Consider the same class as above, but with a rewritten PrintLabel() method:&lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; PrintLabel()&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;{&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;  &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; _customer.CompanyName + &lt;span style="color: #006080"&gt;&amp;quot;\n&amp;quot;&lt;/span&gt; + _customer.Address;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;}&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;This code will still compile just fine, but now will very likely result in a NullReferenceException when it attempts to access properties of the _customer, which may not yet be initialized.&amp;#160; The solution to this would be to control access to the _customer member.&amp;#160; We’ve already set its access to &lt;em&gt;private&lt;/em&gt;, though, which is as restrictive as we can make it.&amp;#160; We could force it to be initialized by moving the work into the class’s constructor, but then we’re losing the benefits of lazy initialization.&amp;#160; I wonder if it wouldn’t be useful to do something like this instead:&lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; Order&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;{&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #008000"&gt;// other properties&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&amp;#160;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;private&lt;/span&gt; Customer _customer;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; Customer Customer&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        get&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;            &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (_customer == &lt;span style="color: #0000ff"&gt;null&lt;/span&gt;)&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;            {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;                _customer = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; Customer();&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;            }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;            &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; _customer;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&amp;#160;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; PrintLabel()&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; result = _customer.CompanyName; &lt;span style="color: #008000"&gt;// probably results in a NullReferenceException&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; result + &lt;span style="color: #006080"&gt;&amp;quot;\n&amp;quot;&lt;/span&gt; + Customer.Address; &lt;span style="color: #008000"&gt;// ok to access Customer&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;}&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;div&gt;&amp;#160;&lt;/div&gt;

&lt;div&gt;We already have auto-properties in C# that avoid the need for having backing fields in the default case.&amp;#160; I think being able to protect access to backing fields so that they can be configured to only be accessible by their property would be quite useful in a number of cases, including this very common one.&amp;#160; I also don’t believe this would break any existing code or change the language in a way that would make it less easy to understand.&amp;#160; What do you think, is this something the C# team should consider adding in a future version of the language?&lt;/div&gt;

&lt;p&gt;One approach that can be used with the relatively new Lazy&amp;lt;T&amp;gt; type is this one (thanks to Jose Romanie for pointing this out):&lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; Order&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;{&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; Order()&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        _customerInitializer = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; Lazy&amp;lt;Customer&amp;gt;(() =&amp;gt; &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; Customer());&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&amp;#160;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #008000"&gt;// other properties&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&amp;#160;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;private&lt;/span&gt; Lazy&amp;lt;Customer&amp;gt; _customerInitializer;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; Customer Customer&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        get&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;            &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; _customerInitializer.Value;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&amp;#160;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; PrintLabel()&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; result = Customer.CompanyName; &lt;span style="color: #008000"&gt;// ok to access Customer&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; result + &lt;span style="color: #006080"&gt;&amp;quot;\n&amp;quot;&lt;/span&gt; + _customerInitializer.Value.Address; &lt;span style="color: #008000"&gt;// ok to access via .Value&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;}&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;I like this approach, and I’m generally a fan of Lazy&amp;lt;T&amp;gt;.&amp;#160; It might eliminate the need for the private backing field idea for properties, as it does provide a means of enforcing the initialization even if the backing field is accessed from within the class.&amp;#160; The only downside is that you need to work with a Lazy&amp;lt;T&amp;gt; instead of a T, but within the class it’s probably not a bad thing for this detail to be exposed.&amp;#160; Thoughts?&amp;#160; &lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/H-FSePdCGQ5YbEql64aba9PLk_o/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/H-FSePdCGQ5YbEql64aba9PLk_o/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/H-FSePdCGQ5YbEql64aba9PLk_o/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/H-FSePdCGQ5YbEql64aba9PLk_o/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.stevesmithblog.com/~ff/StevenSmith?a=yiV-9FnamZY:qiP9u0GvSEI:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/StevenSmith?i=yiV-9FnamZY:qiP9u0GvSEI:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.stevesmithblog.com/~ff/StevenSmith?a=yiV-9FnamZY:qiP9u0GvSEI:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/StevenSmith?i=yiV-9FnamZY:qiP9u0GvSEI:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.stevesmithblog.com/~ff/StevenSmith?a=yiV-9FnamZY:qiP9u0GvSEI:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/StevenSmith?i=yiV-9FnamZY:qiP9u0GvSEI:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/StevenSmith/~4/yiV-9FnamZY" height="1" width="1"/&gt;</description><pubDate>Sat, 29 Oct 2011 12:07:46 GMT</pubDate><guid isPermaLink="true">http://ardalis.com:80/Inner-Fields-and-Lazy-Initialization-in-C%23</guid></item><item><title>RazorEngine Performance and Template Caching</title><link>http://ardalis.com:80/RazorEngine-Performance-and-Template-Caching</link><description>&lt;p&gt;&lt;img style="margin: 0px 0px 5px 5px; display: inline; float: right" align="right" src="http://download.codeplex.com/Download?ProjectName=razorengine&amp;amp;DownloadId=201064&amp;amp;Build=18207" /&gt;I’ve been using &lt;a href="http://razorengine.codeplex.com/"&gt;RazorEngine&lt;/a&gt; on a project and have been impressed with its simplicity and ease-of-use.&amp;#160; However, the performance of the application isn’t quite where I need it to be, and I was pretty sure the issue was with how I was using RazorEngine, especially since I could anecdotally see that the processor consumption on the machine running the app was quite high, and looking at the running tasks it was clear that most of that was a result of csc.exe (C# compiler) activity.&lt;/p&gt;  &lt;p&gt;A bit of searching found &lt;a href="http://razorengine.codeplex.com/discussions/244527"&gt;this discussion thread on codeplex regarding the re-compiling of existing templates&lt;/a&gt;.&amp;#160; The issue is a known one with version 2.1, which is the current release and what I’m using.&amp;#160; However, I talked to Matthew Abbott (aka Antaris) &lt;a href="http://www.fidelitydesign.net/?p=473"&gt;via his blog where he recently discussed what’s coming in RazorEngine v3&lt;/a&gt;, and that led me to go ahead and pull the latest pre-release &lt;a href="https://github.com/Antaris/RazorEngine"&gt;RazorEngine v3 code out of GitHub&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;From there it was pretty trivial to get my code working with the new bits.&amp;#160; Fortunately I’d created an interface ITemplateParser and implemented a RazorEngineTemplateParser, and this latter class was the only one I needed to change to use the new API.&amp;#160; I created a couple of nearly identical unit tests, with the key difference being when they make the call to parse the template.&amp;#160; The caching version provides the same name for the template with each call, while the non-caching one provides a new Guid string as the template name, ensuring a cache miss.&lt;/p&gt;  &lt;p&gt;I don’t have any fancy graphs to show off, since all I did was run a 2-minute load test of each unit test with 5 users and no think time using Visual Studio 2010’s load test runner.&amp;#160; The results were pretty significant, though, and corresponded with the performance I was seeing in my actual application (about 1 request per second on one thread):&lt;/p&gt;  &lt;h2&gt;5 Concurrent Users, Non-Cached&lt;/h2&gt;  &lt;p&gt;&lt;strong&gt;&lt;font color="#0000ff"&gt;5 Tests/Second&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;h2&gt;5 Concurrent Users, Cached&lt;/h2&gt;  &lt;p&gt;&lt;strong&gt;&lt;font color="#0000ff"&gt;1600 Tests/Second&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/dpqla8wuMWs5wqd2MPvW5gktWJU/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/dpqla8wuMWs5wqd2MPvW5gktWJU/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/dpqla8wuMWs5wqd2MPvW5gktWJU/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/dpqla8wuMWs5wqd2MPvW5gktWJU/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.stevesmithblog.com/~ff/StevenSmith?a=6QiULnnKc2M:lGjPdsHnDGQ:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/StevenSmith?i=6QiULnnKc2M:lGjPdsHnDGQ:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.stevesmithblog.com/~ff/StevenSmith?a=6QiULnnKc2M:lGjPdsHnDGQ:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/StevenSmith?i=6QiULnnKc2M:lGjPdsHnDGQ:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.stevesmithblog.com/~ff/StevenSmith?a=6QiULnnKc2M:lGjPdsHnDGQ:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/StevenSmith?i=6QiULnnKc2M:lGjPdsHnDGQ:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/StevenSmith/~4/6QiULnnKc2M" height="1" width="1"/&gt;</description><pubDate>Wed, 26 Oct 2011 17:09:36 GMT</pubDate><guid isPermaLink="true">http://ardalis.com:80/RazorEngine-Performance-and-Template-Caching</guid></item><item><title>Install Application as Service on Windows Server 2008</title><link>http://ardalis.com:80/Install-Application-as-Service-on-Windows-Server-2008</link><description>&lt;p&gt;You can use the &lt;a href="http://support.microsoft.com/kb/251192"&gt;sc.exe command to install an EXE as a service&lt;/a&gt; on Windows Server 2008.&amp;#160; There’s a good article on &lt;a href="http://tech.einaregilsson.com/2007/08/15/run-windows-service-as-a-console-program/"&gt;creating an application that can easily run as either a console app or as a service here&lt;/a&gt;.&amp;#160; From an administrator command prompt, the syntax is something like this:&lt;/p&gt;  &lt;p&gt;&lt;font face="Consolas"&gt;sc &lt;/font&gt;&lt;font face="Consolas"&gt;\\servername&lt;/font&gt;&lt;font face="Consolas"&gt; create MyService.ServiceName binpath= d:\services\Foo\Foo.exe displayname= MyService.ServiceName&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;Note that for this particular utility, the command line options include the “=” sign in them, so you must have no space before the “=” and you must have a space after the “=”.&amp;#160;&amp;#160; Also the server name must be preceded by \\ to work.&lt;/p&gt;  &lt;p&gt;Assuming it works, you should see something like this:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://stevesmithblog.com/files/media/image/Windows-Live-Writer/Install-Application-as-Service-on-Window_8FCA/image_2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://stevesmithblog.com/files/media/image/Windows-Live-Writer/Install-Application-as-Service-on-Window_8FCA/image_thumb.png" width="372" height="484" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;As you can see from the help message above, the SC.EXE utility can be used for much more than simply creating services, but this is something I’ve had to use it for more than once (and hence I’m blogging it since it’s not necessarily easy to search for).&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/RAymdi73X254P9qMB4CMB8zthP0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/RAymdi73X254P9qMB4CMB8zthP0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/RAymdi73X254P9qMB4CMB8zthP0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/RAymdi73X254P9qMB4CMB8zthP0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.stevesmithblog.com/~ff/StevenSmith?a=7vZaApKpdno:eH7AyO69Yts:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/StevenSmith?i=7vZaApKpdno:eH7AyO69Yts:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.stevesmithblog.com/~ff/StevenSmith?a=7vZaApKpdno:eH7AyO69Yts:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/StevenSmith?i=7vZaApKpdno:eH7AyO69Yts:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.stevesmithblog.com/~ff/StevenSmith?a=7vZaApKpdno:eH7AyO69Yts:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/StevenSmith?i=7vZaApKpdno:eH7AyO69Yts:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/StevenSmith/~4/7vZaApKpdno" height="1" width="1"/&gt;</description><pubDate>Tue, 25 Oct 2011 10:23:03 GMT</pubDate><guid isPermaLink="true">http://ardalis.com:80/Install-Application-as-Service-on-Windows-Server-2008</guid></item></channel></rss>

