<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" version="2.0">

<channel>
	<title>Deployment Zone</title>
	
	<link>http://www.deploymentzone.com</link>
	<description />
	<lastBuildDate>Thu, 22 Oct 2009 05:04:36 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/deploymentzone" type="application/rss+xml" /><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://add.my.yahoo.com/rss?url=http%3A%2F%2Ffeeds.feedburner.com%2Fdeploymentzone" src="http://us.i1.yimg.com/us.yimg.com/i/us/my/addtomyyahoo4.gif">Subscribe with My Yahoo!</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://www.newsgator.com/ngs/subscriber/subext.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2Fdeploymentzone" src="http://www.newsgator.com/images/ngsub1.gif">Subscribe with NewsGator</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://www.bloglines.com/sub/http://feeds.feedburner.com/deploymentzone" src="http://www.bloglines.com/images/sub_modern11.gif">Subscribe with Bloglines</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://www.netvibes.com/subscribe.php?url=http%3A%2F%2Ffeeds.feedburner.com%2Fdeploymentzone" src="http://www.netvibes.com/img/add2netvibes.gif">Subscribe with Netvibes</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://fusion.google.com/add?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2Fdeploymentzone" src="http://buttons.googlesyndication.com/fusion/add.gif">Subscribe with Google</feedburner:feedFlare><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item>
		<title>Andy Hunt/Pragmatic Thinking and Learning Presentation @ RJUG</title>
		<link>http://www.deploymentzone.com/2009/10/22/andy-huntpragmatic-thinking-and-learning-presentation-rjug/</link>
		<comments>http://www.deploymentzone.com/2009/10/22/andy-huntpragmatic-thinking-and-learning-presentation-rjug/#comments</comments>
		<pubDate>Thu, 22 Oct 2009 05:02:07 +0000</pubDate>
		<dc:creator>Chuck</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.deploymentzone.com/2009/10/22/andy-huntpragmatic-thinking-and-learning-presentation-rjug/</guid>
		<description><![CDATA[ I attended Andy Hunt's “Refactor Your Wetware: Pragmatic Thinking and Learning” presentation given for the Richmond Java User Group/Central VA Ruby User Group October meeting Wednesday night.&#160; Having just completed this book in September I was very interested in reinforcing what I have learned (and began practicing, ahem, mind mapping) and excited to see [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.amazon.com/Pragmatic-Thinking-Learning-Refactor-Programmers/dp/1934356050/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1256185862&amp;sr=8-1"><img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px" title="image" border="0" alt="image" align="left" src="http://www.deploymentzone.com/wp-content/uploads/2009/10/image.png" width="240" height="240" /></a> I attended <a href="http://andy.pragprog.com/">Andy Hunt's</a> “Refactor Your Wetware: Pragmatic Thinking and Learning” presentation given for the <a href="http://www.richmondjug.com/event/pragmatic-thinking-and-learning-andy-hunt-pragmatic-programmer">Richmond Java User Group</a>/Central VA Ruby User Group October meeting Wednesday night.&#160; Having just completed this book in September I was very interested in reinforcing what I have learned (and began practicing, ahem, mind mapping) and excited to see the author present this material.</p>
<p>I was impressed with the professional atmosphere and organization at this event.</p>
<p>Andy’s presentation centered around <a href="http://www.pragprog.com/titles/ahptl/pragmatic-thinking-and-learning">the book</a>, touching on several highlights over the two hour period.&#160; This was largely a rehash for me, which was very good, with a little bit of new material thrown in.&#160; (There is a new <a href="http://www.pragprog.com/news/pomodoro-technique-illustrated-grails-in-print">Pomodoro book pragprog is publishing</a> so there was a brief overview of Pomodoro included with a plug – which I fully support at free/sponsored events; I had just read the RSS post earlier in the day so I would have been disappointed if it were skipped!)&#160; His slides were good – not distracting – and the presentation was delivered with animation and some really well placed humor.</p>
<p>Points [I remember]:</p>
<p><a href="http://en.wikipedia.org/wiki/Dreyfus_model_of_skill_acquisition">Dreyfus Model of Skill Acquisition</a></p>
<p><a href="http://en.wikipedia.org/wiki/Mind_mapping">Mind mapping</a> (easily my favorite technique I learned from the book)</p>
<p>You cannot execute a great idea if you don’t exercise your brain to get it to produce them – write down your ideas, all of them</p>
<p>Meditation</p>
<p>How context switching and multitasking damages productivity</p>
<p>Have a personal wiki</p>
<p><a href="http://en.wikipedia.org/wiki/Study_group">Book study groups</a> – going to suggest replacing our low value formal code reviews with this in an on-going basis</p>
<p>&#160;</p>
<p>Finally Andy said it may be possible in the near future to get some of <a href="http://www.pragprog.com/">pragprog</a>’s non-code books in an audio book format which for anyone who has a long commute is very good news.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.deploymentzone.com/2009/10/22/andy-huntpragmatic-thinking-and-learning-presentation-rjug/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I’m Dangerous with Ruby!</title>
		<link>http://www.deploymentzone.com/2009/10/22/im-dangerous-with-ruby/</link>
		<comments>http://www.deploymentzone.com/2009/10/22/im-dangerous-with-ruby/#comments</comments>
		<pubDate>Thu, 22 Oct 2009 04:24:14 +0000</pubDate>
		<dc:creator>Chuck</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://www.deploymentzone.com/2009/10/22/im-dangerous-with-ruby/</guid>
		<description><![CDATA[My solution was selected as the winning solution for RubyLearning.com’s RPCFN #2 “Average Arrival Time for A Flight.”
This challenge involved averaging times of the day without the actual day in the context.&#160; When I first started to tackle the problem I thought to myself that this will be very easy.&#160; Then I hit the “no [...]]]></description>
			<content:encoded><![CDATA[<p>My solution was selected as the winning solution for <a href="http://www.rubylearning.com">RubyLearning.com’s</a> <acronym title="Ruby Programming Challenge For Newbies">RPCFN</acronym> #2 “<a href="http://rubylearning.com/blog/2009/10/08/rpcfn-average-arrival-time-for-a-flight-2/">Average Arrival Time for A Flight</a>.”</p>
<p>This challenge involved averaging times of the day without the actual day in the context.&#160; When I first started to tackle the problem I thought to myself that this will be very easy.&#160; Then I hit the “no day” context and realized that this problem was much tougher than I anticipated.&#160; When I finally saw the posted solutions including <a href="https://gist.github.com/4f6807eef49064027a3c">Chris Strom’s</a> (<a href="http://japhr.blogspot.com/">blog</a>) it was like decades old high school math came rushing back to me.&#160; I would have never thought of plotting points on a graph but now that I’ve been exposed I’m certain I will never forget it!</p>
<p>My friend [and commuting body] Matt and I talked through the problem during our drive home as we sat in Virginia I-495 outer loop and I-95S traffic.&#160; He had some ideas about plotting the problem linearly around 0 but ultimately I ended up going with making assumptions about how close the provided times were to midday and midnight.</p>
<pre class="brush: ruby;">require 'time'

SECONDS_IN_DAY = 86400
MIDNIGHT = Time.parse(&quot;12:00AM&quot;).to_i
MIDDAY = Time.parse(&quot;12:00PM&quot;).to_i

def average_time_of_day(times)
  seconds = []
  times.each {|time| seconds &lt;&lt; Time.parse(time).to_i}
  seconds.sort!
  if (seconds.first - MIDNIGHT) &lt; (seconds.last - MIDDAY)
    seconds.map! {|s| s &lt; MIDDAY ? s += SECONDS_IN_DAY : s }
  end
  Time.at(seconds.inject { |sum,n| sum += n }.to_f / seconds.length).strftime(&quot;%I:%M%p&quot;).downcase
end</pre>
<p>&#160;</p>
<p>Gist: <a title="https://gist.github.com/5b371226faf83af50d7e" href="https://gist.github.com/5b371226faf83af50d7e">https://gist.github.com/5b371226faf83af50d7e</a></p>
<p>Interview: <a title="http://rubylearning.com/blog/2009/10/22/charles-feduke-winner-rpcfn-2/" href="http://rubylearning.com/blog/2009/10/22/charles-feduke-winner-rpcfn-2/">http://rubylearning.com/blog/2009/10/22/charles-feduke-winner-rpcfn-2/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.deploymentzone.com/2009/10/22/im-dangerous-with-ruby/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Temp Files and Ruby 1.8.6 on Windows</title>
		<link>http://www.deploymentzone.com/2009/09/29/temp-files-and-ruby-1-8-6-on-windows/</link>
		<comments>http://www.deploymentzone.com/2009/09/29/temp-files-and-ruby-1-8-6-on-windows/#comments</comments>
		<pubDate>Tue, 29 Sep 2009 05:56:30 +0000</pubDate>
		<dc:creator>Chuck</dc:creator>
				<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://www.deploymentzone.com/2009/09/29/temp-files-and-ruby-1-8-6-on-windows/</guid>
		<description><![CDATA[Working on the RPCFN: Shift Subtitle I found myself having to work with files input as a stream (or anyway that’s how I wanted to approach the problem; streams are efficient to me).&#160; In order to give my code any sort of unit testing justice I needed to mock the file system.&#160; The challenge expressly [...]]]></description>
			<content:encoded><![CDATA[<p>Working on the <a href="http://rubylearning.com/blog/2009/09/24/rpcfn-shift-subtitle-1/">RPCFN: Shift Subtitle</a> I found myself having to work with files input as a stream (or anyway that’s how I wanted to approach the problem; streams are <em>efficient</em> to me).&#160; In order to give my code any sort of unit testing justice I needed to mock the file system.&#160; The challenge expressly forbids any Ruby gems from being used in the script itself – and maybe by extension the unit tests as well – but I could not see devoting the time necessary to write a mocking framework for the file system.</p>
<p>I found a gem that does precisely what I needed named <a href="http://devver.net/blog/2009/08/unit-testing-filesystem-interaction/">Construct</a>.&#160; Unfortunately there is a <a href="http://redmine.ruby-lang.org/issues/show/1494">bug with Ruby 1.8.6 on Windows</a> in regards to clean up of temp files.&#160; The problem is that when attempting to clean up a Errno::EACCES is raised causing the unit test to fail (or you to write a lot of rescue blocks).</p>
<p>A workaround I came up with was to replace the rmtree method in the Pathname class within my unit test to perform no clean up.&#160; Not the best approach I am sure, but it let me get on with my work.</p>
<pre class="brush: ruby;"># something_test.rb
require &quot;test/unit&quot;
require 'construct'
require 'something'

class Pathname
  # windows has problems with temp files created by Ruby
  # http://redmine.ruby-lang.org/issues/show/1494
  def rmtree
    nil
  end
end

class SomethingTest &lt; Test::Unit::TestCase
   # test methods...
end</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.deploymentzone.com/2009/09/29/temp-files-and-ruby-1-8-6-on-windows/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Ruby: Mocking Kernel Exit</title>
		<link>http://www.deploymentzone.com/2009/09/26/ruby-mocking-kernel-exit/</link>
		<comments>http://www.deploymentzone.com/2009/09/26/ruby-mocking-kernel-exit/#comments</comments>
		<pubDate>Sat, 26 Sep 2009 14:45:03 +0000</pubDate>
		<dc:creator>Chuck</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[mock]]></category>
		<category><![CDATA[rspec]]></category>

		<guid isPermaLink="false">http://www.deploymentzone.com/2009/09/26/ruby-mocking-kernel-exit/</guid>
		<description><![CDATA[I’m working on the RubyLearning blog’s Ruby Programming Challenge for Newbies #1 to learn the language – I’ve done a bit with Rails and some admin scripts so I could use the exposure.&#160; Since I love TDD approaching Ruby development through RSpec is only natural, but it was a pain in the ass trying to [...]]]></description>
			<content:encoded><![CDATA[<p>I’m working on the RubyLearning blog’s <a href="http://rubylearning.com/blog/2009/09/24/rpcfn-shift-subtitle-1/">Ruby Programming Challenge for Newbies #1</a> to learn the language – I’ve done a bit with Rails and some admin scripts so I could use the exposure.&#160; Since I love TDD approaching Ruby development through RSpec is only natural, but it was a pain in the ass trying to find how I could have RSpec verify that my program properly exited when certain conditions were met.&#160; <a href="http://stackoverflow.com/questions/1480537/how-can-i-validate-exits-and-aborts-in-rspec">Here’s how I solved it</a>, reposted here:</p>
<pre class="brush: ruby;"># something.rb
class Something
    def initialize(kernel=Kernel)
        @kernel = kernel
    end

    def process_arguments(args)
        @kernel.exit
    end
end

# something_spec.rb
require 'something'
describe Something do
    before :each do
        @mock_kernel = mock(Kernel)
        @mock_kernel.stub!(:exit)
    end

    it &quot;should exit cleanly&quot; do
        s = Something.new(@mock_kernel)
        @mock_kernel.should_receive(:exit)
        s.process_arguments([&quot;-h&quot;])
    end
end</pre>
<p>What I learned was that you can define a constructor with optional arguments (in this case, initialize(kernel=Kernel) and then proceed to use @kernel’s methods instead of the methods that Kernel provides when you do not specify a class instance.&#160; With a properly mocked and stubbed exit method in my spec things operate as expected.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.deploymentzone.com/2009/09/26/ruby-mocking-kernel-exit/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Side Effect Free Retrieval Pattern</title>
		<link>http://www.deploymentzone.com/2009/07/16/side-effect-free-retrieval-pattern/</link>
		<comments>http://www.deploymentzone.com/2009/07/16/side-effect-free-retrieval-pattern/#comments</comments>
		<pubDate>Thu, 16 Jul 2009 21:11:00 +0000</pubDate>
		<dc:creator>Chuck</dc:creator>
				<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://www.deploymentzone.com/2009/07/16/side-effect-free-retrieval-pattern/</guid>
		<description><![CDATA[A colleague of mine and I were discussing good verb replacements for “GetOrCreate” data retrieval patterns, where the “Create” part is responsible for the instantiation of a new instance of something.&#160; While the pattern I present here did not solve his particular problem, its at least worth sharing.&#160; Its obvious, and probably in use commonly [...]]]></description>
			<content:encoded><![CDATA[<p>A colleague of mine and I were discussing good verb replacements for “GetOrCreate” data retrieval patterns, where the “Create” part is responsible for the instantiation of a new instance of something.&#160; While the pattern I present here did not solve his particular problem, its at least worth sharing.&#160; Its obvious, and probably in use commonly already, but I figure its worth noting.</p>
<p>Essentially the goal is to get away from a “GetOrCreate” master method call and just have two methods: Get(args) and Get(args, Foo default) and then leave the responsibility of default generation up to Foo.&#160; This way there’s no unintended side effects and you don’t have to explicitly coalesce (though with this pattern you could as easily coalesce; strictly speaking it isn’t as “discoverable”)…</p>
<pre class="brush: csharp; toolbar: false;">var foo = FooService.Get(23) ?? new Foo { ... };</pre>
<p>So here’s the pattern defined in code:</p>
<pre class="brush: csharp;">public class Foo : ICloneable
{
    private readonly static Foo __default =
        new Foo { Bar = &quot;...&quot;, Baz = Int32.MinValue };

    public string Bar { get; set; }
    public int Baz { get; set; }

    public static Foo Default()
    {
        return (Foo)__default.Clone();
    }

    public object Clone()
    {
        return new Foo { Bar = this.Bar, Baz = this.Baz };
    }
}

public class FooService
{
    public Foo Get(int baz)
    {
        // retrieve from data store...
        return null;
    }

    public Foo Get(int baz, Func&lt;Foo&gt; @default)
    {
        return Get(baz) ?? @default.Invoke();
    }
}</pre>
<p>You’ll see that any associated overhead with Clone only occurs if Get(baz) returns null.&#160; I have specifically stepped around the common naming standard of “GetDefault()” for the function – its named like a property - because its intended usage is as follows:</p>
<pre class="brush: csharp; toolbar: false;">var foo = new FooService().Get(12, Foo.Default);</pre>
<p>
  <br />An ICloneable reference type is pretty much required, <a href="http://www.stevecooper.org/2009/07/14/immutable-objects-in-c/">though any immutable reference type</a> could get by without cloning because any changes gives you a new copy of that type.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.deploymentzone.com/2009/07/16/side-effect-free-retrieval-pattern/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Khorne Berzerkers</title>
		<link>http://www.deploymentzone.com/2009/06/04/khorne-berzerkers/</link>
		<comments>http://www.deploymentzone.com/2009/06/04/khorne-berzerkers/#comments</comments>
		<pubDate>Thu, 04 Jun 2009 06:16:12 +0000</pubDate>
		<dc:creator>Chuck</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.deploymentzone.com/?p=126</guid>
		<description><![CDATA[Some Khorne Berzerkers I finished up after having them assembled and sitting in a box for over six years.  Also trying out my new camera and figuring out how to take pictures.
 
 
]]></description>
			<content:encoded><![CDATA[<p>Some Khorne Berzerkers I finished up after having them assembled and sitting in a box for over six years.  Also trying out my new camera and figuring out how to take pictures.</p>
<p> <br />
<a class="tt-flickr tt-flickr tt-flickr-Small" title="Khorne Berzerkers" href="http://farm4.static.flickr.com/3662/3593413231_cac5728bd6_b.jpg"><img src="http://farm4.static.flickr.com/3662/3593413231_cac5728bd6_m.jpg" border="0" alt="Khorne Berzerkers" width="240" height="180" /></a> <a class="tt-flickr tt-flickr tt-flickr-Small" title="Khorne Berzerkers (All)" href="http://farm4.static.flickr.com/3097/3593413419_a2fba133b4_b.jpg"><img src="http://farm4.static.flickr.com/3097/3593413419_a2fba133b4_m.jpg" border="0" alt="Khorne Berzerkers (All)" width="240" height="180" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.deploymentzone.com/2009/06/04/khorne-berzerkers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hordes: Lord of the Feast</title>
		<link>http://www.deploymentzone.com/2009/05/26/hordes-lord-of-the-feast/</link>
		<comments>http://www.deploymentzone.com/2009/05/26/hordes-lord-of-the-feast/#comments</comments>
		<pubDate>Tue, 26 May 2009 20:29:27 +0000</pubDate>
		<dc:creator>Chuck</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[hordes painting]]></category>

		<guid isPermaLink="false">http://www.deploymentzone.com/?p=124</guid>
		<description><![CDATA[One of the coolest Hordes models and also one of the weakest.  I painted this a long time ago and its one of the funnest paint jobs I've done.  When I use this model its only because it looks awesome and intimidating.
 
Update: a much better photo.
]]></description>
			<content:encoded><![CDATA[<p>One of the coolest Hordes models and also one of the weakest.  I painted this a long time ago and its one of the funnest paint jobs I've done.  When I use this model its only because it looks awesome and intimidating.</p>
<p><a class="tt-flickr tt-flickr tt-flickr-Small" title="Lord of the Feast" href="http://farm4.static.flickr.com/3568/3594344930_eddf93f12a_b.jpg"><img src="http://farm4.static.flickr.com/3568/3594344930_eddf93f12a_m.jpg" border="0" alt="Lord of the Feast" width="240" height="180" /></a> </p>
<p>Update: a much better photo.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.deploymentzone.com/2009/05/26/hordes-lord-of-the-feast/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Warhammer 40K Tyranids</title>
		<link>http://www.deploymentzone.com/2009/05/26/warhammer-40k-tyranids/</link>
		<comments>http://www.deploymentzone.com/2009/05/26/warhammer-40k-tyranids/#comments</comments>
		<pubDate>Tue, 26 May 2009 10:54:37 +0000</pubDate>
		<dc:creator>Chuck</dc:creator>
				<category><![CDATA[40K]]></category>
		<category><![CDATA[tyranid]]></category>

		<guid isPermaLink="false">http://www.deploymentzone.com/?p=121</guid>
		<description><![CDATA[I painted these 8 horma-terma-whatever-gaunts in Hive Fleet Leviathan paint scheme more than a year ago.  They came out fairly well, but it took about twelve hours to do.  Upon completion I determined I shall not have a Tyranid force painted in Leviathan color scheme.  Instead I'm going to do something that [...]]]></description>
			<content:encoded><![CDATA[<p>I painted these 8 horma-terma-whatever-gaunts in Hive Fleet Leviathan paint scheme more than a year ago.  They came out fairly well, but it took about twelve hours to do.  Upon completion I determined I shall not have a Tyranid force painted in Leviathan color scheme.  Instead I'm going to do something that involves an airbrush and wood stain.</p>
<div style="text-align:center;"><a class="tt-flickr tt-flickr tt-flickr-Small" title="Tyranids Wide" href="http://farm4.static.flickr.com/3394/3566119164_7ff92bd7e2_b.jpg"><img src="http://farm4.static.flickr.com/3394/3566119164_7ff92bd7e2_m.jpg" border="0" alt="Tyranids Wide" width="240" height="59" /></a></p>
<p><a class="tt-flickr tt-flickr tt-flickr-Medium" title="Tyranids Pair" href="http://farm3.static.flickr.com/2476/3566119202_3a5231f088_o.jpg"><img src="http://farm3.static.flickr.com/2476/3566119202_446823662e.jpg" border="0" alt="Tyranids Pair" width="470" height="352" /></a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.deploymentzone.com/2009/05/26/warhammer-40k-tyranids/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Trying out SyntaxHighligher and PreCode</title>
		<link>http://www.deploymentzone.com/2009/04/29/trying-out-syntaxhighligher-and-precode/</link>
		<comments>http://www.deploymentzone.com/2009/04/29/trying-out-syntaxhighligher-and-precode/#comments</comments>
		<pubDate>Wed, 29 Apr 2009 18:10:03 +0000</pubDate>
		<dc:creator>Chuck</dc:creator>
				<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://www.deploymentzone.com/2009/04/29/trying-out-syntaxhighligher-and-precode/</guid>
		<description><![CDATA[Just making sure this is correct.&#160; By this I mean PreCode (requires Windows Live Writer 2009) with SyntaxHighligher setup.&#160; PreCode is also a stand alone program.
&#160;
public bool Validate(IValidationDictionary modelState, string prefix)
{
    // xVal example code
    var dataAnnotationErrors = from prop in TypeDescriptor.GetProperties(_entity).Cast&#60;PropertyDescriptor&#62;()
        [...]]]></description>
			<content:encoded><![CDATA[<p>Just making sure this is correct.&#160; By this I mean <a href="http://precode.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=25426#ReleaseFiles">PreCode</a> (requires <a href="http://windowslivewriter.spaces.live.com/">Windows Live Writer 2009</a>) with <a href="http://alexgorbatchev.com/wiki/SyntaxHighlighter">SyntaxHighligher</a> setup.&#160; PreCode is also a stand alone program.</p>
<p>&#160;</p>
<pre class="brush: csharp;">public bool Validate(IValidationDictionary modelState, string prefix)
{
    // xVal example code
    var dataAnnotationErrors = from prop in TypeDescriptor.GetProperties(_entity).Cast&lt;PropertyDescriptor&gt;()
           from attribute in prop.Attributes.OfType&lt;ValidationAttribute&gt;()
           where !attribute.IsValid(prop.GetValue(_entity))
           select new ErrorInfo(prop.Name, attribute.FormatErrorMessage(string.Empty), _entity);

    var brokenRules = GetBrokenRules();

    if (!String.IsNullOrEmpty(prefix))
        prefix += &quot;.&quot;;

    if (dataAnnotationErrors.Any())
        dataAnnotationErrors.ForEach(ei =&gt; modelState.AddError(prefix + ei.PropertyName, ei.ErrorMessage));
    if (brokenRules.Any())
        brokenRules.ForEach(rule =&gt; modelState.AddError(prefix + rule.Property, rule.Message));

    return modelState.IsValid;
}</pre>
<p>&#160;</p>
<p>There is a “Fix Indentation” button in PreCode.&#160; I am in love.</p>
<p><strike>Now just to setup the clipboard SWF thing.</strike></p>
<p>I should seriously consider a theme with a wider content area.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.deploymentzone.com/2009/04/29/trying-out-syntaxhighligher-and-precode/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Automatic Windows Update Fail and Fix for WHS (Server 2003)</title>
		<link>http://www.deploymentzone.com/2009/04/23/automatic-windows-update-fail-and-fix-for-whs-server-2003/</link>
		<comments>http://www.deploymentzone.com/2009/04/23/automatic-windows-update-fail-and-fix-for-whs-server-2003/#comments</comments>
		<pubDate>Thu, 23 Apr 2009 06:20:25 +0000</pubDate>
		<dc:creator>Chuck</dc:creator>
				<category><![CDATA[Servers]]></category>
		<category><![CDATA[dvd]]></category>
		<category><![CDATA[mediacenter]]></category>
		<category><![CDATA[stuttering]]></category>
		<category><![CDATA[tcpip]]></category>
		<category><![CDATA[whs]]></category>

		<guid isPermaLink="false">http://www.deploymentzone.com/?p=113</guid>
		<description><![CDATA[So I went to stream a movie (DVD) off my Windows Home Server (Windows Server 2003 based) to my Windows Media Center 2005 (XP 32-bit) and encountered CONSTANT stuttering.  The night before I had watched a movie with no problems.  I spent about 5 hours trying to figure out what had happened - both machines [...]]]></description>
			<content:encoded><![CDATA[<p>So I went to stream a movie (DVD) off my Windows Home Server (Windows Server 2003 based) to my Windows Media Center 2005 (XP 32-bit) and encountered CONSTANT stuttering.  The night before I had watched a movie with no problems.  I spent about 5 hours trying to figure out what had happened - both machines had a "Your computer was recently updated!" message from automatic updates.  I knew I was in serious trouble.</p>
<p>I spent a long time trying to troubleshoot codecs (both audio and video) and going through all manner of issues.  I mucked around with the registry on both machines as I narrowed down the problem to horrible, horrible gigabit network performance.  I watched the networking performance through Task Manager on the server and saw my network usage NEVER go above 1%.</p>
<p>Then finally I came across the hotfix from Microsoft to unfuck the hotfix automatic updates kindly installed for me:</p>
<p><a href="http://support.microsoft.com/kb/948496/">http://support.microsoft.com/kb/948496/</a></p>
<p>Now network utilization hangs out at 25% while copying a 7 GB file across my gigabit network.</p>
<p>And I've learned the lesson I seem to learn every 6 months or so - pretty much every time a new install of Windows or a new PC comes online in my house - disable Automatic Update.  If you don't - you will regret it.</p>
<p>Update: I also had to install a hotfix rollup for Windows Media Center 2005 available from Windows Update and reboot the machine to put my network bandwidth consumption at something over 0.5% which is apparently what I need to play DVDs without stutters... though /sigh there is *still* some stuttering but not nearly as bad as before.</p>
<p>Update[2]: FINALLY.  I ran across this:</p>
<p>http://www.winaims.com/network_patch.html</p>
<p>So on my Windows Media Center machine I fired up regedit again and did:</p>
<p>HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanworkstation\parameters<br />
Key: ReadAheadGranularity<br />
Type: DWORD<br />
Value: 0</p>
<p>rebooted, and now network utilization seems to stay at a constant 20% when copying a 6 GB file over my network.</p>
<p>Finally I can sleep with a minor feeling of accomplishment.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.deploymentzone.com/2009/04/23/automatic-windows-update-fail-and-fix-for-whs-server-2003/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
