<?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>Tim Hoolihan</title>
	<atom:link href="http://hoolihan.net/blog-tim/feed/" rel="self" type="application/rss+xml" />
	<link>http://hoolihan.net/blog-tim</link>
	<description>My Blog</description>
	<lastBuildDate>Tue, 07 Sep 2010 19:08:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Listener in Oracle 11g</title>
		<link>http://hoolihan.net/blog-tim/2010/09/07/listener-in-oracle-11g/</link>
		<comments>http://hoolihan.net/blog-tim/2010/09/07/listener-in-oracle-11g/#comments</comments>
		<pubDate>Tue, 07 Sep 2010 19:08:36 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Data]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[linkedin]]></category>
		<category><![CDATA[oracle]]></category>

		<guid isPermaLink="false">http://hoolihan.net/blog-tim/?p=292</guid>
		<description><![CDATA[I am working on a project that uses Oracle 11g, and we were standing up a db for proof of concept in one of the dev environments. I configured listener.ora to point to the instance, but still was having connection problems. Apparently in your init file, you need the line: local_listener='MySidName' To make sure it [...]]]></description>
			<content:encoded><![CDATA[<p>I am working on a project that uses Oracle 11g, and we were standing up a db for proof of concept in one of the dev environments.  I configured listener.ora to point to the instance, but still was having connection problems.  </p>
<p>Apparently in your init file, you need the line:</p>
<pre>
<code>local_listener='MySidName'</code>
</pre>
<p>To make sure it keeps loading, run the following via sqlplus:</p>
<pre>
<code>C:\&gt; cd some_path_with_my_init_file
C:\&gt; sqlplus /nolog
SQL&gt; connect / as sysdba
SQL&gt; shutdown immediate
SQL&gt; startup pfile='myinit.ora'
SQL&gt; create spfile from pfile</code>
</pre>
<p>Hope this helps someone&#8230;</p>



Share and Enjoy:


	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fhoolihan.net%2Fblog-tim%2F2010%2F09%2F07%2Flistener-in-oracle-11g%2F&amp;title=Listener%20in%20Oracle%2011g&amp;bodytext=I%20am%20working%20on%20a%20project%20that%20uses%20Oracle%2011g%2C%20and%20we%20were%20standing%20up%20a%20db%20for%20proof%20of%20concept%20in%20one%20of%20the%20dev%20environments.%20%20I%20configured%20listener.ora%20to%20point%20to%20the%20instance%2C%20but%20still%20was%20having%20connection%20problems.%20%20%0D%0A%0D%0AApparently%20in%20your%20i" title="Digg"><img src="http://hoolihan.net/blog-tim/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fhoolihan.net%2Fblog-tim%2F2010%2F09%2F07%2Flistener-in-oracle-11g%2F&amp;title=Listener%20in%20Oracle%2011g&amp;notes=I%20am%20working%20on%20a%20project%20that%20uses%20Oracle%2011g%2C%20and%20we%20were%20standing%20up%20a%20db%20for%20proof%20of%20concept%20in%20one%20of%20the%20dev%20environments.%20%20I%20configured%20listener.ora%20to%20point%20to%20the%20instance%2C%20but%20still%20was%20having%20connection%20problems.%20%20%0D%0A%0D%0AApparently%20in%20your%20i" title="del.icio.us"><img src="http://hoolihan.net/blog-tim/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fhoolihan.net%2Fblog-tim%2F2010%2F09%2F07%2Flistener-in-oracle-11g%2F&amp;t=Listener%20in%20Oracle%2011g" title="Facebook"><img src="http://hoolihan.net/blog-tim/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fhoolihan.net%2Fblog-tim%2F2010%2F09%2F07%2Flistener-in-oracle-11g%2F&amp;title=Listener%20in%20Oracle%2011g&amp;annotation=I%20am%20working%20on%20a%20project%20that%20uses%20Oracle%2011g%2C%20and%20we%20were%20standing%20up%20a%20db%20for%20proof%20of%20concept%20in%20one%20of%20the%20dev%20environments.%20%20I%20configured%20listener.ora%20to%20point%20to%20the%20instance%2C%20but%20still%20was%20having%20connection%20problems.%20%20%0D%0A%0D%0AApparently%20in%20your%20i" title="Google Bookmarks"><img src="http://hoolihan.net/blog-tim/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=Listener%20in%20Oracle%2011g%20-%20http%3A%2F%2Fhoolihan.net%2Fblog-tim%2F2010%2F09%2F07%2Flistener-in-oracle-11g%2F" title="Twitter"><img src="http://hoolihan.net/blog-tim/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://hoolihan.net/blog-tim/2010/09/07/listener-in-oracle-11g/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My Kindle Experience So Far</title>
		<link>http://hoolihan.net/blog-tim/2010/09/03/my-kindle-experience-so-far/</link>
		<comments>http://hoolihan.net/blog-tim/2010/09/03/my-kindle-experience-so-far/#comments</comments>
		<pubDate>Fri, 03 Sep 2010 14:12:28 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
				<category><![CDATA[Books]]></category>
		<category><![CDATA[kindle]]></category>

		<guid isPermaLink="false">http://hoolihan.net/blog-tim/?p=280</guid>
		<description><![CDATA[I&#8217;ve now read 2 books on my Kindle, David Maister&#8217;s Managing The Professional Service Firm and William Gibson&#8217;s Neuromancer. Reading Maister&#8217;s book helped highlight some of the features of the kindle. The ability to highlight snippets of text for later, and take simple notes added to the experience. However, it&#8217;s worth noting if you&#8217;re a [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve now read 2 books on my <a href="http://www.amazon.com/gp/product/B00154JDAI?ie=UTF8&#038;tag=timhoosblo-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=B00154JDAI">Kindle</a><img src="http://www.assoc-amazon.com/e/ir?t=timhoosblo-20&#038;l=as2&#038;o=1&#038;a=B00154JDAI" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />, David Maister&#8217;s <a href="http://www.amazon.com/gp/product/B00120955I?ie=UTF8&#038;tag=timhoosblo-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=B00120955I">Managing The Professional Service Firm</a><img src="http://www.assoc-amazon.com/e/ir?t=timhoosblo-20&#038;l=as2&#038;o=1&#038;a=B00120955I" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /><br />
and William Gibson&#8217;s <a href="http://www.amazon.com/gp/product/B000O76ON6?ie=UTF8&#038;tag=timhoosblo-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=B000O76ON6">Neuromancer</a><img src="http://www.assoc-amazon.com/e/ir?t=timhoosblo-20&#038;l=as2&#038;o=1&#038;a=B000O76ON6" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />.  </p>
<p>Reading Maister&#8217;s book helped highlight some of the features of the kindle.  The ability to highlight snippets of text for later, and take simple notes added to the experience.  However, it&#8217;s worth noting if you&#8217;re a heavy note taker in the margin of your books, this feature may leave a bit to be desired.  As I&#8217;m a moderate note taker at best, it wasn&#8217;t an issue.  </p>
<p>The screen is really impressive.  In particular, I like to read over my lunch time at work, and the screen holds up in sunlight very well with no glare issues.  </p>
<p>And the page syncing is nice.  If you use your iphone, ipad, pc or mac to read, it can update the location for you to sync to on any other device.  If I have a complaint, it&#8217;s that it would be nice to reset that value.  If I skip to the index at the end of the book and then go back to reading, the furthest page read will remain the index at the end of the book.</p>
<p>One other complaint is the issues of DRM.  The book is tied to my account, and unlike a paperback, I can&#8217;t loan that book to a friend without giving them my amazon username and password.  And many readers are sociable about passing books around.</p>
<p>The kindle has recently come down in price, and if you have an ipad, or are comfortable reading on your laptop or netbook, then you don&#8217;t even need the device.  My experience has been great and I&#8217;d recommend it to readers.</p>



Share and Enjoy:


	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fhoolihan.net%2Fblog-tim%2F2010%2F09%2F03%2Fmy-kindle-experience-so-far%2F&amp;title=My%20Kindle%20Experience%20So%20Far&amp;bodytext=I%27ve%20now%20read%202%20books%20on%20my%20Kindle%2C%20David%20Maister%27s%20Managing%20The%20Professional%20Service%20Firm%0D%0Aand%20William%20Gibson%27s%20Neuromancer.%20%20%0D%0A%0D%0AReading%20Maister%27s%20book%20helped%20highlight%20some%20of%20the%20features%20of%20the%20kindle.%20%20The%20ability%20to%20highlight%20snippets%20of%20text%20" title="Digg"><img src="http://hoolihan.net/blog-tim/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fhoolihan.net%2Fblog-tim%2F2010%2F09%2F03%2Fmy-kindle-experience-so-far%2F&amp;title=My%20Kindle%20Experience%20So%20Far&amp;notes=I%27ve%20now%20read%202%20books%20on%20my%20Kindle%2C%20David%20Maister%27s%20Managing%20The%20Professional%20Service%20Firm%0D%0Aand%20William%20Gibson%27s%20Neuromancer.%20%20%0D%0A%0D%0AReading%20Maister%27s%20book%20helped%20highlight%20some%20of%20the%20features%20of%20the%20kindle.%20%20The%20ability%20to%20highlight%20snippets%20of%20text%20" title="del.icio.us"><img src="http://hoolihan.net/blog-tim/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fhoolihan.net%2Fblog-tim%2F2010%2F09%2F03%2Fmy-kindle-experience-so-far%2F&amp;t=My%20Kindle%20Experience%20So%20Far" title="Facebook"><img src="http://hoolihan.net/blog-tim/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fhoolihan.net%2Fblog-tim%2F2010%2F09%2F03%2Fmy-kindle-experience-so-far%2F&amp;title=My%20Kindle%20Experience%20So%20Far&amp;annotation=I%27ve%20now%20read%202%20books%20on%20my%20Kindle%2C%20David%20Maister%27s%20Managing%20The%20Professional%20Service%20Firm%0D%0Aand%20William%20Gibson%27s%20Neuromancer.%20%20%0D%0A%0D%0AReading%20Maister%27s%20book%20helped%20highlight%20some%20of%20the%20features%20of%20the%20kindle.%20%20The%20ability%20to%20highlight%20snippets%20of%20text%20" title="Google Bookmarks"><img src="http://hoolihan.net/blog-tim/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=My%20Kindle%20Experience%20So%20Far%20-%20http%3A%2F%2Fhoolihan.net%2Fblog-tim%2F2010%2F09%2F03%2Fmy-kindle-experience-so-far%2F" title="Twitter"><img src="http://hoolihan.net/blog-tim/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://hoolihan.net/blog-tim/2010/09/03/my-kindle-experience-so-far/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Rake Breathing New Life to Building Old Projects</title>
		<link>http://hoolihan.net/blog-tim/2010/09/01/rake-breathing-new-life-to-building-old-projects/</link>
		<comments>http://hoolihan.net/blog-tim/2010/09/01/rake-breathing-new-life-to-building-old-projects/#comments</comments>
		<pubDate>Wed, 01 Sep 2010 14:29:27 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[linkedin]]></category>
		<category><![CDATA[rake]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://hoolihan.net/blog-tim/?p=272</guid>
		<description><![CDATA[I&#8217;ve seen lots of examples of rake (the ruby make replacement) being used as a build tool in non-ruby projects. Many of these are still modern platforms, like .Net. For example, StructureMap builds with rake. But I&#8217;ve found that even on older platforms, the power of having a full programming language in your build tool [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve seen lots of examples of rake (the ruby make replacement) being used as a build tool in non-ruby projects.  Many of these are still modern platforms, like .Net.  For example, <a href="http://structuremap.github.com">StructureMap</a> builds with rake.  But I&#8217;ve found that even on older platforms, the power of having a full programming language in your build tool is useful.</p>
<p>Recently, I was working through examples in <a href="http://www.amazon.com/gp/product/0139798099?ie=UTF8&#038;tag=timhoosblo-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=0139798099"><em>Thinking in C++</em></a><img src="http://www.assoc-amazon.com/e/ir?t=timhoosblo-20&#038;l=as2&#038;o=1&#038;a=0139798099" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />, and there is the need to build many small one file examples.  I started writing a Makefile to simplify this, and decided to try rake instead.  </p>
<p>The power of a programming language brings a lot to table when doing repetitive tasks.  Check out the following Rakefile which generates a build, run, and clean method for each file listed in an array.  And there are aggregate methods which will run or clean all.</p>
<pre>
<code>exe_name = ["hello","c_in_cpp","file","vector"]

exe_name.each do |f|
  desc "clean #{f}"
  task "clean_#{f}".to_sym do
    sh "rm -rf #{f} #{f}.o"
  end

  desc "build #{f}"
  task "build_#{f}".to_sym =&gt; "clean_#{f}" do
    sh "g++ #{f}.cpp -o #{f}"
  end

  desc "run #{f}"
  task "run_#{f}".to_sym =&gt; "build_#{f}" do
    sh "./#{f} 2&gt; error.log"
  end
end

desc "run all"
task :default =&gt; exe_name.collect{|f| "run_#{f}"}

desc "clean all"
task :clean =&gt; exe_name.collect{|f| "clean_#{f}"}</code>
</pre>
<p>If any of the above is unclear, and you want to see the output, do the following:  copy and paste that code into a file named &#8220;Rakefile&#8221;.  Run &#8220;rake -T&#8221; to lists all available tasks.  You won&#8217;t be able to actually run the tasks, unless you have the appropriate cpp files in the directory (ie &#8220;rake run_hello&#8221; requires hello.cpp).  </p>
<p>If you want to learn a build tool, and know ruby, or want to learn ruby rather than some specialized build language with no other uses, give rake a shot.</p>



Share and Enjoy:


	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fhoolihan.net%2Fblog-tim%2F2010%2F09%2F01%2Frake-breathing-new-life-to-building-old-projects%2F&amp;title=Rake%20Breathing%20New%20Life%20to%20Building%20Old%20Projects&amp;bodytext=I%27ve%20seen%20lots%20of%20examples%20of%20rake%20%28the%20ruby%20make%20replacement%29%20being%20used%20as%20a%20build%20tool%20in%20non-ruby%20projects.%20%20Many%20of%20these%20are%20still%20modern%20platforms%2C%20like%20.Net.%20%20For%20example%2C%20StructureMap%20builds%20with%20rake.%20%20But%20I%27ve%20found%20that%20even%20on%20older%20plat" title="Digg"><img src="http://hoolihan.net/blog-tim/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fhoolihan.net%2Fblog-tim%2F2010%2F09%2F01%2Frake-breathing-new-life-to-building-old-projects%2F&amp;title=Rake%20Breathing%20New%20Life%20to%20Building%20Old%20Projects&amp;notes=I%27ve%20seen%20lots%20of%20examples%20of%20rake%20%28the%20ruby%20make%20replacement%29%20being%20used%20as%20a%20build%20tool%20in%20non-ruby%20projects.%20%20Many%20of%20these%20are%20still%20modern%20platforms%2C%20like%20.Net.%20%20For%20example%2C%20StructureMap%20builds%20with%20rake.%20%20But%20I%27ve%20found%20that%20even%20on%20older%20plat" title="del.icio.us"><img src="http://hoolihan.net/blog-tim/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fhoolihan.net%2Fblog-tim%2F2010%2F09%2F01%2Frake-breathing-new-life-to-building-old-projects%2F&amp;t=Rake%20Breathing%20New%20Life%20to%20Building%20Old%20Projects" title="Facebook"><img src="http://hoolihan.net/blog-tim/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fhoolihan.net%2Fblog-tim%2F2010%2F09%2F01%2Frake-breathing-new-life-to-building-old-projects%2F&amp;title=Rake%20Breathing%20New%20Life%20to%20Building%20Old%20Projects&amp;annotation=I%27ve%20seen%20lots%20of%20examples%20of%20rake%20%28the%20ruby%20make%20replacement%29%20being%20used%20as%20a%20build%20tool%20in%20non-ruby%20projects.%20%20Many%20of%20these%20are%20still%20modern%20platforms%2C%20like%20.Net.%20%20For%20example%2C%20StructureMap%20builds%20with%20rake.%20%20But%20I%27ve%20found%20that%20even%20on%20older%20plat" title="Google Bookmarks"><img src="http://hoolihan.net/blog-tim/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=Rake%20Breathing%20New%20Life%20to%20Building%20Old%20Projects%20-%20http%3A%2F%2Fhoolihan.net%2Fblog-tim%2F2010%2F09%2F01%2Frake-breathing-new-life-to-building-old-projects%2F" title="Twitter"><img src="http://hoolihan.net/blog-tim/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://hoolihan.net/blog-tim/2010/09/01/rake-breathing-new-life-to-building-old-projects/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Developing for Open Source Languages on Windows the Better Way</title>
		<link>http://hoolihan.net/blog-tim/2010/07/08/developing-for-open-source-languages-on-windows-the-better-way/</link>
		<comments>http://hoolihan.net/blog-tim/2010/07/08/developing-for-open-source-languages-on-windows-the-better-way/#comments</comments>
		<pubDate>Fri, 09 Jul 2010 01:31:39 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Emacs]]></category>
		<category><![CDATA[li]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[virtual machines]]></category>

		<guid isPermaLink="false">http://hoolihan.net/blog-tim/?p=259</guid>
		<description><![CDATA[When working with php, rails, python, etc, windows is sufficient, but definitely leaves something to be desired. The ports of these languages are definitely second class. With Microsoft&#8217;s backing php support with IIS is improving, but it&#8217;s not the same. And usually you are going to deploy those apps on a linux/bsd web server, so [...]]]></description>
			<content:encoded><![CDATA[<p>When working with php, rails, python, etc, windows is sufficient, but definitely leaves something to be desired.  The ports of these languages are definitely second class.  With Microsoft&#8217;s backing <a href="http://php.iis.net/">php support with IIS is improving</a>, but it&#8217;s not the same.  And usually you are going to deploy those apps on a linux/bsd web server, so it&#8217;s nice to know if there are any nuances.  A lot of developers opt for a mac if they are developing in these types of languages.  But macs can be pricey, and buying a new machine to work on other platforms seems overkill.  </p>
<p>Now I do have a mac, but have a windows 7 laptop at work, and sometimes I do work in ruby on various projects.  So I have worked out a way that I think is worth sharing.  At it&#8217;s core, the idea is to use a vm, but there are some other tweaks that make this method even better.</p>
<p><strong>Install VirtualBox</strong>.  It&#8217;s from <del datetime="2010-07-09T00:25:38+00:00">Sun</del> Oracle and <a href="http://www.virtualbox.org/">it&#8217;s freely available.</a>  </p>
<p><strong>Create a virtual machine with Ubuntu</strong>.  Or your favorite flavor of linux or bsd.  I <strong>used the server version of ubuntu</strong>.</p>
<p><strong>Setup Networking (Optional)</strong>.  You can use bridge mode, but for added security I used NAT for the adapter on the virtual machine.  To then access the machine locally, forward your local ssh port to the virtual machine using <a href="http://mydebian.blogdns.org/?p=148">the following instructions</a>.</p>
<p><strong>Install Putty with Tools and XMing in Windows</strong>.  Available <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/">here</a> and <a href="http://www.straightrunning.com/XmingNotes/">here</a>, these tools will let you do ssh with X forwarding in windows.</p>
<p><strong>Setup a Connection in Putty</strong>.<br />
<img src="http://hoolihan.net/blog-tim/wp-content/uploads/2010/07/conn1.jpg" alt="connection info" /></p>
<p><strong>Enable X-Forwaring in Connection</strong>.<br />
<img src="http://hoolihan.net/blog-tim/wp-content/uploads/2010/07/conn2.jpg" alt="X-Forwarding" /></p>
<p><strong>Setup SSH Tunnels</strong>.<br />
<img src="http://hoolihan.net/blog-tim/wp-content/uploads/2010/07/conn3.jpg" alt="ssh tunnel" /></p>
<p><strong>Setup a Proxy connection in Firefox</strong><br />
<img src="http://hoolihan.net/blog-tim/wp-content/uploads/2010/07/proxy.jpg" alt="proxy" /></p>
<p><strong>Create your user and install your language platforms in the virtual machine</strong>.  For example in ubuntu, you&#8217;re looking for &#8220;sudo apt-get install ruby-1.8&#8243;.</p>
<p><strong>Install your preferred editor in the virtual machine</strong>Emacs, Vim, Eclipse, Netbeans, etc.  </p>
<p>Your environment is now setup.  I&#8217;ll give an example with ruby:</p>
<ul>
<li>Start the virtual machine</li>
<li>Start XMing</li>
<li>Connect with Putty</li>
<li>Start your editor (for example &#8220;emacs &#038;&#8221;)</li>
<li>Open Firefox</li>
<li>Start your app (for example &#8220;ruby script/server&#8221;)</li>
<li>Go to http://localhost:3000 in Firefox</li>
</ul>
<p>This virtual machine does not require a lot of software installed, and a small amount of ram (like 128mb) should be sufficient.  And by backing up your virtual machine (which should be pretty small), you have backed up your entire development environment without getting the documents, media, etc that you have on the windows side.  </p>
<p>Hopefully you find this helpful if you want to develop in environments that lend themselves to this environment.</p>



Share and Enjoy:


	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fhoolihan.net%2Fblog-tim%2F2010%2F07%2F08%2Fdeveloping-for-open-source-languages-on-windows-the-better-way%2F&amp;title=Developing%20for%20Open%20Source%20Languages%20on%20Windows%20the%20Better%20Way&amp;bodytext=When%20working%20with%20php%2C%20rails%2C%20python%2C%20etc%2C%20windows%20is%20sufficient%2C%20but%20definitely%20leaves%20something%20to%20be%20desired.%20%20The%20ports%20of%20these%20languages%20are%20definitely%20second%20class.%20%20With%20Microsoft%27s%20backing%20php%20support%20with%20IIS%20is%20improving%2C%20but%20it%27s%20not%20the%20" title="Digg"><img src="http://hoolihan.net/blog-tim/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fhoolihan.net%2Fblog-tim%2F2010%2F07%2F08%2Fdeveloping-for-open-source-languages-on-windows-the-better-way%2F&amp;title=Developing%20for%20Open%20Source%20Languages%20on%20Windows%20the%20Better%20Way&amp;notes=When%20working%20with%20php%2C%20rails%2C%20python%2C%20etc%2C%20windows%20is%20sufficient%2C%20but%20definitely%20leaves%20something%20to%20be%20desired.%20%20The%20ports%20of%20these%20languages%20are%20definitely%20second%20class.%20%20With%20Microsoft%27s%20backing%20php%20support%20with%20IIS%20is%20improving%2C%20but%20it%27s%20not%20the%20" title="del.icio.us"><img src="http://hoolihan.net/blog-tim/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fhoolihan.net%2Fblog-tim%2F2010%2F07%2F08%2Fdeveloping-for-open-source-languages-on-windows-the-better-way%2F&amp;t=Developing%20for%20Open%20Source%20Languages%20on%20Windows%20the%20Better%20Way" title="Facebook"><img src="http://hoolihan.net/blog-tim/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fhoolihan.net%2Fblog-tim%2F2010%2F07%2F08%2Fdeveloping-for-open-source-languages-on-windows-the-better-way%2F&amp;title=Developing%20for%20Open%20Source%20Languages%20on%20Windows%20the%20Better%20Way&amp;annotation=When%20working%20with%20php%2C%20rails%2C%20python%2C%20etc%2C%20windows%20is%20sufficient%2C%20but%20definitely%20leaves%20something%20to%20be%20desired.%20%20The%20ports%20of%20these%20languages%20are%20definitely%20second%20class.%20%20With%20Microsoft%27s%20backing%20php%20support%20with%20IIS%20is%20improving%2C%20but%20it%27s%20not%20the%20" title="Google Bookmarks"><img src="http://hoolihan.net/blog-tim/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=Developing%20for%20Open%20Source%20Languages%20on%20Windows%20the%20Better%20Way%20-%20http%3A%2F%2Fhoolihan.net%2Fblog-tim%2F2010%2F07%2F08%2Fdeveloping-for-open-source-languages-on-windows-the-better-way%2F" title="Twitter"><img src="http://hoolihan.net/blog-tim/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://hoolihan.net/blog-tim/2010/07/08/developing-for-open-source-languages-on-windows-the-better-way/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Datalayer Decisions (Repository, DAO, Services) in Domain-Driven-Design Applications</title>
		<link>http://hoolihan.net/blog-tim/2010/06/09/datalayer-decisions-repository-dao-services-in-domain-driven-design-applications/</link>
		<comments>http://hoolihan.net/blog-tim/2010/06/09/datalayer-decisions-repository-dao-services-in-domain-driven-design-applications/#comments</comments>
		<pubDate>Wed, 09 Jun 2010 13:22:01 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Data]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[architecture]]></category>
		<category><![CDATA[dao]]></category>
		<category><![CDATA[linked]]></category>
		<category><![CDATA[patters]]></category>
		<category><![CDATA[repository]]></category>
		<category><![CDATA[services]]></category>

		<guid isPermaLink="false">http://hoolihan.net/blog-tim/?p=255</guid>
		<description><![CDATA[I have been working several applications lately at work that use Domain-Driven Design. I had a couple of questions about design choices I saw made in the applications I&#8217;m working with. I recently talked to an architect who uses DDD a lot (Model first), and had the chance to pick his brain. Here&#8217;s what I [...]]]></description>
			<content:encoded><![CDATA[<p>I have been working several applications lately at work that use <a href="http://www.amazon.com/gp/product/0321125215?ie=UTF8&#038;tag=timhoosblo-20&#038;linkCode=as2&#038;camp=1789&#038;creative=390957&#038;creativeASIN=0321125215">Domain-Driven Design</a><img src="http://www.assoc-amazon.com/e/ir?t=timhoosblo-20&#038;l=as2&#038;o=1&#038;a=0321125215" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />.  </p>
<p>I had a couple of questions about design choices I saw made in the applications I&#8217;m working with.  I recently talked to an architect who uses DDD a lot (Model first), and had the chance to pick his brain.  Here&#8217;s what I came up with.  I&#8217;d be curious to hear other opinions via comments:</p>
<p>1. Why choose Repository vs DAO pattern or vice-versa?  I even found some Spring posts recommending both.  </p>
<p>Answer: Repository fits nicely on a legacy schema.  If you&#8217;re domain objects do not match the database, then there this pattern works better.  For green field, DAO choice means you can simplify mapping, because your schema is under your control.  </p>
<p>One additional consideration: DAO model first means that your database may not be normalized and / or friendly for reporting tools etc.  If you are in an enterprise setting, that reporting should be done off of a separate schema anyway (data warehouse).  The warehouse records can be written in the service layer (see question 2) or extracted via an ETL process batch job.  If this is overkill, then you may want to use Repository and map to a friendlier schema.</p>
<p>In the case of using both repository and DAO, this seems to be of value when you are not using an ORM.  The DAO simply manages CRUD for one table, and the Repitory layer handles joining and translating entities into domain objects.</p>
<p>2. What is the purpose of a service layer that encapsulates a DAO or Repository?</p>
<p>Answer: There are various concerns that relate to the application, but not the domain model.  For example, a Product model will have validation that is true in and of itself.  For example, it must have a name, and that name is 50 characters or less.  But in the context of an order, there may be additional validation rules that involve various domain models in the context.  </p>
<p>So the service layer should provide a single interface for various actions related to domain that the User Interface layer should call.  So for instance, a web application has an admin section where I want to delete a product.  And a product can only be deleted without orders.  </p>
<p>Top to bottom, the stack looks like the following:</p>
<ul>
<li>Web application: Sends request to Product Service to delete a product</li>
<li>Product Service:
<ul>
<li>Calls OrderRepository to validate there are no related orders</li>
<li>Calls ProductRepository to delete Product</li>
</ul>
</li>
</ul>
<p>That is rather simple logic in the service, but why should the product repository know about the order repository?  These services serve as single endpoints for user interface programmers.  They can simply request a product deletion and handle appropriate validation messages / errors.  They don&#8217;t care about context validation, model validation, and all the sub steps involved, that is handled for them.</p>
<p>And each class follows the <a href="http://en.wikipedia.org/wiki/Single_responsibility_principle">single responsibility rule.</a></p>



Share and Enjoy:


	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fhoolihan.net%2Fblog-tim%2F2010%2F06%2F09%2Fdatalayer-decisions-repository-dao-services-in-domain-driven-design-applications%2F&amp;title=Datalayer%20Decisions%20%28Repository%2C%20DAO%2C%20Services%29%20in%20Domain-Driven-Design%20Applications&amp;bodytext=I%20have%20been%20working%20several%20applications%20lately%20at%20work%20that%20use%20Domain-Driven%20Design.%20%20%0D%0A%0D%0AI%20had%20a%20couple%20of%20questions%20about%20design%20choices%20I%20saw%20made%20in%20the%20applications%20I%27m%20working%20with.%20%20I%20recently%20talked%20to%20an%20architect%20who%20uses%20DDD%20a%20lot%20%28Model" title="Digg"><img src="http://hoolihan.net/blog-tim/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fhoolihan.net%2Fblog-tim%2F2010%2F06%2F09%2Fdatalayer-decisions-repository-dao-services-in-domain-driven-design-applications%2F&amp;title=Datalayer%20Decisions%20%28Repository%2C%20DAO%2C%20Services%29%20in%20Domain-Driven-Design%20Applications&amp;notes=I%20have%20been%20working%20several%20applications%20lately%20at%20work%20that%20use%20Domain-Driven%20Design.%20%20%0D%0A%0D%0AI%20had%20a%20couple%20of%20questions%20about%20design%20choices%20I%20saw%20made%20in%20the%20applications%20I%27m%20working%20with.%20%20I%20recently%20talked%20to%20an%20architect%20who%20uses%20DDD%20a%20lot%20%28Model" title="del.icio.us"><img src="http://hoolihan.net/blog-tim/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fhoolihan.net%2Fblog-tim%2F2010%2F06%2F09%2Fdatalayer-decisions-repository-dao-services-in-domain-driven-design-applications%2F&amp;t=Datalayer%20Decisions%20%28Repository%2C%20DAO%2C%20Services%29%20in%20Domain-Driven-Design%20Applications" title="Facebook"><img src="http://hoolihan.net/blog-tim/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fhoolihan.net%2Fblog-tim%2F2010%2F06%2F09%2Fdatalayer-decisions-repository-dao-services-in-domain-driven-design-applications%2F&amp;title=Datalayer%20Decisions%20%28Repository%2C%20DAO%2C%20Services%29%20in%20Domain-Driven-Design%20Applications&amp;annotation=I%20have%20been%20working%20several%20applications%20lately%20at%20work%20that%20use%20Domain-Driven%20Design.%20%20%0D%0A%0D%0AI%20had%20a%20couple%20of%20questions%20about%20design%20choices%20I%20saw%20made%20in%20the%20applications%20I%27m%20working%20with.%20%20I%20recently%20talked%20to%20an%20architect%20who%20uses%20DDD%20a%20lot%20%28Model" title="Google Bookmarks"><img src="http://hoolihan.net/blog-tim/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=Datalayer%20Decisions%20%28Repository%2C%20DAO%2C%20Services%29%20in%20Domain-Driven-Design%20Applications%20-%20http%3A%2F%2Fhoolihan.net%2Fblog-tim%2F2010%2F06%2F09%2Fdatalayer-decisions-repository-dao-services-in-domain-driven-design-applications%2F" title="Twitter"><img src="http://hoolihan.net/blog-tim/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://hoolihan.net/blog-tim/2010/06/09/datalayer-decisions-repository-dao-services-in-domain-driven-design-applications/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>NHibernate and Auto Properties</title>
		<link>http://hoolihan.net/blog-tim/2010/06/09/nhibernate-and-auto-properties/</link>
		<comments>http://hoolihan.net/blog-tim/2010/06/09/nhibernate-and-auto-properties/#comments</comments>
		<pubDate>Wed, 09 Jun 2010 13:02:46 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[linkedin]]></category>
		<category><![CDATA[nhibernate]]></category>
		<category><![CDATA[reflection]]></category>

		<guid isPermaLink="false">http://hoolihan.net/blog-tim/?p=251</guid>
		<description><![CDATA[I&#8217;ve been working through the NHibernate with ASP.NET ProblemDesignSolution (Wrox Blox), with some small changes. I&#8217;m writing my sample in C# using the .Net framework 3.5. I prefer to use auto-properties. It&#8217;s common that fields have private setters and only nhibernate can map using the backing field (set via reflection). public String City { get; [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been working through the <a href="http://www.amazon.com/gp/product/B0036V7H5G?ie=UTF8&#038;tag=timhoosblo-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=B0036V7H5G">NHibernate with ASP.NET ProblemDesignSolution (Wrox Blox)</a><img src="http://www.assoc-amazon.com/e/ir?t=timhoosblo-20&#038;l=as2&#038;o=1&#038;a=B0036V7H5G" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />, with some small changes.  I&#8217;m writing my sample in C# using the .Net framework 3.5.  I prefer to use auto-properties.  </p>
<p>It&#8217;s common that fields have private setters and only nhibernate can map using the backing field (set via reflection).  </p>
<pre>
<code>public String City { get; private set; }</code>
</pre>
<p>
The problem is telling NHibernate how to find the backing field.  When you have an explicit field, you end up with something like:</p>
<pre>
<code>&lt;property access=”field.camelcase-underscore” name=”City” /&gt;</code>
</pre>
<p>
But with no backing field, that is a problem.  I started looking around on the net and found the following:
</p>
<p><a href="http://stackoverflow.com/questions/1491307/mapping-private-set-using-nhibernate">StackOverflow discussion without much good info</a><br />
and <a href="http://weblogs.asp.net/sfeldman/archive/2008/02/29/c-3-0-auto-property-and-nhibernate.aspx">a blog post with an interesting response from Ayende Rahien.</a></p>
<p>Ayende is saying to not worry about the issue, NHibernate will still be able to set via reflection.  That&#8217;s fine, but it feels a little &#8220;magical&#8221;, especially to a new developer coming along.  </p>
<p>Why not set protected?  It&#8217;s not unreasonable to expect a maintaining developer to understand that NHibernate sub-classes your class.</p>
<pre>
<code>public String City { get; protected set; }</code>
</pre>
<p>
Now the mapping stays simple too:</p>
<pre>
<code>&lt;property name=”City” /&gt;</code>
</pre>
<p>
And there is no need to expect a maintaining developer to know that reflection magic is setting the property.  </p>



Share and Enjoy:


	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fhoolihan.net%2Fblog-tim%2F2010%2F06%2F09%2Fnhibernate-and-auto-properties%2F&amp;title=NHibernate%20and%20Auto%20Properties&amp;bodytext=I%27ve%20been%20working%20through%20the%20NHibernate%20with%20ASP.NET%20ProblemDesignSolution%20%28Wrox%20Blox%29%2C%20with%20some%20small%20changes.%20%20I%27m%20writing%20my%20sample%20in%20C%23%20using%20the%20.Net%20framework%203.5.%20%20I%20prefer%20to%20use%20auto-properties.%20%20%0D%0A%0D%0AIt%27s%20common%20that%20fields%20have%20private%20s" title="Digg"><img src="http://hoolihan.net/blog-tim/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fhoolihan.net%2Fblog-tim%2F2010%2F06%2F09%2Fnhibernate-and-auto-properties%2F&amp;title=NHibernate%20and%20Auto%20Properties&amp;notes=I%27ve%20been%20working%20through%20the%20NHibernate%20with%20ASP.NET%20ProblemDesignSolution%20%28Wrox%20Blox%29%2C%20with%20some%20small%20changes.%20%20I%27m%20writing%20my%20sample%20in%20C%23%20using%20the%20.Net%20framework%203.5.%20%20I%20prefer%20to%20use%20auto-properties.%20%20%0D%0A%0D%0AIt%27s%20common%20that%20fields%20have%20private%20s" title="del.icio.us"><img src="http://hoolihan.net/blog-tim/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fhoolihan.net%2Fblog-tim%2F2010%2F06%2F09%2Fnhibernate-and-auto-properties%2F&amp;t=NHibernate%20and%20Auto%20Properties" title="Facebook"><img src="http://hoolihan.net/blog-tim/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fhoolihan.net%2Fblog-tim%2F2010%2F06%2F09%2Fnhibernate-and-auto-properties%2F&amp;title=NHibernate%20and%20Auto%20Properties&amp;annotation=I%27ve%20been%20working%20through%20the%20NHibernate%20with%20ASP.NET%20ProblemDesignSolution%20%28Wrox%20Blox%29%2C%20with%20some%20small%20changes.%20%20I%27m%20writing%20my%20sample%20in%20C%23%20using%20the%20.Net%20framework%203.5.%20%20I%20prefer%20to%20use%20auto-properties.%20%20%0D%0A%0D%0AIt%27s%20common%20that%20fields%20have%20private%20s" title="Google Bookmarks"><img src="http://hoolihan.net/blog-tim/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=NHibernate%20and%20Auto%20Properties%20-%20http%3A%2F%2Fhoolihan.net%2Fblog-tim%2F2010%2F06%2F09%2Fnhibernate-and-auto-properties%2F" title="Twitter"><img src="http://hoolihan.net/blog-tim/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://hoolihan.net/blog-tim/2010/06/09/nhibernate-and-auto-properties/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Equals, ==, and MSTest</title>
		<link>http://hoolihan.net/blog-tim/2010/04/26/equals-and-mstest/</link>
		<comments>http://hoolihan.net/blog-tim/2010/04/26/equals-and-mstest/#comments</comments>
		<pubDate>Mon, 26 Apr 2010 20:31:09 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[.Net]]></category>
		<category><![CDATA[linkedin]]></category>
		<category><![CDATA[unit-test]]></category>

		<guid isPermaLink="false">http://hoolihan.net/blog-tim/?p=248</guid>
		<description><![CDATA[public class SampleClass { public int X { get; set; } public override bool Equals(object obj) { if (obj == null) return false; if (obj.GetType() != typeof(SampleClass)) return false; var s = obj as SampleClass; return this.X == s.X; } } Tests: [TestMethod()] public void EqualsTest() { var sc = new SampleClass { X = [...]]]></description>
			<content:encoded><![CDATA[<pre>
<code>
  public class SampleClass
    {
        public int X { get; set; }

        public override bool Equals(object obj)
        {
            if (obj == null) return false;
            if (obj.GetType() != typeof(SampleClass)) return false;
            var s = obj as SampleClass;
            return this.X == s.X;
        }
    }</code>
</pre>
<p>Tests:</p>
<pre>
<code>        [TestMethod()]
        public void EqualsTest()
        {
            var sc = new SampleClass { X = 1 };
            var sc_copy = sc;
            var sc2 = new SampleClass { X = 1 };

            Assert.IsFalse(sc.Equals(null));
            Assert.IsTrue(sc.Equals(sc));
            Assert.IsTrue(sc == sc_copy);
            Assert.IsFalse(sc == sc2);
            Assert.IsTrue(sc.Equals(sc2));
            Assert.IsTrue(sc2.Equals(sc));
            Assert.IsTrue(sc.Equals(sc_copy));

            Assert.AreEqual(sc, sc2);
            Assert.AreEqual(sc, sc_copy);
            Assert.AreSame(sc, sc_copy);
            Assert.AreNotSame(sc, sc2);
            Assert.AreNotSame(sc_copy, sc2);
        }</code>
</pre>



Share and Enjoy:


	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fhoolihan.net%2Fblog-tim%2F2010%2F04%2F26%2Fequals-and-mstest%2F&amp;title=Equals%2C%20%3D%3D%2C%20and%20MSTest&amp;bodytext=%0D%0A%20%20%20%20%0D%0A%20%20public%20class%20SampleClass%0D%0A%20%20%20%20%7B%0D%0A%20%20%20%20%20%20%20%20public%20int%20X%20%7B%20get%3B%20set%3B%20%7D%0D%0A%0D%0A%20%20%20%20%20%20%20%20public%20override%20bool%20Equals%28object%20obj%29%0D%0A%20%20%20%20%20%20%20%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20%28obj%20%3D%3D%20null%29%20return%20false%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20%28obj.GetType%28%29%20%21%3D%20typeof%28SampleClass%29%29%20return%20fals" title="Digg"><img src="http://hoolihan.net/blog-tim/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fhoolihan.net%2Fblog-tim%2F2010%2F04%2F26%2Fequals-and-mstest%2F&amp;title=Equals%2C%20%3D%3D%2C%20and%20MSTest&amp;notes=%0D%0A%20%20%20%20%0D%0A%20%20public%20class%20SampleClass%0D%0A%20%20%20%20%7B%0D%0A%20%20%20%20%20%20%20%20public%20int%20X%20%7B%20get%3B%20set%3B%20%7D%0D%0A%0D%0A%20%20%20%20%20%20%20%20public%20override%20bool%20Equals%28object%20obj%29%0D%0A%20%20%20%20%20%20%20%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20%28obj%20%3D%3D%20null%29%20return%20false%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20%28obj.GetType%28%29%20%21%3D%20typeof%28SampleClass%29%29%20return%20fals" title="del.icio.us"><img src="http://hoolihan.net/blog-tim/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fhoolihan.net%2Fblog-tim%2F2010%2F04%2F26%2Fequals-and-mstest%2F&amp;t=Equals%2C%20%3D%3D%2C%20and%20MSTest" title="Facebook"><img src="http://hoolihan.net/blog-tim/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fhoolihan.net%2Fblog-tim%2F2010%2F04%2F26%2Fequals-and-mstest%2F&amp;title=Equals%2C%20%3D%3D%2C%20and%20MSTest&amp;annotation=%0D%0A%20%20%20%20%0D%0A%20%20public%20class%20SampleClass%0D%0A%20%20%20%20%7B%0D%0A%20%20%20%20%20%20%20%20public%20int%20X%20%7B%20get%3B%20set%3B%20%7D%0D%0A%0D%0A%20%20%20%20%20%20%20%20public%20override%20bool%20Equals%28object%20obj%29%0D%0A%20%20%20%20%20%20%20%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20%28obj%20%3D%3D%20null%29%20return%20false%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20%28obj.GetType%28%29%20%21%3D%20typeof%28SampleClass%29%29%20return%20fals" title="Google Bookmarks"><img src="http://hoolihan.net/blog-tim/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=Equals%2C%20%3D%3D%2C%20and%20MSTest%20-%20http%3A%2F%2Fhoolihan.net%2Fblog-tim%2F2010%2F04%2F26%2Fequals-and-mstest%2F" title="Twitter"><img src="http://hoolihan.net/blog-tim/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://hoolihan.net/blog-tim/2010/04/26/equals-and-mstest/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>External Tools in Visual Studio</title>
		<link>http://hoolihan.net/blog-tim/2010/04/05/external-tools-in-visual-studio/</link>
		<comments>http://hoolihan.net/blog-tim/2010/04/05/external-tools-in-visual-studio/#comments</comments>
		<pubDate>Mon, 05 Apr 2010 12:32:16 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[.Net]]></category>
		<category><![CDATA[linkedin]]></category>
		<category><![CDATA[vs]]></category>

		<guid isPermaLink="false">http://hoolihan.net/blog-tim/?p=240</guid>
		<description><![CDATA[If you use subversion or git, bouncing over to source control is something you have to do a lot from Visual Studio. Here&#8217;s how to make it easier. In Visual Studio, go to Tools -> External Tools and setup Explorer if you use TortoiseSVN, or GitBash if you use that. Share and Enjoy:]]></description>
			<content:encoded><![CDATA[<p>If you use subversion or git, bouncing over to source control is something you have to do a lot from Visual Studio.  Here&#8217;s how to make it easier.  In Visual Studio, go to Tools -> External Tools and setup Explorer if you use TortoiseSVN, or GitBash if you use that.</p>
<p><img src="http://farm3.static.flickr.com/2747/4492684073_c2eba33a4a_o.jpg" alt="Explorer" /><br />
<img src="http://farm3.static.flickr.com/2779/4492684081_543b8a3062_o.jpg" alt="GitBash" /></p>



Share and Enjoy:


	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fhoolihan.net%2Fblog-tim%2F2010%2F04%2F05%2Fexternal-tools-in-visual-studio%2F&amp;title=External%20Tools%20in%20Visual%20Studio&amp;bodytext=If%20you%20use%20subversion%20or%20git%2C%20bouncing%20over%20to%20source%20control%20is%20something%20you%20have%20to%20do%20a%20lot%20from%20Visual%20Studio.%20%20Here%27s%20how%20to%20make%20it%20easier.%20%20In%20Visual%20Studio%2C%20go%20to%20Tools%20-%3E%20External%20Tools%20and%20setup%20Explorer%20if%20you%20use%20TortoiseSVN%2C%20or%20GitBash%20" title="Digg"><img src="http://hoolihan.net/blog-tim/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fhoolihan.net%2Fblog-tim%2F2010%2F04%2F05%2Fexternal-tools-in-visual-studio%2F&amp;title=External%20Tools%20in%20Visual%20Studio&amp;notes=If%20you%20use%20subversion%20or%20git%2C%20bouncing%20over%20to%20source%20control%20is%20something%20you%20have%20to%20do%20a%20lot%20from%20Visual%20Studio.%20%20Here%27s%20how%20to%20make%20it%20easier.%20%20In%20Visual%20Studio%2C%20go%20to%20Tools%20-%3E%20External%20Tools%20and%20setup%20Explorer%20if%20you%20use%20TortoiseSVN%2C%20or%20GitBash%20" title="del.icio.us"><img src="http://hoolihan.net/blog-tim/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fhoolihan.net%2Fblog-tim%2F2010%2F04%2F05%2Fexternal-tools-in-visual-studio%2F&amp;t=External%20Tools%20in%20Visual%20Studio" title="Facebook"><img src="http://hoolihan.net/blog-tim/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fhoolihan.net%2Fblog-tim%2F2010%2F04%2F05%2Fexternal-tools-in-visual-studio%2F&amp;title=External%20Tools%20in%20Visual%20Studio&amp;annotation=If%20you%20use%20subversion%20or%20git%2C%20bouncing%20over%20to%20source%20control%20is%20something%20you%20have%20to%20do%20a%20lot%20from%20Visual%20Studio.%20%20Here%27s%20how%20to%20make%20it%20easier.%20%20In%20Visual%20Studio%2C%20go%20to%20Tools%20-%3E%20External%20Tools%20and%20setup%20Explorer%20if%20you%20use%20TortoiseSVN%2C%20or%20GitBash%20" title="Google Bookmarks"><img src="http://hoolihan.net/blog-tim/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=External%20Tools%20in%20Visual%20Studio%20-%20http%3A%2F%2Fhoolihan.net%2Fblog-tim%2F2010%2F04%2F05%2Fexternal-tools-in-visual-studio%2F" title="Twitter"><img src="http://hoolihan.net/blog-tim/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://hoolihan.net/blog-tim/2010/04/05/external-tools-in-visual-studio/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Handling Persistance in Asp.Net with Dynamic Controls</title>
		<link>http://hoolihan.net/blog-tim/2010/03/29/handling-persistance-in-asp-net-with-dynamic-controls/</link>
		<comments>http://hoolihan.net/blog-tim/2010/03/29/handling-persistance-in-asp-net-with-dynamic-controls/#comments</comments>
		<pubDate>Mon, 29 Mar 2010 14:58:28 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[linkedin]]></category>
		<category><![CDATA[webforms]]></category>

		<guid isPermaLink="false">http://hoolihan.net/blog-tim/?p=236</guid>
		<description><![CDATA[I worked on a project a couple of years ago using dynamic controls in an Asp.Net WebForms environment. Managing dynamic controls can be a real hassle. So when I read Dave Reed&#8217;s great article about Viewstate, I wondered if I could do it better now. I worked up a simple example using no Viewstate where [...]]]></description>
			<content:encoded><![CDATA[<p>I worked on a project a couple of years ago using dynamic controls in an Asp.Net WebForms environment.  Managing dynamic controls can be a real hassle.  </p>
<p>So when I read Dave Reed&#8217;s <a href="http://weblogs.asp.net/infinitiesloop/archive/2006/08/03/Truly-Understanding-Viewstate.aspx">great article about Viewstate</a>, I wondered if I could do it better now.  I worked up a simple example using no Viewstate where values persist across postbacks.  Going to the page new resets everything.  </p>
<p>The one piece I don&#8217;t like is that it uses session for a control count.  But it&#8217;s a single Int32 per user that get&#8217;s stored in session, so it could be worse.  Anyway, here&#8217;s the code&#8230;</p>
<p><em>Note: the aspx page has a placeholder (phOne) and two buttons (btnAdd) and (btnRemove).  EnableViewstate is false on phOne.</em></p>
<pre>
<code>using System;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Web
{
    public partial class Dynamic : System.Web.UI.Page
    {
        private const string KeyNumControls = "DynamicPage_NumControls";
        private const int DefaultControlCount = 2;

        protected override void OnInit(EventArgs e)
        {
            CreateControls(NumberOfControls);
            base.OnInit(e);
        }

        protected override void OnLoad(EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                CreateControls(DefaultControlCount);
            }
        }

        private void CreateControls(int controlCount)
        {
            NumberOfControls = controlCount;
            while(phOne.Controls.Count &gt; NumberOfControls)
            {
                RemoveLastControl();
            }
            while(phOne.Controls.Count &lt; NumberOfControls)
            {
                CreateControl();
            }
        }

        private void RemoveLastControl()
        {
            phOne.Controls.RemoveAt(phOne.Controls.Count - 1);
        }

        private void CreateControl()
        {
            phOne.Controls.Add(new TextBox { EnableViewState = false });
        }

        protected int NumberOfControls
        {
            get
            {
                Session[KeyNumControls] = Session[KeyNumControls] ??
                                        DefaultControlCount;
                return (int)Session[KeyNumControls];
            }
            set { Session[KeyNumControls] = value; }
        }

        protected void BtnAddClick(object sender, EventArgs e)
        {
            NumberOfControls += 1;
            CreateControl();
        }

        protected void BtnRemoveClick(object sender, EventArgs e)
        {
            NumberOfControls -= 1;
            RemoveLastControl();
        }
    }
}</code>
</pre>



Share and Enjoy:


	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fhoolihan.net%2Fblog-tim%2F2010%2F03%2F29%2Fhandling-persistance-in-asp-net-with-dynamic-controls%2F&amp;title=Handling%20Persistance%20in%20Asp.Net%20with%20Dynamic%20Controls&amp;bodytext=I%20worked%20on%20a%20project%20a%20couple%20of%20years%20ago%20using%20dynamic%20controls%20in%20an%20Asp.Net%20WebForms%20environment.%20%20Managing%20dynamic%20controls%20can%20be%20a%20real%20hassle.%20%20%0D%0A%0D%0ASo%20when%20I%20read%20Dave%20Reed%27s%20great%20article%20about%20Viewstate%2C%20I%20wondered%20if%20I%20could%20do%20it%20better%20" title="Digg"><img src="http://hoolihan.net/blog-tim/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fhoolihan.net%2Fblog-tim%2F2010%2F03%2F29%2Fhandling-persistance-in-asp-net-with-dynamic-controls%2F&amp;title=Handling%20Persistance%20in%20Asp.Net%20with%20Dynamic%20Controls&amp;notes=I%20worked%20on%20a%20project%20a%20couple%20of%20years%20ago%20using%20dynamic%20controls%20in%20an%20Asp.Net%20WebForms%20environment.%20%20Managing%20dynamic%20controls%20can%20be%20a%20real%20hassle.%20%20%0D%0A%0D%0ASo%20when%20I%20read%20Dave%20Reed%27s%20great%20article%20about%20Viewstate%2C%20I%20wondered%20if%20I%20could%20do%20it%20better%20" title="del.icio.us"><img src="http://hoolihan.net/blog-tim/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fhoolihan.net%2Fblog-tim%2F2010%2F03%2F29%2Fhandling-persistance-in-asp-net-with-dynamic-controls%2F&amp;t=Handling%20Persistance%20in%20Asp.Net%20with%20Dynamic%20Controls" title="Facebook"><img src="http://hoolihan.net/blog-tim/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fhoolihan.net%2Fblog-tim%2F2010%2F03%2F29%2Fhandling-persistance-in-asp-net-with-dynamic-controls%2F&amp;title=Handling%20Persistance%20in%20Asp.Net%20with%20Dynamic%20Controls&amp;annotation=I%20worked%20on%20a%20project%20a%20couple%20of%20years%20ago%20using%20dynamic%20controls%20in%20an%20Asp.Net%20WebForms%20environment.%20%20Managing%20dynamic%20controls%20can%20be%20a%20real%20hassle.%20%20%0D%0A%0D%0ASo%20when%20I%20read%20Dave%20Reed%27s%20great%20article%20about%20Viewstate%2C%20I%20wondered%20if%20I%20could%20do%20it%20better%20" title="Google Bookmarks"><img src="http://hoolihan.net/blog-tim/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=Handling%20Persistance%20in%20Asp.Net%20with%20Dynamic%20Controls%20-%20http%3A%2F%2Fhoolihan.net%2Fblog-tim%2F2010%2F03%2F29%2Fhandling-persistance-in-asp-net-with-dynamic-controls%2F" title="Twitter"><img src="http://hoolihan.net/blog-tim/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://hoolihan.net/blog-tim/2010/03/29/handling-persistance-in-asp-net-with-dynamic-controls/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Passing in &#8220;this&#8221; in StructureMap</title>
		<link>http://hoolihan.net/blog-tim/2010/02/26/passing-in-this-in-structuremap/</link>
		<comments>http://hoolihan.net/blog-tim/2010/02/26/passing-in-this-in-structuremap/#comments</comments>
		<pubDate>Fri, 26 Feb 2010 20:34:38 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[.Net]]></category>
		<category><![CDATA[ioc]]></category>
		<category><![CDATA[linkedin]]></category>

		<guid isPermaLink="false">http://hoolihan.net/blog-tim/?p=231</guid>
		<description><![CDATA[I&#8217;ve been working with StructureMap lately, and struggled when I need to pass this in. The following code is an example of resolving that issue&#8230; namespace StateMachine { public class StateRegistry : StructureMap.Configuration.DSL.Registry { public StateRegistry () { For&#60;IState&#62;.Use&#60;StateA&#62;.Named("FirstState"); For&#60;IState&#62;.Use&#60;StateB&#62;.Named("SecondState"); } } public interface IStateMachine { void ChangeState(IState state); } public interface IState { void [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been working with StructureMap lately, and struggled when I need to pass this in.  The following code is an example of resolving that issue&#8230;</p>
<pre>
<code>namespace StateMachine
{
  public class StateRegistry : StructureMap.Configuration.DSL.Registry
  {
    public StateRegistry ()
      {
        For&lt;IState&gt;.Use&lt;StateA&gt;.Named("FirstState");
        For&lt;IState&gt;.Use&lt;StateB&gt;.Named("SecondState");
      }
  }

  public interface IStateMachine
  {
    void ChangeState(IState state);
  }

  public interface IState
  {
    void DoWork();
  }

  public class StateA : IState
  {
    IStateMachine _machine;
    public StateA(IStateMachine machine)
      {
        _machine = machine;
      }
    public void DoWork() { // do stuff }
  }

  public class Machine : IStateMachine
  {
    public IState FirstState {get;set;}
    public IState SecondState {get;set;}
    public IState CurrentState {get; private set;}
    public Machine()
      {
        FirstState = ObjectFactory.With&lt;IStateMachine&gt;(this).GetInstance&lt;IState&gt;("FirstState");
        SecondState = ObjectFactory.With&lt;IStateMachine&gt;(this).GetInstance&lt;IState&gt;("SecondState");
        ChangeState(FirstState);
      }
    public void ChangeState(IState state) { CurrentState = state; }
  }
}</code>
</pre>



Share and Enjoy:


	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fhoolihan.net%2Fblog-tim%2F2010%2F02%2F26%2Fpassing-in-this-in-structuremap%2F&amp;title=Passing%20in%20%22this%22%20in%20StructureMap&amp;bodytext=I%27ve%20been%20working%20with%20StructureMap%20lately%2C%20and%20struggled%20when%20I%20need%20to%20pass%20this%20in.%20%20The%20following%20code%20is%20an%20example%20of%20resolving%20that%20issue...%0D%0A%0D%0A%0D%0A%0D%0Anamespace%20StateMachine%0D%0A%7B%0D%0A%20%20public%20class%20StateRegistry%20%3A%20StructureMap.Configuration.DSL.Regist" title="Digg"><img src="http://hoolihan.net/blog-tim/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fhoolihan.net%2Fblog-tim%2F2010%2F02%2F26%2Fpassing-in-this-in-structuremap%2F&amp;title=Passing%20in%20%22this%22%20in%20StructureMap&amp;notes=I%27ve%20been%20working%20with%20StructureMap%20lately%2C%20and%20struggled%20when%20I%20need%20to%20pass%20this%20in.%20%20The%20following%20code%20is%20an%20example%20of%20resolving%20that%20issue...%0D%0A%0D%0A%0D%0A%0D%0Anamespace%20StateMachine%0D%0A%7B%0D%0A%20%20public%20class%20StateRegistry%20%3A%20StructureMap.Configuration.DSL.Regist" title="del.icio.us"><img src="http://hoolihan.net/blog-tim/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fhoolihan.net%2Fblog-tim%2F2010%2F02%2F26%2Fpassing-in-this-in-structuremap%2F&amp;t=Passing%20in%20%22this%22%20in%20StructureMap" title="Facebook"><img src="http://hoolihan.net/blog-tim/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fhoolihan.net%2Fblog-tim%2F2010%2F02%2F26%2Fpassing-in-this-in-structuremap%2F&amp;title=Passing%20in%20%22this%22%20in%20StructureMap&amp;annotation=I%27ve%20been%20working%20with%20StructureMap%20lately%2C%20and%20struggled%20when%20I%20need%20to%20pass%20this%20in.%20%20The%20following%20code%20is%20an%20example%20of%20resolving%20that%20issue...%0D%0A%0D%0A%0D%0A%0D%0Anamespace%20StateMachine%0D%0A%7B%0D%0A%20%20public%20class%20StateRegistry%20%3A%20StructureMap.Configuration.DSL.Regist" title="Google Bookmarks"><img src="http://hoolihan.net/blog-tim/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=Passing%20in%20%22this%22%20in%20StructureMap%20-%20http%3A%2F%2Fhoolihan.net%2Fblog-tim%2F2010%2F02%2F26%2Fpassing-in-this-in-structuremap%2F" title="Twitter"><img src="http://hoolihan.net/blog-tim/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://hoolihan.net/blog-tim/2010/02/26/passing-in-this-in-structuremap/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
