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

<channel>
	<title>Infinity &#187; Technology</title>
	<atom:link href="http://blog.cyragon.com/category/technology/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.cyragon.com</link>
	<description>where it all begins</description>
	<lastBuildDate>Fri, 11 Feb 2011 20:26:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.1</generator>
		<item>
		<title>C# vs Java: casting objects and calling members</title>
		<link>http://blog.cyragon.com/2011/02/c-vs-java-casting-objects-and-calling-members/</link>
		<comments>http://blog.cyragon.com/2011/02/c-vs-java-casting-objects-and-calling-members/#comments</comments>
		<pubDate>Fri, 11 Feb 2011 20:24:00 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Interesting]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://blog.cyragon.com/?p=210</guid>
		<description><![CDATA[Given these two functionally identical code samples in c# and java, what is the output? C#: public class A { &#160;&#160;public String Method() &#160;&#160;{ &#160;&#160;&#160;&#160;return &#34;this is A&#34;; &#160;&#160;} } public class B : A { &#160;&#160;public String Method() &#160;&#160;{ &#160;&#160;&#160;&#160;return &#34;this is B&#34;; &#160;&#160;} } A thisA = new B(); thisA.Method(); Java: public class [...]]]></description>
			<content:encoded><![CDATA[<p>Given these two functionally identical code samples in c# and java, what is the output?</p>
<p>C#:<br />
<pre><code>public class A
{
&nbsp;&nbsp;public String Method()
&nbsp;&nbsp;{
&nbsp;&nbsp;&nbsp;&nbsp;return &quot;this is A&quot;;
&nbsp;&nbsp;}
}

public class B : A
{
&nbsp;&nbsp;public String Method()
&nbsp;&nbsp;{
&nbsp;&nbsp;&nbsp;&nbsp;return &quot;this is B&quot;;
&nbsp;&nbsp;}
}

A thisA = new B();

thisA.Method();</code></pre></p>
<p>Java:<br />
<pre><code>public class A
{
&nbsp;&nbsp;public String Method()
&nbsp;&nbsp;{
&nbsp;&nbsp;&nbsp;&nbsp;return &quot;this is A&quot;;
&nbsp;&nbsp;}
}

public class B extends A
{
&nbsp;&nbsp;public String Method()
&nbsp;&nbsp;{
&nbsp;&nbsp;&nbsp;&nbsp;return &quot;this is B&quot;;
&nbsp;&nbsp;}
}

A thisA = new B();

thisA.Method();</code></pre></p>
<p>What does thisA.Method() return? </p>
<p>It turns out that there are two different answers to this. In .NET/C# it returns from A (&#8220;this is A&#8221;). In Java, it returns from B (&#8220;this is B&#8221;). </p>
<p>So far it appears that this is a type issue; new B() must be getting cast back to A in C#. Looking for some documentation on this specifically. Links anyone?</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.cyragon.com/2011/02/c-vs-java-casting-objects-and-calling-members/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Our latest project: Live Election Results for 2010!</title>
		<link>http://blog.cyragon.com/2010/11/our-latest-project-live-election-results-for-2010/</link>
		<comments>http://blog.cyragon.com/2010/11/our-latest-project-live-election-results-for-2010/#comments</comments>
		<pubDate>Tue, 02 Nov 2010 01:39:08 +0000</pubDate>
		<dc:creator>Ben Farmer</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Agile]]></category>
		<category><![CDATA[Announcement]]></category>
		<category><![CDATA[Interesting]]></category>
		<category><![CDATA[Politics]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Election 2010]]></category>
		<category><![CDATA[Live Election Results]]></category>

		<guid isPermaLink="false">http://blog.cyragon.com/?p=193</guid>
		<description><![CDATA[That&#8217;s right, our latest project turned into a pretty big effort; live election results for the entire US! We&#8217;re allowing you to customize which races you want to watch in real-time. The idea for this project started back in August of 2010 as a simple site to show some local live election results for one [...]]]></description>
			<content:encoded><![CDATA[<p>That&#8217;s right, our latest project turned into a pretty big effort; <a href="http://liveelectionresults2010.com">live election results</a> for the entire US! We&#8217;re allowing you to customize which races you want to watch in real-time. </p>
<p>The idea for this project started back in August of 2010 as a simple site to show some local live election results for one county. It was a quick and simple application that worked really well. </p>
<p>In October, we started working on some improvements and decided to expand the scope of the results to cover all U.S. Senate, U.S. House races, and as many states as we could before November 2nd. Oh, and we redesigned the Silverlight UI and added a ton of functionality. </p>
<p>On top of that, the project now includes a mobile web version for the iPhone, Android, and Blackberry devices. And a custom Windows Phone 7 client application with some really advanced features. Not to mention a ton of new really smart high-availability back-end data services.  </p>
<p>So, yeah, lots of work and not much sleep. But it&#8217;s really awesome and we&#8217;re very happy with it. Check it out: <a href="http://liveelectionresults2010.com">Live Election Results for November 2nd 2010</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.cyragon.com/2010/11/our-latest-project-live-election-results-for-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Extending Moq&#8217;s Setup() to return multiple values</title>
		<link>http://blog.cyragon.com/2010/06/extending-moqs-setup-to-return-multiple-values/</link>
		<comments>http://blog.cyragon.com/2010/06/extending-moqs-setup-to-return-multiple-values/#comments</comments>
		<pubDate>Fri, 25 Jun 2010 20:37:35 +0000</pubDate>
		<dc:creator>jwcarroll</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Moq]]></category>
		<category><![CDATA[TDD]]></category>
		<category><![CDATA[Unit Testing]]></category>

		<guid isPermaLink="false">http://blog.cyragon.com/?p=134</guid>
		<description><![CDATA[If you regularly use TDD, then you are familiar with the concept of mocking. If you don&#8217;t use TDD, then you need to slap yourself and apologize to Bob Martin, Michael Feathers and Ron Jeffries immediately. I&#8217;ll wait here&#8230; While I would argue you should begin your TDD journey by writing your own mocks; using a framework [...]]]></description>
			<content:encoded><![CDATA[<p>If you regularly use <a href="http://en.wikipedia.org/wiki/Test-driven_development">TDD</a>, then you are familiar with the concept of mocking. If you don&#8217;t use TDD, then you need to slap yourself and apologize to <a href="http://www.objectmentor.com/omTeam/martin_r.html">Bob Martin</a>, <a href="http://www.objectmentor.com/omTeam/feathers_m.html">Michael Feathers</a> and <a href="http://www.objectmentor.com/omTeam/jeffries_r.html">Ron Jeffries</a> immediately. I&#8217;ll wait here&#8230;</p>
<p>While I would argue you should begin your TDD journey by <a href="http://blog.objectmentor.com/articles/2009/10/28/manual-mocking-resisting-the-invasion-of-dots-and-parentheses">writing your own mocks</a>; using a framework will certainly make like easier in many instances and allow you to focus on the tests themselves.</p>
<p>I was a <a href="http://www.ayende.com/projects/rhino-mocks.aspx">RhinoMocks</a> guy for a long time, but have recently converted to <a href="http://code.google.com/p/moq/">Moq</a>&#8230; AND I LOVE IT!!! Moq is simple and easy to use, and doesn&#8217;t get in the way of the intent of your tests. That being said, there are certain scenarios you run into with any framework that you end up coding around, and sometimes that <em>does</em> get in the way of your what you trying to say with your test.</p>
<p>Moq allows for a pretty simple syntax when you want to set up a return value on a mocked type.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p134code9'); return false;">View Code</a> CSHARP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p1349"><td class="line_numbers"><pre>1
2
</pre></td><td class="code" id="p134code9"><pre class="csharp" style="font-family:monospace;">var mockService <span style="color: #008000;">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> Mock<span style="color: #008000;">&lt;</span>IReturnStuff<span style="color: #008000;">&gt;</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
mockService<span style="color: #008000;">.</span><span style="color: #0000FF;">Setup</span><span style="color: #008000;">&#40;</span>svc <span style="color: #008000;">=&gt;</span> svc<span style="color: #008000;">.</span><span style="color: #0000FF;">SomeMethodCall</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Returns</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;Hello, World!&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span></pre></td></tr></table></div>

<p>
Pretty sweet so far, and that works 99% of the time. But&#8230; what about a scenario where we want to return different values on successive calls to that method. I can think of a lot of situations where, in the absence of formal eventing, you want your code to test some value until it meets a certain criteria. You might be polling a web service for status updates, or checking a database to see if a record has been written. Whatever the case may be, it <em>will</em> come up.</p>
<p>So, for illustration purposes, let&#8217;s make up one such example. Suppose we wanted to ask a service for a specified set of values, but the return types could be varied. Perhaps we only care about some subset of those values, and want to test that our code correctly deals with variable data.</p>
<p>We have our service contract:<br />
</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p134code10'); return false;">View Code</a> CSHARP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p13410"><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code" id="p134code10"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">interface</span> IReturnStuff
<span style="color: #008000;">&#123;</span>
    <span style="color: #6666cc; font-weight: bold;">String</span> ReturnAString<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
<span style="color: #008000;">&#125;</span></pre></td></tr></table></div>

<p>
Next we have our consuming class (the subject under test):<br />
</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p134code11'); return false;">View Code</a> CSHARP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p13411"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
</pre></td><td class="code" id="p134code11"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">class</span> UsesReturnedStuff
<span style="color: #008000;">&#123;</span>
    <span style="color: #0600FF; font-weight: bold;">public</span> IReturnStuff ReturnStuff <span style="color: #008000;">&#123;</span> get<span style="color: #008000;">;</span> set<span style="color: #008000;">;</span> <span style="color: #008000;">&#125;</span>
    <span style="color: #0600FF; font-weight: bold;">private</span> Regex Filter <span style="color: #008000;">&#123;</span> get<span style="color: #008000;">;</span> set<span style="color: #008000;">;</span> <span style="color: #008000;">&#125;</span>
&nbsp;
    <span style="color: #0600FF; font-weight: bold;">public</span> UsesReturnedStuff<span style="color: #008000;">&#40;</span>IReturnStuff returnStuff<span style="color: #008000;">&#41;</span>
    <span style="color: #008000;">&#123;</span>
        ReturnStuff <span style="color: #008000;">=</span> returnStuff<span style="color: #008000;">;</span>
        Filter <span style="color: #008000;">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> Regex<span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;(the|quick|brown|fox|hello|world)(:Pu)?&quot;</span>, RegexOptions<span style="color: #008000;">.</span><span style="color: #0000FF;">IgnoreCase</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
    <span style="color: #008000;">&#125;</span>
&nbsp;
    <span style="color: #0600FF; font-weight: bold;">public</span> List<span style="color: #008000;">&lt;</span><span style="color: #6666cc; font-weight: bold;">String</span><span style="color: #008000;">&gt;</span> GetStuff<span style="color: #008000;">&#40;</span>Int32 times<span style="color: #008000;">&#41;</span>
    <span style="color: #008000;">&#123;</span>
        var stuff <span style="color: #008000;">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> List<span style="color: #008000;">&lt;</span><span style="color: #6666cc; font-weight: bold;">String</span><span style="color: #008000;">&gt;</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
        <span style="color: #0600FF; font-weight: bold;">for</span> <span style="color: #008000;">&#40;</span>var i <span style="color: #008000;">=</span> <span style="color: #FF0000;">0</span><span style="color: #008000;">;</span> i <span style="color: #008000;">&lt;</span> times<span style="color: #008000;">;</span> i<span style="color: #008000;">++</span><span style="color: #008000;">&#41;</span>
        <span style="color: #008000;">&#123;</span>
            var newStuff <span style="color: #008000;">=</span> ReturnStuff<span style="color: #008000;">.</span><span style="color: #0000FF;">ReturnAString</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
            <span style="color: #0600FF; font-weight: bold;">if</span><span style="color: #008000;">&#40;</span>Filter<span style="color: #008000;">.</span><span style="color: #0000FF;">IsMatch</span><span style="color: #008000;">&#40;</span>newStuff<span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span>
                stuff<span style="color: #008000;">.</span><span style="color: #0000FF;">Add</span><span style="color: #008000;">&#40;</span>newStuff<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
        <span style="color: #008000;">&#125;</span>
&nbsp;
        <span style="color: #0600FF; font-weight: bold;">return</span> stuff<span style="color: #008000;">;</span>
    <span style="color: #008000;">&#125;</span>
<span style="color: #008000;">&#125;</span></pre></td></tr></table></div>

<p>
As you can see we have a pretty basic setup here that uses a white-list approach to building up a list. We want to write some tests to mock this behavior. If we wanted two different return values when this method is called, we might instinctively write a test like this:<br />
</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p134code12'); return false;">View Code</a> CSHARP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p13412"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
</pre></td><td class="code" id="p134code12"><pre class="csharp" style="font-family:monospace;"><span style="color: #008000;">&#91;</span>Test<span style="color: #008000;">&#93;</span>
<span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">void</span> LastSetupWins<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span>
<span style="color: #008000;">&#123;</span>
var mockReturnStuff <span style="color: #008000;">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> Mock<span style="color: #008000;">&lt;</span>IReturnStuff<span style="color: #008000;">&gt;</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
var usesStuff <span style="color: #008000;">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> UsesReturnedStuff<span style="color: #008000;">&#40;</span>mockReturnStuff<span style="color: #008000;">.</span><span style="color: #6666cc; font-weight: bold;">Object</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
mockReturnStuff<span style="color: #008000;">.</span><span style="color: #0000FF;">Setup</span><span style="color: #008000;">&#40;</span>svc <span style="color: #008000;">=&gt;</span> svc<span style="color: #008000;">.</span><span style="color: #0000FF;">ReturnAString</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Returns</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;Hello&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
mockReturnStuff<span style="color: #008000;">.</span><span style="color: #0000FF;">Setup</span><span style="color: #008000;">&#40;</span>svc <span style="color: #008000;">=&gt;</span> svc<span style="color: #008000;">.</span><span style="color: #0000FF;">ReturnAString</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Returns</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;World!&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
var stuff <span style="color: #008000;">=</span> usesStuff<span style="color: #008000;">.</span><span style="color: #0000FF;">GetStuff</span><span style="color: #008000;">&#40;</span><span style="color: #FF0000;">2</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
Assert<span style="color: #008000;">.</span><span style="color: #0000FF;">AreEqual</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;Hello World!&quot;</span>, <span style="color: #6666cc; font-weight: bold;">String</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Join</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot; &quot;</span>, stuff<span style="color: #008000;">.</span><span style="color: #0000FF;">ToArray</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
<span style="color: #008000;">&#125;</span></pre></td></tr></table></div>

<p>
If you couldn&#8217;t already tell from the name of the test method, this won&#8217;t work as the last return value to be Setup wins. The output from this test will produce the text:</p>
<blockquote><p>&#8220;World! World!&#8221;</p></blockquote>
<p>Not so great, but the Moq documentation gives us a workaround by using a callback method. A little bit of refactoring and Voila!<br />
</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p134code13'); return false;">View Code</a> CSHARP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p13413"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
</pre></td><td class="code" id="p134code13"><pre class="csharp" style="font-family:monospace;"><span style="color: #008000;">&#91;</span>Test<span style="color: #008000;">&#93;</span>
<span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">void</span> SetupWithCallback<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span>
<span style="color: #008000;">&#123;</span>
    var mockReturnStuff <span style="color: #008000;">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> Mock<span style="color: #008000;">&lt;</span>IReturnStuff<span style="color: #008000;">&gt;</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
    var usesStuff <span style="color: #008000;">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> UsesReturnedStuff<span style="color: #008000;">&#40;</span>mockReturnStuff<span style="color: #008000;">.</span><span style="color: #6666cc; font-weight: bold;">Object</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
    var returnValues <span style="color: #008000;">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a><span style="color: #008000;">&#91;</span><span style="color: #008000;">&#93;</span> <span style="color: #008000;">&#123;</span><span style="color: #666666;">&quot;Hello&quot;</span>, <span style="color: #666666;">&quot;World!&quot;</span><span style="color: #008000;">&#125;</span><span style="color: #008000;">;</span>
    var numCalls <span style="color: #008000;">=</span> <span style="color: #FF0000;">0</span><span style="color: #008000;">;</span>
&nbsp;
    mockReturnStuff<span style="color: #008000;">.</span><span style="color: #0000FF;">Setup</span><span style="color: #008000;">&#40;</span>svc <span style="color: #008000;">=&gt;</span> svc<span style="color: #008000;">.</span><span style="color: #0000FF;">ReturnAString</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span>
        <span style="color: #008000;">.</span><span style="color: #0000FF;">Returns</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span> <span style="color: #008000;">=&gt;</span> returnValues<span style="color: #008000;">&#91;</span>numCalls<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#41;</span>
        <span style="color: #008000;">.</span><span style="color: #0000FF;">Callback</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span> <span style="color: #008000;">=&gt;</span> numCalls<span style="color: #008000;">++</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
    var stuff <span style="color: #008000;">=</span> usesStuff<span style="color: #008000;">.</span><span style="color: #0000FF;">GetStuff</span><span style="color: #008000;">&#40;</span>returnValues<span style="color: #008000;">.</span><span style="color: #0000FF;">Length</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
    Assert<span style="color: #008000;">.</span><span style="color: #0000FF;">AreEqual</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;Hello World!&quot;</span>, <span style="color: #6666cc; font-weight: bold;">String</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Join</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot; &quot;</span>, stuff<span style="color: #008000;">.</span><span style="color: #0000FF;">ToArray</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
<span style="color: #008000;">&#125;</span></pre></td></tr></table></div>

<p>
Here we are taking advantage of anonymous methods and closures to essentially keep feeding our Mock service it&#8217;s next value. This works, but&#8230; yuck! Reading this test is not very clear, and it gets in the way of the intent.<br />
Since we are supposed to refactor our test code too, lets move the ugly bits out into a private method, and re-write our test again.<br />
</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p134code14'); return false;">View Code</a> CSHARP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p13414"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
</pre></td><td class="code" id="p134code14"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF; font-weight: bold;">private</span> <span style="color: #0600FF; font-weight: bold;">static</span> Int32 SetupMany<span style="color: #008000;">&#40;</span>Mock<span style="color: #008000;">&lt;</span>IReturnStuff<span style="color: #008000;">&gt;</span> mock, Expression<span style="color: #008000;">&lt;</span>Func<span style="color: #008000;">&lt;</span>IReturnStuff, <span style="color: #6666cc; font-weight: bold;">String</span><span style="color: #008000;">&gt;&gt;</span> expression, <span style="color: #0600FF; font-weight: bold;">params</span> <span style="color: #6666cc; font-weight: bold;">String</span><span style="color: #008000;">&#91;</span><span style="color: #008000;">&#93;</span> args<span style="color: #008000;">&#41;</span>
<span style="color: #008000;">&#123;</span>
    var numCalls <span style="color: #008000;">=</span> <span style="color: #FF0000;">0</span><span style="color: #008000;">;</span>
&nbsp;
    mock<span style="color: #008000;">.</span><span style="color: #0000FF;">Setup</span><span style="color: #008000;">&#40;</span>expression<span style="color: #008000;">&#41;</span>
        <span style="color: #008000;">.</span><span style="color: #0000FF;">Returns</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span> <span style="color: #008000;">=&gt;</span> args<span style="color: #008000;">&#91;</span>numCalls<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#41;</span>
        <span style="color: #008000;">.</span><span style="color: #0000FF;">Callback</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span> <span style="color: #008000;">=&gt;</span> numCalls<span style="color: #008000;">++</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
    <span style="color: #0600FF; font-weight: bold;">return</span> args<span style="color: #008000;">.</span><span style="color: #0000FF;">Length</span><span style="color: #008000;">;</span>
<span style="color: #008000;">&#125;</span>
&nbsp;
<span style="color: #008000;">&#91;</span>Test<span style="color: #008000;">&#93;</span>
<span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">void</span> SetupWithExtractedMethod<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span>
<span style="color: #008000;">&#123;</span>
    var mockReturnStuff <span style="color: #008000;">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> Mock<span style="color: #008000;">&lt;</span>IReturnStuff<span style="color: #008000;">&gt;</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
    var usesStuff <span style="color: #008000;">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> UsesReturnedStuff<span style="color: #008000;">&#40;</span>mockReturnStuff<span style="color: #008000;">.</span><span style="color: #6666cc; font-weight: bold;">Object</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
    var calls <span style="color: #008000;">=</span> SetupMany<span style="color: #008000;">&#40;</span>mockReturnStuff,
                          svc <span style="color: #008000;">=&gt;</span> svc<span style="color: #008000;">.</span><span style="color: #0000FF;">ReturnAString</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span>,
                          <span style="color: #666666;">&quot;Hello&quot;</span>, <span style="color: #666666;">&quot;World!&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
    var stuff <span style="color: #008000;">=</span> usesStuff<span style="color: #008000;">.</span><span style="color: #0000FF;">GetStuff</span><span style="color: #008000;">&#40;</span>calls<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
    Assert<span style="color: #008000;">.</span><span style="color: #0000FF;">AreEqual</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;Hello World!&quot;</span>, <span style="color: #6666cc; font-weight: bold;">String</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Join</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot; &quot;</span>, stuff<span style="color: #008000;">.</span><span style="color: #0000FF;">ToArray</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
<span style="color: #008000;">&#125;</span></pre></td></tr></table></div>

<p>
This is good. We haven&#8217;t lost any functionality, but the intent of the test is much clearer. There is less friction because you can read the code and understand what it is doing pretty quickly without having to &#8220;decipher&#8221; the meaning.<br />
Now, this is all fine and good, but I am likely to run into this same scenario more than once. What I would really love to have is a SetupMany() method that was built into Moq. A method I could call directly on the mocked object. Well&#8230; starting with C# 3.0 Extension Methods give us the ability to do just that. With a little work, we should be able to create a very generic extension to give us the desired behavior.<br />
</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p134code15'); return false;">View Code</a> CSHARP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p13415"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
</pre></td><td class="code" id="p134code15"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #0600FF; font-weight: bold;">static</span> <span style="color: #6666cc; font-weight: bold;">class</span> MoqExtensions
<span style="color: #008000;">&#123;</span>
    <span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #0600FF; font-weight: bold;">static</span> <span style="color: #6666cc; font-weight: bold;">void</span> SetupMany<span style="color: #008000;">&lt;</span>TSvc, TReturn<span style="color: #008000;">&gt;</span><span style="color: #008000;">&#40;</span><span style="color: #0600FF; font-weight: bold;">this</span> Mock<span style="color: #008000;">&lt;</span>TSvc<span style="color: #008000;">&gt;</span> mock,
        Expression<span style="color: #008000;">&lt;</span>Func<span style="color: #008000;">&lt;</span>TSvc, TReturn<span style="color: #008000;">&gt;&gt;</span> expression,
        <span style="color: #0600FF; font-weight: bold;">params</span> TReturn<span style="color: #008000;">&#91;</span><span style="color: #008000;">&#93;</span> args<span style="color: #008000;">&#41;</span>
        <span style="color: #0600FF; font-weight: bold;">where</span> TSvc <span style="color: #008000;">:</span> <span style="color: #6666cc; font-weight: bold;">class</span>
    <span style="color: #008000;">&#123;</span>
        var numCalls <span style="color: #008000;">=</span> <span style="color: #FF0000;">0</span><span style="color: #008000;">;</span>
&nbsp;
        mock<span style="color: #008000;">.</span><span style="color: #0000FF;">Setup</span><span style="color: #008000;">&#40;</span>expression<span style="color: #008000;">&#41;</span>
            <span style="color: #008000;">.</span><span style="color: #0000FF;">Returns</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span> <span style="color: #008000;">=&gt;</span> numCalls <span style="color: #008000;">&lt;</span> args<span style="color: #008000;">.</span><span style="color: #0000FF;">Length</span> <span style="color: #008000;">?</span> args<span style="color: #008000;">&#91;</span>numCalls<span style="color: #008000;">&#93;</span> <span style="color: #008000;">:</span> args<span style="color: #008000;">&#91;</span>args<span style="color: #008000;">.</span><span style="color: #0000FF;">Length</span> <span style="color: #008000;">-</span> <span style="color: #FF0000;">1</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">&#41;</span>
            <span style="color: #008000;">.</span><span style="color: #0000FF;">Callback</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span> <span style="color: #008000;">=&gt;</span> numCalls<span style="color: #008000;">++</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
    <span style="color: #008000;">&#125;</span>
<span style="color: #008000;">&#125;</span></pre></td></tr></table></div>

<p>
Ok, so I know the method signature looks pretty scary. Just don&#8217;t stare at it long enough or you will go blind! The extra bit with the Ternary operator is a bit of error checking to prevent you from running over the bounds of the array. If you call the method more times than available arguments, it will simply keep returning the last argument in the list.<br />
Refactoring our test one last time gives us an even cleaner syntax that works with any return type. The second test merely demonstrates the &#8220;sticky&#8221; final value being returned over and over.<br />
</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p134code16'); return false;">View Code</a> CSHARP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p13416"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
</pre></td><td class="code" id="p134code16"><pre class="csharp" style="font-family:monospace;"><span style="color: #008000;">&#91;</span>Test<span style="color: #008000;">&#93;</span>
<span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">void</span> SetupWithGenericExtensionMethod<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span>
<span style="color: #008000;">&#123;</span>
    var mockReturnStuff <span style="color: #008000;">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> Mock<span style="color: #008000;">&lt;</span>IReturnStuff<span style="color: #008000;">&gt;</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
    var usesStuff <span style="color: #008000;">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> UsesReturnedStuff<span style="color: #008000;">&#40;</span>mockReturnStuff<span style="color: #008000;">.</span><span style="color: #6666cc; font-weight: bold;">Object</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
    mockReturnStuff<span style="color: #008000;">.</span><span style="color: #0000FF;">SetupMany</span><span style="color: #008000;">&#40;</span>svc <span style="color: #008000;">=&gt;</span> svc<span style="color: #008000;">.</span><span style="color: #0000FF;">ReturnAString</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span>, <span style="color: #666666;">&quot;Hello&quot;</span>, <span style="color: #666666;">&quot;World!&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
    var stuff <span style="color: #008000;">=</span> usesStuff<span style="color: #008000;">.</span><span style="color: #0000FF;">GetStuff</span><span style="color: #008000;">&#40;</span><span style="color: #FF0000;">2</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
    Assert<span style="color: #008000;">.</span><span style="color: #0000FF;">AreEqual</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;Hello World!&quot;</span>, <span style="color: #6666cc; font-weight: bold;">String</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Join</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot; &quot;</span>, stuff<span style="color: #008000;">.</span><span style="color: #0000FF;">ToArray</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
<span style="color: #008000;">&#125;</span>
&nbsp;
<span style="color: #008000;">&#91;</span>Test<span style="color: #008000;">&#93;</span>
<span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">void</span> SetupWithLotsOfParams<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span>
<span style="color: #008000;">&#123;</span>
    var mockReturnStuff <span style="color: #008000;">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> Mock<span style="color: #008000;">&lt;</span>IReturnStuff<span style="color: #008000;">&gt;</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
    var usesStuff <span style="color: #008000;">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> UsesReturnedStuff<span style="color: #008000;">&#40;</span>mockReturnStuff<span style="color: #008000;">.</span><span style="color: #6666cc; font-weight: bold;">Object</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
    mockReturnStuff<span style="color: #008000;">.</span><span style="color: #0000FF;">SetupMany</span><span style="color: #008000;">&#40;</span>svc <span style="color: #008000;">=&gt;</span> svc<span style="color: #008000;">.</span><span style="color: #0000FF;">ReturnAString</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span>,
                              <span style="color: #666666;">&quot;the&quot;</span>,<span style="color: #666666;">&quot;quick&quot;</span>,<span style="color: #666666;">&quot;brown&quot;</span>,<span style="color: #666666;">&quot;fox&quot;</span>,<span style="color: #666666;">&quot;jumps&quot;</span>,<span style="color: #666666;">&quot;over&quot;</span>,<span style="color: #666666;">&quot;the&quot;</span>,<span style="color: #666666;">&quot;fence&quot;</span>,<span style="color: #666666;">&quot;hello!&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
    var stuff <span style="color: #008000;">=</span> usesStuff<span style="color: #008000;">.</span><span style="color: #0000FF;">GetStuff</span><span style="color: #008000;">&#40;</span><span style="color: #FF0000;">11</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
    Assert<span style="color: #008000;">.</span><span style="color: #0000FF;">AreEqual</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;the quick brown fox the hello! hello! hello!&quot;</span>, <span style="color: #6666cc; font-weight: bold;">String</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Join</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot; &quot;</span>, stuff<span style="color: #008000;">.</span><span style="color: #0000FF;">ToArray</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
<span style="color: #008000;">&#125;</span></pre></td></tr></table></div>

<p>
And there you have it. Extending the Moq API without having to actually go in and modify the source. Hopefully this will save you a headache or two in the future.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.cyragon.com/2010/06/extending-moqs-setup-to-return-multiple-values/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>CodeStock 2010</title>
		<link>http://blog.cyragon.com/2010/03/codestock-2010/</link>
		<comments>http://blog.cyragon.com/2010/03/codestock-2010/#comments</comments>
		<pubDate>Fri, 12 Mar 2010 15:45:06 +0000</pubDate>
		<dc:creator>Ben Farmer</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Agile]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[CodeStock]]></category>

		<guid isPermaLink="false">http://blog.cyragon.com/?p=132</guid>
		<description><![CDATA[My good friend Josh Carroll and I have submitted a session to CodeStock about practicing Agile on small software development teams. Sign up and vote for our session! Chaos to Awesome in 60 minutes / the heart of Agile without all the fluff Track / Area: Developer / Methodology Technology: Agile, CI, testing, development processes, [...]]]></description>
			<content:encoded><![CDATA[<p>My good friend Josh Carroll and I have submitted a session to CodeStock about practicing Agile on small software development teams. Sign up and vote for our session!</p>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Chaos to Awesome in 60 minutes / the heart of Agile without all the fluff</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Track / Area: Developer / Methodology</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Technology: Agile, CI, testing, development processes, tools</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">General / Specific Experience Level: Beginner / Beginner</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Co-Presented with Josh Carroll.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Want to increase visibility, collaboration, and communication in your development process? Striving to ensure higher quality products with rapid feedback cycles? Don&#8217;t know where to start?</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Our goal is to show you how we use simple tools and practices to work in an agile way &#8211; without any fluff. We will cover how we manage our task board and source code; simple continuous integration; unit testing with mocks; design patterns for clean separation of concerns and testability. All in one hour. &#8216;Cause that&#8217;s how we roll.</div>
<p style="padding-left: 30px;"><strong>Chaos to Awesome in 60 minutes / the heart of Agile without all the fluff</strong></p>
<p style="padding-left: 30px;">
<p style="padding-left: 30px;"><strong>Track / Area:</strong> Developer / Methodology</p>
<p style="padding-left: 30px;"><strong>Technology:</strong> Agile, CI, testing, development processes, tools</p>
<p style="padding-left: 30px;"><strong>General / Specific Experience Level:</strong> Beginner / Beginner</p>
<p style="padding-left: 30px;">
<p style="padding-left: 30px;">Co-Presented with<strong> Josh Carroll</strong>.</p>
<p style="padding-left: 30px;">
<p style="padding-left: 30px;">Want to increase visibility, collaboration, and communication in your development process? Striving to ensure higher quality products with rapid feedback cycles? Don&#8217;t know where to start?</p>
<p style="padding-left: 30px;">
<p style="padding-left: 30px;">Our goal is to show you how we use simple tools and practices to work in an agile way &#8211; without any fluff. We will cover how we manage our task board and source code; simple continuous integration; unit testing with mocks; design patterns for clean separation of concerns and testability. All in one hour. &#8216;Cause that&#8217;s how we roll.</p>
<p>You can check out all the details on the <a href="http://codestock.org/Sessions/chaos-to-awesome-in-60-minutes--the-heart-of-agile-without-all-the-fluff.aspx">CodeStock session page</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.cyragon.com/2010/03/codestock-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Impressions of Microsoft and Google</title>
		<link>http://blog.cyragon.com/2008/11/impressions-of-microsoft-and-google/</link>
		<comments>http://blog.cyragon.com/2008/11/impressions-of-microsoft-and-google/#comments</comments>
		<pubDate>Wed, 19 Nov 2008 03:40:46 +0000</pubDate>
		<dc:creator>Ben Farmer</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Microsoft]]></category>

		<guid isPermaLink="false">http://blog.cyragon.com/?p=53</guid>
		<description><![CDATA[Let&#8217;s talk about Microsoft. Let&#8217;s talk about how we feel about Microsoft. Large. Prevailing. Controlling? Invasive. Driving. Organized. They come across as a large organization that wants to impress you with its largeness and organizationess. They will do what it takes to make their products needed or required. What about Google? Let&#8217;s talk about how [...]]]></description>
			<content:encoded><![CDATA[<p>Let&#8217;s talk about Microsoft. Let&#8217;s talk about how we <em>feel</em> about Microsoft.</p>
<p>Large. Prevailing. Controlling? Invasive. Driving. Organized.</p>
<p>They come across as a large organization that wants to impress you with its largeness and organizationess. They will do what it takes to make their products needed or <em>required</em>. </p>
<p>What about Google? Let&#8217;s talk about how we <em>feel</em> about Google.</p>
<p>Now, I don&#8217;t really mind that Google is a large controlling, all-invasive, monopoly-wannabe. I have warm fuzzy thoughts about Google. I don&#8217;t use everything they make but I try just about everything they put out. </p>
<p>Google is the kid in my neighborhood that made it big. He set out to do something really well and did it. Even at the top, he still has some of that underdog charm.</p>
<p>But what&#8217;s the real difference between Microsoft and Google? Impression, mostly. They both have critical, pervasive primary products. Both have scores of emerging products with lots of promise. My impression of them is different. For Microsoft, it&#8217;s as if they went about their business growing it, expanding it, doing whatever it took to make them #1 without really thinking about how they were being perceived. </p>
<p>Perception is reality. Well, not really, but you know what I mean.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.cyragon.com/2008/11/impressions-of-microsoft-and-google/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
