<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">
  <channel>
    <title>David Mohundro</title>
    <link>http://www.mohundro.com/blog/</link>
    <description>From the life of a programmer</description>
    <language>en-us</language>
    <copyright>David Mohundro</copyright>
    <lastBuildDate>Thu, 22 Oct 2009 02:15:16 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 2.3.9074.18820</generator>
    <managingEditor>drmohundro@gmail.com</managingEditor>
    <webMaster>drmohundro@gmail.com</webMaster>
    <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/DavidMohundro" type="application/rss+xml" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item>
      <trackback:ping>http://www.mohundro.com/blog/Trackback.aspx?guid=19362723-a02f-4b21-baa9-fe5660a7a081</trackback:ping>
      <pingback:server>http://www.mohundro.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.mohundro.com/blog/PermaLink,guid,19362723-a02f-4b21-baa9-fe5660a7a081.aspx</pingback:target>
      <dc:creator>David Mohundro</dc:creator>
      <wfw:comment>http://www.mohundro.com/blog/CommentView,guid,19362723-a02f-4b21-baa9-fe5660a7a081.aspx</wfw:comment>
      <wfw:commentRss>http://www.mohundro.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=19362723-a02f-4b21-baa9-fe5660a7a081</wfw:commentRss>
      <slash:comments>2</slash:comments>
      
      <title>Ping, VPN, etc from Windows XP Mode</title>
      <guid isPermaLink="false">http://www.mohundro.com/blog/PermaLink,guid,19362723-a02f-4b21-baa9-fe5660a7a081.aspx</guid>
      <link>http://feedproxy.google.com/~r/DavidMohundro/~3/wTGwFtaOR7g/PingVPNEtcFromWindowsXPMode.aspx</link>
      <pubDate>Thu, 22 Oct 2009 02:15:16 GMT</pubDate>
      <description>&lt;body xmlns="http://www.w3.org/1999/xhtml"&gt;&#xD;
        &lt;p&gt;&#xD;
I just wanted to share a quick tip on something that had been tripping me up. I’ve&#xD;
happily been running Windows 7 x64 for around a month now. At work, our VPN hardware&#xD;
doesn’t support 64-bit (different topic, don’t ask), so I wanted to use the VPN client&#xD;
from within Windows XP Mode. Sounds good, right?&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
One problem. The VPN client couldn’t see outside networks. In fact, I couldn’t even&#xD;
ping.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Attempting to ping  from XPM" border="0" alt="Attempting to ping  from XPM" src="http://www.mohundro.com/blog/content/binary/WindowsLiveWriter/PingVPNetcfromWindowsXPMode_12ADF/image_3.png" width="644" height="185"&gt;&lt;/img&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
The default networking adapter seems to be “Shared Networking (NAT)” – just change&#xD;
it to your actual network adapter.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Networking adapter settings" border="0" alt="Networking adapter settings" src="http://www.mohundro.com/blog/content/binary/WindowsLiveWriter/PingVPNetcfromWindowsXPMode_12ADF/image_6.png" width="644" height="433"&gt;&lt;/img&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Success!&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Successful ping!" border="0" alt="Successful ping!" src="http://www.mohundro.com/blog/content/binary/WindowsLiveWriter/PingVPNetcfromWindowsXPMode_12ADF/image_9.png" width="644" height="277"&gt;&lt;/img&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;img width="0" height="0" src="http://www.mohundro.com/blog/aggbug.ashx?id=19362723-a02f-4b21-baa9-fe5660a7a081"&gt;&lt;/img&gt;&#xD;
      &lt;/body&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/DavidMohundro?a=wTGwFtaOR7g:PNWTh2-W4tw:G79ilh31hkQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DavidMohundro?d=G79ilh31hkQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/DavidMohundro?a=wTGwFtaOR7g:PNWTh2-W4tw:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DavidMohundro?i=wTGwFtaOR7g:PNWTh2-W4tw:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/DavidMohundro/~4/wTGwFtaOR7g" height="1" width="1"/&gt;</description>
      <comments>http://www.mohundro.com/blog/CommentView,guid,19362723-a02f-4b21-baa9-fe5660a7a081.aspx</comments>
      <category>Windows 7</category>
    <feedburner:origLink>http://www.mohundro.com/blog/2009/10/22/PingVPNEtcFromWindowsXPMode.aspx</feedburner:origLink></item>
    <item>
      <trackback:ping>http://www.mohundro.com/blog/Trackback.aspx?guid=ff1a646d-a820-4b62-8d4c-9e07ec76181b</trackback:ping>
      <pingback:server>http://www.mohundro.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.mohundro.com/blog/PermaLink,guid,ff1a646d-a820-4b62-8d4c-9e07ec76181b.aspx</pingback:target>
      <dc:creator>David Mohundro</dc:creator>
      <wfw:comment>http://www.mohundro.com/blog/CommentView,guid,ff1a646d-a820-4b62-8d4c-9e07ec76181b.aspx</wfw:comment>
      <wfw:commentRss>http://www.mohundro.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=ff1a646d-a820-4b62-8d4c-9e07ec76181b</wfw:commentRss>
      <slash:comments>1</slash:comments>
      
      <title>Simple Sinatra example using IronRuby</title>
      <guid isPermaLink="false">http://www.mohundro.com/blog/PermaLink,guid,ff1a646d-a820-4b62-8d4c-9e07ec76181b.aspx</guid>
      <link>http://feedproxy.google.com/~r/DavidMohundro/~3/YXmF6ijXvqY/SimpleSinatraExampleUsingIronRuby.aspx</link>
      <pubDate>Fri, 09 Oct 2009 14:41:10 GMT</pubDate>
      <description>&lt;body xmlns="http://www.w3.org/1999/xhtml"&gt;&#xD;
        &lt;p&gt;&#xD;
My first Ruby application recently went live a month or two back. I’ve been meaning&#xD;
to get some experience with Ruby for quite a while now, but it took a real project&#xD;
to actually get a chance to really do something with it. Of course, “real project”&#xD;
in this case is a project that just as easily could have been coded in static HTML&#xD;
:-). &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
The project turned out to building a website for &lt;a href="http://www.arpediatrictherapy.com/"&gt;Arkansas&#xD;
Pediatric Therapy&lt;/a&gt;, which is the company that my wife does speech therapy for.&#xD;
The initial requirements for the site were to just get some static content out there,&#xD;
but it still gave me an opportunity to use some Ruby to build the site. &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Because the site really has no database needs of any kind yet, I ended up choosing&#xD;
to use &lt;a href="http://www.sinatrarb.com/"&gt;Sinatra&lt;/a&gt; instead of &lt;a href="http://rubyonrails.org/"&gt;Rails&lt;/a&gt;.&#xD;
For deployment, I used &lt;a href="http://heroku.com/"&gt;Heroku&lt;/a&gt;. I was also able to&#xD;
incorporate some basic integration with the &lt;a href="http://code.google.com/apis/maps/"&gt;Google&#xD;
Maps API&lt;/a&gt;. For my JavaScript framework, I used &lt;a href="http://jquery.com/"&gt;jQuery&lt;/a&gt;.&#xD;
For the web design, I ended up asking one of my coworkers, &lt;a href="http://www.pureux.com/"&gt;Tim&#xD;
Franklin&lt;/a&gt;, to help me out. His web design skill far exceed mine, so that was definitely&#xD;
the right choice.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
So, basically, I took the initial requirements to build an easy static HTML site and&#xD;
ran! Was it overkill? I don’t think so – I ended up learning &lt;em&gt;a lot&lt;/em&gt; and I&#xD;
don’t have duplication of HTML all over the place. It should be pretty easy to add&#xD;
dynamic content later if I wish to. It really didn’t take a lot more time either.&#xD;
(NOTE: I did use &lt;a href="http://webgen.rubyforge.org/"&gt;webgen&lt;/a&gt; at first to build&#xD;
a static HTML version of the site. If you really just want static content, I can definitely&#xD;
recommend using it to take advantage of templates.)&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
But… the post title is about IronRuby… did I use IronRuby for this site? Actually,&#xD;
I didn’t. I might’ve tried it, but I’m pretty sure that Heroku doesn’t support IronRuby&#xD;
currently. Maybe some future site can take advantage of IronRuby. What I want to do&#xD;
is share some of this cool Ruby knowledge with my predominantly .NET readership using&#xD;
IronRuby.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
So, here are the steps you can take to build your first Sinatra application using&#xD;
IronRuby!&#xD;
&lt;/p&gt;&#xD;
        &lt;h4&gt;Downloading, Installing IronRuby, and Adding it Your Path&#xD;
&lt;/h4&gt;&#xD;
        &lt;p&gt;&#xD;
First, you’ll have to download &lt;a href="http://www.ironruby.net/"&gt;IronRuby&lt;/a&gt;. At&#xD;
the time of this post, it looks like the most current version is 0.9.1 though I used&#xD;
0.9.0 for the post. The release is just a ZIP file, so all you have to do is extract&#xD;
it and go. I would recommend extracting the zip to your C:\ drive (or root somewhere)&#xD;
as opposed to somewhere under Program Files. Why? Well, I initially dropped mine under&#xD;
Program Files and received an error when trying to install the sinatra gem. I ended&#xD;
up finding &lt;a href="http://unplugged.giggio.net/unplugged/category/IronRuby.aspx"&gt;this&#xD;
post&lt;/a&gt; to fix it – the problem is that the one of the paths is too long (check out &lt;a href="http://www.google.com/search?q=max_path"&gt;all&#xD;
the information about the infamous MAX_PATH constant&lt;/a&gt;).&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
You should have a directory that looks something like c:\ironruby-0.9.1 with the rest&#xD;
of the files underneath it. Next, you’ll need to add the bin directory to your path.&#xD;
For now, I’m just going to add it to my PowerShell profile instead of adding it for&#xD;
the entire system. Here’s all you have to do:&#xD;
&lt;/p&gt;&#xD;
        &lt;pre class="brush: ps1;"&gt;$env:path += ';C:\ironruby-0.9.0\bin'&#xD;
&lt;/pre&gt;&#xD;
        &lt;p&gt;&#xD;
Once this is done, the IronRuby commands should all be in scope. You can verify this&#xD;
by running “Get-Command ir*” which should return all of the commands under the IronRuby&#xD;
bin directory.&#xD;
&lt;/p&gt;&#xD;
        &lt;h4&gt;Installing the Sinatra Gem&#xD;
&lt;/h4&gt;&#xD;
        &lt;p&gt;&#xD;
.NET developers share code by sharing their assemblies. Ruby developers share code&#xD;
by using gems. If you wish to use a .NET library, you usually have to pull up a browser,&#xD;
download a zip file, extract it and then add a reference to the assembly. If you wish&#xD;
to use a gem, you use the gem command and ask it to install it for you. Like so:&#xD;
&lt;/p&gt;&#xD;
        &lt;pre class="brush: ruby;"&gt;gem install sinatra&#xD;
&lt;/pre&gt;&#xD;
        &lt;p&gt;&#xD;
Then, to actually “reference” the gem in your code, you just “require” the dependencies&#xD;
you have.&#xD;
&lt;/p&gt;&#xD;
        &lt;pre class="brush: ruby;"&gt;require 'rubygems'&#xD;
require 'sinatra'&#xD;
&lt;/pre&gt;&#xD;
        &lt;p&gt;&#xD;
Of course, we’re using IronRuby, so the commands are slightly different. &#xD;
&lt;/p&gt;&#xD;
        &lt;pre class="brush: ruby;"&gt;igem install sinatra&lt;/pre&gt;&#xD;
        &lt;p&gt;&#xD;
If you wish to see all of the gems installed locally, just run: &#xD;
&lt;/p&gt;&#xD;
        &lt;pre class="brush: ruby;"&gt;igem list –local&lt;/pre&gt;&#xD;
        &lt;p&gt;&#xD;
After installing Sinatra, you should see at least the following gems installed: &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="igem list --local" border="0" alt="igem list --local" src="http://www.mohundro.com/blog/content/binary/WindowsLiveWriter/SimpleSinatraexampleusingIronRuby_8831/image_6.png" width="266" height="141"&gt;&lt;/img&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;blockquote&gt;&#xD;
          &lt;p&gt;&#xD;
NOTE: If you happen to be at work and are behind a proxy, you might have trouble with&#xD;
the gem install command. Ruby and RubyGems take the Unix/Linux approach to proxies.&#xD;
That is, they’re expecting you to have an environment variable set up named &lt;a href="http://www.google.com/search?q=http_proxy+environment+variable"&gt;HTTP_PROXY&lt;/a&gt;.&#xD;
I have a PowerShell script that I run to initialize this for me, but it basically&#xD;
just does this (assuming you have populated the required PowerShell variables): &#xD;
&lt;/p&gt;&#xD;
          &lt;pre class="brush: ps1;"&gt;$env:http_proxy = "http://$username:$password@$proxy:$proxyPort"&#xD;
&lt;/pre&gt;&#xD;
          &lt;p&gt;&#xD;
I use the Get-Credential cmdlet so that I don’t have to hardcode my username and password&#xD;
anywhere.&#xD;
&lt;/p&gt;&#xD;
        &lt;/blockquote&gt;&#xD;
        &lt;h4&gt;Patching Sinatra to run with IronRuby First&#xD;
&lt;/h4&gt;&#xD;
        &lt;p&gt;&#xD;
Now… you’re not done with installing Sinatra yet. Sinatra doesn’t yet support IronRuby&#xD;
out of the box (as of sinatra 0.9.4 anyway). Check out the &lt;a href="http://www.ironruby.net/Documentation/Real_Ruby_Applications/Sinatra"&gt;IronRuby&#xD;
documentation on patching Sinatra to get it to run under IronRuby&lt;/a&gt;. Basically,&#xD;
you can open the base.rb code file (mine was under C:\ironruby-0.9.0\lib\IronRuby\gems\1.8\gems\sinatra-0.9.4\lib\sinatra)&#xD;
and paste in the patched code. Comment on the post if you’re unsure how to read and&#xD;
apply a patch.&#xD;
&lt;/p&gt;&#xD;
        &lt;h4&gt;Your First Sinatra Application in IronRuby&#xD;
&lt;/h4&gt;&#xD;
        &lt;p&gt;&#xD;
Now, we’re ready to create the first IronRuby code file. Below is the code: &#xD;
&lt;/p&gt;&#xD;
        &lt;pre class="brush: ruby;"&gt;require 'rubygems'&#xD;
require 'sinatra' &#xD;
&#xD;
get '/' do&#xD;
  "My machine name is #{System::Environment::machine_name}"&#xD;
end&#xD;
&lt;/pre&gt;&#xD;
        &lt;p&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Pretty easy, huh? I’ve already pointed out the require statements further up the post.&#xD;
The next three lines illustrate the magic and simplicity of sinatra (and of Ruby).&#xD;
Sinatra bills itself as a “DSL for quickly creating web applications in Ruby with&#xD;
minimal effort.”&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
What those lines say is, when the ‘/’ path (the root of the site) receives an HTTP&#xD;
GET, respond with the string “My machine name is” and then the evaluated machine name&#xD;
that sinatra is running on. Note that I’m using &lt;a href="http://msdn.microsoft.com/en-us/library/system.environment.machinename.aspx"&gt;System.Environment.MachineName&lt;/a&gt; from&#xD;
the .NET Framework. Note also that I reference the MachineName property using machine_name&#xD;
instead. This illustrates IronRuby’s name mangling feature which maps CLR property&#xD;
and method names to use Ruby’s naming standards.&#xD;
&lt;/p&gt;&#xD;
        &lt;h4&gt;Running It!&#xD;
&lt;/h4&gt;&#xD;
        &lt;p&gt;&#xD;
To run your code in sinatra, you use the ir command (ir = IronRuby) against your Ruby&#xD;
source file. You should see something like the following when you run it:&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="ir .\myironrubyapp.rb" border="0" alt="ir .\myironrubyapp.rb" src="http://www.mohundro.com/blog/content/binary/WindowsLiveWriter/SimpleSinatraexampleusingIronRuby_8831/image_5.png" width="644" height="167"&gt;&lt;/img&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
In case you missed it from the screenshot, sinatra outputs that it “has taken the&#xD;
stage on 4567 for development.” 4567 is the port that sinatra is listening on. This&#xD;
means you can browse to http://localhost:4567.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
You should see something like the following when you browse to this address.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Sinatra Running!" border="0" alt="Sinatra Running!" src="http://www.mohundro.com/blog/content/binary/WindowsLiveWriter/SimpleSinatraexampleusingIronRuby_8831/image_9.png" width="351" height="109"&gt;&lt;/img&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
So, there you go. Your first Sinatra app with IronRuby. If there is interest, I’ll&#xD;
share more about how you can use Sinatra including how to use ERB to have templates&#xD;
with Sinatra.&#xD;
&lt;/p&gt;&#xD;
        &lt;img width="0" height="0" src="http://www.mohundro.com/blog/aggbug.ashx?id=ff1a646d-a820-4b62-8d4c-9e07ec76181b"&gt;&lt;/img&gt;&#xD;
      &lt;/body&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/DavidMohundro?a=YXmF6ijXvqY:AchWgzjxLnU:G79ilh31hkQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DavidMohundro?d=G79ilh31hkQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/DavidMohundro?a=YXmF6ijXvqY:AchWgzjxLnU:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DavidMohundro?i=YXmF6ijXvqY:AchWgzjxLnU:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/DavidMohundro/~4/YXmF6ijXvqY" height="1" width="1"/&gt;</description>
      <comments>http://www.mohundro.com/blog/CommentView,guid,ff1a646d-a820-4b62-8d4c-9e07ec76181b.aspx</comments>
      <category>.NET</category>
      <category>IronRuby</category>
      <category>Ruby</category>
    <feedburner:origLink>http://www.mohundro.com/blog/2009/10/09/SimpleSinatraExampleUsingIronRuby.aspx</feedburner:origLink></item>
    <item>
      <trackback:ping>http://www.mohundro.com/blog/Trackback.aspx?guid=e9661fd6-c7f8-48fd-bd49-8e703001d8d1</trackback:ping>
      <pingback:server>http://www.mohundro.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.mohundro.com/blog/PermaLink,guid,e9661fd6-c7f8-48fd-bd49-8e703001d8d1.aspx</pingback:target>
      <dc:creator>David Mohundro</dc:creator>
      <wfw:comment>http://www.mohundro.com/blog/CommentView,guid,e9661fd6-c7f8-48fd-bd49-8e703001d8d1.aspx</wfw:comment>
      <wfw:commentRss>http://www.mohundro.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=e9661fd6-c7f8-48fd-bd49-8e703001d8d1</wfw:commentRss>
      
      <title>Another year, another devLink (part 3)</title>
      <guid isPermaLink="false">http://www.mohundro.com/blog/PermaLink,guid,e9661fd6-c7f8-48fd-bd49-8e703001d8d1.aspx</guid>
      <link>http://feedproxy.google.com/~r/DavidMohundro/~3/jEZHrwflCgY/AnotherYearAnotherDevLinkPart3.aspx</link>
      <pubDate>Wed, 26 Aug 2009 18:24:17 GMT</pubDate>
      <description>&lt;body xmlns="http://www.w3.org/1999/xhtml"&gt;&#xD;
        &lt;p&gt;&#xD;
So, it didn’t occur to me until today that I was creating a trilogy here. &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
If I had thought about it ahead of time, I would’ve given my titles more creative&#xD;
names like &lt;a href="http://www.mohundro.com/blog/2009/08/24/AnotherYearAnotherDevLinkPart1.aspx"&gt;“devLink”&lt;/a&gt;, &lt;a href="http://www.mohundro.com/blog/2009/08/25/AnotherYearAnotherDevLinkPart2.aspx"&gt;“devLink&#xD;
Strikes Back”&lt;/a&gt; and “the Return of devLink.” The true test will be to see if the&#xD;
second post is everyone’s favorite.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Obligatory Ewoks for the 3rd movie... errr post." border="0" alt="Obligatory Ewoks for the 3rd movie... errr post." src="http://www.mohundro.com/blog/content/binary/WindowsLiveWriter/AnotheryearanotherdevLinkpart3_BC80/image_3.png" width="99" height="146"&gt;&lt;/img&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Oh well. Maybe next year.&#xD;
&lt;/p&gt;&#xD;
        &lt;h4&gt;Managed Rootkits&#xD;
&lt;/h4&gt;&#xD;
        &lt;p&gt;&#xD;
The first session I went to on Saturday was an Open Spaces session on Managed Rootkits&#xD;
convened by &lt;a href="http://www.sempf.net/"&gt;Bill Sempf&lt;/a&gt;.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Before I continue, read that sentence again. Didn’t see it yet? Here’s a hint: &lt;em&gt;Managed&lt;/em&gt; Rootkits.&#xD;
You know, managed… as in managed langauges… like .NET. Get your attention yet? It&#xD;
did mine, which is why I showed up! Of course, I expected to be completely lost because,&#xD;
in my mind, &lt;a href="http://en.wikipedia.org/wiki/Rootkit"&gt;rootkits&lt;/a&gt; are hard stuff&#xD;
that take a &lt;a href="http://blogs.technet.com/markrussinovich/archive/2005/10/31/sony-rootkits-and-digital-rights-management-gone-too-far.aspx"&gt;computer&#xD;
genius to find and fix&lt;/a&gt;. Surprisingly though, the concept behind managed rootkits&#xD;
is easy.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
But first, some background. &lt;a href="http://www.sempf.net/post/Defcon-Recap.aspx"&gt;Bill&#xD;
had attended Defcon&lt;/a&gt; which is where he had originally heard about managed rootkits&#xD;
in the first place (note that his post &lt;a href="http://www.applicationsecurity.co.il/english/NETFrameworkRootkits/tabid/161/Default.aspx"&gt;links&#xD;
to a page that includes a demonstration&lt;/a&gt;). That’s how the entire session came to&#xD;
be.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
So, wanna know how to hack the framework?&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
First, take mscorlib. (that’s the primary .NET assembly by the way)&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Next, take &lt;a href="http://msdn.microsoft.com/en-us/library/f7dy01k1%28VS.80%29.aspx"&gt;ildasm&lt;/a&gt;.&#xD;
(that’s the MSIL Disassembler – the built-in &lt;a href="http://www.red-gate.com/products/reflector/"&gt;Reflector&lt;/a&gt; if&#xD;
you will)&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Disassemble mscorlib into IL.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Write your own IL and paste it in the IL you got from disassembling mscorlib.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Find &lt;a href="http://msdn.microsoft.com/en-us/library/496e4ekx%28VS.80%29.aspx"&gt;ilasm&lt;/a&gt; on&#xD;
your machine. (you guessed it, that’s the .NET Assembler)&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Assemble your modified IL into a new mscorlib.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Drop it in the GAC.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
You L33T hacker you.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
The entire reason this works is because, once an assembly has been installed into&#xD;
the GAC, the framework doesn’t run additional checks to verify that the assembly matches&#xD;
the hash in its strong name. So yeah, strong naming doesn’t protect assemblies.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Once we were all up to speed on the logistics, we discussed if this was, in fact,&#xD;
a &lt;a href="http://en.wikipedia.org/wiki/Zero_day_attack"&gt;zero day exploit&lt;/a&gt;. It’s&#xD;
not. Why? Because you still have to have administrative privileges to modify any files&#xD;
in the GAC. As Raymond Chen points out, &lt;a href="http://blogs.msdn.com/oldnewthing/archive/2009/01/21/9353310.aspx"&gt;“if&#xD;
you have full trust, then you can do anything.”&lt;/a&gt;&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Anyway, it was a &lt;em&gt;very&lt;/em&gt; interesting conversation. I made the point that, even&#xD;
if it isn’t a security vulnerability, there is the whole user perception issue. For&#xD;
example, if an assembly that your application uses is modified so that it posts your&#xD;
credit card information out on the internet, network trace tools are going to show&#xD;
that it is &lt;em&gt;your&lt;/em&gt; application that is connecting to the internet. If your computer&#xD;
were already infiltrated to the point that someone could modify mscorlib on your machine,&#xD;
though, managed rootkits likely aren’t your biggest concern. Oh well, it sounded like&#xD;
a good argument at the time.&#xD;
&lt;/p&gt;&#xD;
        &lt;h4&gt;Domain Driven Design&#xD;
&lt;/h4&gt;&#xD;
        &lt;p&gt;&#xD;
The next session I attended was on &lt;a href="http://domaindrivendesign.org/"&gt;Domain&#xD;
Driven Design&lt;/a&gt; with &lt;a href="http://www.craigberntson.com/blog"&gt;Craig Berntson&lt;/a&gt;.&#xD;
Here’s &lt;a href="http://www.craigberntson.com/blog/2009/03/speaking-at-devlink.asp"&gt;the&#xD;
synopsis from his blog&lt;/a&gt;:&#xD;
&lt;/p&gt;&#xD;
        &lt;blockquote&gt;Domain Driven Design is a way to design and develop enterprise applications&#xD;
so that they are easier to maintain, enhance, and extend. DDD is overkill for many&#xD;
of the applications we develop today, but still has principles that can be applied&#xD;
to most of the apps we write. In this session, you will learn to apply these concepts.&lt;/blockquote&gt;&#xD;
        &lt;p&gt;&#xD;
My personal feelings regarding this talk was that he did an excellent job at actually&#xD;
communicating DDD. He contrasted the typical data-driven design for applications to&#xD;
driving the design of the system from the business domain. He also did a good job&#xD;
of explaining it in terms that everyone could understand. It was a very good talk.&#xD;
&lt;/p&gt;&#xD;
        &lt;h4&gt;Lunch over Open Spaces&#xD;
&lt;/h4&gt;&#xD;
        &lt;p&gt;&#xD;
Over lunch, I went back to the Open Spaces area to see if there were any sessions&#xD;
going on then. A group of people were all sitting in one area so I assumed it was&#xD;
going to be a great conversation. It certainly was, but it wasn’t a planned session.&#xD;
It wasn’t even technical in nature at times… I remember discussing favorite Family&#xD;
Guy episodes at one point…&#xD;
&lt;/p&gt;&#xD;
        &lt;h4&gt;Architecting Architectural Stuff&#xD;
&lt;/h4&gt;&#xD;
        &lt;p&gt;&#xD;
My last session was on Architecting Modern Distributed Applications with &lt;a href="http://www.notsotrivial.net/blog/"&gt;Clint&#xD;
Edmonson&lt;/a&gt;. He has &lt;a href="http://www.notsotrivial.net/blog/post/2009/08/17/DevLink-Decompression.aspx"&gt;posted&#xD;
his slides and thoughts on the conference on his blog&lt;/a&gt;. He shared a diagram that&#xD;
he had seen at an internal Microsoft presentation that showed the various architectural&#xD;
layers in typical applications and showed how you could use the diagram to help make&#xD;
decisions like self-hosting versus hosted solutions versus moving entirely to the&#xD;
cloud. A comment he made in passing but that I thought had a lot of merit was adding&#xD;
in a ping operation to all of your services so that you can quickly and easily determine&#xD;
the state of what is working and what isn’t. I know hardware almost always has this,&#xD;
but I hadn’t really considered putting it in software. I know, you’ve probably been&#xD;
doing it for years.&#xD;
&lt;/p&gt;&#xD;
        &lt;h4&gt;Closing Circle&#xD;
&lt;/h4&gt;&#xD;
        &lt;p&gt;&#xD;
At the end of the day, I went to the Open Spaces closing circle where we went over&#xD;
the week, discussed how we could more effectively publicize Open Spaces to the rest&#xD;
of the conference attendees, and other things related to the conference. I was a jerk&#xD;
and had to leave early, but it was all positive while I was in the room. I’m pretty&#xD;
sure it didn’t erupt or anything after I left :-)&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Once again, kudos to &lt;a href="http://www.johnkellar.com/"&gt;John Kellar&lt;/a&gt; and team&#xD;
for planning another amazing devLink. If you’re interested in seeing more and better&#xD;
pictures than I’ll ever be able to take, &lt;a href="http://www.davidgiard.com/"&gt;David&#xD;
Giard&lt;/a&gt; has &lt;a href="http://www.davidgiard.com/2009/08/23/DevLinkAndLinkWray.aspx"&gt;posted&#xD;
a link to his pictures on his blog&lt;/a&gt;. If you weren’t able to attend this year, go&#xD;
next year.&#xD;
&lt;/p&gt;&#xD;
        &lt;img width="0" height="0" src="http://www.mohundro.com/blog/aggbug.ashx?id=e9661fd6-c7f8-48fd-bd49-8e703001d8d1"&gt;&lt;/img&gt;&#xD;
      &lt;/body&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/DavidMohundro?a=jEZHrwflCgY:buk08gHUTAM:G79ilh31hkQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DavidMohundro?d=G79ilh31hkQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/DavidMohundro?a=jEZHrwflCgY:buk08gHUTAM:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DavidMohundro?i=jEZHrwflCgY:buk08gHUTAM:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/DavidMohundro/~4/jEZHrwflCgY" height="1" width="1"/&gt;</description>
      <comments>http://www.mohundro.com/blog/CommentView,guid,e9661fd6-c7f8-48fd-bd49-8e703001d8d1.aspx</comments>
      <category>Conferences</category>
    <feedburner:origLink>http://www.mohundro.com/blog/2009/08/26/AnotherYearAnotherDevLinkPart3.aspx</feedburner:origLink></item>
    <item>
      <trackback:ping>http://www.mohundro.com/blog/Trackback.aspx?guid=bb8df4e2-52dc-4f46-97d2-04c563ac64bd</trackback:ping>
      <pingback:server>http://www.mohundro.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.mohundro.com/blog/PermaLink,guid,bb8df4e2-52dc-4f46-97d2-04c563ac64bd.aspx</pingback:target>
      <dc:creator>David Mohundro</dc:creator>
      <wfw:comment>http://www.mohundro.com/blog/CommentView,guid,bb8df4e2-52dc-4f46-97d2-04c563ac64bd.aspx</wfw:comment>
      <wfw:commentRss>http://www.mohundro.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=bb8df4e2-52dc-4f46-97d2-04c563ac64bd</wfw:commentRss>
      <slash:comments>4</slash:comments>
      
      <title>Another year, another devLink (part 2)</title>
      <guid isPermaLink="false">http://www.mohundro.com/blog/PermaLink,guid,bb8df4e2-52dc-4f46-97d2-04c563ac64bd.aspx</guid>
      <link>http://feedproxy.google.com/~r/DavidMohundro/~3/ZmE6NfWedt4/AnotherYearAnotherDevLinkPart2.aspx</link>
      <pubDate>Tue, 25 Aug 2009 18:35:57 GMT</pubDate>
      <description>&lt;body xmlns="http://www.w3.org/1999/xhtml"&gt;&#xD;
        &lt;p&gt;&#xD;
Yesterday, &lt;a href="http://www.mohundro.com/blog/2009/08/24/AnotherYearAnotherDevLinkPart1.aspx"&gt;I&#xD;
blogged about the first day of devLink&lt;/a&gt; – today, I’ll continue the recap with,&#xD;
you guessed it, day 2.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
The Open Spaces side of devLink started on day two, so that’s where I went. Like last&#xD;
year, &lt;a href="http://netcave.org/"&gt;Alan Stevens&lt;/a&gt; kicked everything off with the&#xD;
opening circle. (if you’re unclear on the Open Spaces concept, I gave it more time&#xD;
in &lt;a href="http://www.mohundro.com/blog/2008/08/27/devLink2008Recap.aspx"&gt;my post&#xD;
from last year&lt;/a&gt;) &#xD;
&lt;/p&gt;&#xD;
        &lt;h4&gt;Convening my first open space session&#xD;
&lt;/h4&gt;&#xD;
        &lt;p&gt;&#xD;
Last year, I didn’t have the guts to jump out there and provide a topic that I wanted&#xD;
to convene. This year, though, I thought I’d give it a try. So, I threw out &lt;a href="http://en.wikipedia.org/wiki/Event-driven_architecture"&gt;Event&#xD;
Driven Architecture&lt;/a&gt; using tools like &lt;a href="http://code.google.com/p/masstransit/"&gt;MassTransit&lt;/a&gt; or &lt;a href="http://www.nservicebus.com/"&gt;nServiceBus&lt;/a&gt;.&#xD;
Of course, when I brought it forward, I only said MassTransit and a few people came&#xD;
up to ask if I was referring to “mass transit” as in buses or trains. I guess I could’ve&#xD;
been more clear in my explanation. My &lt;em&gt;primary&lt;/em&gt; purpose in picking this topic&#xD;
was entirely selfish – I hoped that someone would show up who knew more about it and&#xD;
they could do most of the talking! &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Let’s just say it didn’t quite work out that way :-)&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
I still think it went well. I ended up going over the very basics of EDA and MassTransit&#xD;
and having a discussion about how EDA can vastly decrease coupling in applications&#xD;
as well as how it also completely changes the way a system is architected over all.&#xD;
Interestingly enough, &lt;a href="http://maggieplusplus.com/"&gt;Maggie Longshore&lt;/a&gt; mentioned&#xD;
that, in embedded software development, messaging was the norm instead of the typical&#xD;
“call a webservice and wait” that is typical of .NET code. I also spoke about the&#xD;
similarities between EDA and UI patterns like the &lt;a href="http://martinfowler.com/eaaDev/EventAggregator.html"&gt;event&#xD;
aggregator&lt;/a&gt;. I mentioned &lt;a href="http://www.udidahan.com/2009/06/14/domain-events-salvation/"&gt;Udi&#xD;
Dahan’s domain events post&lt;/a&gt; as well. During our discussion, &lt;a href="http://www.thinqlinq.com/"&gt;Jim&#xD;
Wooley&lt;/a&gt; mentioned Linq to Events (or the Rx Framework) and pointed everyone to &lt;a href="http://themechanicalbride.blogspot.com/2009/07/introducing-rx-linq-to-events.html"&gt;an&#xD;
introductory article on the Rx Framework&lt;/a&gt;. I’m still trying to wrap my head around&#xD;
that post!&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Towards the end, the conversation drifted off into… just about everything else. We&#xD;
spoke about adding scripting functionality to applications (using tools like PowerShell,&#xD;
IronRuby or IronPython). As the convener, it was my role to ensure the conversation&#xD;
stayed on topic, but I was having fun just jumping around to different topics at the&#xD;
end. I think it went well.&#xD;
&lt;/p&gt;&#xD;
        &lt;h4&gt;jQuery Plugins are cool&#xD;
&lt;/h4&gt;&#xD;
        &lt;p&gt;&#xD;
Next, I went to an “eyes front” session from &lt;a href="http://elijahmanor.com/"&gt;Elijah&#xD;
Manor&lt;/a&gt; on writing jQuery plugins. He has posted &lt;a href="http://elijahmanor.com/2009/08/14/HowToCreateYourOwnJQueryPlugin.aspx"&gt;the&#xD;
slides from his presentation on his blog&lt;/a&gt;. Having read &lt;a href="http://www.crockford.com/javascript/javascript.html"&gt;“the&#xD;
world’s most misunderstood programming language”&lt;/a&gt; from &lt;a href="http://www.crockford.com/"&gt;Douglas&#xD;
Crockford&lt;/a&gt;, I now consider myself somewhat of a JavaScript fanboy so I really enjoyed&#xD;
the talk. My hands-on experience with jQuery has been fairly limited up to this point&#xD;
and really only included using the Lightbox plugin and a few other tools, so the session&#xD;
was an eye opener. Probably one of my favorite parts of the talk was when Elijah shared &lt;a href="http://elijahmanor.com/2009/08/19/12MustHaveWebDeveloperBookmarklets.aspx"&gt;some&#xD;
must have developer bookmarklets&lt;/a&gt;. I had heard of Firebug Lite before, but the&#xD;
jQuery specific bookmarklets were new to me.&#xD;
&lt;/p&gt;&#xD;
        &lt;h4&gt;Mono is cool, too&#xD;
&lt;/h4&gt;&#xD;
        &lt;p&gt;&#xD;
After Elijah’s talk, I went to &lt;a href="http://www.codinggeekette.com/"&gt;Sarah Dutkiewicz’s&lt;/a&gt; talk&#xD;
on cross platform C# using Mono. I’ve been following Mono from a distance for a few&#xD;
years, so it was good to hear Sarah’s talk. After her presentation, we spoke about&#xD;
things like &lt;a href="http://monodevelop.com/"&gt;MonoDevelop&lt;/a&gt;, &lt;a href="http://banshee-project.org/"&gt;Banshee&lt;/a&gt; and&#xD;
other open source things. I wasn’t able to keep up entirely because my Mono experience&#xD;
thus far includes opening MonoDevelop and building Hello World, reading &lt;a href="http://tirania.org/blog/"&gt;Miguel&#xD;
de Icaza’s blog&lt;/a&gt;, and listening to the &lt;a href="http://www.hanselminutes.com/default.aspx?showID=186"&gt;Hanselminutes&#xD;
episode on Mono and Banshee&lt;/a&gt;. &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
// TODO: Add Mono to the list of cool things to look at some day!&#xD;
&lt;/p&gt;&#xD;
        &lt;h4&gt;Learning Rails in the hallway&#xD;
&lt;/h4&gt;&#xD;
        &lt;p&gt;&#xD;
On the way back to the Open Spaces room, I ran into a group of people learning Rails&#xD;
from Leon in the hallway. Note that this wasn’t a planned session - it just happened.&#xD;
Two or three people were sitting on a bench in the hall while everyone else was sitting&#xD;
in the floor. Most had laptops, but a few were looking over shoulders. If I can find&#xD;
a picture, I’ll post it – a picture would communicate this a lot better than I can.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Impromptu Rails Session" border="0" alt="Impromptu Rails Session" src="http://www.mohundro.com/blog/content/binary/WindowsLiveWriter/AnotheryearanotherdevLinkpart2_F5A9/image_3.png" width="608" height="408"&gt;&lt;/img&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
UPDATE: thanks to &lt;a href="http://mattbrewer.mp/"&gt;Matt Brewer&lt;/a&gt; for providing a&#xD;
link to the above picture of the impromptu Rails learning session with Leon – and&#xD;
thanks to &lt;a href="http://www.johnkellar.com/"&gt;John Kellar&lt;/a&gt; for posting it to his&#xD;
Facebook photo album!&#xD;
&lt;/p&gt;&#xD;
        &lt;h4&gt;Final Open Spaces Session on… I’m not entirely sure&#xD;
&lt;/h4&gt;&#xD;
        &lt;p&gt;&#xD;
I was convinced that the final session of the day was on distributed source control.&#xD;
Later, I think I heard it was on DSLs (domain specific languages). In either case,&#xD;
it turned into another fun and random conversation.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
I’ll finish up the devLink review covering day 3 soon!&#xD;
&lt;/p&gt;&#xD;
        &lt;img width="0" height="0" src="http://www.mohundro.com/blog/aggbug.ashx?id=bb8df4e2-52dc-4f46-97d2-04c563ac64bd"&gt;&lt;/img&gt;&#xD;
      &lt;/body&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/DavidMohundro?a=ZmE6NfWedt4:Y5KcigIqsSM:G79ilh31hkQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DavidMohundro?d=G79ilh31hkQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/DavidMohundro?a=ZmE6NfWedt4:Y5KcigIqsSM:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DavidMohundro?i=ZmE6NfWedt4:Y5KcigIqsSM:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/DavidMohundro/~4/ZmE6NfWedt4" height="1" width="1"/&gt;</description>
      <comments>http://www.mohundro.com/blog/CommentView,guid,bb8df4e2-52dc-4f46-97d2-04c563ac64bd.aspx</comments>
      <category>Conferences</category>
    <feedburner:origLink>http://www.mohundro.com/blog/2009/08/25/AnotherYearAnotherDevLinkPart2.aspx</feedburner:origLink></item>
    <item>
      <trackback:ping>http://www.mohundro.com/blog/Trackback.aspx?guid=1e522746-a4aa-4eed-8635-de77bb093d58</trackback:ping>
      <pingback:server>http://www.mohundro.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.mohundro.com/blog/PermaLink,guid,1e522746-a4aa-4eed-8635-de77bb093d58.aspx</pingback:target>
      <dc:creator>David Mohundro</dc:creator>
      <wfw:comment>http://www.mohundro.com/blog/CommentView,guid,1e522746-a4aa-4eed-8635-de77bb093d58.aspx</wfw:comment>
      <wfw:commentRss>http://www.mohundro.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=1e522746-a4aa-4eed-8635-de77bb093d58</wfw:commentRss>
      <slash:comments>1</slash:comments>
      
      <title>Another year, another devLink (part 1)</title>
      <guid isPermaLink="false">http://www.mohundro.com/blog/PermaLink,guid,1e522746-a4aa-4eed-8635-de77bb093d58.aspx</guid>
      <link>http://feedproxy.google.com/~r/DavidMohundro/~3/Qoj9vqZzomo/AnotherYearAnotherDevLinkPart1.aspx</link>
      <pubDate>Mon, 24 Aug 2009 15:35:17 GMT</pubDate>
      <description>&lt;body xmlns="http://www.w3.org/1999/xhtml"&gt;&#xD;
        &lt;p&gt;&#xD;
I’ve now attended &lt;a href="http://devlink.net"&gt;devLink&lt;/a&gt; three times, with each&#xD;
time getting progressively better. This year marked the first time for devLink to&#xD;
be split across three days (from Thursday, August 13 through Saturday, August 15).&#xD;
Day one included preconference-like sessions that were longer in length with days&#xD;
two and three more closely resembling prior years. Like last year, this year also&#xD;
included Open Spaces, which ran over days two and three.&#xD;
&lt;/p&gt;&#xD;
        &lt;h4&gt;Ruby Enlightenment&#xD;
&lt;/h4&gt;&#xD;
        &lt;p&gt;&#xD;
My first session of devLink was with &lt;a href="http://fallenrogue.com/"&gt;Leon Gersing&lt;/a&gt; covering&#xD;
Ruby-Koans: Path to Ruby Enlightenment. Let me start this way – I have never been&#xD;
to a session that was presented in quite the way that Leon gave this presentation.&#xD;
Let me give my alternate title for this presentation: “Learning Ruby through Pair&#xD;
Programming using Test Driven Development.” It was amazing. The guys at EdgeCase have&#xD;
created an open source library called &lt;a href="http://github.com/edgecase/ruby_koans/tree/master"&gt;Ruby&#xD;
Koans&lt;/a&gt;. From the project’s README:&#xD;
&lt;/p&gt;&#xD;
        &lt;blockquote&gt;&#xD;
          &lt;p&gt;&#xD;
The Ruby Koans walk you along the path to enlightenment in order to learn Ruby. The&#xD;
goal is to learn the Ruby language, syntax, structure, and some common functions and&#xD;
libraries. We also teach you culture. Testing is not just something we pay lip service&#xD;
to, but something we live. It is essential in your quest to learn and do great things&#xD;
in the language.&#xD;
&lt;/p&gt;&#xD;
        &lt;/blockquote&gt;&#xD;
        &lt;p&gt;&#xD;
Leon helped everyone get Ruby othat was done, we broke up into pairs and went through&#xD;
the koans. Leon walked around the room and helped whenever someone ran into a question&#xD;
or a problem.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Let me share the first koan with you as an example. Pull up your favorite command&#xD;
prompt and go to the directory where you extracted ruby_koans. Once in that directory,&#xD;
run rake (rake is to ruby as make is to C or as nant/msbuild is to C#/VB.NET).&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Running Ruby Koans" border="0" alt="Running Ruby Koans" src="http://www.mohundro.com/blog/content/binary/WindowsLiveWriter/AnotheryearanotherdevLinkpart1_94E1/image_8.png" width="450" height="354"&gt;&lt;/img&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
The rake file changes the directory to the koans directory and then executes the various&#xD;
ruby files in it, which are unit tests. The first test fails in the ./about_basics.rb&#xD;
file on line 10. Here is what that file looks like:&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Ruby Koan 1" border="0" alt="Ruby Koan 1" src="http://www.mohundro.com/blog/content/binary/WindowsLiveWriter/AnotheryearanotherdevLinkpart1_94E1/image4.png" width="671" height="81"&gt;&lt;/img&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
You don’t really even have to know programming to see what you should do here. Just&#xD;
change the false to be true to get your test to pass. Once that is done, move to the&#xD;
next test and so on.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
The koans start at the simplest level and then move up to higher levels of complexity&#xD;
to expose you the Ruby language.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Thanks to Leon for sharing this with us and helping to bring us all closer to Ruby&#xD;
enlightenment!&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Ruby Koans session" border="0" alt="Ruby Koans session" src="http://www.mohundro.com/blog/content/binary/WindowsLiveWriter/AnotheryearanotherdevLinkpart1_94E1/image_7.png" width="644" height="432"&gt;&lt;/img&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
(thanks to the &lt;a href="http://devlink.net"&gt;devLink&lt;/a&gt; site for the above picture&#xD;
of the Ruby Koans session)&#xD;
&lt;/p&gt;&#xD;
        &lt;h4&gt;Closures Explained&#xD;
&lt;/h4&gt;&#xD;
        &lt;p&gt;&#xD;
The next session was with &lt;a href="http://blogs.msdn.com/chrsmith/"&gt;Chris Smith&lt;/a&gt; on&#xD;
closures, lambda calculus, and functional programming with both C# and F#. I already&#xD;
had a basic understanding of closures, but I got a lot more from this talk. Surprisingly,&#xD;
lambda calculus’s name is far more complex than the actual concepts that it introduces.&#xD;
Unfortunately, I still can’t read more than half of the F# examples out there. I seriously&#xD;
need to try it out on some personal projects to understand it. Luckily, the ideas&#xD;
behind it are more solid now. Great job Chris!&#xD;
&lt;/p&gt;&#xD;
        &lt;h4&gt;The Lost Art of Simplicity&#xD;
&lt;/h4&gt;&#xD;
        &lt;p&gt;&#xD;
The opening keynote was presented by &lt;a href="http://www.joshholmes.com/blog/"&gt;Josh&#xD;
Holmes&lt;/a&gt; on &lt;a href="http://www.joshholmes.com/blog/2009/04/29/TheLostArtOfSimplicity.aspx"&gt;the&#xD;
Lost Art of Simplicity&lt;/a&gt;. He posted the slides from when he gave his presentation&#xD;
earlier in the year, so I won’t spend a lot of time speaking on it. I do want to share&#xD;
a few thoughts that I got from it, though. &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Josh brought up the thinking that a lot of developers have when they see an application&#xD;
or other project: “I could build that in a weekend.” I saw this thinking &lt;em&gt;a lot&lt;/em&gt; from&#xD;
people when stackoverflow.com was built. Josh pointed out the disconnect between this&#xD;
and then explaining to our users that a new feature will take eight months. &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
That sort of hit me in the gut :-) &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
He’s right, of course – we do this all the time, particularly in “enterprise” development.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Another comment he brought up that was both true and funny at the same time is that&#xD;
we as developers don’t speak human, we speak geek. How right he is.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
 &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
And now for something completely different…&#xD;
&lt;/p&gt;&#xD;
        &lt;h4&gt;Lunch boxes do more than carry food&#xD;
&lt;/h4&gt;&#xD;
        &lt;p&gt;&#xD;
They carry code. Below is a picture that &lt;a href="http://twitter.com/mmcquade"&gt;Micky&#xD;
McQuade&lt;/a&gt; took of me trying to explain closures of all things to &lt;a href="http://twitter.com/anthonyford"&gt;Anthony&#xD;
Ford&lt;/a&gt;. My communication skills were lacking at the time, so I decided to try to&#xD;
communicate with code and, seeing as how the lunch box was the closest writing medium&#xD;
I could find, I used it.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Me writing on a lunch box" border="0" alt="Me writing on a lunch box" src="http://www.mohundro.com/blog/content/binary/WindowsLiveWriter/AnotheryearanotherdevLinkpart1_94E1/photo_3.jpg" width="363" height="484"&gt;&lt;/img&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
The code snippet below is approximately something like:&#xD;
&lt;/p&gt;&#xD;
        &lt;pre&gt;void Foo()&#xD;
{&#xD;
   var x = 5;&#xD;
   var nums = new List&lt;int&gt;&#xD;
{ 1, 2, 3 }; nums.ForEach(n =&amp;gt; Console.WriteLine(x)); }&#xD;
&lt;/int&gt;&lt;/pre&gt;&#xD;
        &lt;p&gt;&#xD;
I wanted to show how, if the lambda were moved out to its own function, it wouldn’t&#xD;
be able to access the x variable. &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Code on a lunch box" border="0" alt="Code on a lunch box" src="http://www.mohundro.com/blog/content/binary/WindowsLiveWriter/AnotheryearanotherdevLinkpart1_94E1/photo2.jpg" width="363" height="484"&gt;&lt;/img&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;img width="0" height="0" src="http://www.mohundro.com/blog/aggbug.ashx?id=1e522746-a4aa-4eed-8635-de77bb093d58"&gt;&lt;/img&gt;&#xD;
      &lt;/body&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/DavidMohundro?a=Qoj9vqZzomo:Qu6onNBao0E:G79ilh31hkQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DavidMohundro?d=G79ilh31hkQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/DavidMohundro?a=Qoj9vqZzomo:Qu6onNBao0E:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DavidMohundro?i=Qoj9vqZzomo:Qu6onNBao0E:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/DavidMohundro/~4/Qoj9vqZzomo" height="1" width="1"/&gt;</description>
      <comments>http://www.mohundro.com/blog/CommentView,guid,1e522746-a4aa-4eed-8635-de77bb093d58.aspx</comments>
      <category>Conferences</category>
    <feedburner:origLink>http://www.mohundro.com/blog/2009/08/24/AnotherYearAnotherDevLinkPart1.aspx</feedburner:origLink></item>
    <item>
      <trackback:ping>http://www.mohundro.com/blog/Trackback.aspx?guid=52efd93d-5ac0-48ff-aea2-29dad51890ef</trackback:ping>
      <pingback:server>http://www.mohundro.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.mohundro.com/blog/PermaLink,guid,52efd93d-5ac0-48ff-aea2-29dad51890ef.aspx</pingback:target>
      <dc:creator>David Mohundro</dc:creator>
      <wfw:comment>http://www.mohundro.com/blog/CommentView,guid,52efd93d-5ac0-48ff-aea2-29dad51890ef.aspx</wfw:comment>
      <wfw:commentRss>http://www.mohundro.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=52efd93d-5ac0-48ff-aea2-29dad51890ef</wfw:commentRss>
      
      <title>Haven’t heard about PowerShell yet? And you’ll be in the Little Rock area this week, too???</title>
      <guid isPermaLink="false">http://www.mohundro.com/blog/PermaLink,guid,52efd93d-5ac0-48ff-aea2-29dad51890ef.aspx</guid>
      <link>http://feedproxy.google.com/~r/DavidMohundro/~3/jJHtfJS2Lfw/HaventHeardAboutPowerShellYetAndYoullBeInTheLittleRockAreaThisWeekToo.aspx</link>
      <pubDate>Sun, 12 Jul 2009 19:28:28 GMT</pubDate>
      <description>&lt;body xmlns="http://www.w3.org/1999/xhtml"&gt;&#xD;
        &lt;p&gt;&#xD;
If you seriously still haven’t heard or used PowerShell yet, come to my Little Rock&#xD;
DNUG presentation on the topic on Monday, July 13. Or, if you’re busy Monday night&#xD;
because you’re going to hear &lt;a href="http://keithelder.net/blog/"&gt;Keith Elder&lt;/a&gt; speak&#xD;
on Velocity to the &lt;a href="http://fsdnug.org/"&gt;Fort Smith DNUG&lt;/a&gt;, then come Tuesday&#xD;
night to hear me give my PowerShell presentation to the Conway DNUG instead!&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
I’ve never given a talk two days in a row, so this will be a new experience for me.&#xD;
If you’re interested in the content, I’m trying to keep my presentation notes and&#xD;
related files up on &lt;a href="http://github.com/drmohundro/presentations/tree/master"&gt;one&#xD;
of my github projects&lt;/a&gt;. I’m finding that the whole distributed source control works&#xD;
well for me for accessing and working on my presentation from all different areas&#xD;
and computers.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
If you’re at the meeting, stop by and say hi!&#xD;
&lt;/p&gt;&#xD;
        &lt;img width="0" height="0" src="http://www.mohundro.com/blog/aggbug.ashx?id=52efd93d-5ac0-48ff-aea2-29dad51890ef"&gt;&lt;/img&gt;&#xD;
      &lt;/body&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/DavidMohundro?a=jJHtfJS2Lfw:8-DvTwQ6OrQ:G79ilh31hkQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DavidMohundro?d=G79ilh31hkQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/DavidMohundro?a=jJHtfJS2Lfw:8-DvTwQ6OrQ:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DavidMohundro?i=jJHtfJS2Lfw:8-DvTwQ6OrQ:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/DavidMohundro/~4/jJHtfJS2Lfw" height="1" width="1"/&gt;</description>
      <comments>http://www.mohundro.com/blog/CommentView,guid,52efd93d-5ac0-48ff-aea2-29dad51890ef.aspx</comments>
      <category>PowerShell</category>
      <category>Speaking</category>
    <feedburner:origLink>http://www.mohundro.com/blog/2009/07/12/HaventHeardAboutPowerShellYetAndYoullBeInTheLittleRockAreaThisWeekToo.aspx</feedburner:origLink></item>
    <item>
      <trackback:ping>http://www.mohundro.com/blog/Trackback.aspx?guid=6b15a888-ae1a-41b1-8559-5ac3f8e8fbab</trackback:ping>
      <pingback:server>http://www.mohundro.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.mohundro.com/blog/PermaLink,guid,6b15a888-ae1a-41b1-8559-5ac3f8e8fbab.aspx</pingback:target>
      <dc:creator>David Mohundro</dc:creator>
      <wfw:comment>http://www.mohundro.com/blog/CommentView,guid,6b15a888-ae1a-41b1-8559-5ac3f8e8fbab.aspx</wfw:comment>
      <wfw:commentRss>http://www.mohundro.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=6b15a888-ae1a-41b1-8559-5ac3f8e8fbab</wfw:commentRss>
      
      <title>Find-String.ps1 – ack for PowerShell</title>
      <guid isPermaLink="false">http://www.mohundro.com/blog/PermaLink,guid,6b15a888-ae1a-41b1-8559-5ac3f8e8fbab.aspx</guid>
      <link>http://feedproxy.google.com/~r/DavidMohundro/~3/7PYA0Lxxiho/FindStringps1AckForPowerShell.aspx</link>
      <pubDate>Fri, 12 Jun 2009 12:58:18 GMT</pubDate>
      <description>&lt;body xmlns="http://www.w3.org/1999/xhtml"&gt;&#xD;
        &lt;p&gt;&#xD;
Never heard of &lt;a href="http://betterthangrep.com/"&gt;ack&lt;/a&gt;? Well, by ack’s admission,&#xD;
it is “better than grep.” That’s up to you to decide, but it does make searching code&#xD;
easier than grep.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
As a means of illustration, here is a grep example of a recursive search for StringBuilder&#xD;
across multiple C# files that I used back in &lt;a href="http://www.mohundro.com/blog/2009/05/12/FindingStuffQuicklyOrSearchingThroughCodeEffectively.aspx"&gt;my&#xD;
post on “finding stuff quickly.”&lt;/a&gt;&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;img src="http://www.mohundro.com/blog/content/binary/WindowsLiveWriter/Findingstuffquicklyorsearchingthroughcod_BD54/image_thumb_5.png"&gt;&lt;/img&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
The output is pretty nice, but the addition of the find command to limit the searching&#xD;
to only C# files isn’t the easiest to type quickly.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
ack makes this a little… well, a lot easier.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;a href="http://www.mohundro.com/blog/content/binary/WindowsLiveWriter/FindString.ps1ackforPowerShell_7013/image_2.png"&gt;&#xD;
            &lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.mohundro.com/blog/content/binary/WindowsLiveWriter/FindString.ps1ackforPowerShell_7013/image_thumb.png" width="503" height="173"&gt;&lt;/img&gt;&#xD;
          &lt;/a&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Nice! Even EASIER to read than the grep matching. And it is easier to type.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Well, of course, I had to add this functionality to Find-String. (Guess what, it runs&#xD;
faster than grep and ack both! At least on Windows…)&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;a href="http://www.mohundro.com/blog/content/binary/WindowsLiveWriter/FindString.ps1ackforPowerShell_7013/image_4.png"&gt;&#xD;
            &lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.mohundro.com/blog/content/binary/WindowsLiveWriter/FindString.ps1ackforPowerShell_7013/image_thumb_1.png" width="594" height="277"&gt;&lt;/img&gt;&#xD;
          &lt;/a&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Now, this makes… the third post I’ve had on a Find-String PowerShell script I think.&#xD;
At some point, you’re going to get tired of this if you haven’t already. &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
“Is this guy seriously going to post every time he changes the way Find-String works?”&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
No, no, I guess I shouldn’t.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
But for my own benefit, I do want this in source control. And I’d like to make it&#xD;
easier to use and find this. I’ve been using a local SVN repository for my changes&#xD;
to my scripts, but they included all of my scripts. Well, I moved just the Find-String&#xD;
source over to GitHub yesterday. I even started from the initial version of Find-String&#xD;
and committed my change history over from SVN :-)&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;a href="http://www.mohundro.com/blog/content/binary/WindowsLiveWriter/FindString.ps1ackforPowerShell_7013/image_6.png"&gt;&#xD;
            &lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.mohundro.com/blog/content/binary/WindowsLiveWriter/FindString.ps1ackforPowerShell_7013/image_thumb_2.png" width="624" height="103"&gt;&lt;/img&gt;&#xD;
          &lt;/a&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
For up to date versions of Find-String, they’ll be out there. The URL is &lt;a title="http://github.com/drmohundro/Find-String/tree/master" href="http://github.com/drmohundro/Find-String/tree/master"&gt;http://github.com/drmohundro/Find-String/tree/master&lt;/a&gt;.&#xD;
If you don’t want to install &lt;a href="http://www.git-scm.com/"&gt;git&lt;/a&gt; to check the&#xD;
source out, there is a big download button on the project page. It will package up&#xD;
the current version of Find-String for you which you can then download and use to&#xD;
your heart’s content.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
If you improve upon the script, send me pull requests or a patch and I’d be happy&#xD;
to make it better.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
 &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;strong&gt;Warning, upcoming tangent regarding GitHub adding PowerShell syntax support…&lt;/strong&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
My other hope with posting this is that maybe GitHub will add the PowerShell syntax&#xD;
support to GitHub. If you view the source for Find-String on the GitHub website, you&#xD;
won’t see any syntax highlighting.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;a href="http://www.mohundro.com/blog/content/binary/WindowsLiveWriter/FindString.ps1ackforPowerShell_7013/image_8.png"&gt;&#xD;
            &lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.mohundro.com/blog/content/binary/WindowsLiveWriter/FindString.ps1ackforPowerShell_7013/image_thumb_3.png" width="369" height="250"&gt;&lt;/img&gt;&#xD;
          &lt;/a&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
But… they have syntax highlighting for &lt;em&gt;lots&lt;/em&gt; of other file types, as is evidenced&#xD;
by the gists I’ve already shared.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;a href="http://www.mohundro.com/blog/content/binary/WindowsLiveWriter/FindString.ps1ackforPowerShell_7013/image_10.png"&gt;&#xD;
            &lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.mohundro.com/blog/content/binary/WindowsLiveWriter/FindString.ps1ackforPowerShell_7013/image_thumb_4.png" width="430" height="295"&gt;&lt;/img&gt;&#xD;
          &lt;/a&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;a href="http://support.github.com/discussions/feature-requests/327-powershell-as-a-support-language#comment_134001"&gt;I&#xD;
already asked for this on the GitHub support site&lt;/a&gt;, but it was inexplicably closed&#xD;
with “no more actions from GitHub… are required” and that it is apparently “resolved.”&#xD;
Maybe I shouldn’t worry and the feature just hasn’t gone live yet. In which case,&#xD;
I’m just blabbing on and on for no reason and creating a long tangent to the rest&#xD;
of my post. If &lt;em&gt;not&lt;/em&gt;, well, maybe they’ll add support if I complain some more!&#xD;
&lt;/p&gt;&#xD;
        &lt;img width="0" height="0" src="http://www.mohundro.com/blog/aggbug.ashx?id=6b15a888-ae1a-41b1-8559-5ac3f8e8fbab"&gt;&lt;/img&gt;&#xD;
      &lt;/body&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/DavidMohundro?a=7PYA0Lxxiho:8DAwdnXmVF0:G79ilh31hkQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DavidMohundro?d=G79ilh31hkQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/DavidMohundro?a=7PYA0Lxxiho:8DAwdnXmVF0:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DavidMohundro?i=7PYA0Lxxiho:8DAwdnXmVF0:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/DavidMohundro/~4/7PYA0Lxxiho" height="1" width="1"/&gt;</description>
      <comments>http://www.mohundro.com/blog/CommentView,guid,6b15a888-ae1a-41b1-8559-5ac3f8e8fbab.aspx</comments>
      <category>PowerShell</category>
      <category>Programming</category>
      <category>Utilities</category>
    <feedburner:origLink>http://www.mohundro.com/blog/2009/06/12/FindStringps1AckForPowerShell.aspx</feedburner:origLink></item>
    <item>
      <trackback:ping>http://www.mohundro.com/blog/Trackback.aspx?guid=fa72ff57-5c08-49fa-979e-c732df2bf5f8</trackback:ping>
      <pingback:server>http://www.mohundro.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.mohundro.com/blog/PermaLink,guid,fa72ff57-5c08-49fa-979e-c732df2bf5f8.aspx</pingback:target>
      <dc:creator>David Mohundro</dc:creator>
      <wfw:comment>http://www.mohundro.com/blog/CommentView,guid,fa72ff57-5c08-49fa-979e-c732df2bf5f8.aspx</wfw:comment>
      <wfw:commentRss>http://www.mohundro.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=fa72ff57-5c08-49fa-979e-c732df2bf5f8</wfw:commentRss>
      
      <title>NHibernate Unit Testing… with Fluent NHibernate!</title>
      <guid isPermaLink="false">http://www.mohundro.com/blog/PermaLink,guid,fa72ff57-5c08-49fa-979e-c732df2bf5f8.aspx</guid>
      <link>http://feedproxy.google.com/~r/DavidMohundro/~3/vB_rrb7b1Yo/NHibernateUnitTestingWithFluentNHibernate.aspx</link>
      <pubDate>Tue, 19 May 2009 17:34:06 GMT</pubDate>
      <description>&lt;body xmlns="http://www.w3.org/1999/xhtml"&gt;&#xD;
        &lt;p&gt;&#xD;
I’ve been attempting to learn NHibernate lately. One of the big draws for me was the&#xD;
ability to write unit tests that did hit a database, but an in-memory one. Ayende&#xD;
recently posted on &lt;a href="http://ayende.com/Blog/archive/2009/04/28/nhibernate-unit-testing.aspx"&gt;how&#xD;
to use SQLite to get in-memory unit tests&lt;/a&gt;. His example assumed standard hbm mappings&#xD;
and configuration.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
I was curious how hard it would be port his example over to Fluent NHibernate. Not&#xD;
surprisingly, it was quite easy actually!&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Here’s the Blog entity I used, which is based on the usage I saw from Ayende’s post:&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;script src="http://gist.github.com/114239.js"&gt;&#xD;
          &lt;/script&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
And here is the mapping:&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;script src="http://gist.github.com/114241.js"&gt;&#xD;
          &lt;/script&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
As you can see, it is pretty straight forward so far. The next piece of code is the&#xD;
Fluent NHibernate implementation of Ayende’s InMemoryDatabaseTest.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;script src="http://gist.github.com/114242.js"&gt;&#xD;
          &lt;/script&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
There aren’t too many differences really. We’re using the same SchemaExport, but we&#xD;
do need to call ExposeConfiguration so that we can store off a reference to the Configuration&#xD;
to be used by the SchemaExport instance.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
The final piece, the actual test itself, is identical to Ayende’s example, except&#xD;
that I’m using MbUnit instead of xUnit:&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;script src="http://gist.github.com/114244.js"&gt;&#xD;
          &lt;/script&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Nice and easy! I like it!&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
As you can also tell, I’m experimenting with using &lt;a href="http://github.com/"&gt;github&lt;/a&gt;’s &lt;a href="http://gist.github.com/"&gt;gist&lt;/a&gt; feature.&#xD;
I’ve been using &lt;a href="http://github.com/"&gt;github&lt;/a&gt; to store off my dot files&#xD;
and other environment-related settings as well as my presentations, but the gist feature&#xD;
seems pretty nice.&#xD;
&lt;/p&gt;&#xD;
        &lt;img width="0" height="0" src="http://www.mohundro.com/blog/aggbug.ashx?id=fa72ff57-5c08-49fa-979e-c732df2bf5f8"&gt;&lt;/img&gt;&#xD;
      &lt;/body&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/DavidMohundro?a=vB_rrb7b1Yo:4Q_fD_uIRaQ:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DavidMohundro?i=vB_rrb7b1Yo:4Q_fD_uIRaQ:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/DavidMohundro/~4/vB_rrb7b1Yo" height="1" width="1"/&gt;</description>
      <comments>http://www.mohundro.com/blog/CommentView,guid,fa72ff57-5c08-49fa-979e-c732df2bf5f8.aspx</comments>
      <category>.NET</category>
      <category>Unit Testing</category>
    <feedburner:origLink>http://www.mohundro.com/blog/2009/05/19/NHibernateUnitTestingWithFluentNHibernate.aspx</feedburner:origLink></item>
    <item>
      <trackback:ping>http://www.mohundro.com/blog/Trackback.aspx?guid=83ba3e37-c3e9-402c-9a13-7cfcb306c007</trackback:ping>
      <pingback:server>http://www.mohundro.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.mohundro.com/blog/PermaLink,guid,83ba3e37-c3e9-402c-9a13-7cfcb306c007.aspx</pingback:target>
      <dc:creator>David Mohundro</dc:creator>
      <wfw:comment>http://www.mohundro.com/blog/CommentView,guid,83ba3e37-c3e9-402c-9a13-7cfcb306c007.aspx</wfw:comment>
      <wfw:commentRss>http://www.mohundro.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=83ba3e37-c3e9-402c-9a13-7cfcb306c007</wfw:commentRss>
      <slash:comments>3</slash:comments>
      
      <title>Finding stuff quickly (or searching through code effectively)</title>
      <guid isPermaLink="false">http://www.mohundro.com/blog/PermaLink,guid,83ba3e37-c3e9-402c-9a13-7cfcb306c007.aspx</guid>
      <link>http://feedproxy.google.com/~r/DavidMohundro/~3/SZL7CnO72aM/FindingStuffQuicklyOrSearchingThroughCodeEffectively.aspx</link>
      <pubDate>Tue, 12 May 2009 19:55:25 GMT</pubDate>
      <description>&lt;body xmlns="http://www.w3.org/1999/xhtml"&gt;&#xD;
        &lt;p&gt;&#xD;
I &lt;a href="http://www.mohundro.com/blog/2006/11/06/FindInFilesWithPowerShell.aspx"&gt;blogged&#xD;
a while back about finding in files with PowerShell&lt;/a&gt; and I wanted to share an update&#xD;
on that.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
The original post highlighted using a combination of Get-ChildItem and Select-String&#xD;
to quickly find things. It works fine, but the output isn’t the easiest to read, because&#xD;
the found text isn’t highlighted in any way.&#xD;
&lt;/p&gt;&#xD;
        &lt;pre class="brush: ps1;"&gt;Get-ChildItem –include *.cs –recurse | Select-String searchText&#xD;
&lt;/pre&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;a href="http://www.mohundro.com/blog/content/binary/WindowsLiveWriter/Findingstuffquicklyorsearchingthroughcod_BD54/image_8.png"&gt;&#xD;
            &lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.mohundro.com/blog/content/binary/WindowsLiveWriter/Findingstuffquicklyorsearchingthroughcod_BD54/image_thumb_3.png" width="678" height="127"&gt;&lt;/img&gt;&#xD;
          &lt;/a&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
I really like the color output that grep provides. Check out the results of grep on&#xD;
the same search.&#xD;
&lt;/p&gt;&#xD;
        &lt;pre class="brush: bash;"&gt;find –name *.cs | xargs grep StringBuilder&#xD;
&lt;/pre&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;a href="http://www.mohundro.com/blog/content/binary/WindowsLiveWriter/Findingstuffquicklyorsearchingthroughcod_BD54/image_10.png"&gt;&#xD;
            &lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.mohundro.com/blog/content/binary/WindowsLiveWriter/Findingstuffquicklyorsearchingthroughcod_BD54/image_thumb_4.png" width="665" height="85"&gt;&lt;/img&gt;&#xD;
          &lt;/a&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
That is &lt;em&gt;so much easier&lt;/em&gt; to read that it isn’t even funny. The match jumps&#xD;
out at you because of the color difference.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
I did some searching and found &lt;a href="http://weblogs.asp.net/whaggard/archive/2007/03/23/powershell-script-to-find-strings-and-highlight-them-in-the-output.aspx"&gt;Wes&#xD;
Haggard’s Find-String script&lt;/a&gt;. It had the additional benefit that it also displayed&#xD;
the line number, but it didn’t display the relative path.&#xD;
&lt;/p&gt;&#xD;
        &lt;pre class="brush: ps1;"&gt;find-string.ps1 StringBuilder *.cs -recurse&#xD;
&lt;/pre&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;a href="http://www.mohundro.com/blog/content/binary/WindowsLiveWriter/Findingstuffquicklyorsearchingthroughcod_BD54/image_6.png"&gt;&#xD;
            &lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.mohundro.com/blog/content/binary/WindowsLiveWriter/Findingstuffquicklyorsearchingthroughcod_BD54/image_thumb_2.png" width="663" height="82"&gt;&lt;/img&gt;&#xD;
          &lt;/a&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Wes’ script still served my purposes, though, so I used it for a long time until I&#xD;
learned about grep’s Context Line Control arguments. They would let grep print out&#xD;
additional lines before or after the display search result so that you could see the&#xD;
context of your search result. Like so:&#xD;
&lt;/p&gt;&#xD;
        &lt;pre class="brush: bash;"&gt;find –name *.cs | xargs grep StringBuilder –A 3&#xD;
&lt;/pre&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;a href="http://www.mohundro.com/blog/content/binary/WindowsLiveWriter/Findingstuffquicklyorsearchingthroughcod_BD54/image_12.png"&gt;&#xD;
            &lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.mohundro.com/blog/content/binary/WindowsLiveWriter/Findingstuffquicklyorsearchingthroughcod_BD54/image_thumb_5.png" width="700" height="159"&gt;&lt;/img&gt;&#xD;
          &lt;/a&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Unfortunately for me, PowerShell’s Select-String didn’t support context… at least&#xD;
until version 2.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
With the addition of the Context parameter, I could now build a nice grep replacement&#xD;
in PowerShell. I broke my version out into two separate scripts: one to actually format&#xD;
the MatchInfo object and one to do the finding. As you might imagine, the formatting&#xD;
script is a little more interesting. You can get Out-ColorMatchInfo at &lt;a title="http://poshcode.org/1095" href="http://poshcode.org/1095"&gt;http://poshcode.org/1095&lt;/a&gt; and&#xD;
you can get my version of Find-String at &lt;a title="http://poshcode.org/1096" href="http://poshcode.org/1096"&gt;http://poshcode.org/1096&lt;/a&gt;.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Here’s sample output:&#xD;
&lt;/p&gt;&#xD;
        &lt;pre class="brush: ps1;"&gt;find-string StringBuilder *.cs –context 0,3&#xD;
&lt;/pre&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;a href="http://www.mohundro.com/blog/content/binary/WindowsLiveWriter/Findingstuffquicklyorsearchingthroughcod_BD54/image_14.png"&gt;&#xD;
            &lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.mohundro.com/blog/content/binary/WindowsLiveWriter/Findingstuffquicklyorsearchingthroughcod_BD54/image_thumb_6.png" width="650" height="183"&gt;&lt;/img&gt;&#xD;
          &lt;/a&gt; &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
I went with only displaying the relative path to the file on one line and then displaying&#xD;
the results on the following lines. It makes reading context easier for me.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Let me know what you think.&#xD;
&lt;/p&gt;&#xD;
        &lt;img width="0" height="0" src="http://www.mohundro.com/blog/aggbug.ashx?id=83ba3e37-c3e9-402c-9a13-7cfcb306c007"&gt;&lt;/img&gt;&#xD;
      &lt;/body&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/DavidMohundro?a=SZL7CnO72aM:VHCO80XGmJY:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DavidMohundro?i=SZL7CnO72aM:VHCO80XGmJY:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/DavidMohundro/~4/SZL7CnO72aM" height="1" width="1"/&gt;</description>
      <comments>http://www.mohundro.com/blog/CommentView,guid,83ba3e37-c3e9-402c-9a13-7cfcb306c007.aspx</comments>
      <category>PowerShell</category>
      <category>Utilities</category>
    <feedburner:origLink>http://www.mohundro.com/blog/2009/05/12/FindingStuffQuicklyOrSearchingThroughCodeEffectively.aspx</feedburner:origLink></item>
    <item>
      <trackback:ping>http://www.mohundro.com/blog/Trackback.aspx?guid=2ff35723-b8aa-4d51-b050-6c1508a65a8b</trackback:ping>
      <pingback:server>http://www.mohundro.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.mohundro.com/blog/PermaLink,guid,2ff35723-b8aa-4d51-b050-6c1508a65a8b.aspx</pingback:target>
      <dc:creator>David Mohundro</dc:creator>
      <wfw:comment>http://www.mohundro.com/blog/CommentView,guid,2ff35723-b8aa-4d51-b050-6c1508a65a8b.aspx</wfw:comment>
      <wfw:commentRss>http://www.mohundro.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=2ff35723-b8aa-4d51-b050-6c1508a65a8b</wfw:commentRss>
      
      <title>NWA Code Camp 2009 is tomorrow</title>
      <guid isPermaLink="false">http://www.mohundro.com/blog/PermaLink,guid,2ff35723-b8aa-4d51-b050-6c1508a65a8b.aspx</guid>
      <link>http://feedproxy.google.com/~r/DavidMohundro/~3/tNbOhuoQF8M/NWACodeCamp2009IsTomorrow.aspx</link>
      <pubDate>Fri, 24 Apr 2009 12:28:37 GMT</pubDate>
      <description>&lt;body xmlns="http://www.w3.org/1999/xhtml"&gt;&#xD;
        &lt;p&gt;&#xD;
If you’ll be in the northwest Arkansas area tomorrow (April 25), be sure to come out&#xD;
for the &lt;a href="http://codecamp.nwadnug.org/"&gt;NWA Code Camp&lt;/a&gt;. There will be presentations&#xD;
on everything ranging from LINQ and Silverlight to iPhone development. I’ll be presenting&#xD;
my PowerShell talk one more time as well. If I can count at all, it looks like there&#xD;
will be 15 different speakers total.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
I’m looking forward to it!&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;a href="http://codecamp.nwadnug.org/"&gt;&#xD;
            &lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.mohundro.com/blog/content/binary/WindowsLiveWriter/NWACodeCamp2009istomorrow_691F/image_9.png" width="244" height="75"&gt;&lt;/img&gt;&#xD;
          &lt;/a&gt; &#xD;
&lt;/p&gt;&#xD;
        &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:a3e83366-c886-4d06-a6c6-6eaa8f87f3a4" class="wlWriterEditableSmartContent"&gt;Technorati&#xD;
Tags: &lt;a href="http://technorati.com/tags/CodeCamp" rel="tag"&gt;CodeCamp&lt;/a&gt;&lt;/div&gt;&#xD;
        &lt;img width="0" height="0" src="http://www.mohundro.com/blog/aggbug.ashx?id=2ff35723-b8aa-4d51-b050-6c1508a65a8b"&gt;&lt;/img&gt;&#xD;
      &lt;/body&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/DavidMohundro?a=tNbOhuoQF8M:Xn57YzKxIjM:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/DavidMohundro?i=tNbOhuoQF8M:Xn57YzKxIjM:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/DavidMohundro/~4/tNbOhuoQF8M" height="1" width="1"/&gt;</description>
      <comments>http://www.mohundro.com/blog/CommentView,guid,2ff35723-b8aa-4d51-b050-6c1508a65a8b.aspx</comments>
      <category>Conferences</category>
      <category>Speaking</category>
    <feedburner:origLink>http://www.mohundro.com/blog/2009/04/24/NWACodeCamp2009IsTomorrow.aspx</feedburner:origLink></item>
  </channel>
</rss>
