<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.scottmuc.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom">

  <title><![CDATA[More Muc Than You Can Handle]]></title>
  
  <link href="http://scottmuc.com/" />
  <updated>2013-04-22T21:42:49+05:30</updated>
  <id>http://scottmuc.com/</id>
  <author>
    <name><![CDATA[Scott Muc]]></name>
    <email><![CDATA[scottmuc@gmail.com]]></email>
  </author>
  <generator uri="http://octopress.org/">Octopress</generator>

  
  <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.scottmuc.com/scottmucblog" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="scottmucblog" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry>
    <title type="html"><![CDATA[Replacing the Kanban Board with a Shark Tank]]></title>
    <link href="http://scottmuc.com/going-post-kanban-with-a-shark-tank/" />
    <updated>2013-04-13T23:48:00+05:30</updated>
    <id>http://scottmuc.com/going-post-kanban-with-a-shark-tank</id>
    <content type="html"><![CDATA[<p><img class="right" src="http://scottmuc.com/images/blog/shark-tank-wall.jpg" width="400"></p>

<p>No, this is not an April Fools joke. This was something that was actually implemented.</p>

<p>After ThoughtWorks University was over we had a backlog of work items that needed to be done before we all went back to
billable work. I wanted to put up a Kanban board with 3 columns (TODO, WIP, DONE) to track the work we needed to do. A
question popped into my head; is 3 columns the minimum number necessary?</p>

<p><a href="https://twitter.com/mfait">Michael Fait</a>, a colleague of mine, challenged this notion saying:</p>

<blockquote><p>First, we can get rid of DONE. Just rip up the card.Second, we can remove WIP by putting stickies with names on them on the cards being worked on.</p></blockquote>


<p>Then we wanted to consider priority, so we had the most important things float to the top. Less important items could
not float up until the top ones were removed. &#8220;Like a fish tank!&#8221;, one of us exclaimed! The metaphor went crazy from that
point forward. Somehow we introduced sharks and they live near the surface eating all the meat (tasks) that float to
the top. Pairing is represented by sharks eating the same piece of meat. If a shark is out, then they hang out on the beach.</p>

<h3>Make Your Own Shark Tank</h3>

<ol>
<li><a href="http://www.youtube.com/watch?v=gfydvDUncbY">Draw sharks</a> representing each person on the team.</li>
<li>Put <a href="http://en.wikipedia.org/wiki/Blu-Tack">blu tack</a> on the back of the sharks.</li>
<li>Draw the surface of the water, this is where work will get done.</li>
<li>Put stickies in the tank representing work that needs to get done.</li>
<li>As the sharks eat the stickies, let the next level of stickies float on up.</li>
</ol>

]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Going Against the Flow]]></title>
    <link href="http://scottmuc.com/going-against-the-flow/" />
    <updated>2013-02-10T23:41:00+05:30</updated>
    <id>http://scottmuc.com/going-against-the-flow</id>
    <content type="html"><![CDATA[<p>Developers like to talk about being in a state of
<a href="http://psygrammer.com/2011/02/10/the-flow-programming-in-ecstasy/">flow</a>. This is when time just seems to fly
by and you&#8217;re writing more code in a few hours than you do in several days when you&#8217;re not &#8220;flowing&#8221;. While I think
flowing can be postive, it often can do more harm than good if going on for <strong>too long</strong>.</p>

<p>In the past I would complain that the environment around me kept me from the <strong>flow</strong>. I would look forward to the quiet
times in the office when I could zone out for hours and complete some wild and crazy code I was working on. Many times
I would return the next day and realize that I could have done it simpler, or there were many other aspects of the
problem that I didn&#8217;t take into consideration. One of the biggest complaints about flow is that it takes a long time to
get into that state. How can we minimize this time, and keep these flows shorter?</p>

<p><img class="right" src="http://scottmuc.com/images/blog/flow.png">What I found myself needing were breaks. Brief moments to reflect on the past bit of effort and reflect on what work was
done and where it&#8217;s heading. Many times this has resulted in an &#8220;aha&#8221; moment and see that my path is not going towards a
solution that is best for the project. It&#8217;s also a good time to check your assumptions. You may be flowing towards a
dead-end because of something a little bit of planning could have prevented. Like the diagram to the right suggests,
flow can result in effort that&#8217;s far from the solution, whereas the small bursts follow a &#8220;truer&#8221; path. After the flow
session is it easy to get back on track? Sometimes it&#8217;s best to simply eliminate all you&#8217;ve worked on and start from
scratch.</p>

<p>This leads me to <a href="http://www.jamesshore.com/Agile-Book/spike_solutions.html">spiking</a>. Getting into a flow can be useful
when performing a spike. It can reduce the spike time, but is it really possible to flow when working on something you
don&#8217;t have any clue about?</p>

<p>When programming solo I try my best to always practice the <a href="http://www.pomodorotechnique.com/">pomodoro technique</a>.
There have been so many times that the break (and I try to be disciplined about stopping when the timer goes off, even
when I&#8217;m in the middle of something) introduces new ways of tackling the problem.</p>

<p>When pairing I experience similar gains with breaks. I never considered this technique when pairing, because I always thought that the
practice already mitigated the risks I mentioned earlier. That may be true, but thanks to <a href="http://johnpdaigle.com/">Paul Daigle</a>, I
found that it was just as effective when pairing. It&#8217;s even better because you have
someone to reflect upon the pairing session with. A quick time away from the code is a good time to recall what problem
you&#8217;re actually trying to solve and whether or not the direction you&#8217;re going is actually going to lead you there.</p>

<p>If you&#8217;re leading a technical team and you see everyone glued to their monitors and typing franctically, you might think
that they are &#8220;flowing&#8221; and working at a heightened level of productivity. Think again, they could possibly be racing towards
the wrong direction. A team that&#8217;s moving around, going for walks, taking 5 to do a
<a href="http://www.tabatatimer.com/">tabata</a> to me is a sign of a more switched on team.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[PowerShell Pester 2 and 1.2 Released!]]></title>
    <link href="http://scottmuc.com/powershell-pester-2-and-1-dot-2-released/" />
    <updated>2013-02-02T15:34:00+05:30</updated>
    <id>http://scottmuc.com/powershell-pester-2-and-1-dot-2-released</id>
    <content type="html"><![CDATA[<p>After a whirlwind of activity on the <a href="https://github.com/pester/Pester">Pester</a> codebase I&#8217;m happy to announce the latest release of Pester. Versions 1.2 and 2 are identical feature wise except for one subtle difference that I&#8217;ll get into soon.</p>

<h2>New Expectation and Matcher Syntax</h2>

<p>In prior versions of Pester, we have the dot notation expectation and matcher syntax</p>

<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
</pre></td><td class='code'><pre><code class='powershell'><span class='line'><span class="nv">$some_string</span><span class="p">.</span><span class="n">should</span><span class="p">.</span><span class="n">be</span><span class="p">(</span><span class="s2">&quot;some value&quot;</span><span class="p">)</span>
</span></code></pre></td></tr></table></div></figure>


<p>This required some <a href="https://github.com/pester/Pester/blob/bf3afbf330808cfee8a26665a77c9388ae432286/ObjectAdaptations/types.ps1xml">clever and downright nasty hacks</a> to the PowerShell runtime. This created a <a href="https://github.com/pester/Pester/issues/19">few</a> <a href="https://github.com/pester/Pester/issues/27">issues</a> for some users and I wanted to get that fixed. It turned out the extension on Object was the root issue so I investigated a pipeline based expectation syntax. Here is the result:</p>

<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
</pre></td><td class='code'><pre><code class='powershell'><span class='line'><span class="nv">$deployDir</span>                <span class="p">|</span> <span class="n">Should</span> <span class="n">Be</span> <span class="s2">&quot;C:\inetpub\wwwroot\myApp&quot;</span>
</span><span class='line'><span class="s2">&quot;iis:\Sites\myApp&quot;</span>        <span class="p">|</span> <span class="n">Should</span> <span class="n">Exist</span> <span class="c"># this works with any PowerShell provider</span>
</span><span class='line'><span class="s2">&quot;C:\test\rush_albums.txt&quot;</span> <span class="p">|</span> <span class="n">Should</span> <span class="n">Contain</span> <span class="n">2112</span>
</span><span class='line'><span class="s2">&quot;&quot;</span>                        <span class="p">|</span> <span class="n">Should</span> <span class="n">Be</span> <span class="n">NullOrEmpty</span>
</span><span class='line'><span class="p">{</span> <span class="n">throw</span> <span class="p">}</span>                 <span class="p">|</span> <span class="n">Should</span> <span class="n">Throw</span>
</span></code></pre></td></tr></table></div></figure>


<p>Negative statements work too:</p>

<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
</pre></td><td class='code'><pre><code class='powershell'><span class='line'><span class="n">2</span>                                   <span class="p">|</span> <span class="n">Should</span> <span class="n">Not</span> <span class="n">Be</span> <span class="n">1</span>
</span><span class='line'><span class="s2">&quot;C:\temp\deployment_scratch_space&quot;</span>  <span class="p">|</span> <span class="n">Should</span> <span class="n">Not</span> <span class="n">Exist</span>
</span><span class='line'><span class="s2">&quot;C:\test\rush_albums.txt&quot;</span>           <span class="p">|</span> <span class="n">Should</span> <span class="n">Not</span> <span class="n">Contain</span> <span class="n">5150</span>
</span><span class='line'><span class="n">1</span><span class="p">,</span><span class="n">2</span><span class="p">,</span><span class="n">3</span>                               <span class="p">|</span> <span class="n">Should</span> <span class="n">Not</span> <span class="n">Be</span> <span class="n">NullOrEmpty</span>
</span><span class='line'><span class="p">{</span> <span class="n">Deploy-Website</span> <span class="s2">&quot;superawesome&quot;</span> <span class="p">}</span>   <span class="p">|</span> <span class="n">Should</span> <span class="n">Not</span> <span class="n">Throw</span>
</span></code></pre></td></tr></table></div></figure>


<p>Extending the syntax is simply a matter of adding domain specific expectations, that follow the Pester function naming
conventions, to your test suite:</p>

<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
<span class='line-number'>7</span>
<span class='line-number'>8</span>
<span class='line-number'>9</span>
<span class='line-number'>10</span>
<span class='line-number'>11</span>
<span class='line-number'>12</span>
<span class='line-number'>13</span>
<span class='line-number'>14</span>
<span class='line-number'>15</span>
<span class='line-number'>16</span>
<span class='line-number'>17</span>
<span class='line-number'>18</span>
<span class='line-number'>19</span>
<span class='line-number'>20</span>
<span class='line-number'>21</span>
<span class='line-number'>22</span>
<span class='line-number'>23</span>
<span class='line-number'>24</span>
<span class='line-number'>25</span>
<span class='line-number'>26</span>
<span class='line-number'>27</span>
</pre></td><td class='code'><pre><code class='powershell'><span class='line'><span class="k">function</span> <span class="n">PesterBeCanadian</span><span class="p">(</span><span class="nv">$sentence</span><span class="p">)</span> <span class="p">{</span>
</span><span class='line'>    <span class="k">return</span> <span class="p">(</span><span class="nv">$sentence</span> <span class="o">-match</span> <span class="s2">&quot;.*[,\ ]eh.$&quot;</span><span class="p">)</span>
</span><span class='line'><span class="p">}</span>
</span><span class='line'>
</span><span class='line'><span class="k">function</span> <span class="n">PesterBeCanadianFailureMessage</span><span class="p">(</span><span class="nv">$sentence</span><span class="p">)</span> <span class="p">{</span>
</span><span class='line'>    <span class="k">return</span> <span class="s2">&quot;Expected: {$sentence} to end with &#39;eh&#39;&quot;</span>
</span><span class='line'><span class="p">}</span>
</span><span class='line'>
</span><span class='line'><span class="k">function</span> <span class="n">NotPesterBeCanadianFailureMessage</span><span class="p">(</span><span class="nv">$sentence</span><span class="p">)</span> <span class="p">{</span>
</span><span class='line'>    <span class="k">return</span> <span class="s2">&quot;Expected: {$sentence} ended with eh, you hoser!&quot;</span>
</span><span class='line'><span class="p">}</span>
</span><span class='line'>
</span><span class='line'><span class="n">Describe</span> <span class="s2">&quot;a few sentences&quot;</span> <span class="p">{</span>
</span><span class='line'>    <span class="n">Context</span> <span class="s2">&quot;when scott says something&quot;</span> <span class="p">{</span>
</span><span class='line'>        <span class="n">It</span> <span class="s2">&quot;is Canadian&quot;</span> <span class="p">{</span>
</span><span class='line'>            <span class="nv">$what_scott_says</span> <span class="p">=</span> <span class="s2">&quot;Good show, eh?&quot;</span>
</span><span class='line'>            <span class="nv">$what_scott_says</span> <span class="p">|</span> <span class="n">Should</span> <span class="n">BeCanadian</span>
</span><span class='line'>        <span class="p">}</span>
</span><span class='line'>    <span class="p">}</span>
</span><span class='line'>
</span><span class='line'>    <span class="n">Context</span> <span class="s2">&quot;when pete hodgson says something&quot;</span> <span class="p">{</span>
</span><span class='line'>        <span class="n">It</span> <span class="s2">&quot;is not Canadian&quot;</span> <span class="p">{</span>
</span><span class='line'>            <span class="nv">$what_pete_says</span> <span class="p">=</span> <span class="s2">&quot;Have you tried testing it with Frank?&quot;</span>
</span><span class='line'>            <span class="nv">$what_pete_says</span> <span class="p">|</span> <span class="n">Should</span> <span class="n">Not</span> <span class="n">BeCanadian</span>
</span><span class='line'>        <span class="p">}</span>
</span><span class='line'>    <span class="p">}</span>
</span><span class='line'><span class="p">}</span>
</span></code></pre></td></tr></table></div></figure>


<p>Pretty cool, eh? I feel that this can lessen the potential bloat of expectations in Pester and allow people to write
test suites that fit their infrastructure domain model. The expectations are also very <a href="https://github.com/pester/Pester/blob/master/Functions/Assertions/Be.Tests.ps1">easy to test</a> in isolation. The core matchers are pretty light, but they should be easy to modify now that matchers have test coverage unlike the previous syntax.</p>

<p>Adding your own matcher requires you to add 3 convention following functions. One that is the matcher, and 2 that return
failure messages for postive and negative expectations. The biggest problem I see with this method is that if the
convention ever changes, I&#8217;ll have to be very cautious and make it backwards compatible.</p>

<h2>Mocks!</h2>

<p>This was released earlier but I didn&#8217;t really announce anything. Thanks to <a href="http://www.mattwrock.com/">Matt Wrock</a>(<a href="https://twitter.com/mwrockx">twitter</a>) Pester has the ability to mock cmdlets. I&#8217;m looking forward to trying this out on my next project.</p>

<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
</pre></td><td class='code'><pre><code class='powershell'><span class='line'><span class="n">Mock</span> <span class="nb">Get-Location</span> <span class="p">{</span> <span class="k">return</span> <span class="s2">&quot;you are home, sir.&quot;</span> <span class="p">}</span>
</span><span class='line'><span class="nb">Get-Location</span> <span class="p">|</span> <span class="n">Should</span> <span class="n">Be</span> <span class="s2">&quot;you are home, sir.&quot;</span>
</span></code></pre></td></tr></table></div></figure>


<h2>Description Tagging</h2>

<p>Thanks to <a href="https://github.com/rismoney">Rich Siegel</a>, Pester can now run blocks that fit a certain tag.</p>

<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
</pre></td><td class='code'><pre><code class='powershell'><span class='line'><span class="n">Describe</span> <span class="n">-Tag</span> <span class="s2">&quot;Acceptance&quot;</span> <span class="s2">&quot;Website deployment flow&quot;</span> <span class="p">{</span>
</span><span class='line'>    <span class="n">It</span> <span class="s2">&quot;...&quot;</span> <span class="p">{</span> <span class="p">...</span> <span class="p">}</span>
</span><span class='line'><span class="p">}</span>
</span><span class='line'>
</span><span class='line'><span class="c"># and run it like this:</span>
</span><span class='line'><span class="nb">Invoke-Pester</span> <span class="n">-Tag</span> <span class="n">Acceptance</span>
</span></code></pre></td></tr></table></div></figure>


<h2>Xml Reporting</h2>

<p>Another contributor is <a href="https://github.com/mbergmann">Max Bergmann</a> who added NUnit style xml reporting to Pester runs.
We are even using it in Pester&#8217;s own <a href="http://teamcity.codebetter.com/project.html?projectId=project261&amp;tab=projectOverview">CI build</a>.
There&#8217;s some XML validation bugs that are still being sorted out.</p>

<h2>Why 1.2.x and 2.0.x?</h2>

<p>The motivation for this release is to fix the issues people have add where a <code>should</code> property is added to every Object.
I&#8217;m not sure how exactly it was breaking things, but it was messy anyways, and I wanted to get rid of it.</p>

<p>In version <code>1.2.x</code>, you can disable the old assertions by running Pester with the <code>-DisableLegacyExpectations</code>. This will
mean that your test suite has to only use the new pipeline style expectations.</p>

<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
</pre></td><td class='code'><pre><code class='powershell'><span class='line'><span class="c"># version 1.2.x has this switch</span>
</span><span class='line'><span class="nb">Invoke-Pester</span> <span class="n">-DisableLegacyExpectations</span>
</span></code></pre></td></tr></table></div></figure>


<p>For version <code>2.0.x</code> we disable the old style assertions and you need to explicitly enable them using the
<code>-EnableLegacyExpectations</code> switch. In the next significant release we&#8217;re going to remove the dot style assertions
completely from the codebase.</p>

<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
</pre></td><td class='code'><pre><code class='powershell'><span class='line'><span class="c"># version 2.0.x has this switch</span>
</span><span class='line'><span class="nb">Invoke-Pester</span> <span class="n">-EnableLegacyExpectations</span>
</span></code></pre></td></tr></table></div></figure>


<p>So if you&#8217;re upgrading Pester, then you should probably move to <code>1.2.x</code> first. If you can run your tests with the
<code>-DisableLegacyAssertions</code> flag set, then you should be fine to move to <code>2.0.x</code>. If you&#8217;re starting from scratch, then
definitely use <code>2.0.x</code>.</p>

<h2>What&#8217;s Left To Do?</h2>

<p>Lots and lots of documenting. The <code>Get-Help</code> pages need to be updated and I want to get pesterbdd.com up as soon as
possible. I think version 2 should be a fairly stable version of Pester.</p>

<p>If you&#8217;re interested in contributing to Pester please join the <a href="https://groups.google.com/forum/?fromgroups#!forum/pester">google group</a>.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Setting up Overtone]]></title>
    <link href="http://scottmuc.com/setting-up-overtone/" />
    <updated>2013-01-27T21:11:00+05:30</updated>
    <id>http://scottmuc.com/setting-up-overtone</id>
    <content type="html"><![CDATA[<p>Every now and then I like to sit in a coffee shop on a Sunday and focus on writing some code. This weekend I had the pleasure of spending this geeky time with a colleague, <a href="http://literateprogrammer.blogspot.in/">Chris Ford</a>(<a href="https://twitter.com/ctford">twitter</a>).</p>

<p>Chris has gotten me interested into an open source toolkit for creating sounds and making music called <a href="https://github.com/overtone/overtone">Overtone</a>. Here&#8217;s a talk about demonstrates functional composition using clojure through music and overtone.</p>

<iframe width="640" height="510" src="http://www.youtube.com/embed/Mfsnlbd-4xQ " frameborder="0" allowfullscreen></iframe>


<p>That talk made me want to play with overtone. Here&#8217;s the diary of my workstation setup.</p>

<h2>Leiningen</h2>

<p><img class="right" src="http://leiningen.org/img/leiningen.jpg"> Thinking I know what I&#8217;m doing I say &#8220;So, Overtone is in Clojure, right? So I&#8217;ll first install that.&#8221;. To which he replied &#8220;No, you need to install <a href="http://leiningen.org/">Leiningen</a>.&#8221;. What?! I want to install clojure, why do I need this oddly named tool? Already my world has been turned upside down.</p>

<p>Leiningen is a package manager for Clojure. I can&#8217;t say I understand completely what it&#8217;s doing, but when I did a <code>sudo port install leiningen</code> I saw Maven was being installed. Chris calmed me down and said that <code>lein</code> hides the pain so I don&#8217;t have to worry about it.</p>

<p>Sure enough, the install works. I run <code>lein new mucmusic</code> and a simple project structure is setup for me. I updated the <code>project.clj</code> to refer to the 1.4.0 version of Clojure.</p>

<p>I then run <code>lein repl</code> and see the package manager at work. It downloads Clojure for me and I&#8217;m in a repl. I try the most basic thing I know <code>(+ 1 1)</code> and it works! I can only imagine what&#8217;s going on behind the scenes. I find it interesting that a package management tool is responsible for obtaining the language you&#8217;re going to develop in. It makes a whole lot of sense actually. It&#8217;s sort of like <a href="http://www.virtualenv.org/en/latest/">virtualenv</a>, but not quite.</p>

<h2>Clojure</h2>

<p><img class="left" src="http://clojure.org/space/showimage/clojure-icon.gif"> Since I&#8217;m still coming to grips on writing code in Clojure I can&#8217;t comment on the language, but what I really like so far is how accessible the documentation is. Simply evaluating <code>(doc +)</code> will print the documentation for &#8216;+&#8217; function  and <code>(source +)</code> prints out the source code. The REPL made it very easy to get started.</p>

<p>One thing that tripped me up was using a namespace I had defined. I learned the the &#8217; character is used to indicate the following text is a symbol and not to be evaluated. Also, the first project I created had an underscore in it. In order to use that namespace I had to use a hyphen when using it.</p>

<h2>Overtone</h2>

<p><img class="right" src="http://overtone.github.com/media/logo.png"> Happy that I can write and evaluate Clojure code it was time to setup Overtone. This part was really nice. All I did was update the <code>project.clj</code> file and added the overtone dependency. The next time I ran <code>lein repl</code> it downloaded overtone and set everything up for me.</p>

<p>In the repl I loaded overtone via <code>(use 'overtone.live)</code> and here&#8217;s the output:</p>

<pre><code>reply.eval-modes.nrepl=&gt; (use 'overtone.live)
--&gt; Loading Overtone...
--&gt; Booting internal SuperCollider server...
--&gt; Connecting to internal SuperCollider server...
--&gt; Connection established

    _____                 __
   / __  /_  _____  _____/ /_____  ____  ___
  / / / / | / / _ \/ ___/ __/ __ \/ __ \/ _ \
 / /_/ /| |/ /  __/ /  / /_/ /_/ / / / /  __/
 \____/ |___/\___/_/   \__/\____/_/ /_/\___/

    Collaborative Programmable Music. v0.8

Hello ThoughtWorks, just take a moment to pause and focus your creative powers...
</code></pre>

<p>Woah! Booting internal SuperCollider server? Is Clojure so powerful that I can run my own atom smasher?
Turns out the answer is unknown on that, but what <code>overtone.live</code> does is smartly start up
<a href="http://supercollider.sourceforge.net/">SuperCollider</a> which is &#8220;an environment and programming language
for real time audio synthesis and algorithmic composition&#8221;. Ahh! So overtone needs this to actually
create audio.</p>

<p>I continue to follow the <a href="https://github.com/overtone/overtone">README</a> and make my first sound.</p>

<pre><code>(demo (sin-osc))
</code></pre>

<p>This code rewards me with the beautiful sound that is a sine wave. Curious as to what <code>demo</code> and <code>sin-osc</code>
do I load up the docs in the repl.</p>

<pre><code>overtone.live/demo
([&amp; body])
Macro
  Listen to an anonymous synth definition for a fixed period of time.
  Useful for experimentation.  If the root node is not an out ugen, then
  it will add one automatically.  You can specify a timeout in seconds
  as the first argument otherwise it defaults to *demo-time* ms. See
  #'run for a version of demo that does not add an out ugen.

  (demo (sin-osc 440))      ;=&gt; plays a sine wave for *demo-time* ms
  (demo 0.5 (sin-osc 440))  ;=&gt; plays a sine wave for half a second
nil
user=&gt; (doc sin-osc)
-------------------------
overtone.live/sin-osc
([freq phase])

  Sine table lookup oscillator 

  [freq 440.0, phase 0.0]

  freq  - Frequency in Hertz 
  phase - Phase offset or modulator in radians 

  Outputs a sine wave with values oscillating between -1 and 1 similar to 
  osc except that the table has already been fixed as a sine table of 8192 
  entries.

  Sine waves are often used for creating sub-basses or are mixed with 
  other waveforms to add extra body or bottom end to a sound. They contain 
  no harmonics and consist entirely of the fundamental frequency. This 
  means that they're not suitable for subtractive synthesis i.e. 
  passing through filters such as a hpf or lpf. However, they are useful 
  for additive synthesis i.e. adding multiple sine waves together at 
  different frequencies, amplitudes and phase to create new timbres. 

  Categories: Generators -&gt; Deterministic
  Rates: [ :ar, :kr ]
  Default rate: :ar
</code></pre>

<p>No wonder people love programming in clojure! This idea of the documentation living in the
code is wonderful. I&#8217;m generally used to googling for a function name, but this makes that step
unnecessary.</p>

<h2>VimClojure</h2>

<p>Chris, like myself, also uses <a href="http://www.vim.org/">Vim</a>. So first thing I wanted to do is get some syntax highlighting. Chris points me to <a href="https://github.com/daveray/vimclojure-easy">vimclojure-easy</a>, but I didn&#8217;t want to replace my vim configuration. I already maintain my vim in a tidy and versioned way. Looking at the this repo gave me the direction I needed to set this up. I cloned <a href="https://github.com/vim-scripts/VimClojure">VimClojure</a> into my <code>~/.vim/bundle</code> directory (and removed its .git directory). I launch vim on a clojure file and I have syntax highlighting!</p>

<h2>lein-tarsier and nailgun</h2>

<p>Thinking I was complete I tried some of the vim shortcuts to evaluate some clojure from within vim. Then I realized I&#8217;m
not quite done (feels like my visit to the <a href="http://indianfrro.gov.in/frro/">FRRO</a>. This is now where the JVM comes in.
Clojure is a JIT compiled language. In order to compile, it needs a JVM. Starting up a JVM all the time is a very
slow and painful process.</p>

<p>Lein-tarsier (tarsier is the type of creature on the <a href="http://shop.oreilly.com/product/9780596529833.do">O&#8217;Reilly Vim book</a>
is a lein plugin that starts up a VimClojure server. To install this, I just added it to my lein profile. It didn&#8217;t work
at first, but that was because MacPorts installs version 1.6 of lein. Nailgun was some C code that you have to download a compile and make reference to it in your vimrc. I&#8217;m sort of lost on how all these components work together.</p>

<p>A quick <code>lein upgrade</code> got me to version 2.0. Then an execution of <code>lein vimclojure</code> and the server is up and running.</p>

<h2>Summary</h2>

<p>After installing a bunch of oddly named things I was able to play the pieces from Chris&#8217; talk in vim.</p>

<p>There were some details that I left out (and forgot). I don&#8217;t think I would have gotten this far without help from Chris
and the considerable documentation that&#8217;s in the README files and wikis. Part of me also thinks that it shouldn&#8217;t
require this much work. As a side project, I&#8217;m going to look into pulling all of these steps into a Vagrant
configuration management setup. I think it would be nice to go <code>vagrant up overtone</code> and have a working overtone
development environment.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[My Developer Resolutions for 2013]]></title>
    <link href="http://scottmuc.com/my-developer-resolutions-for-2013/" />
    <updated>2012-12-31T10:45:00+05:30</updated>
    <id>http://scottmuc.com/my-developer-resolutions-for-2013</id>
    <content type="html"><![CDATA[<p>2012 started off interesting because I was on on an iOS/ruby project. Nearly everything was new to me, but I liked how
my past experiences with other technology stacks were still relevant. Even though I didn&#8217;t know the languages very well
the patterns I&#8217;ve seen before still applied.</p>

<p>The last quarter of the year was spent teaching new software developers in India, which has been one of the most
rewarding experiences of my career! It has definitely influenced my goals for 2013.</p>

<!-- more -->


<h2>Reflections on 2012 and carry over from 2011:</h2>

<ul>
<li>Learn a server provisioning automation tool (2011) - I may have failed this one big time in 2011 but 2012 was a great
year for this. I spent much of the year getting to know Chef. I feel I can check this one off now.</li>
<li>Stop reading comments (2012) - Can&#8217;t say I&#8217;ve stopped reading comments but I&#8217;m more conscious of when I&#8217;m wasting my
time and tend to stop immediately. I started following a <a href="https://twitter.com/AvoidComments">useful twitter account</a>
which provides constant reminders that reading comments can be a huge waste of time.</li>
<li>No client work when away from client (2012) - I twisted this one into a conditional success. I still like to hack in
my spare time but I hack on my personal projects and stay away from doing extra billable hours when I should be having
ME time. I&#8217;ve been much better at saying NO to excess outings and have focused on being healthy.</li>
<li>Complete <a href="https://github.com/manojlds/YDeliver/">YDeliver</a> (2012) - This one is a big failure. I barely touched
YDeliver all year. Apparently it&#8217;s been used in a few ThoughtWorks projects by <a href="https://github.com/manojlds">Manoj</a> and he now
has ownership of the repository. I&#8217;ve come to the realization that OSS doesn&#8217;t come out of a vacuum. YDeliver was
going strong when I still had fresh memories of that previous project, but as time went on, the relevance (to me) of
YDeliver was diminishing. The takeaway for is me to maintain the momentum if it&#8217;s there.</li>
</ul>


<h2>Development Goals for 2013:</h2>

<p>While 2012 was a great mix of fun ops tooling learning and consulting, I want to get back to my roots (pun?) and do more low
level tech related things. At the same time, I want to improve on my teaching skills which will mean facilitating more learning
workshops and presenting more frequently.</p>

<h3>Read <a href="http://pragprog.com/book/btlang/seven-languages-in-seven-weeks">7 Languages in 7 Weeks</a></h3>

<p>Much of my effort is spent making many puzzle pieces fit together. Being isolated to a
<a href="http://en.wikipedia.org/wiki/Read%E2%80%93eval%E2%80%93print_loop">REPL</a> and a text editor would be
pleasant change. Also, I haven&#8217;t dived deep into a language lately. All my ruby learning has been simply by having to
write ruby code for work. I can&#8217;t say I know the language, but I&#8217;ve managed to figure things out. I miss having a little
bit deeper knowledge of a language like I used to have with C#.</p>

<p>My action plan is to purchase the book and do 1 language a month. So by July this goal will be accomplished.</p>

<h3>More Presentations</h3>

<p>Being a trainer at ThoughtWorks University taught me that I have a lot to learn about presenting. <a href="http://www.learninggeneralist.com/">Sumeet
Moghe</a>, who was the previous lead trainer, showed excellent examples of what makes a
good presentation. It was interesting, because I always felt those points internally, but he expresses them externally
in a digestable way that actually inspires me to make excellent presentations.</p>

<p>My colleague <a href="http://twitter.com/tpbrown">Tim Brown</a> will be happy about this goal because he&#8217;s been nagging me for a
while about this. Some topics I&#8217;ve been pondering so far are:</p>

<ul>
<li>Using <a href="http://vagrantup.com/">Vagrant</a> to provide local infrastructure (aka never install a DB server on your machine again)</li>
<li>Application configuration patterns with a non-trivial number of environments</li>
<li>PowerShell BDD with <a href="https://github.com/pester/Pester/">Pester</a></li>
</ul>


<p>The action plan is to choose 1 of these topics and present it 3 times. As well as the presentations, I will design 3
different workshops and faciliate each one 3 times.</p>

<h3>Expand my Ops Toolbelt</h3>

<p>I really love ops and I think this is the career path I want to continue on. 2012 was great for learning
<a href="http://www.opscode.com/chef/">Chef</a>, so this year I want to learn <a href="http://puppetlabs.com/">Puppet</a>. Another area
that I would like to improve upon my knowledge is the domain of remoting.</p>

<p>My action plan is to duplicate any Vagrant server setups that use Chef to use Puppet as well. This will be great for
a side-by-side comparison. So currently that would mean the following repositories need a puppet provisioner:</p>

<ul>
<li><a href="https://github.com/scottmuc/vagrant-postgresql">vagrant-postgresql</a></li>
<li><a href="https://github.com/scottmuc/vagrant_rails">vagrant-rails</a></li>
<li><a href="https://github.com/scottmuc/gordon">gordon</a></li>
</ul>


<p>For remoting I plan on writing 10 blog posts on tools like ssh, winRM. I want to dive into the mechanics of
authentication and networking to better understand technologies like kerberos, certificates, and gssapi which are
crucial for making remoting work on a larger scale.</p>

<h3>Summary</h3>

<p>The last few years I&#8217;ve learned a lot about managing my goals. I&#8217;m doing my best to keep my goals
<a href="http://en.wikipedia.org/wiki/SMART_criteria">SMART</a> so that I can actually achieve them. We&#8217;ll see how things turn
out 365 days from now!</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Devops Days 2012 in Summary]]></title>
    <link href="http://scottmuc.com/devops-days-2012-in-summary/" />
    <updated>2012-06-29T17:08:00+05:30</updated>
    <id>http://scottmuc.com/devops-days-2012-in-summary</id>
    <content type="html"><![CDATA[<p><a href="http://devopsdays.org/">DevopsDays</a> is a juxtaposition in the world of IT. Most
tech conferences focus on tools and processes, whereas Devops Days focuses on
culture and the delivery of value. This year&#8217;s conference was no exception and
here is a summary of what I experienced:</p>

<h2>Day 1</h2>

<h4>The Audubon Society for Partial Failures</h4>

<p>The first <a href="http://cl.ly/2t1J0H1M3b2O092a1v1S">presentation</a> was done by <a href="https://twitter.com/moonpolysoft">Cliff Moon</a>. He argues
that there are many common patterns in the IT space and it would be valuable
to have a repository of knowledge that we can visit to read about the types of
errors that can happen. If we could build a taxonomy for the partial failures
that exist we may better understand our systems and explain when full-blown
outages occur.</p>

<p>He stresses sharing as the ultimate method for this. Not just sharing ideas and
hypotheses but also the data that lead to the hypothesis. This allows for peer
review and corrections to be made if analysis of the data could have been
misinterpreted.</p>

<p>What I really enjoyed was the spirit of Cliff&#8217;s talk. The influence for the title
was a man who was obsessed with categorizing birds, John James Adubon. What
really hit home was the idea that there&#8217;s always someone on your team that is
somewhat of a shaman when it comes to resolving production issues. It might
simply be because that person understands the conventions of the system at
work. Creating this taxonomy could help in revealing the shaman&#8217;s &#8220;secrets&#8221; and
allow for everyone to weave a little magic.</p>

<h4>Continuous Improvement</h4>

<p><a href="https://twitter.com/noahsussman">Noah Sussman</a> is a test architect at Etsy and he
<a href="http://www.slideshare.net/noahsussman/continuous-improvement-devops-day-mountain-view-2012">presented</a> on how Continuous Deployment and
Continuous Delivery change how quality assurance needs to be done.</p>

<p>I believe this to be a very important topic because this is going to be
a drastic change for most organisations. Large companies are enamoured with
startup culture and ideas, but aren&#8217;t seeing what&#8217;s required of them to change
to this model. A change in testing strategy is a significant barrier to entry
for most large companies. Even if the devs and ops teams are collaborating,
they can&#8217;t deliver anything unless it gets passed the quality gates.</p>

<h4>Vagrant 2.0</h4>

<p>I got a chance to meet <a href="https://twitter.com/mitchellh">Mitchell Hashimoto</a>,
creator of a tool that I&#8217;ve been enjoying quite a bit lately,
<a href="http://vagrantup.com/">Vagrant</a>. There was an excellent discussion on how people
are using vagrant in their organisation. What was also exciting was hearing
what&#8217;s coming out next:</p>

<ul>
<li>run on any VM software</li>
<li>run any guest OS (that includes OS X)</li>
<li>distributed as a package, not as a gem</li>
<li>Builder (essentially merging veewee into vagrant)</li>
</ul>


<p>During the session I also learned about the concept of baking an image vs
frying one (and everyone knows I love analogies). To bake an image is to use
an image as is, no configuration management is needed. This doesn&#8217;t mean
configuration management isn&#8217;t used to bake that image though which I thought
was an important detail. Frying an image is to start with a common base and
always reach an end state via configuration management. Frying is the approach
I favour because I like to execute my chef recipes as often as possible. I
also learned about different ways of baking images and still having the same
level of confidence in configuration management scripting.</p>

<h2>Day 2</h2>

<h4>Gauntlt and bridging the gap between security and everyone</h4>

<p><a href="https://twitter.com/wickett">James Wickett</a>, a security consultant, discussed how security is feeling left
out in this crazy world of Continuous Integration, Testing, and Delivery.
What is cool, is that he&#8217;s doing something about it.</p>

<p>In typical security processes, an organisation has someone come in and
perform an assessment of the security of the applications being developed.
The artifact is usually a 100 page PDF describing everything that&#8217;s wrong
with the system being developed. Instead of a document, he suggests delivering
a test suite that can be executed continuously. Hence <a href="https://github.com/thegauntlet/gauntlt">gauntlt</a> is born; a tool
to execute security tests against a running application.</p>

<p>I chatted with James briefly and somehow managed to volunteer to join their
team. I am no security expert, but I believe there&#8217;s a gap in security knowledge
in the software industry. Hopefully by integrating gauntlt into future projects
I can provide some feedback to make the tool more useful.</p>

<h4>Continuous Delivery at Ancestry.com</h4>

<p>I posted my thoughts on a similar presentation at <a href="http://scottmuc.com/chefconf-2012-in-summary/">Chef Conf</a> and again John
delivered an excellent presentation on the values of culture and delivery focus
at their organisation.</p>

<p>Again I got a chance to chat with Dan Gilmer who implemented a lot of tech
around their pipeline and am looking forward to collaborating with him on
open sourcing his robust solution to dealing with Windows configuration
management using PowerShell and Chef. Hopefully we&#8217;ll have some of that
knowledge in a project in github soon.</p>

<h4>Automating Application Configuration Deployment</h4>

<p><a href="https://twitter.com/dcnem">Dan Nemec</a> delivered a presentation that is very near and dear to my heart.
Application configuration management can be messy if left to people who do not
have visibility into all the systems that are in play. He brought a system that
required 400+ configuration files to a 2 file system. The 400+ files still
existed but by using templates, and simple configuration hierarchy in chef
he was able to make application configuration management much simpler and
easier to scale.</p>

<p>This hit home for me because I&#8217;ve implemented my own turnkey implementation
of this on my last few projects. Those that have worked with me know I refer
to these as environment yaml files. These files are a manifest of the topology
of an environment and all its configuration.</p>

<p>You can read more about Dan&#8217;s thoughts on this on his <a href="http://blog.geeksgonemad.com/2012/05/automating-application-configuration.html">blog</a>.</p>

<h4>Where Does SmallOps Fit In</h4>

<p>This session was very relevant to me as someone who has been working on a small
team for the last few months. <a href="https://twitter.com/mkocher">Matthew Kocher</a>
highlights the simple solutions which is why I really enjoy hearing him discuss
his opinion.</p>

<p>During this session not much of a consensus was reached. I got the feeling that
most of the people in the room didn&#8217;t quite know what to do with SmallOps. How
do you manage 20 servers and not complicate the infrastructure
management?</p>

<h4>Devops as a role on projects</h4>

<p>This topic, I love in principle, but do a horrible job in practice. There&#8217;s
no such thing as a &#8220;DevOps Engineer&#8221;, it&#8217;s just a mindset. This is where
the cultural message is most important. DevOps is about transforming
organisations to remove silos. Jamie who brought up the open space likened
a software delivery team to a sports team (again, I love the analogies). With
sports you still have specialists, but they work has a cohesive unit. In
football, there&#8217;s no reason a defense person can&#8217;t score a goal. If you have
a team where offensive players begin blaming defense for their lack of success
you then have a disfunctional team.</p>

<h4>What Am I Going To Do Now?</h4>

<p>It really hit home to me after this Devops Days how I am doing a lot of things
wrong in the mission to bridge these gaps.</p>

<p>I&#8217;m going to:</p>

<ul>
<li>Measure all things.</li>
<li>Use monitoring tools (I&#8217;ve been a cowboy ops person for too long)</li>
<li>Keep my engagements short to force knowledge transfer early</li>
</ul>

]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Examples of how production like environments can catch bugs early]]></title>
    <link href="http://scottmuc.com/examples-of-how-production-like-environments-can-catch-bugs-early/" />
    <updated>2012-06-08T17:03:00+05:30</updated>
    <id>http://scottmuc.com/examples-of-how-production-like-environments-can-catch-bugs-early</id>
    <content type="html"><![CDATA[<p>On a previous project, I witnessed a few interesting build breakages that we caught in <a href="http://wikipedia.org/Continuous_Integration">CI</a>
that could have easily gotten passed our automated quality gates. These issues would have hurt us in downstream
environments.</p>

<p>It&#8217;s commonly referenced in the <a href="http://continuousdelivery.com/">Continuous Delivery</a> book that development
environments should be as close to production like as possible. This might not
be 100% possible but you can come close. What can come that close is your
system integration test environment. On this project we had a typical
web application architecture: web server, database server, and a load balancer
to support multiple web servers. Here are a couple integration failures that we experienced:</p>

<h2>Issue 1</h2>

<p>A route in our application returned the version of the application and the
hostname of the machine. It wasn&#8217;t used by the application at all, but it was
used in environments that had load balancers because it is what they used to
detect the health of the application. Someone deleted this route and
deployments ceased to be successful because the application was considered
down by the load balancer so it returned <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html">HTTP 503</a>.</p>

<p>Had our <a href="http://en.wikipedia.org/wiki/System_integration_testing">system integration</a> environment simply used the hostname of the
application server, this would not have been caught until it made it to
downstream environments. It was easy to fix and helped transfer knowledge to
the team. It was also much less stressful to catch here than when a product
owner is pushing something to UAT and things all of the sudden break.</p>

<h2>Issue 2</h2>

<p>A change to some application code used unconfigured database connection
code. Default behaviour of the code is to connect to localhost when issuing
queries against the database. This worked fine locally, but because the
system integration environment seperated the database server from the web
application server, this unconfigured code was caught before it made it to
any other downstream environment.</p>

<h2>Isn&#8217;t That Overboard?</h2>

<p>If I was managing environments manually, I would say yes. Since the environments
are nearly 100% configured by <a href="http://opscode.com/chef">Chef</a> and our deployment code is automated, I don&#8217;t think
having the environment set up this way is going too far. It caught what could be
extremely stressful defects to debug in production much earlier such that that our fixes
could be done quickly and with confidence.</p>

<p>I predict that in the future, tools like <a href="http://vagrantup.com/">vagrant</a> will help us setup these
architectures on our local machines so that we can catch these issues before
they even get checked into version control. Imagine developing software in
a way that the mismatch between dev and prod becomes such a non-issue that
it&#8217;s no longer a worry? I look forward to helping make that world possible.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[ChefConf 2012 in Summary]]></title>
    <link href="http://scottmuc.com/chefconf-2012-in-summary/" />
    <updated>2012-06-03T21:07:00+05:30</updated>
    <id>http://scottmuc.com/chefconf-2012-in-summary</id>
    <content type="html"><![CDATA[<p>This is a little late coming but figured I should post anyways. <a href="http://chefconf.opscode.com/">ChefConf 2012</a>
was an amazing event and absolutely surprising considering it&#8217;s the first
conference <a href="http://www.opscode.com/">Opscode</a> has put on. Here are a few things that I noticed:</p>

<h2>Culture</h2>

<p>The attitude and culture around the people there was incredible. Everyone was
focused on the needs of the business that they worked for. Sometimes it meant
making developers more productive by being to provide consistent environments
or by lessening the pain operations have to go through in order to release
software created by development teams.</p>

<p>It inspired me to see so many people in the business to help others. There was
not a lot of ego, but there was definitely a sense of pride in the work that
many of the people did there.</p>

<h2>Demand</h2>

<p>I was hoping to find some excited chefs out there that would love to work for
<a href="http://join.thoughtworks.com/">ThoughtWorks</a> but it seemed everyone was doing the same. Attempts to recruit me
occurred as I was trying to recruit them! This is definitely a hot part of the
software industry.</p>

<p>What made matters worse is that nearly everyone is extremely satisfied with
their jobs. Pretty hard to recruit people that are quite comfortable with their
positions and projects.</p>

<h2>Orchestration</h2>

<p>Configuration management of a single node seems to nearly be a solved issue.
A running theme amongst many of the sessions was that orchesration. There were
many discussions but it didn&#8217;t sound like it&#8217;s been solved in a uniform way.
Maybe orchestration is something that has to be done custom depending on your
environment. While listening to the conversations it appeared that many
had different requirements for how they do the orchestration. I&#8217;ve written
plenty of orchestration code and was relieved that I wasn&#8217;t the only person
that found it hard to do. This subject will my &#8220;next level&#8221; in understanding
infrastructure automation processes.</p>

<h2>Sessions of Note</h2>

<h3>Transformation to Continuous Delivery at Ancestry</h3>

<p>Since I have a lot Windows background, I was really interested in the
two talks given by the folks from <a href="http://www.ancestry.com/">Ancestry.com</a>. The first one was a high level
summary of Ancenstry&#8217;s path to Continuous Delivery. <em>John Esser</em> articulated the
principles well and was pleasantly surprised to see him promote <a href="http://www.thoughtworks-studios.com/go-agile-release-management">ThoughtWorks Studios&#8217; product Go</a>.</p>

<p>The main takeaway I got from the talk that the transformation seemed to be
more of a culture shift, rather than a technical one.</p>

<iframe width="640" height="510" src="http://www.youtube.com/embed/J6g10f83yVE " frameborder="0" allowfullscreen></iframe>


<h3>DevOps + Chef + Windows at Ancestry.com</h3>

<p>Next was a more technical discussion by <em>Dan Gilmer</em> which reminded me of all
the lessons I&#8217;ve learned in the Windows automation world. I had an excellent
chat with him and shared war stories that were all to familiar to him. I also
got a kick out of his pride in working for days without ever having to
Remote Desktop into a machine.</p>

<p>This is a problem domain that seems to be repeatably solved. Hopefully some
OSS will come out of this. I would like to dive deeper into how they are
driving out infrastructure using data_bags rather than roles.</p>

<iframe width="640" height="510" src="http://www.youtube.com/embed/pF5ya0q53kk " frameborder="0" allowfullscreen></iframe>


<h3>Opscode Chef State of the Union</h3>

<p><em>Adam Jacobs</em> keynote was a good reminder that Chef is about providing us with
infrastructure primitives. As much as we like to standardize, the real world
isn&#8217;t ever going to reach a global convergence. Every site is different and
they decided they didn&#8217;t want to be the dictators on how you setup your
infrastructure. I think this is great because it allows Chef users to define
the opinionated stacks that they require. It&#8217;s a good separation of concerns
in my opinion and a concept that I will try to pull into future projects.</p>

<iframe width="640" height="510" src="http://www.youtube.com/embed/bAWjqE5FCxI " frameborder="0" allowfullscreen></iframe>


<h3>Test-Driven Development for Chef Practitioners</h3>

<p><em>Jim Hopp</em> from <a href="https://www.mylookout.com/">Lookout</a> had an awesome slide deck (hand drawn with paper and
crayola markers) that discussed Test Driven Development of cookbooks. I look
forward to trying out the concepts he discussed in my next project. For
developers the concepts might seem pretty standard but the ideas are very
new for operations minded folk.</p>

<iframe width="640" height="510" src="http://www.youtube.com/embed/o2e0aZUAVGw " frameborder="0" allowfullscreen></iframe>


<h3>CycleCloud + Chef = 50,000-core Utility Supercomputer for Science</h3>

<p>Lastly, <a href="http://cyclecomputing.com/">CycleCloud&#8217;s</a> <em>Jason Stowe</em> impressed everyone by discussing how they were
able to spin up $20 million dollars worth of infrastructure using AWS and only
paid $5k/hr for 3 hours use. Not only did the massive infrastructure speed
things up for them, it actually produced better results when performing protein
analysis. It begs the question of what other things are we missing because we
are yet to through large enough computing systems at them.</p>

<iframe width="640" height="510" src="http://www.youtube.com/embed/cEaQB6e7G0Q " frameborder="0" allowfullscreen></iframe>


<h2>Summary</h2>

<p>The couple days were inspiring by I had to keep my energy in check because
I learned that certain things are not necessary for small projects with just
a handful of servers. I&#8217;ve been using chef-solo for all my machines because
the size of the environments I&#8217;m dealing with can easily be tracked in simpler
ways. I do look forward to the day when a chef server is necessary to deal
with all the infrastructure. That&#8217;s where metrics like 1 engineer per 1000
machines is possible.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Intentional Programming aka Calling Your Shots]]></title>
    <link href="http://scottmuc.com/intentional-programming/" />
    <updated>2012-02-21T00:00:00+05:30</updated>
    <id>http://scottmuc.com/intentional-programming</id>
    <content type="html"><![CDATA[<p>I just read this <a href="http://playswithfire.com/blog/2012/02/19/you-are-not-ruthless-enough/">blog post</a> and it&#8217;s inspired me to finally post
about something that&#8217;s been in the back of my mind for while now.</p>

<p>Back in the day I used to play 8-ball on a fairly regular basis. I would play with a regular group of friends who would all work on
improving our game. One of the players was nearly a professional and provided me one training tip that helps me everyday. He would ask me
to declare every variable of my shot. Not just what ball and pocket I&#8217;m targeting, but what trajectory the cue ball will take after contact
and how it will carom off of every rail, and to predict where the cue ball will end up. By doing this it revealed so much more of the game
to me. As a novice, your primary concern is potting balls. But to be good, you need be in control of everything on the table.</p>

<!-- more -->


<p>I like to apply this to software development. While watching Kent Beck&#8217;s <a href="http://pragprog.com/screencasts/v-kbtdd/test-driven-development">TDD screencast</a>
I heard him label this kind of thing as calling yours shots. I absolutely love that term for it and can&#8217;t believe I never thought of naming it that
before! Ultimately, calling your shots is like this:</p>

<blockquote><p><strong>When changing part of the system, predict how the the behaviour of the system has changed.</strong></p></blockquote>

<p>So if it&#8217;s code under test, predict the test result. If you predict it&#8217;s going to fail, declare exactly why it&#8217;s going to fail. When making
code change, declare your intent of what you want to happen as a result of that change. Before I went into software development I worked as
a system administrator and this routine became valuable. Saying things like &#8220;Because I have update this registry entry, a file named blah.log
should be in C:\foo\logs&#8221;. If that doesn&#8217;t happen, then you have an opportunity to learn more on how the system works.</p>

<p>I had an experience recently where I wasn&#8217;t able to call my shots. I was working on some CSS positioning and nearly every change I made to
that poor little SASS file was a shot in the dark. This was a clear indicator that I didn&#8217;t know what I was doing and that some deeper
understanding was necessary to be at all effective.</p>

<p>This is the paragraph from the <a href="http://playswithfire.com/blog/2012/02/19/you-are-not-ruthless-enough/">blog post</a> that really hit home
for me.</p>

<blockquote><p>Every time you throw in something that seems to work, find out why it works. If you don’t understand why it works then the code is
just magic and you’re letting yourself off the hook. That code will become enshrined in your version control system for later
generations (read: you, three months from now) to discover, wonder at, puzzle over, and leave it because no one understands what it does.</p></blockquote>

<p>When it comes to software and computers, I have little patience for magic. This probably slows me down initially but as the system grows
I feel confident that I understand everything quite well.</p>

<p>On the other side of the coin, playing around and exploring is also necessary. This is the realm of the spike. I had an experience with a colleague
recently where I kept on insisting that they called their shot. They announce that they couldn&#8217;t because of a lack of context and understanding
and that they were simply exploring. It was a good reminder that exploration is extremely important and that we don&#8217;t spike things out
often enough. Our spikes end up being our production code which is part of what the linked to article is trying to get at.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Migrated to Octopress!]]></title>
    <link href="http://scottmuc.com/migrated-to-octopress/" />
    <updated>2012-01-15T08:45:00+05:30</updated>
    <id>http://scottmuc.com/migrated-to-octopress</id>
    <content type="html"><![CDATA[<p>It&#8217;s funny how many posts there are from <a href="https://www.google.com/search?q=migrating+to+octopress">people who have migrated to Octopress</a>. What would motivate someone to post their migration experience? I think I understand why. It&#8217;s such a shift in thinking that it&#8217;s worth talking about. My migration experience was so much pleasant that I feel that I must let everyone know.</p>

<!-- more -->


<p>So what&#8217;s my motivation for moving to a new blogging platform? Was what I was using before broken? Not
exactly, but I didn&#8217;t enjoy the blogging experience that much because I found the experience to not be a
lot of fun. I want to start writing more and feel that removing any barriers to this activity will get more
content out there. I also didn&#8217;t like having to rely on a server side application server. For a website that changes around 30 times a year, a database backed content management system was overkill. Also, the website was hosted on a friends server that I had no backups for, and didn&#8217;t want to spend much effort creating a backup/restoration strategy.</p>

<p>After some searching, I found <a href="http://jekyllrb.com/">jekyll</a>, wich I love for its simplicity. I was going to use bare bones jekyll but then I was directed to <a href="http://octopress.org/">Octopress</a> which is a framework to make working
with jekyll a lot easier.</p>

<p>Since I was on Windows my install was a bit different than the documentation. Luckily I have created a tool
to make <a href="http://scottmuc.com/blog/development/simplifying-ruby-installation-in-windows/">ruby installation simple on Windows</a>. Here&#8217;s everything I did to go from nothing to having a working
blog hosted on github!</p>

<ol>
<li>Installed <a href="https://github.com/scottmuc/yari">yari</a>, and got my environment using ruby 1.9.2</li>
<li>Followed the octopress <a href="http://octopress.org/docs/setup/">setup instructions</a></li>
<li>Followed the octopress <a href="http://octopress.org/docs/deploying/github/">deployment instructions</a></li>
</ol>


<p>I was blown away when I saw my blog appear when I went to <a href="http://scottmuc.github.com/">scottmuc.github.com</a>.</p>

<h3>Migration</h3>

<p>Unfortunately my previous blog engine&#8217;s export functionality is broken so migration had to be manual. Every post
is going to be copy and pasted and re-linkified in markdown syntax. I wanted to get this new version up and
running first so I made a few compromises.</p>

<ol>
<li>I decided not to migrate every post. Some of my old content doesn&#8217;t really fit with the rest of the content
so I decided to abandon the posts. I&#8217;m keeping the <a href="http://old.scottmuc.com/">old blog</a> up and running so that people can still find the posts there if they really want them.</li>
<li>Keeping links working is <strong>extremely</strong> important to me. Octopress provides the ability to set the permalink on
an individual post which made this element of the migration super easy. Every blog post has &#8220;front matter&#8221; which is a little bit of YAML meta data. Adding a permalink value will make the post accessible from that URL path: <pre>permalink: /foo/bar/post</pre></li>
<li>I went live with an incomplete migration. I only have about a third of my posts migrated. I did this so I can
get this live and sort out issues right away before everything is migrated. Also, it&#8217;s a way to motivate me to get
everything into the new blog ASAP.</li>
<li>Added a custom <a href="http://scottmuc.com/non-existent-page/">404</a> to guide those who want to see non-migrated content to the old blog.</li>
<li>Added &#8220;scottmuc.com&#8221; to my CNAME file. I followed the instructions <a href="https://github.com/blog/315-cname-support-for-github-pages">here</a>. Note that this is enabled for non-paying users now! I use <a href="http://gandi.net/">gandi.net</a> for my DNS and updating the A record and CNAME (for www) was a snap.</li>
</ol>


<h3>Other Stuff</h3>

<p>When setting up the blog I had an online discussion about how url design. I decided to leave dates out of my url
and to include them in the title slug only when appropriate. I came to the conclusion that url slug design is
extremely important and doesn&#8217;t always have to be word for word related to the post title. Because Octopress is
so easy to configure, the configuration setting for this is simply this value in _config.yml:</p>

<pre>permalink: /:title/</pre>


<p>I&#8217;m now using other 3rd party services like feedburner, disqus, and gist.github.com. With all of these things
taken care of for me, authoring a post is a call to <em>rake new_post[&#8220;post title&#8221;]</em>, edit in vim, and preview
using <em>rake preview</em> to view the changes before I deploy them.</p>

<p>The one thing I would like to change is learn how to create a custom theme. It&#8217;s quite common to see a lot of
octopress based blogs use the same default theme that I&#8217;m using now.</p>

<h3>Summary</h3>

<p>Octopress is awesome! I love the workflow for authoring new content. I much prefer markdown over using some
WYSIWIG editor over a web connection. The ability to do everything local means there&#8217;s significantly less
effort for me. I believe Octopress is an excellent example of how an excellent deployment mechanism can shift
how work can be done. If pushing brand new code to production is that easy, it removes the need for complex
server side code.</p>

<p>Lastly, if you would like to see what a raw blog post looks like, take a look <a href="https://github.com/scottmuc/scottmuc.github.com/tree/source/source/_posts">here</a>.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Reflections on 2 Years at ThoughtWorks]]></title>
    <link href="http://scottmuc.com/blog/development/reflections-on-2-years-at-thoughtworks/" />
    <updated>2012-01-04T10:24:00+05:30</updated>
    <id>http://scottmuc.com/blog/development/reflections-on-2-years-at-thoughtworks</id>
    <content type="html"><![CDATA[<p>I cannot believe I&#8217;ve been at ThoughtWorks for 2 years now! My colleague Aaron Erickson has written an excellent writeup on <a href="http://nomadic-developer.com/2012/01/03/why-thoughtworks/">why (work at) ThoughtWorks</a>. I couldn&#8217;t agree more!</p>

<p>Reading another <a href="http://www.adidav9.blogspot.com/2011/09/letter-that-i-present-day-rose-wish.html">colleague&#8217;s post</a> a while ago inspired me to write a little retrospective of my own. Thanks Rose, you are wise beyond your years!</p>

<!-- more -->


<p>ThoughtWorks has been a place I wanted to work for since I attended <a href="http://geekswithblogs.net/mucman/category/6627.aspx">DevTeach in 2007</a>. I met some really smart people who were excellent at articulating their perspective. Also, I observed many of the best blogs I read at the time were written by ThoughtWorkers. Yeah, I was also a BFF (Biggest <a href="http://martinfowler.com/">Fowler</a> Fan), but now my experience has shown me that there&#8217;s so much more.</p>

<p>So far I have worked on 3 large projects. This scale of work wasn&#8217;t exactly what I was expecting to do when I joined. I&#8217;m now thankful I got to work on them because they&#8217;ve all provide unique experiences.</p>

<ul>
<li><strong>Project 1</strong> - This was a pretty hostile environment where I learned how ThoughtWorkers band together and deliver.</li>
<li><strong>Project 2</strong> - I worked on this one for over a year on the largest project at the time. Here I met <a href="http://igiveada.mn/andy-d/">my sponsor</a> (here&#8217;s him in a <a href="http://www.youtube.com/watch?v=A98Asrs0X0g&amp;feature=youtu.be">monkey suit</a> at the ThoughtWorks North America Away Day)who has become an awesome friend in a very short time. The work done there will inspire me for quite a long time. It&#8217;s the reason why I yap about PowerShell so much.
Project 3 - This project was even larger than the previous one. Over 400 people distributed across the globe. Here I learned how to be patient, consistent, understanding, and observant. Large systems have so many variables that coming in complaining and pointing out the flaws gets you nowhere. For 8 months we chipped away and I think we made a difference. It wasn&#8217;t the most interesting project from a technical standpoint. I don&#8217;t think I&#8217;m mature enough yet to understand all the I&#8217;ve learned during this time. Plus I got to work with <a href="https://twitter.com/#!/manderbabble">@manderbabble</a>!</li>
</ul>


<p>Here are some other take-aways from the last 2 years that I did not expect:</p>

<h3>Be Organized</h3>

<p>I&#8217;m pretty organized in general but have realized a lot of people aren&#8217;t. I got the feeling that this ability to be organized help instill confidence in those that depended on what I did. I personally know that it&#8217;s a relief to have people that you can depend on. However, I did feel that I had to nag people on occasion. In large projects there&#8217;s already many different ways to become distracted and I think my organizational skill helped me keep a cool head no matter what kind of perceived chaos was ensuing.</p>

<p>Be awesome to your office manager! He/she runs the joint and when you need that private meeting room, or need lunch ordered for a meeting, they are your go to people. Also figure out logistical tasks like your client email, userid, and network access so soon as you can. Everyone else in the organization will have an expectation on you to have all that stuff sorted out.</p>

<p>Lastly, get a guy (for taxi service). While working in Bellevue I made friends with a father son taxi company (call Harry (206)-724-9525). They reduced the stress of travel big time. I could text them when I needed a lift and they would monitor my travel itinerary and be ready to pick me up at the airport. Their service was absolutely top-notch, thanks Harry and Gill!</p>

<h3>Know Your Org</h3>

<p>Understanding the organizational structure is hugely valuable. As much as we like to complain about how the structure holds you back, that effort is just a waste of energy. Learning the structure and how to use it is key when working with larger organizations. Changing that structure requires lots of time, and the will to build up a lot of trust. This can be, unfortunately, beyond what we can offer as technical consultants.</p>

<p>It&#8217;s funny how often technical help is seeked but the problem is usually human and requires a much different angle to work with. It&#8217;s sad that often I see people try to solve human problems through technical measures. Sometimes it doesn&#8217;t appear to be clear to people that we use computers and work with people, not vice-versa.</p>

<h3>Travel</h3>

<p>For the last 8 months I&#8217;ve been on the road, and I probably only slept in my own bed for about 15 nights in that entire time period (except the Christmas break). This is really fun and exciting (and one of the main draws of ThoughtWorks for me). Here are a few things that it has made me realize:</p>

<ul>
<li>Home is where the laptop is. It&#8217;s amazing how no matter where I traveled to, I would feel quite comfortable as long as I have my laptop and an Internet connection. At all times I&#8217;ve been able to connect with friends and family.</li>
<li>Autonomy is important. No matter where I am, I always try to keep my life autonomous. Some days I would hang out with friends and go with the flow, but many times I would consciencly be sure to break off and do things on my own.</li>
<li>Ok, maybe home isn&#8217;t where the laptop is. Over the holidays I&#8217;ve come to realize that Calgary is truly my home right now. The level of comfort I got from my own bed, couch, diner, and friends was a warm reminder to slow it down every now and then.
I can see how traveling makes it hard for many people to stick with ThoughtWorks. I&#8217;m lucky to be at a point in my life where this amount of chaos is exciting. As much as I enjoyed my week of over the holidays I was ready to get back on the &#8220;road&#8221;.</li>
</ul>


<h3>When You Don&#8217;t Know</h3>

<p>The biggest thing I&#8217;ve learned is how to ask for help. I used to pride myself on being able to do things on my own. Unfortunately I cannot scale, and doing things on my own severely limits my capabilities. Asking for help has been the best thing I&#8217;ve learned. It&#8217;s enabled me to venture into territory that I know little about, but do so without much fear because I know I have awesome colleagues to fall back on.</p>

<p>Even in the personal space I&#8217;ve learned to ask for help. ThoughtWorkers make amazing friends too and provide a support structure that is beyond comprehension. I don&#8217;t know where I would be if it wasn&#8217;t for some of the push and support they&#8217;ve given me.</p>

<p>Saying &#8220;I don&#8217;t know&#8221; amongst a group of ThoughtWorkers is an invitation to be taught without being scoffed at which is better than the snickers and scoffing you get amongst other technical crowds.</p>

<h3>Validation</h3>

<p>This one is a little selfish but working at ThoughtWorks these last couple years have helped me become more confident in my intuition and analysis. Many strategies and tactics I&#8217;ve done earlier on in my career were actually on a correct path, albeit not executed as well because of my naiviety at the time. Before ThoughtWorks I had 8 years of IT work, and I feel even better about the work that I did. Of course I wish I could have done it all differently, but that&#8217;s with todays knowledge.</p>

<p>I now feel even more confident that I can take on problems and solve them even when I really don&#8217;t know exactly what I&#8217;m doing. I&#8217;ve proven to myself that I can solve problems. Hey, if we knew the solutions ahead of time, they wouldn&#8217;t be problems now, would they?</p>

<p>Also like to wish <a href="http://www.codecuriosity.com/">Tyler</a> a happy two years! We started on the same day back in 2010. He&#8217;s managed to put up with my humour longer than any ThoughtWorker and that&#8217;s a pretty good accomplishment.</p>

<p>I&#8217;m now realizing this sounds like a pitch to get people to join ThoughtWorks. It didn&#8217;t start out that way but having more awesome people around doesn&#8217;t sound like such a bad idea! If you&#8217;re interested please check out <a href="http://join.thoughtworks.com/">join.thoughtworks.com</a>.</p>

<p>And now for something completely different (the best image from the last 2 years):</p>

<p><img src="http://scottmuc.com/images/blog/bestimageever.jpg"></p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[My Developer Resolutions for 2012]]></title>
    <link href="http://scottmuc.com/blog/development/my-developer-resolutions-for-2012/" />
    <updated>2011-12-31T10:45:00+05:30</updated>
    <id>http://scottmuc.com/blog/development/my-developer-resolutions-for-2012</id>
    <content type="html"><![CDATA[<p>An interesting thing about 2011 is that my resolutions from earlier became quite prominent. Given that 8 months of 2011 were spent on a large account with less technical focus, I&#8217;m amazed at some of the technical things that I&#8217;ve done.</p>

<!-- more -->


<h2>Reflections on 2011 and carry over from 2010:</h2>

<ul>
<li>Mouseless Computing (2010) - I think the practice is paying off as a colleague of mine told me &#8220;You make Windows fly!&#8221;, and he&#8217;s a savvy keyboard only Mac OSX user.</li>
<li>OSS participation (2010) - I started the following projects:

<ul>
<li>Pester - I&#8217;ve blogged about it and it&#8217;s getting some traction out there in the wild. It&#8217;s a spec based testing framework for Powershell. The first implementation was written on a hung-over new years day!</li>
<li>yari - A Windows ruby version manager. Currently being used by a very large client. I wrote this on a whim, because I thought I could do better than what was previously implemented. Turned out the client liked this a lot more and decided to adopt it right away.</li>
<li>YDeliver - The beginnings of a Continuous Delivery framework for .Net projects.</li>
<li>Misc - Submitted a patch to OpenMRS, a bug report to Puppet, directory additions to PSGet</li>
</ul>
</li>
<li>Learn VIM (2011) - This went really well. I&#8217;m definitely no expert at this point but I&#8217;m continuoully trying to learn new things. I&#8217;ve setup a github project for my vimfiles which is a fun way to share my tweaks.</li>
<li>Develop an Android App (2011) - Nope, didn&#8217;t do anything here. It&#8217;s actually dropped off my radar as it&#8217;s not really something I&#8217;m interested in anymore</li>
<li>Learn a server provisioning automation tool (2011) - I barely get a passing grade on this one. I&#8217;ve yet to use any of these tools (chef, puppet, etc&#8230;) on a project. In my spare time I&#8217;ve tried them out and understand the gist of how they work. I do question how necessary they are though. Unless you&#8217;re doing massive scaling it seems like they just add extra overhead for simple scenarios.</li>
<li>Move this blog (2011) - This will be my last post on this blog engine. I&#8217;ve currently setup Octopress and have my new blog ready on github. I just have the task of migrating over all posts (and deleting some). I have more to say about Octopress soon.</li>
</ul>


<h2>Development Goals for 2012:</h2>

<p>2012 is going to be different for me development wise. I&#8217;m finding myself less focused on technical issues and more on system, culture, and people goals. I&#8217;m striving to become more of a leader (clear sign of post-technical syndrome) and I think that&#8217;s reflected in my resolutions for this year.</p>

<h3>Stop reading comments</h3>

<p>Often when I read comments online I want to get those precious minutes of my life back. I favour a discussion over pointless online kibitzing any day. Now of course every scenario is different. The probability of reading comments on Youtube or on some news website is very low. On a blog post about some technical issue, I&#8217;ll likely read the comments.</p>

<h3>No client work when away from client</h3>

<p>Being away from the client is not a place in space problem, it&#8217;s a frame of mind issue. I want to develop some skills in removing myself from the client mentally. This is purely for my own sanity and likely for the sanity of those around me. I&#8217;m finding myself disconnected from my personal goals and more focused at facilitating the goals of whom I am working for. One thing I&#8217;ve learned by being on the road is that ME time is harder to come by. As an introverted individual, that ME time is how I recharge.</p>

<h3>Complete YDeliver</h3>

<p>Hey, an actual technical resolution! By the end of 2012 I want to know that at least 5 projects are using YDeliver. It&#8217;s incomplete right now and I need to get off my arse and complete some of the &#8220;last mile&#8221; stories to get it out there. I also don&#8217;t want to be the single committer to the project. This is a call for help for anyone interested in participating! I have some very strong opinions on how some of the pieces should work together and I will be happy to provide guidance.</p>

<h3>Summary</h3>

<p>Yeah, so this is probably less interesting than previous years. I&#8217;m actually very happy on how my previous resolutions have developed and are continuing to get better and better. In previous years I mentioned developing something on a completely different stack (like Ruby on Rails). Next year I&#8217;m starting a new project working on a small application that involves iOS and ruby development. So work is going to force some of my previous resolutions on me.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Simplifying Ruby Installation in Windows]]></title>
    <link href="http://scottmuc.com/blog/development/simplifying-ruby-installation-in-windows/" />
    <updated>2011-11-20T10:54:00+05:30</updated>
    <id>http://scottmuc.com/blog/development/simplifying-ruby-installation-in-windows</id>
    <content type="html"><![CDATA[<p>The one thing that has always annoyed me with installing ruby on Windows is that at some point in time I always need to setup the DevKit because I want to install gems that require native extensions. Also, I want the ability to switch between different versions of ruby.</p>

<!-- more -->


<h3>Introducing Yari</h3>

<p>yari is a tool (implemented in Powershell) I&#8217;ve made to simplify both of these operations. Right now it&#8217;s hard coded to only install the 2 ruby versions I care about right now.</p>

<ul>
<li>1.8.7 so I can play with <a href="http://projects.puppetlabs.com/projects/1/wiki/Puppet_Windows">Puppet</a></li>
<li>1.9.2 to be bleeding edge</li>
</ul>


<p><strong>Installation</strong> is described in the readme on the github page. Once installed you can simply run yari from anywhere in the command prompt. Also, you can pass a -InstallMachine argument to yari and it will permanently configure your PATH for the ruby version selected.</p>

<p>So far this tool has made my ruby management in Windows a lot simpler and hopefully it can help you out too. If you find it useful but can use a few changes please submit issues to the projects github page. Or better yet, fork it and submit a pull request.</p>

<p>After installing, here&#8217;s what you&#8217;ll be able to do (and installing things that require native extensions will work):</p>

<pre>
C:\Users\smuc> ruby -v
'ruby' is not recognized as an internal or external command,
operable program or batch file.

C:\user\smuc> yari 1.9.2

C:\user\smuc> ruby -v
ruby 1.9.2p290 (2011-07-09) [i386-mingw32]

C:\user\smuc> yari 1.8.7

C:\user\smuc> ruby -v
ruby 1.8.7 (2011-02-18 patchlevel 334) [i386-mingw32]

C:\user\smuc>
</pre>

]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[The Madness Must Stop! - PowerShell Package Management]]></title>
    <link href="http://scottmuc.com/blog/development/the-madness-must-stop-powershell-package-management/" />
    <updated>2011-10-10T10:57:00+05:30</updated>
    <id>http://scottmuc.com/blog/development/the-madness-must-stop-powershell-package-management</id>
    <content type="html"><![CDATA[<p>As a publisher for a few Powershell modules I&#8217;m getting frustrated by the lack of standarization in the community on how to support versioning, deployment and conventions within Powershell module distribution. All I can find is rather adhoc mechanisms of sharing poorly written code with the &#8220;use at your own risk&#8221; kinds of disclaimers.</p>

<!-- more -->


<p>I keep on looking at the ruby community with their amazing tools like rvm, ruby gems, and bundler to make ruby scripting highly testable and repeatable. The formalization also means that you don&#8217;t see people writing ruby code with random imports and magical includes that only work in very specific scenarios. By creating a community around gems and some basic standards, it&#8217;s forced developers to factor their ruby code accordingly and modularize when necessary.</p>

<p>So far I&#8217;ve found the following package management tools for Windows:</p>

<ul>
<li>Nuget - conversations online have lead me to understand that nuget isn&#8217;t meant for powershell</li>
<li>OpenWrap - still under evaluation</li>
<li>Chocolatey (by Rob Reynolds) - wrapper around nuget. Seems to be about config management like Puppet and Chef.</li>
<li>Chewie (by Eric Ridgeway) - bundler for nuget. Could have some input on how to manage PS module packages. Potential to be the front end for managing suites of modules.</li>
<li>Web Platform Installer - not even going to go there</li>
<li>PS-Get (by Andrew Nurse) - built around nuget but Andrew has the MS connection to make it popular.</li>
<li>PS-Get (by Mike Chaliy) - my favourite but needs some growth in the community. A showcase for simplest thing that can possibly work.</li>
<li>Nugit - almost forgot about this late entry. Don&#8217;t know anything about it yet.</li>
</ul>


<p>Here&#8217;s my wishlist (that none of the above can fulfill):</p>

<ul>
<li>Ability to deploy multiple versions of the same package</li>
<li>Different levels of isolation (System | Profile | Project ) levels</li>
<li>A management tool so that projects can declare versions and packages that they need along with dependency chaining (ala bundler and ivy)</li>
<li>Packages can be stored in many different locations (Nuget.org, github, some url pattern)</li>
</ul>


<p>History has shown that pretty much all languages need their own package management system (which can then be wrapped by a system level package manager). I vote that some of us in the community have a round-table and discuss how to move forward with this. There&#8217;s so much to learn from what already exists to get Windows out of the scripting ghetto.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[PowerShell BDD Testing - Pester Screencast]]></title>
    <link href="http://scottmuc.com/blog/development/powershell-bdd-testing-pester-screencast/" />
    <updated>2011-08-25T11:16:00+05:30</updated>
    <id>http://scottmuc.com/blog/development/powershell-bdd-testing-pester-screencast</id>
    <content type="html"><![CDATA[<p>A few months ago I posted a simple tutorial on how to use <a href="http://scottmuc.com/blog/development/pester-bdd-for-the-system-administrator/">Pester (a powershell bdd testing framework)</a>. I&#8217;m starting to practice the making of screencasts so I thought I would add some audio/visual to the blog post. I start rambling in the last 5 minutes so I won&#8217;t feel insulted if you stop paying attention after that part.</p>

<!-- more -->


<p>Also, I want to thank <a href="https://github.com/manojlds">Manoj Mahalingam</a> and <a href="http://blog.martin.aatmaa.net/">Martin Aatmaa</a> for their feedback and contributions!</p>

<p>* <em>the video starts off pixelated but it fixes itself in a few seconds</em></p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Adopting PsGet for PowerShell Module Management]]></title>
    <link href="http://scottmuc.com/blog/development/adopting-psget-for-powershell-module-management/" />
    <updated>2011-08-03T11:18:00+05:30</updated>
    <id>http://scottmuc.com/blog/development/adopting-psget-for-powershell-module-management</id>
    <content type="html"><![CDATA[<p>For a while now I&#8217;ve been waiting for something that can be as close to ruby gems as possible for PowerShell. For a while I thought Nuget was the way but it&#8217;s tight coupling to Visual Studio made it feel like it wasn&#8217;t quite the right fit for PowerShell.</p>

<!-- more -->


<p>Mike Chaliy has made probably what could be called the simplest thing that could possibly work, and it works well! It&#8217;s called PsGet (not to be confused with another project called PsGet). Take a look at the homepage and bask in its simplicity! Installation is copying/pasting the bootstrap code. Then install modules via name or absolute url to a powershell module.</p>

<p>Take a look at my post about Pester for an example of setting it up.</p>

<p>I have a couple features that I would like to bake into it. Hopefully I won&#8217;t add too much complexity to it as I do really appreciate it&#8217;s simple approach.</p>

<ul>
<li>Ability to deploy a specific version (using git tags) eg: https://github.com/scottmuc/Pester/archives/1.0.3</li>
<li>Something similar to the concept of gemsets in rvm for easy switching between module versions</li>
</ul>

]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Pester - PowerShell BDD Style Testing For The System Administrator]]></title>
    <link href="http://scottmuc.com/blog/development/pester-bdd-for-the-system-administrator/" />
    <updated>2011-05-11T20:05:00+05:30</updated>
    <id>http://scottmuc.com/blog/development/pester-powershell-bdd-style-testing-for-the-system-administrator</id>
    <content type="html"><![CDATA[<p>Hi there and welcome to my demo of Pester, a BDD style testing framework for Powershell. The creation of Pester came out of the desire to test some build/deployment infrastructure we were creating for a project. We wrote nearly all the code without tests and it came to bite us in the end. I wanted to find a way ensure these problems didn&#8217;t happen again as well as provide some code coverage to give new entrants to the codebase some confidence that they won&#8217;t break everything.</p>

<!-- more -->


<p>Inside Pester there&#8217;s already a trivial Calculator example but it&#8217;s not really the best way to demonstrate the app. Pester itself is tested using Pester. In fact it&#8217;s being tested by the version of Pester that&#8217;s under test (although Martin pointed out some uncovered areas). Still, probably not the best way to show how it all works.</p>

<p>What I&#8217;m going to go through here is the beginning of what could possibly be a real world scenario for a person assigned to write deployment code.</p>

<h2>Here&#8217;s the story:</h2>

<p>Initech has had issues where their .Net web applications have been deployed on production servers with the debug compilation flag set to true. This has made production support people irritable because they now manually tweak the web.config every single time they do a deploy. Michael Bolton has decided he&#8217;s going to automate this step but wants to right it test first. He doesn&#8217;t want to repeat the debacle of his previous attempt at being clever.</p>

<p>First step is to setup a project. Mike (as he now likes be known as) decides to call his project of tools IDeploy and creates a folder of that name where he does is development.</p>

<p>Setting up Pester is simply a matter of following the instructions at PsGet (author Mike Chaliy has tons of great PowerShell modules)then running Install-Pester. Then running Import-Module Pester anytime you open up a PowerShell session where you want to use Pester. The console should look like the following:</p>

<pre>
SMUC-PC {C:\d\IDeploy} (new-object Net.WebClient).DownloadString("http://bit.ly/GetPsGet") | iex
Downloading PsGet from https://github.com/chaliy/psget/raw/master/PsGet/PsGet.psm1
PsGet is installed and ready to use
USAGE:
    import-module PsGet
    install-module https://github.com/chaliy/psurl/raw/master/PsUrl/PsUrl.psm1

For more details:
    get-help install-module
Or visit http://psget.net
SMUC-PC {C:\d\IDeploy} import-module PsGet
SMUC-PC {C:\d\IDeploy} install-module Pester
Module Pester was successfully installed.
SMUC-PC {C:\d\IDeploy} import-module Pester
SMUC-PC {C:\d\IDeploy} Get-Module

ModuleType Name                      ExportedCommands
---------- ----                      ----------------
Script     PsGet                     {Get-PsGetModuleInfo, Install-Module}
Script     Pester                    {It, Describe, New-Fixture, Invoke-Pester...}

</pre>


<p>Pester includes a helper function called Create-Fixture. Calling the function with no args looks like the following:</p>

<pre>
SMUC-PC {C:\d\IDeploy} Create-Fixture
invalid usage, please specify (path, name)
eg: .\Create-Fixture -Path Foo -Name Bar
creates .\Foo\Bar.ps1 and .\Foo.Bar.Tests.ps1
</pre>


<p>Create-Fixture wants to know what the path of your function is going to be and what to call it. I personally like having my tests next to what I&#8217;m testing so Create-Fixture sort of enforces this convention. Note that Pester can be used without ever using this function. I just never remember how to create my fixtures so this saves me a bit of copying and pasting.</p>

<p>Armed with a quick way to create fixtures Michael runs his Create-Fixture to scaffold his feature. He decides he wants it to be called Ensure-AspNetDebugIsFalse and places it in the Deploy\Functions directory of his project.</p>

<pre>
SMUC-PC {C:\d\IDeploy} Create-Fixture Deploy\Functions Ensure-AspNetDebugIsFalse
Creating => Deploy\Functions\Ensure-AspNetDebugIsFalse.ps1
Creating => Deploy\Functions\Ensure-AspNetDebugIsFalse.Tests.ps1
</pre>


<p>Wanting to see some red he runs the tests by running Invoke-Pester which loads all files that match *.Tests.ps1 recursively in the current directory.</p>

<pre>
SMUCS-PC {C:\d\IDeploy} Invoke-Pester
Executing all tests in C:\dev\IDeploy\Deploy
Describing Ensure-AspNetDebugIsFalse
does something useful
Tests completed
Passed: 0 Failed: 1
</pre>


<p>As you can see Pester by default makes a failing test. Now it&#8217;s time for Michael to update the test to make it more meaningful. Here&#8217;s his test file after he&#8217;s setup his expectations.</p>

<p>Wow, it failed! Why is that? By default Pester will generate a fixture that is silly and won&#8217;t ever pass. So what should we do with this broken function? As it stands now it&#8217;s totally empty. Let&#8217;s update our specification (aka Test) and do something useful.</p>

<p>So Michael has written a test that didn&#8217;t require a lot of code, but is actually doing a few cool things. I&#8217;ll try to go line by line and explain what&#8217;s going on:</p>

<p>Ensure-AspNetDebugIsFalse.Tests.ps1 contents:</p>

<pre>
$pwd = Split-Path -Parent $MyInvocation.MyCommand.Path
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
. "$pwd\$sut"
. "$pwd\..\..\Pester.1.0.1\tools\Pester.ps1"
 
Describe "Ensure-AspNetDebugIsFalse" {
 
    Setup -File "inetpub\wwwroot\testsite\web.config" `
                "&lt;configuration&gt;&lt;system.web&gt;&lt;compilation debug='true' /&gt;&lt;/system.web&gt;&lt;/configuration&gt;"
 
    It "switches debug attribute to false for a web.config in a given website path" {
        Ensure-AspNetDebugIsFalse "$TestDrive\inetpub\wwwroot\testsite"
 
        [xml] $xml = Get-Content "$TestDrive\inetpub\wwwroot\testsite\web.config"
        $xml.configuration."system.web".compilation.debug.should.be("false")
    }
}
</pre>


<p>Ensure-AspNetDebugIsFalse.ps1 contents:</p>

<pre><code>function Ensure-AspNetDebugIsFalse($websitePath) {

}
</code></pre>

<p>Here are some details on some of the lines in the test.</p>

<ol>
<li><p>We obtain the directory of the test script because we need to base all other paths off of it</p></li>
<li><p>Here&#8217;s how we ensure our code/test conventions. This means that the code in Foo.Tests.ps1 will automatically include Foo.ps1 (the code under test) in line 3</p></li>
<li><p>Create-Fixture automagically resolves the Pester path no matter what version of Pester you have. This directory will remain static. I might implement an Upgrade-Fixture script so that as you update your Pester version you can update your tests as well.</p></li>
<li><p>Pester has the ability to do filesystem based setups. This line is creating a file in isolation in what Pester calls the $TestDrive. The $TestDrive is disposed of after every Describe context. This allows you to perform filesystem related tasks without having to maintain separate test files. This line has created a file called web.config in the inetpub\wwwroot\testsite path in the $TestDrive and the 2nd argument is the content of that file.</p></li>
<li><p>We execute the code we want to test</p></li>
<li><p>We assert that the debug attribute has been set to false.</p></li>
</ol>


<p>Let&#8217;s make this bad boy pass!
Here&#8217;s the function fleshed out and the test passes!</p>

<pre>
function Ensure-AspNetDebugIsFalse($websitePath) {
    $webConfigPath = "$websitePath\web.config"
 
    [xml] $webConfig = Get-Content $webConfigPath
    $webConfig.configuration."system.web".compilation.debug = "false"
    $webConfig.Save($webConfigPath)
}
</pre>


<p>and the execution of the test:</p>

<pre>
SMUC-PC {C:\d\IDeploy} Invoke-Pester
Executing all tests in C:\dev\IDeploy\Deploy
Describing Ensure-AspNetDebugIsFalse
switches debug attribute to false for a web.config in a given website path
Tests completed
Passed: 1 Failed: 0
</pre>


<p>Now Michael has an extra tool at his disposal to call when he&#8217;s performing deployments. If only he had taken this approach when he wrote his money transfer code. He wouldn&#8217;t have missed all those decimal places!</p>

<p>Hope this helps get you running with Pester. There&#8217;s a lot more I would like to add but I&#8217;m really only adding stuff as I see the need for it. Pester was driven out by my desire to refactor another Powershell library I wrote called PowerYaml. Take a look at the project page to see how I took the untested code, wrapped tests around it, then refactored.</p>

<p>Feedback is greatly appreciate and I hope this helps your teams make reliable Powershell scripts.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Stop Trying to be Perfect and Make Mistakes!]]></title>
    <link href="http://scottmuc.com/blog/development/stop-trying-to-be-perfect-and-make-mistakes/" />
    <updated>2011-01-30T21:30:00+05:30</updated>
    <id>http://scottmuc.com/blog/development/stop-trying-to-be-perfect-and-make-mistakes</id>
    <content type="html"><![CDATA[<p>Think about how you get good at anything. What do you remember spending most of your time on? Most likely you spent the majority of your time messing things up and getting it wrong. Why are kids so quick at picking up new skills, especially dangerous ones? It&#8217;s because kids are fearless experimenters. I&#8217;m currently learning how to skate and ski and my ability to learn is hindered by my concern of hurting myself; potentially preventing me from working and earning a living. I want to try and correlate the idea of failure as a healthy activity in the road to expertise in the world of operations in the software world.</p>

<!-- more -->


<p>Operations people have two numbers they care about. The number 9 and how many of them they have (99.999% uptime is commonly known as five nines). This is a great metric for a system that doesn&#8217;t change, but in a world where new requirements are constantly conjured up and need to be live yesterday, the number of 9&#8217;s you have becomes harder to keep stable. A new operational metric needs to be created to handle this new kind of ever changing system.</p>

<p>Historically operations people are stereotyped as grumpy curmudgeons who will only let you deploy something in the 1 minute downtime window that they provide for you on the 3rd full moon after each solstice on a Sunday night at 2:29am, and you better get it done before the backups fire up or else you&#8217;re screwed! Developers on the other hand are eager to get their newly written code live so that people can see the fruits of their labour. It&#8217;s pretty obvious that these mentalities are in complete opposition.</p>

<p>This clash of values can be lessened if operators adopted a new bragging metric. The <strong>Mean Time to Recovery (MTTR)</strong>. An operations person that can fix a problem fast is much stronger than someone without that kind of debugging ability. To get ops to fix problems that means they need to have strong knowledge of the applications they are deploying and strong relationships with the teams that developed them. The hard part about this metric is that it needs to be exercised. You can&#8217;t measure your MTTR unless things break.</p>

<p>Another great metric was created by the Lean way of thinking where minimization of completed features (an inventory) waiting to go live is important because that backlog is considered wasteful. This is still a great system wide view of shortening the time from concept to market, but I want to focus a little on the mind of an operations person.</p>

<p>One of the problems with software development is a general sense of hubris when it comes to the stability and functionality of an application. Stats like the number of unit tests and code coverage are often leaned on with the implicit understanding that it means the code is working. That&#8217;s when concepts like <a href="http://en.wikipedia.org/wiki/Mutation_testing">Mutation Testing</a> are great for truly determining the value and confidence that the test suite brings. Tools like <a href="http://jester.sourceforge.net/">Jester perform</a> a little bytecode magic behind the scenes to determine how brittle your tests are.</p>

<p>Operations can suffer from the same kind illogical confidence. How are the 9&#8217;s measured? I&#8217;ve often seen uptime measured by how long heartbeat.html is still up, but how confident would that make you believe that the entire system can still process an order? A server that&#8217;s up and running serving up broken software should not count as being &#8220;up&#8221;. This is where a common agreement of the term &#8220;done&#8221; is important in bridging the gap between software development and operations.</p>

<p>It&#8217;s too bad that ops can&#8217;t perform activities like TDD where the developer intentionally fails a test in order to drive out the code to implement a feature.</p>

<p>At a few conferences I&#8217;ve met a few people who deploy to production rapidly in massive systems (<a href="http://engineering.imvu.com/2010/04/09/imvus-approach-to-integrating-quality-assurance-with-continuous-deployment/">IMVU</a>, <a href="http://glinden.blogspot.com/2009/11/continuous-deployment-at-facebook.html">Facebook</a>). They don&#8217;t know 100% the code they are deploying won&#8217;t break in production. By deploying to partitions they can use system wide health metrics to determine whether or not things are working. Are orders still being processed in the partition that the new code was deployed to?</p>

<p>In my previous work experience I deployed code to production all the time (and broke things). Every time I broke something was a learning experience, but I didn&#8217;t stress about it because I knew how to fix things reasonably fast. I didn&#8217;t realize at the time how valuable that was. Periodic failure was welcome because it re-assured us that we knew how the system worked. Now of course mission critical applications have much different sensitivities to failure. I&#8217;m not talking about software that launches the space shuttle here.</p>

<p>In conclusion I would like to see how we can allow operations to fail without such a negative impact. If a deployment fails because someone forgot to chmod a file with +x, that&#8217;s a great lesson learned and hopefully someone will update the deployment script. After all, we&#8217;re all human and we make mistakes. By recording the operational MTTR we can grow a team that updates production frequently and fixes errors fast, rather than a team performs massive batch releases to production and slowly figures out the errors. So let&#8217;s figure out how we can help our ops people fear downtime a bit less and empower them with the ability fix the software we build. On the flip side lets write software that is easily deployable and doesn&#8217;t require pages of instructions to make live so that operations can feel more comfortable tweaking and redeploying with confidence.</p>

<p>I don&#8217;t propose any solutions to this mindset but would love to hear some feedback. Would measuring MTTR be important in an operations group?</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[My Developer Resolutions for 2011]]></title>
    <link href="http://scottmuc.com/blog/development/my-developer-resolutions-for-2011/" />
    <updated>2010-12-27T21:35:00+05:30</updated>
    <id>http://scottmuc.com/blog/development/my-developer-resolutions-for-2011</id>
    <content type="html"><![CDATA[<p>Looking back at 2010 I can&#8217;t say I did a good job of following through with <a href="http://scottmuc.com/blog/development/my-developer-resolutions-for-2010/">my resolutions</a>, but I believe I have a valid excuse! For the last 12 months I&#8217;ve been working more as a <a href="http://scottmuc.com/blog/development/getting-my-build-and-release-on/">build/release specialist</a> than a software developer. Anyways, here&#8217;s a rundown of what I didn&#8217;t accomplish last year:</p>

<!-- more -->


<ul>
<li>Test Driven Design - I barely coded at all so that was a total flop. I also believe that this is something that&#8217;s hard to do on your own. This discipline really needs a pair in order to stay on track.</li>
<li>Mouseless Computing - This is probably my most successful resolution. I&#8217;m still no keyboard ninja, but I&#8217;ve improved over last year and even wrote a fun negative re-inforcement application.</li>
<li>OSS Participation - I&#8217;m going to defer this to this year as I have a couple things planned for the near future.</li>
<li>Complete small project in different dev stack - Total flop. I attempted to do something in Rails and I couldn&#8217;t get going. I think I&#8217;ve been in the .Net world for too long. New frameworks completely twist the way I do things and I find I&#8217;m not good at learning the conventions of these new technologies.</li>
</ul>


<h2>Development Goals for 2011:</h2>

<h3>Learn VIM (building my lightsaber)</h3>

<p>I&#8217;ve tried to find the perfect editor for ages. I&#8217;ve sort of come to the conclusion that I&#8217;m going to be a perpetual generalist. Sometimes I find myself working on all sorts of OS&#8217;s (Ubuntu, Win7, Mac OSX), and I don&#8217;t want to learn the best editor for each (GEdit, Notepad++, TextMate). VIM works on all of them so why not learn that? Historically VIM has been labelled as a difficult but powerful editor and with good reason. I&#8217;m writing this post in VIM and discovering how much learning I have to do to get to the level of VIM experts.</p>

<p>To make it more fun I&#8217;m treating VIM like a lightsaber. It&#8217;s the weapon that every Jedi must construct themselves. Part of the lightsaber is the crystal which is imbued with the force and resonates to produce the blade. To me, the .vimrc file is my version of my set of lightsaber crystals. Hopefully with some study and careful construction (and vimcasts) I can craft my very own coding lightsaber.</p>

<h3>Develop an Android App</h3>

<p>I&#8217;ve always wanted to dive into the mobile development world but I don&#8217;t own a Mac so iOS was out. Windows mobile development didn&#8217;t seem that much fun, and Blackberry was definitely out of the question. PalmOS was too niche as well so I passed on that too.</p>

<p>Now that I have an Android based phone and I have an idea for an application (using SongKick), my goal is to release something to the Android market sometime this year. At the same time I want to play around with Ubuntu as my development environment while I&#8217;m at it.</p>

<h3>Learn a server provisioning automation tool</h3>

<p>This year I learned about the term DevOps, and sort of got to work under that kind of role. I didn&#8217;t do such a great job of it as I&#8217;m more a dev than I am an ops, but I want to change that. Tools like Chef, Puppet, Babushka, Vagrant all look really interesting and I would like see how I can use these tools to solve some interesting problems. Unfortunately I can&#8217;t put them in my problem solving toolkit until I actually know how to use them.</p>

<p>Along with these tools, I&#8217;ll probably train myself on VM technologies so I can re-provision servers and play around with these automation tools.</p>

<h3>Move this blog</h3>

<p>At some point this year I need to get this blog off of this application. This old version of Graffiti CMS uses VistaDB for it&#8217;s persistent datastore and the BlogML export functionality is broken.</p>

<p>That&#8217;s it! Hopefully I&#8217;ve kept the scope small enough that I can actually accomplish all of this. It&#8217;s strange looking at my resolution posts and realizing how little I achieve of the small goals that I set for myself. Just goes to show how fast a year goes by and how your experiences can be steered in so many directions along the way.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Book Review - The Art of Unit Testing by Roy Osherove]]></title>
    <link href="http://scottmuc.com/blog/reviews/book-review-the-art-of-unit-testing-by-roy-osherove/" />
    <updated>2009-07-08T08:56:00+05:30</updated>
    <id>http://scottmuc.com/blog/reviews/book-review-the-art-of-unit-testing-by-roy-osherove</id>
    <content type="html"><![CDATA[<p><img class="left" src="http://www.manning.com/osherove/osherove_cover150.jpg">
In a recent splurge I purchased 4 books from <a href="http://www.manning.com/">Manning Press</a> with one of them being <a href="http://www.manning.com/osherove/">The Art of Unit Testing</a> by <strong>Roy Osherove</strong>.</p>

<p>I would categorize myself as relatively new to unit testing. My first hands on testing was when I took the Nothing but .Net bootcamp with JP Boodhoo but he emphasized BDD style tests. I saw the benefit of BDD but didn&#8217;t feel I had the know how to implement them properly. About 3 months ago I started writing tests in a more unit test like fashion and things started clicking.</p>

<!-- more -->


<p>This book felt like an Assertion of what I&#8217;ve learned over the last year. As I read the book I kept finding stories I could relate to. In my attempts to apply unit testing to my own code, I experienced nearly everything Roy talks about in this book.</p>

<p><strong>Chapter 5</strong> was great a explaining the differences between the terms <a href="http://www.martinfowler.com/articles/mocksArentStubs.html">Stub and Mock</a>. What I liked was how he provided samples of manual stubs and mocks to give the reader a peak under the curtain as to what a mock (err faking, Roy&#8217;s personal word preference) framework does for us. I can understand how the work mock is overloaded now, and can appreciate the proper terminology and it helps when explaining these concepts to others.</p>

<p>For me <strong>Chapters 6 and 7</strong> are where I got the most out of the book. Through all my reading of testing on-line, I found it quite simple because the scope of the demos were so small. I felt these two chapters armed me with some good principals on organizing tests and treating them just as important as my production code.</p>

<p>All in all this was one of the easiest programming books I&#8217;ve ever read. Roy&#8217;s tone was fun (especially his little jab at <a href="http://ayende.com/">Ayende</a>), but wasn&#8217;t so opinionate that it sounded preachy. In fact I felt comfortable making my own opinions that extend his foundations. Roy presented the material in a way that seems like he assumes you&#8217;re not an idiot. There wasn&#8217;t a lot of &#8220;hand holding&#8221; which can be found in other entry level books. He provides ample resources for those that want more instruction on certain topics which creates a good pace for the reader.</p>

<p>As for the negatives: I wish it was a little longer. I don&#8217;t know why, but I felt that there was more to say on a lot of topics. Perhaps more examples, which could seem a bit repatitive, but could be skipped by those who got the message. I also didn&#8217;t like how <a href="http://typemock.com/">TypeMock</a> was being pushed heavily and the disclaimer that Roy worked for TypeMock didn&#8217;t come in until near the end.</p>

<p>I would reccomend this book to anyone who is new to unit testing. I think I read the book at almost a perfect time. I knew enough that I could see past the trivial example to the message he&#8217;s delivering, but not enough to skip all the material because it was so obvious. A seasoned unit tester might not get as much value from this book, but I would urge them to get it anyways so they can loan it to those they work with who are new to testing.</p>

<p>A great prelude to reading this book is to watch Roy review the test suites for the following projects:</p>

<p><a href="http://weblogs.asp.net/rosherove/archive/2009/03/20/test-review-1-nerddinner.aspx">Nerd Dinner</a> <br />
<a href="http://weblogs.asp.net/rosherove/archive/2009/03/21/test-review-2-asp-net-mvc-unit-tests.aspx">Asp.Net MVC</a> <br />
<a href="http://weblogs.asp.net/rosherove/archive/2009/03/23/test-review-3-unity.aspx">Microsoft Unity</a></p>

<p>Be warned, you&#8217;ll be watching a grumpy Roy at 2am :-). Roy also has a <a href="http://osherove.com/blog">great blog</a> and is active on <a href="http://twitter.com/RoyOsherove">twitter</a> as well.</p>
]]></content>
  </entry>
  
</feed>
