<?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>mgroves</title>
	<atom:link href="http://mgroves.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://mgroves.com</link>
	<description>I&#039;m not an expert, but I am an enthusiast.</description>
	<lastBuildDate>Wed, 01 May 2013 09:19:58 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>An update</title>
		<link>http://mgroves.com/an-update/</link>
		<comments>http://mgroves.com/an-update/#comments</comments>
		<pubDate>Tue, 05 Mar 2013 16:27:03 +0000</pubDate>
		<dc:creator>mgroves</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[entertainment]]></category>
		<category><![CDATA[personal]]></category>

		<guid isPermaLink="false">http://mgroves.com/?p=1925</guid>
		<description><![CDATA[This blog is basically on an indeterminate hiatus. I blog more often at Cross Cutting Concerns, which is a blog specifically about aspect-oriented programming. I&#8217;m still very active on Twitter, where I tweet about similar topics to mgroves.com. Also, I occasionally write something on Tumblr. Those tend to be very entertainment based: pop culture, comedy, [...]]]></description>
				<content:encoded><![CDATA[<p>This blog is basically on an indeterminate hiatus.</p>
<p>I blog more often at <a href="http://crosscuttingconcerns.com">Cross Cutting Concerns</a>, which is a blog specifically about aspect-oriented programming.</p>
<p>I&#8217;m still very active on <a href="http://twitter.com/mgroves">Twitter</a>, where I tweet about similar topics to mgroves.com.</p>
<p>Also, I occasionally write something on <a href="http://matthewdgroves.tumblr.com/">Tumblr</a>. Those tend to be very entertainment based: pop culture, comedy, comics, etc.</p>
]]></content:encoded>
			<wfw:commentRss>http://mgroves.com/an-update/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Goals for 2012 Part 2</title>
		<link>http://mgroves.com/goals-for-2012-part-2/</link>
		<comments>http://mgroves.com/goals-for-2012-part-2/#comments</comments>
		<pubDate>Tue, 31 Jan 2012 23:24:24 +0000</pubDate>
		<dc:creator>mgroves</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[business]]></category>
		<category><![CDATA[goals]]></category>
		<category><![CDATA[personal]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://mgroves.com/?p=1891</guid>
		<description><![CDATA[My goals for this year are somewhat similar to last year, with a few notable changes. Rehab.  The &#8220;incident&#8221; was a grand mal seizure that gave me two dislocated shoulders, both of which caused fractures, which need surgery.  I&#8217;m on seizure medication, and I&#8217;m not supposed to drive a car until April.  I have already [...]]]></description>
				<content:encoded><![CDATA[<p>My goals for this year are somewhat similar to last year, with a few notable changes.</p>
<ul>
<li><strong>Rehab</strong>.  The &#8220;incident&#8221; was a grand mal seizure that gave me two dislocated shoulders, both of which caused fractures, which need surgery.  I&#8217;m on seizure medication, and I&#8217;m not supposed to drive a car until April.  I have already gotten through <a href="http://twitpic.com/7qvdqb">one surgery</a>, the other will be coming up in February.  If all goes well, I&#8217;ll be about 80% by April, and hopefully 100% by July.  This goal is much lower on Maslow&#8217;s hierarchy than any of my other goals, and thus is automatically the most important.</li>
<li><strong>Certification</strong>.  I&#8217;m already scheduled to take an MCTS exam to help my employer remain in good standing with Microsoft, as well as to improve my knowledge of Microsoft products.  I&#8217;m not overly concerned with certification(s) this year.  If I have the opportunity to take more Microsoft exams or pick up some PDUs, I&#8217;ll take them, but I&#8217;m not going to be worried if I don&#8217;t.</li>
<li><strong>Android apps</strong>.  I will get a handful more of apps into the store this year, whether they be Mono for Android or native Java.  I already have one in the works, and ideas for several more. I&#8217;m also going to get some Windows Phone apps in the marketplace.</li>
<li><strong>Conferences/sessions</strong>.  With the exception of CodeMash, I don&#8217;t have any plans for conferences, until&#8211;at earliest&#8211;after April.  I&#8217;d be open to doing local presentations if I&#8217;m needed, but that&#8217;s about it.  It will be enough of a challenge just to attend CONDG group meetings in the first half of the year.  I would like to definitely make it to GiveCamp this year!</li>
<li><strong>Blogging</strong>.  I&#8217;ve created another blog, one with a much narrower focus than mgroves.com.  It&#8217;s called <a href="http://crosscuttingconcerns.com">Cross Cutting Concerns</a>, and it&#8217;s all about AOP news and information.</li>
<li><strong>Business</strong>.  Our MonthlySauce.com business really needs to pick up this year.  I will be exploring some creative ways to get exposure on our limited budget.</li>
<li><strong>Personal/Internal</strong>.  As before, I have a number of personal and internal-to-my-employer goals that I won&#8217;t state here.  And I may have another surprise or two up my sleeve this year if all goes well.</li>
</ul>
<p>That&#8217;s it.</p>
]]></content:encoded>
			<wfw:commentRss>http://mgroves.com/goals-for-2012-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Goals for 2012 Part 1: Goals for 2011 recap</title>
		<link>http://mgroves.com/goals-for-2012-part-1-goals-for-2011-recap/</link>
		<comments>http://mgroves.com/goals-for-2012-part-1-goals-for-2011-recap/#comments</comments>
		<pubDate>Sun, 15 Jan 2012 21:10:53 +0000</pubDate>
		<dc:creator>mgroves</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[books]]></category>
		<category><![CDATA[business]]></category>
		<category><![CDATA[goals]]></category>
		<category><![CDATA[personal]]></category>

		<guid isPermaLink="false">http://mgroves.com/?p=1889</guid>
		<description><![CDATA[It&#8217;s a little disappointing to me that my Goals for 2011 post is still on the home page of mgroves.com. But que sera. First, a review of my 2011 goals, and how well I did: Read books.  Bender&#8217;s TDD book, yes.  DDD, not so much (it&#8217;s a long book!). F# book, no. Beautiful Code, yes [...]]]></description>
				<content:encoded><![CDATA[<p>It&#8217;s a little disappointing to me that my Goals for 2011 post is still on the home page of mgroves.com. But que sera.</p>
<p>First, a review of my 2011 goals, and how well I did:</p>
<ul>
<li>Read books.  Bender&#8217;s TDD book, yes.  DDD, not so much (it&#8217;s a long book!). F# book, no. Beautiful Code, yes a little.  I&#8217;ve pretty much abandoned the old dev lunchtime book club due to dailys with my employer at that time, but I&#8217;ve managed to sneak in a couple other books too: One on PHP5, reread of Don&#8217;t Make Me Think, ASP.NET MVC 3 from Wrox, Lauren Ipsum, and a few fiction titles here and there.  With my new Kindle, I&#8217;m able to read a lot more conveniently, though code-heavy books could be an issue.</li>
<li>Certification: I think I got a few PDUs from going to the Cincinnati Day of Agile last year, but I&#8217;m really slacking in PDUs.  I will take an MCTS exam (70-515) in a couple weeks.</li>
<li>Android apps: I exceeded my goals here for sure.  I have 5 apps in the store: 1 free, 1 paid.  One of them (Yeah Dog!) has sold well over 150 copies.  My free one has been downloaded over 1000 times.</li>
<li>Conferences &amp; presentations: I also exceeded my goals here, speaking in Pittsburgh (twice), Findlay, Codestock, Devlink, Columbus, Louisville, Detroit, Ann Arbor, Richmond, Stir Trek, New York, and probably one or two more that I&#8217;ve forgotten.  The travel has been a bit of a strain on family and finances, so I was already planning to reduce my speaking, even before the &#8220;incident&#8221;, which I&#8217;ll get to later.</li>
<li>User groups:  I regretfully didn&#8217;t participate in GiveCamp (because of Richmond) in any capacity, but I did help to organize Central Ohio Day of .NET, and I performed okay on the board of CONDG.  I chose not to pursue re-election though (mainly because of the &#8220;incident&#8221;).</li>
<li>Project Euler: I definitely dropped the ball here.  I ended up spending more time preparing and presenting on Euler than I did doing new problems.</li>
<li>Blogging: Another fail.  I spend more time on Twitter than blogging, that&#8217;s for sure.</li>
<li>Surprises: My wife and I successfully launched our first small business, <a href="http://monthlysauce.com">MonthlySauce.com</a>.  Business isn&#8217;t exactly rushing in, but we did launch it on schedule.</li>
</ul>
<p>Stay tuned for my 2012 goals and details on the &#8220;incident&#8221;.</p>
]]></content:encoded>
			<wfw:commentRss>http://mgroves.com/goals-for-2012-part-1-goals-for-2011-recap/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>2011 Funniest Commercial Awards</title>
		<link>http://mgroves.com/2011-funniest-commercial-awards/</link>
		<comments>http://mgroves.com/2011-funniest-commercial-awards/#comments</comments>
		<pubDate>Mon, 05 Dec 2011 14:11:03 +0000</pubDate>
		<dc:creator>mgroves</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[comedy]]></category>
		<category><![CDATA[humor]]></category>
		<category><![CDATA[tv]]></category>

		<guid isPermaLink="false">http://mgroves.com/?p=1888</guid>
		<description><![CDATA[For some reason, a lot of commercials really appealed to me this year.  Maybe it&#8217;s because I so rarely watch commercials anymore (DVR,Netflix) that a good commercial really stands out to me.  Anyway, this is mainly an excuse to get a cheap blog post with some funny videos.  So, without further ado&#8230; 5. My brand! [...]]]></description>
				<content:encoded><![CDATA[<p>For some reason, a lot of commercials really appealed to me this year.  Maybe it&#8217;s because I so rarely watch commercials anymore (DVR,Netflix) that a good commercial really stands out to me.  Anyway, this is mainly an excuse to get a cheap blog post with some funny videos.  So, without further ado&#8230;</p>
<p><strong>5. My brand!</strong></p>
<p>1-800-CONTACTS overly dramatic unboxing commercial.  This commercial might not have come out in 2011.  That&#8217;s okay, it&#8217;s not like this award has the same rigor as, say, the Nickelodean Kids&#8217; Choice Awards.</p>
<p><iframe width="560" height="315" src="http://www.youtube.com/embed/n3dRaEpDruw" frameborder="0" allowfullscreen></iframe></p>
<p><strong>4. I like tacos&#8230;</strong></p>
<p>I really like the acting in this commercial, and especially the delivery of &#8220;I like tacos&#8221; to a crowd of bewildered, chewing coworkers.</p>
<p><iframe width="420" height="315" src="http://www.youtube.com/embed/EoMkJ87uMBU" frameborder="0" allowfullscreen></iframe></p>
<p><strong>3. That&#8217;s dumb</strong></p>
<p>This is the commercial that keeps on giving.  It&#8217;s like the Arrested Development of commercials: each time you watch, you&#8217;ll find some new hilarious aspect of it.</p>
<p><iframe width="560" height="315" src="http://www.youtube.com/embed/8WCBvVH7FGI" frameborder="0" allowfullscreen></iframe></p>
<p><strong>2. CUZ I&#8217;M BLACK OPS</strong></p>
<p>It&#8217;s bizarre how good of a comedic delivery that Brian Wilson has.</p>
<p><iframe width="560" height="315" src="http://www.youtube.com/embed/iLsDZjIH7sE" frameborder="0" allowfullscreen></iframe></p>
<p><strong>1. Yeah dog!</strong></p>
<p>I don&#8217;t think I need to explain this one <a href="https://market.android.com/details?id=com.yeahdog">too much</a>.</p>
<p><iframe width="420" height="315" src="http://www.youtube.com/embed/oe-Y-zSd5gs" frameborder="0" allowfullscreen></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://mgroves.com/2011-funniest-commercial-awards/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Hitchhiker&#8217;s guide to hitchhiking</title>
		<link>http://mgroves.com/hitchhikers-guide-to-hitchhiking/</link>
		<comments>http://mgroves.com/hitchhikers-guide-to-hitchhiking/#comments</comments>
		<pubDate>Sun, 13 Nov 2011 23:59:25 +0000</pubDate>
		<dc:creator>mgroves</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[business]]></category>
		<category><![CDATA[economics]]></category>
		<category><![CDATA[food]]></category>

		<guid isPermaLink="false">http://mgroves.com/?p=1886</guid>
		<description><![CDATA[I was listening to the Freakonomics podcast recently. Specifically, an episode about hitchhiking. They speculate about the various reasons that hitchhiking has largely gone away. It&#8217;s a great episode; check it out. But an important detail was brought up: many people drive around in mostly empty cars. That is, a typical car has capacity for [...]]]></description>
				<content:encoded><![CDATA[<p>I was listening to the Freakonomics podcast recently. Specifically, an episode about <a href="http://www.freakonomics.com/2011/10/10/where-have-all-the-hitchhikers-gone-a-new-freakonomics-radio-podcast/">hitchhiking</a>. They speculate about the various reasons that hitchhiking has largely gone away. It&#8217;s a great episode; check it out. But an important detail was brought up: many people drive around in mostly empty cars. That is, a typical car has capacity for 4 passengers, but only usually carries 1. This means that there&#8217;s a lot of wasted capacity.</p>
<p>On the day I write this, I am currently recovering from a medical issue that prevents me from driving. I&#8217;m sure there are many others in a similar situation: they have no car, no license, a medical condition, etc, that prevents them from driving themselves. Compare this to all the wasted capacity, and you have a market inefficiency (or a market opportunity, depending on how you look at it).</p>
<p>One of the problems with hitchhiking your person around is unreliability. <em>Maybe</em> I can hitch a ride to Chipotle, but will I be able to hitch back, all within a reasonable time?  But what if <em>my burrito</em> could hitch a ride instead of me?  There are many food delivery services in Columbus, but few are suitable or affordable for a single person&#8217;s meal.  So, I <a href="https://twitter.com/#!/mgroves/status/135774828857790464">posed my idea to Twitter</a>.</p>
<p>I soon <a href="https://twitter.com/#!/cdmwebs/status/135777493117448192">received a response</a> that there&#8217;s a service called <a href="http://www.zaarly.com">Zaarly</a>, that could act very much like a service that I imagined.  I placed a somewhat silly order: $10 to deliver me a Chipotle burrito.  I say silly because Zaarly looks like a new service, has very few participants, not to mention I was asking for someone to deliver a burrito to me for about $3 in profit.  However, if there were a critical mass of Zaarly users, then there&#8217;s gotta be at least one user already going to be driving near both a Chipotle and my house anyway, then the $3 is almost free money for someone with a mostly empty car.  And this could work not just for food, but for anything that needs delivery: documents, groceries, anything.  Or maybe there&#8217;s some sort of crediting that could (hypothetically) happen: you deliver to me today, and you&#8217;ll get one free delivery credit to use later, or something like that.  This is similar to the concept of &#8220;<a href="http://en.wikipedia.org/wiki/Slugging">slugging</a>&#8220;, or ad-hoc carpooling, as mentioned in the Freakonomics podcast episode, except it&#8217;s stuff instead of people.</p>
<p>Realistically, Zaarly hasn&#8217;t reached this level of critical mass, at least not in Columbus.  I shouldn&#8217;t have gotten my burrito.  Some smart aleck placed a $40 bid to make this point.</p>
<p>Fortunately for me, the CEO of Zaarly Columbus decided to make his own point: that Zaarly is a business that cares about and needs customers (like me) to be successful, and he accepted and delivered my $10 Chipotle burrito offer.  I&#8217;m not saying he&#8217;s going to be your personal Chipotle delivery man for $3 a pop (I tipped him a little more, by the way <img src='http://mgroves.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> , but I&#8217;m saying in cities bursting with commuters (like Columbus), let&#8217;s put our wasted capacity to work, and start using <a href="http://zaarly.com">Zaarly</a>!</p>
]]></content:encoded>
			<wfw:commentRss>http://mgroves.com/hitchhikers-guide-to-hitchhiking/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My new android app</title>
		<link>http://mgroves.com/my-new-android-app/</link>
		<comments>http://mgroves.com/my-new-android-app/#comments</comments>
		<pubDate>Mon, 29 Aug 2011 22:39:30 +0000</pubDate>
		<dc:creator>mgroves</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[humor]]></category>
		<category><![CDATA[personal]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://mgroves.com/?p=1885</guid>
		<description><![CDATA[Well, it&#8217;s not exactly what I expected to create, but one of my goals this year was to get at least two Android apps into the market(s): one free and one paid. Those goals are now accomplished. My free app has been in the market(s) for a while, and has actually gotten a recent update: [...]]]></description>
				<content:encoded><![CDATA[<p>Well, it&#8217;s not exactly what I expected to create, but one of my goals this year was to get at least two Android apps into the market(s): one free and one paid.  Those goals are now accomplished.</p>
<p>My free app has been in the market(s) for a while, and has actually gotten a recent update: <a href="https://market.android.com/details?id=com.monostockportfolio">Mono Stock Portfolio</a>, which is totally free (and no ads), and was really just a way for me to help learn (and teach) the <a href="http://android.xamarin.com/">Mono for Android</a> tool.  According to Google, this app actually has a surprisingly large user base: 1080 total installs, and 393 active installs.  And I&#8217;ve gotten several e-mails from users asking for more features!</p>
<p>The other app, I just threw together this weekend in a sudden fit of whimsy, inspired in no small part by this commercial:</p>
<p><iframe width="420" height="345" src="http://www.youtube.com/embed/oe-Y-zSd5gs" frameborder="0" allowfullscreen></iframe></p>
<p>The app is &#8220;<a href="https://market.android.com/details?id=com.yeahdog">Yeah Dog!</a>&#8220;, which I started creating with Mono for Android, but soon realized that the 5mb+ overhead just didn&#8217;t make sense for this app.  So I rewrote it, painstakingly, in Java, which wasn&#8217;t as unpleasant as I thought it might&#8217;ve been (but unpleasant nonetheless).  This app will set you back 99 American cents, and is also ad-free.</p>
<p>In the process of creating and publishing Yeah Dog!, I came to find out that I was beaten to market!  First, GEICO actually released their own &#8220;<a href="https://market.android.com/details?id=com.geico.brostache">BroStache</a>&#8221; app some time ago, but I discovered that there is a secret &#8220;Yeah Dawg&#8221; feature in that app.  Secondly, some other rascal created his own <a href="https://market.android.com/details?id=sillythings.yeahdawg">YeahDawg</a> app (albeit an inferior one!) and published a mere two days before me.</p>
<p>Oh well.  Such is the harsh reality of free markets.  But in any case, I believe I have enriched myself as a developer, speaker, and businessman throughout the process of creating, publishing, and maintaining these apps, so that alone makes it worth it.</p>
]]></content:encoded>
			<wfw:commentRss>http://mgroves.com/my-new-android-app/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Hail, Xenu!</title>
		<link>http://mgroves.com/hail-xenu/</link>
		<comments>http://mgroves.com/hail-xenu/#comments</comments>
		<pubDate>Sat, 25 Jun 2011 02:39:34 +0000</pubDate>
		<dc:creator>mgroves</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://mgroves.com/?p=1877</guid>
		<description><![CDATA[I first mentioned Xenu link sleuth way back in March, 2008, as a handy way to find broken links. It&#8217;s worth mentioning a second time, 3+ years later, as I just recently dusted it off again. This time around, though, I wasn&#8217;t looking for broken links or 404&#8242;s, but what I was looking to do [...]]]></description>
				<content:encoded><![CDATA[<p><img class="alignright size-medium wp-image-1878" title="Awaiting Xenu's Orders" src="http://mgroves.com/wp-content/uploads/2011/06/Xenutinfoilhat-300x225.jpg" alt="Awaiting Xenu's Orders" width="300" height="225" /></p>
<p>I first mentioned <a href="http://home.snafu.de/tilman/xenulink.html">Xenu link sleuth</a> way back in <a href="http://mgroves.com/Speedlinking-March-27-2008/">March, 2008</a>, as a handy way to find broken links.</p>
<p>It&#8217;s worth mentioning a second time, 3+ years later, as I just recently dusted it off again.</p>
<p>This time around, though, I wasn&#8217;t looking for broken links or 404&#8242;s, but what I was looking to do was to &#8220;exercise&#8221; an entire site by spidering over it.  The idea being that my site would catch any exceptions and log them, and so by exercising the entire site, I&#8217;m essentially doing one big set of tests.</p>
<p>Xenu is such an easy to use tool.  All you need to do is install it and give it a URL to start with, and it will go to town.</p>
]]></content:encoded>
			<wfw:commentRss>http://mgroves.com/hail-xenu/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Multi-threaded unit testing</title>
		<link>http://mgroves.com/multi-threaded-unit-testing/</link>
		<comments>http://mgroves.com/multi-threaded-unit-testing/#comments</comments>
		<pubDate>Wed, 16 Mar 2011 15:52:50 +0000</pubDate>
		<dc:creator>mgroves</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://mgroves.com/?p=1873</guid>
		<description><![CDATA[I once said that &#8220;Multithreading does a lot of things, but I don&#8217;t think &#8216;simplification&#8217; is ever one of them&#8220;.  Even with the simplest, most beginner level of no-frills threading, I find this to be true. As an example, I was writing unit tests for my MonoDroid app that I recently decided to refactor with [...]]]></description>
				<content:encoded><![CDATA[<p>I once said that &#8220;<a href="http://stackoverflow.com/questions/1125301/is-firing-off-a-thread-a-valid-answer-to-simplifying-code/1125313#1125313">Multithreading does a lot of things, but I don&#8217;t think &#8216;simplification&#8217; is ever one of them</a>&#8220;.  Even with the simplest, most beginner level of no-frills threading, I find this to be true.</p>
<p>As an example, I was writing unit tests for my <a href="https://github.com/mgroves/MonodroidStockPortfolio">MonoDroid app</a> that I recently decided to refactor with the MVP pattern (so I could increase test coverage).  There&#8217;s only one place in the whole app where I use multiple threads.  When the user clicks on a portfolio, there&#8217;s a web service call to get the latest stock prices (and volume, and other stock information).  Because this can take a while, I want to show the user a nice animated &#8220;please wait&#8221; dialog on the UI while the web service (and other stuff) runs on a background thread.  That all works great, and provides a preferable user experience to a blank screen doing nothing. (Note that I tried doing this without threads and I couldn&#8217;t get it to work&#8211;this could be a failure on my part).</p>
<p>However, when I got to the part where I&#8217;m testing the presenter&#8217;s orchestration of the above multi-threaded scenario, my tests started getting inconsistent results. I had also started using <a href="https://github.com/machine/machine.specifications">MSpec</a> and <a href="http://www.telerik.com/products/mocking.aspx">JustMock</a> at this time, and so I immediately assumed I was using those tools wrong.  However, I should have immediately known it was a race condition, because <strong>sometimes my tests would <a href="https://twitter.com/#!/ccarrer/status/47847960251346946">all pass</a>, and sometimes they wouldn&#8217;t</strong>.   Seems obvious in retrospect.</p>
<p>What would happen is that sometimes my background thread would finish before the test assertions, and sometimes it wouldn&#8217;t.  It was a huge relief once I figured that out, but now I have another problem: how do I test it?</p>
<p>My solution seems a little hacky, but it works.  I was reminded of stories of people who wanted to test what would happen to certain parts of code at different times of the day.  I.e. service X should do one thing in the morning, and another thing in the evening.  But you can&#8217;t really inject a mock into every place the DateTime class is used.  So, one approach is to simply wrap it in a service and put it behind an interface.  And that&#8217;s exactly what I did with my threading code (which is a PostSharp aspect):</p>
<p><script src="https://gist.github.com/872672.js?file=gistfile1.cs"></script> Then, when testing, before I do anything else, I set the ThreadingService to be some service that just runs the callback on the main thread, instead of putting it into a worker thread.  Like so:</p>
<p><script src="https://gist.github.com/872679.js?file=gistfile1.cs"></script></p>
<p>Since my unit tests don&#8217;t care about user experience (or even touch the UI implemention), I can now test that the presenter is doing what it&#8217;s supposed to.  Is this a good general strategy for unit testing threaded code?  Probably not.  But maybe!</p>
]]></content:encoded>
			<wfw:commentRss>http://mgroves.com/multi-threaded-unit-testing/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Using PostSharp and SOLID principles, part 3</title>
		<link>http://mgroves.com/using-postsharp-and-solid-principles-part-3/</link>
		<comments>http://mgroves.com/using-postsharp-and-solid-principles-part-3/#comments</comments>
		<pubDate>Tue, 15 Mar 2011 14:51:16 +0000</pubDate>
		<dc:creator>mgroves</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[postsharp]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://mgroves.com/?p=1871</guid>
		<description><![CDATA[Sorry, I&#8217;m getting a little behind myself.  Part 3 of my PostSharp SOLID series went up over a week ago.  Here&#8217;s a preview: Logging and auditing is one of the things that PostSharp is best at. It&#8217;s the quintessential example of a cross-cutting concern. Instead of sprinkling logging code all throughout the app, you simply [...]]]></description>
				<content:encoded><![CDATA[<p><em>Sorry, I&#8217;m getting a little behind myself.  Part 3 of my PostSharp SOLID series went up <a href="http://www.sharpcrafters.com/blog/post/5-Ways-That-Postsharp-Can-SOLIDify-Your-Code-Logging-and-Auditing.aspx">over a week ago</a>.  Here&#8217;s a preview:</em></p>
<p>Logging and auditing is one of the things that PostSharp is best at. It&#8217;s the quintessential example of a cross-cutting concern. Instead of sprinkling logging code all throughout the app, you simply write a logging aspect in one place. You can apply it selectively or on the whole app.</p>
<p>You can get a log a lot of useful information with an aspect</p>
<p><em>To find out more about logging and auditing, and some advanced information about how PostSharp optimizes itself, check out <a href="http://www.sharpcrafters.com/blog/post/5-Ways-That-Postsharp-Can-SOLIDify-Your-Code-Logging-and-Auditing.aspx">5 Ways That Postsharp Can SOLIDify Your Code: Logging and Auditing</a></em></p>
]]></content:encoded>
			<wfw:commentRss>http://mgroves.com/using-postsharp-and-solid-principles-part-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using PostSharp and SOLID principles, part 2</title>
		<link>http://mgroves.com/using-postsharp-and-solid-principles-part-2/</link>
		<comments>http://mgroves.com/using-postsharp-and-solid-principles-part-2/#comments</comments>
		<pubDate>Thu, 17 Feb 2011 16:27:53 +0000</pubDate>
		<dc:creator>mgroves</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[postsharp]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://mgroves.com/?p=1870</guid>
		<description><![CDATA[The second of my 5 part series on using PostSharp to implement SOLID principles is now live.  Here’s a little preview: Sometimes there&#8217;s just no way to speed up an operation. Maybe it&#8217;s dependent on a service that&#8217;s on some external web server, or maybe it&#8217;s a very processor intensive operation, or maybe it&#8217;s fast by [...]]]></description>
				<content:encoded><![CDATA[<p><em>The second of my 5 part series on using PostSharp to implement SOLID principles is <a href="http://www.sharpcrafters.com/blog/post/5-Ways-That-Postsharp-Can-SOLIDify-Your-Code-Caching.aspx">now live</a>.  Here’s a little preview:</em></p>
<p>Sometimes there&#8217;s just no way to speed up an operation. Maybe it&#8217;s dependent on a service that&#8217;s on some external web server, or maybe it&#8217;s a very processor intensive operation, or maybe it&#8217;s fast by itself, but a bunch of concurrent requests would suck up all your resources. There are lots of reasons to use caching. PostSharp itself doesn&#8217;t provide a caching framework for you (again, PostSharp isn&#8217;t reinventing the wheel, it&#8217;s just making it easier to use), but it does provide you with a way to (surprise) reduce boilerplate code, stop repeating yourself, and separate concerns into their own classes.</p>
<p>Suppose I run a car dealership, and I need to see how much my cars are worth. I&#8217;ll use an application that looks up the blue book value given a make &amp; model, and year. However, the blue book value (for the purposes of this demonstration) changes often, so I decide to use a web service to look up the blue book value. But, the web service is slow, and I have a lot of cars on the lot and being traded in all the time. Since I can&#8217;t make the web service any faster, let&#8217;s cache the data that it returns, so I can reduce the number of web service calls.</p>
<p>Since a main feature of PostSharp is intercepting a method before it is actually invoked, it should be clear that we&#8217;d start by writing a MethodInterceptionAspect&#8230;</p>
<p><em>To find out how to write a caching aspect, and some of the more advanced bits of knowledge for working with caches, continue reading: <a href="http://www.sharpcrafters.com/blog/post/5-Ways-That-Postsharp-Can-SOLIDify-Your-Code-Caching.aspx">5 Ways That Postsharp Can SOLIDify Your Code: Caching</a>, and keep an eye out for the next three posts.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://mgroves.com/using-postsharp-and-solid-principles-part-2/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 0.666 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2013-05-21 14:38:06 -->
