<?xml version="1.0" encoding="utf-8"?>
<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/" version="2.0">
  <channel>
    <title>VibrantCode - Random Stuff</title>
    <link>http://blog.andrewnurse.net/</link>
    <description>Oooh...pretty code</description>
    <language>en-us</language>
    <copyright>Andrew Nurse</copyright>
    <lastBuildDate>Fri, 30 Jan 2009 07:45:51 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 2.0.7226.0</generator>
    <managingEditor>andrew@andrewnurse.net</managingEditor>
    <webMaster>andrew@andrewnurse.net</webMaster>
    <item>
      <trackback:ping>http://blog.andrewnurse.net/Trackback.aspx?guid=c585caa9-c80a-48db-af4c-78ba85e07132</trackback:ping>
      <pingback:server>http://blog.andrewnurse.net/pingback.aspx</pingback:server>
      <pingback:target>http://blog.andrewnurse.net/PermaLink,guid,c585caa9-c80a-48db-af4c-78ba85e07132.aspx</pingback:target>
      <dc:creator>Andrew Nurse</dc:creator>
      <wfw:comment>http://blog.andrewnurse.net/CommentView,guid,c585caa9-c80a-48db-af4c-78ba85e07132.aspx</wfw:comment>
      <wfw:commentRss>http://blog.andrewnurse.net/SyndicationService.asmx/GetEntryCommentsRss?guid=c585caa9-c80a-48db-af4c-78ba85e07132</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
One of the most common checks I do is a simple null check on arguments being passed
in to the methods I write.  I usually create a static class called “Arg” with
the following methods (to help out):
</p>
        <pre class="csharp" name="code">public static class Arg {
    public static void NotNull(object value, string paramName) {
        if (value == null) {
            throw new ArgumentNullException(paramName);
        }
    }
    public static void NotNullOrEmpty(string value, string paramName) {
        if (String.IsNullOrEmpty(value)) {
            // ED: Error_StringArgumentNullOrEmpty is a key in my Visual Studio
            //  project's default string resources file (Properties/Resources.resx)
            throw new ArgumentException(
                String.Format(CultureInfo.CurrentCulture, 
                              Resources.Error_StringArgumentNullOrEmpty, 
                              paramName), 
                paramName);
        }
    }
}</pre>
        <p>
Then, I can use it like this
</p>
        <pre class="csharp" name="code">public void Foo(string arg, object reallyLongArgumentName) {
    Arg.NotNullOrEmpty(arg, "arg");
    Arg.NotNull(reallyLongArgumentName, "reallyLongArgumentName");
}</pre>
        <p>
I was recently playing with <a href="http://msdn.microsoft.com/en-us/library/bb397687.aspx" target="_blank">lambda
expressions</a> in C# and thought of a way to make this a little cooler.  The
result is, I can rewrite the lines above like this:
</p>
        <pre class="csharp" name="code">public void Foo(string arg, object reallyLongArgumentName) {
    Arg.NotNullOrEmpty(() =&gt; arg);
    Arg.NotNull(() =&gt; reallyLongArgumentName);
}</pre>
        <p>
The first obvious advantage is that for longer argument names, its more concise. 
The second, is that I no longer have to worry about updating the strings representing
the parameter names when I rename arguments, the Visual Studio Refactoring engine
will take care of it for me.
</p>
        <p>
Obviously, this is slower than the previous method since I’m diving into the lambda
expression at runtime, but its cool.  But if I need the performance, I have a
little Regular Expression I can run in Visual Studio to convert the lambda calls back
to the string versions (and vice-versa)
</p>
        <p>
How does it work? Well, the core of the code is a static helper in the <code>Arg</code> class
</p>
        <pre class="csharp" name="code">private static string GetParameterName&lt;T&gt;(Expression&lt;Func&lt;T&gt;&gt; paramExpr) {
    LambdaExpression lambda = paramExpr as LambdaExpression;
    Debug.Assert(lambda != null);
    MemberExpression paramRef = lambda.Body as MemberExpression;
    Debug.Assert(paramRef != null);

    // Get the parameter name
    string paramName = paramRef.Member.Name;
    return paramName;
}</pre>
        <p>
Lines 2-5 dive through the Expression tree to find the <code>MemberExpression</code> that
represents the parameter (i.e. "foo" in <code>() =&gt; foo</code>). Then, we pull
out the <code>MemberInfo</code> for the parameter and check the name. With that method,
the actual checker is easy:
</p>
        <pre class="csharp" name="code">public static void NotNull(Expression&lt;Func&lt;object&gt;&gt; paramExpr) {
    string paramName = GetParameterName(paramExpr);

    // Compile the lambda (to get the value)
    Func&lt;object&gt; compiledLambda = paramExpr.Compile();
    
    // Run the contract check
    NotNull(compiledLambda(), paramName);
}</pre>
        <p>
Line 2 extracts the parameter name. Line 5 compiles the lambda into an actual function
that will return the value of the parameter. Finally, Line 8 uses the value and the
parameter name to call my original <code>object/string</code> version. The code for <code>NotNullOrEmpty</code> is
nearly identical.
</p>
        <p>
Anyway, if you're concerned about performance, stick to the overloads which take the
parameter name directly. I’ve attached the code as a TXT file, just rename to C#,
change the namespace as appropriate and enjoy
</p>
        <a href="http://blog.andrewnurse.net/content/binary/Arg.txt">Arg.txt (3.93 KB)</a>
        <img width="0" height="0" src="http://blog.andrewnurse.net/aggbug.ashx?id=c585caa9-c80a-48db-af4c-78ba85e07132" />
      </body>
      <title>Wild Ideas &amp;ndash; Using lambdas to check arguments in C#</title>
      <guid isPermaLink="false">http://blog.andrewnurse.net/PermaLink,guid,c585caa9-c80a-48db-af4c-78ba85e07132.aspx</guid>
      <link>http://blog.andrewnurse.net/2009/01/30/WildIdeasNdashUsingLambdasToCheckArgumentsInC.aspx</link>
      <pubDate>Fri, 30 Jan 2009 07:45:51 GMT</pubDate>
      <description>&lt;p&gt;
One of the most common checks I do is a simple null check on arguments being passed
in to the methods I write.&amp;nbsp; I usually create a static class called “Arg” with
the following methods (to help out):
&lt;/p&gt;
&lt;pre class="csharp" name="code"&gt;public static class Arg {
    public static void NotNull(object value, string paramName) {
        if (value == null) {
            throw new ArgumentNullException(paramName);
        }
    }
    public static void NotNullOrEmpty(string value, string paramName) {
        if (String.IsNullOrEmpty(value)) {
            // ED: Error_StringArgumentNullOrEmpty is a key in my Visual Studio
            //  project's default string resources file (Properties/Resources.resx)
            throw new ArgumentException(
                String.Format(CultureInfo.CurrentCulture, 
                              Resources.Error_StringArgumentNullOrEmpty, 
                              paramName), 
                paramName);
        }
    }
}&lt;/pre&gt;
&lt;p&gt;
Then, I can use it like this
&lt;/p&gt;
&lt;pre class="csharp" name="code"&gt;public void Foo(string arg, object reallyLongArgumentName) {
    Arg.NotNullOrEmpty(arg, "arg");
    Arg.NotNull(reallyLongArgumentName, "reallyLongArgumentName");
}&lt;/pre&gt;
&lt;p&gt;
I was recently playing with &lt;a href="http://msdn.microsoft.com/en-us/library/bb397687.aspx" target="_blank"&gt;lambda
expressions&lt;/a&gt; in C# and thought of a way to make this a little cooler.&amp;nbsp; The
result is, I can rewrite the lines above like this:
&lt;/p&gt;
&lt;pre class="csharp" name="code"&gt;public void Foo(string arg, object reallyLongArgumentName) {
    Arg.NotNullOrEmpty(() =&amp;gt; arg);
    Arg.NotNull(() =&amp;gt; reallyLongArgumentName);
}&lt;/pre&gt;
&lt;p&gt;
The first obvious advantage is that for longer argument names, its more concise.&amp;nbsp;
The second, is that I no longer have to worry about updating the strings representing
the parameter names when I rename arguments, the Visual Studio Refactoring engine
will take care of it for me.
&lt;/p&gt;
&lt;p&gt;
Obviously, this is slower than the previous method since I’m diving into the lambda
expression at runtime, but its cool.&amp;nbsp; But if I need the performance, I have a
little Regular Expression I can run in Visual Studio to convert the lambda calls back
to the string versions (and vice-versa)
&lt;/p&gt;
&lt;p&gt;
How does it work? Well, the core of the code is a static helper in the &lt;code&gt;Arg&lt;/code&gt; class
&lt;/p&gt;
&lt;pre class="csharp" name="code"&gt;private static string GetParameterName&amp;lt;T&amp;gt;(Expression&amp;lt;Func&amp;lt;T&amp;gt;&amp;gt; paramExpr) {
    LambdaExpression lambda = paramExpr as LambdaExpression;
    Debug.Assert(lambda != null);
    MemberExpression paramRef = lambda.Body as MemberExpression;
    Debug.Assert(paramRef != null);

    // Get the parameter name
    string paramName = paramRef.Member.Name;
    return paramName;
}&lt;/pre&gt;
&lt;p&gt;
Lines 2-5 dive through the Expression tree to find the &lt;code&gt;MemberExpression&lt;/code&gt; that
represents the parameter (i.e. "foo" in &lt;code&gt;() =&amp;gt; foo&lt;/code&gt;). Then, we pull
out the &lt;code&gt;MemberInfo&lt;/code&gt; for the parameter and check the name. With that method,
the actual checker is easy:
&lt;/p&gt;
&lt;pre class="csharp" name="code"&gt;public static void NotNull(Expression&amp;lt;Func&amp;lt;object&amp;gt;&amp;gt; paramExpr) {
    string paramName = GetParameterName(paramExpr);

    // Compile the lambda (to get the value)
    Func&amp;lt;object&amp;gt; compiledLambda = paramExpr.Compile();
    
    // Run the contract check
    NotNull(compiledLambda(), paramName);
}&lt;/pre&gt;
&lt;p&gt;
Line 2 extracts the parameter name. Line 5 compiles the lambda into an actual function
that will return the value of the parameter. Finally, Line 8 uses the value and the
parameter name to call my original &lt;code&gt;object/string&lt;/code&gt; version. The code for &lt;code&gt;NotNullOrEmpty&lt;/code&gt; is
nearly identical.
&lt;/p&gt;
&lt;p&gt;
Anyway, if you're concerned about performance, stick to the overloads which take the
parameter name directly. I’ve attached the code as a TXT file, just rename to C#,
change the namespace as appropriate and enjoy
&lt;/p&gt;
&lt;a href="http://blog.andrewnurse.net/content/binary/Arg.txt"&gt;Arg.txt (3.93 KB)&lt;/a&gt;&lt;img width="0" height="0" src="http://blog.andrewnurse.net/aggbug.ashx?id=c585caa9-c80a-48db-af4c-78ba85e07132" /&gt;</description>
      <comments>http://blog.andrewnurse.net/CommentView,guid,c585caa9-c80a-48db-af4c-78ba85e07132.aspx</comments>
      <category>CMPT 376</category>
      <category>Random Stuff</category>
      <category>Tips</category>
      <category>Wild Ideas</category>
    </item>
    <item>
      <trackback:ping>http://blog.andrewnurse.net/Trackback.aspx?guid=f0019e7a-c93a-4a79-8a52-40176d999396</trackback:ping>
      <pingback:server>http://blog.andrewnurse.net/pingback.aspx</pingback:server>
      <pingback:target>http://blog.andrewnurse.net/PermaLink,guid,f0019e7a-c93a-4a79-8a52-40176d999396.aspx</pingback:target>
      <dc:creator>Andrew Nurse</dc:creator>
      <wfw:comment>http://blog.andrewnurse.net/CommentView,guid,f0019e7a-c93a-4a79-8a52-40176d999396.aspx</wfw:comment>
      <wfw:commentRss>http://blog.andrewnurse.net/SyndicationService.asmx/GetEntryCommentsRss?guid=f0019e7a-c93a-4a79-8a52-40176d999396</wfw:commentRss>
      <slash:comments>3</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Thanks to Alex Tuteur for typing up the lyrics from our scribbles on paper, to Kyle
Farnung for filiming, converting and posting the video, to Kristine Johnson for singing
the epic win-ness, and to all the people who helped write the song!<br /></p>
        <object width="425" height="344">
          <param name="movie" value="http://www.youtube.com/v/7xoxE399IFE&amp;hl=en&amp;fs=1" />
          <param name="allowFullScreen" value="true" />
          <embed src="http://www.youtube.com/v/7xoxE399IFE&amp;hl=en&amp;fs=1" type="application/x-shockwave-flash" allowfullscreen="true" width="425" height="344">
          </embed>
        </object>
        <p>
STILL AROUND<br />
By Andrew Nurse, Kristine Johnson, Alex Tuteur, Ben Butler, Kyle Farnung, Steven Truong
(EXP), Adam Kiu, and William Hong
</p>
Internz: a triumph<br />
I’m sending a lolcat: EPIC FAIL<br />
It’s hard to understate procrastination<br />
MICROSOFT INTERNS<br />
We do nothing but read mail all day<br />
For the good of all of us<br />
Except for the FTEs<br />
But there’s no sense crying over broken compiles<br />
You just keep on building, it’ll work in awhile<br />
And the coding gets done<br />
And you make a bad pun<br />
For the interns who are 
<br />
STILL AROUND<br /><br />
I’m not really working<br />
I’m reading Internz all day long<br />
Even though I didn’t meet commitments<br />
And now it’s review time<br />
And it is my future on the line<br />
As I leave it sucks because<br />
I was so happy right here<br />
Now it’s time to leave and I am packing my bag<br />
To go back to my school and deal with the jet lag<br />
So I’m GLaD that I’ve turned<br />
Think of all the cash we’ve earned 
<br />
As the interns who are<br />
STILL AROUND<br /><br />
I’m going to leave now<br />
I guess you prefer to stay right here<br />
Maybe I’ll find someone else to work for<br />
Maybe at Google<br />
THAT WAS A JOKE, HAHA, FAT CHANCE<br />
Anyway this lolcat’s great<br />
It’s so amusing and fun<br />
Look at me still coding when there’s packing to do<br />
When I look out there it makes me GLaD I’m not you<br />
I’ve got all my boxes done<br />
Now it’s time for me to run<br />
Bye bye interns who are<br />
STILL AROUND<br /><br />
I can’t believe you are all 
<br />
STILL AROUND<br />
I’m done with coding and you’re 
<br />
STILL AROUND<br />
I’m leaving now and you are 
<br />
STILL AROUND<br />
While I’m at school you’ll be 
<br />
STILL AROUND<br />
And when I’m back here you’ll be 
<br />
STILL AROUND<br />
STILL AROUND<br />
STILL AROUND<br /><img width="0" height="0" src="http://blog.andrewnurse.net/aggbug.ashx?id=f0019e7a-c93a-4a79-8a52-40176d999396" /></body>
      <title>Awesomeness, in a box.</title>
      <guid isPermaLink="false">http://blog.andrewnurse.net/PermaLink,guid,f0019e7a-c93a-4a79-8a52-40176d999396.aspx</guid>
      <link>http://blog.andrewnurse.net/2008/08/19/AwesomenessInABox.aspx</link>
      <pubDate>Tue, 19 Aug 2008 17:30:23 GMT</pubDate>
      <description>&lt;p&gt;
Thanks to Alex Tuteur for typing up the lyrics from our scribbles on paper, to Kyle
Farnung for filiming, converting and posting the video, to Kristine Johnson for singing
the epic win-ness, and to all the people who helped write the song!&lt;br&gt;
&lt;/p&gt;
&lt;object width="425" height="344"&gt;
&lt;param name="movie" value="http://www.youtube.com/v/7xoxE399IFE&amp;amp;hl=en&amp;amp;fs=1"&gt;
&lt;param name="allowFullScreen" value="true"&gt;&lt;embed src="http://www.youtube.com/v/7xoxE399IFE&amp;amp;hl=en&amp;amp;fs=1" type="application/x-shockwave-flash" allowfullscreen="true" width="425" height="344"&gt;
&lt;/object&gt;
&lt;p&gt;
STILL AROUND&lt;br&gt;
By Andrew Nurse, Kristine Johnson, Alex Tuteur, Ben Butler, Kyle Farnung, Steven Truong
(EXP), Adam Kiu, and William Hong
&lt;/p&gt;
Internz: a triumph&lt;br&gt;
I’m sending a lolcat: EPIC FAIL&lt;br&gt;
It’s hard to understate procrastination&lt;br&gt;
MICROSOFT INTERNS&lt;br&gt;
We do nothing but read mail all day&lt;br&gt;
For the good of all of us&lt;br&gt;
Except for the FTEs&lt;br&gt;
But there’s no sense crying over broken compiles&lt;br&gt;
You just keep on building, it’ll work in awhile&lt;br&gt;
And the coding gets done&lt;br&gt;
And you make a bad pun&lt;br&gt;
For the interns who are 
&lt;br&gt;
STILL AROUND&lt;br&gt;
&lt;br&gt;
I’m not really working&lt;br&gt;
I’m reading Internz all day long&lt;br&gt;
Even though I didn’t meet commitments&lt;br&gt;
And now it’s review time&lt;br&gt;
And it is my future on the line&lt;br&gt;
As I leave it sucks because&lt;br&gt;
I was so happy right here&lt;br&gt;
Now it’s time to leave and I am packing my bag&lt;br&gt;
To go back to my school and deal with the jet lag&lt;br&gt;
So I’m GLaD that I’ve turned&lt;br&gt;
Think of all the cash we’ve earned 
&lt;br&gt;
As the interns who are&lt;br&gt;
STILL AROUND&lt;br&gt;
&lt;br&gt;
I’m going to leave now&lt;br&gt;
I guess you prefer to stay right here&lt;br&gt;
Maybe I’ll find someone else to work for&lt;br&gt;
Maybe at Google&lt;br&gt;
THAT WAS A JOKE, HAHA, FAT CHANCE&lt;br&gt;
Anyway this lolcat’s great&lt;br&gt;
It’s so amusing and fun&lt;br&gt;
Look at me still coding when there’s packing to do&lt;br&gt;
When I look out there it makes me GLaD I’m not you&lt;br&gt;
I’ve got all my boxes done&lt;br&gt;
Now it’s time for me to run&lt;br&gt;
Bye bye interns who are&lt;br&gt;
STILL AROUND&lt;br&gt;
&lt;br&gt;
I can’t believe you are all 
&lt;br&gt;
STILL AROUND&lt;br&gt;
I’m done with coding and you’re 
&lt;br&gt;
STILL AROUND&lt;br&gt;
I’m leaving now and you are 
&lt;br&gt;
STILL AROUND&lt;br&gt;
While I’m at school you’ll be 
&lt;br&gt;
STILL AROUND&lt;br&gt;
And when I’m back here you’ll be 
&lt;br&gt;
STILL AROUND&lt;br&gt;
STILL AROUND&lt;br&gt;
STILL AROUND&lt;br&gt;
&lt;img width="0" height="0" src="http://blog.andrewnurse.net/aggbug.ashx?id=f0019e7a-c93a-4a79-8a52-40176d999396" /&gt;</description>
      <comments>http://blog.andrewnurse.net/CommentView,guid,f0019e7a-c93a-4a79-8a52-40176d999396.aspx</comments>
      <category>Microsoft Internship</category>
      <category>Random Stuff</category>
    </item>
    <item>
      <trackback:ping>http://blog.andrewnurse.net/Trackback.aspx?guid=538b858e-525e-4a21-9997-c5fc45d72007</trackback:ping>
      <pingback:server>http://blog.andrewnurse.net/pingback.aspx</pingback:server>
      <pingback:target>http://blog.andrewnurse.net/PermaLink,guid,538b858e-525e-4a21-9997-c5fc45d72007.aspx</pingback:target>
      <dc:creator>Andrew Nurse</dc:creator>
      <wfw:comment>http://blog.andrewnurse.net/CommentView,guid,538b858e-525e-4a21-9997-c5fc45d72007.aspx</wfw:comment>
      <wfw:commentRss>http://blog.andrewnurse.net/SyndicationService.asmx/GetEntryCommentsRss?guid=538b858e-525e-4a21-9997-c5fc45d72007</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Just writing a test post from Windows Live Writer. Look for a future, more detailed
post about it!
</p>
        <p>
        </p>
        <p>
        </p>
        <div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:98cda58e-fadb-4b8c-a9aa-31e395767057" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px">Technorati
Tags: <a href="http://technorati.com/tags/Windows%20Live%20Writer" rel="tag">Windows
Live Writer</a></div>
        <p>
        </p>
        <p>
Here's a map!
</p>
        <p>
        </p>
        <div class="wlWriterSmartContent" id="scid:84E294D0-71C9-4bd0-A0FE-95764E0368D9:0fda3bb5-6e57-49a7-b94a-bdc3a10a86b6" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px">
          <a href="http://maps.live.com/default.aspx?v=2&amp;cp=44.59047~-26.71875&amp;lvl=1&amp;style=r&amp;mkt=en-US&amp;FORM=LLWR" id="map-82044d76-d63c-4c16-a911-52f1671db2ef" alt="Click to view this map on Live.com" title="Click to view this map on Live.com">
            <img src="http://blog.andrewnurse.net/content/binary/WindowsLiveWriter/TestPostfromWindowsLiveWriter_14D5C/map-350854983f6b.jpg" width="320" height="240" alt="Map image" />
          </a>
        </div>
        <p>
        </p>
        <p>
ooo...fancy...
</p>
        <img width="0" height="0" src="http://blog.andrewnurse.net/aggbug.ashx?id=538b858e-525e-4a21-9997-c5fc45d72007" />
      </body>
      <title>Test Post from Windows Live Writer</title>
      <guid isPermaLink="false">http://blog.andrewnurse.net/PermaLink,guid,538b858e-525e-4a21-9997-c5fc45d72007.aspx</guid>
      <link>http://blog.andrewnurse.net/2007/11/20/TestPostFromWindowsLiveWriter.aspx</link>
      <pubDate>Tue, 20 Nov 2007 14:41:33 GMT</pubDate>
      <description>&lt;p&gt;
Just writing a test post from Windows Live Writer. Look for a future, more detailed
post about it!
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:98cda58e-fadb-4b8c-a9aa-31e395767057" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;Technorati
Tags: &lt;a href="http://technorati.com/tags/Windows%20Live%20Writer" rel="tag"&gt;Windows
Live Writer&lt;/a&gt;
&lt;/div&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
Here's a map!
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;div class="wlWriterSmartContent" id="scid:84E294D0-71C9-4bd0-A0FE-95764E0368D9:0fda3bb5-6e57-49a7-b94a-bdc3a10a86b6" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;&lt;a href="http://maps.live.com/default.aspx?v=2&amp;amp;cp=44.59047~-26.71875&amp;amp;lvl=1&amp;amp;style=r&amp;amp;mkt=en-US&amp;amp;FORM=LLWR" id="map-82044d76-d63c-4c16-a911-52f1671db2ef" alt="Click to view this map on Live.com" title="Click to view this map on Live.com"&gt;&lt;img src="http://blog.andrewnurse.net/content/binary/WindowsLiveWriter/TestPostfromWindowsLiveWriter_14D5C/map-350854983f6b.jpg" width="320" height="240" alt="Map image"&gt;&lt;/a&gt;
&lt;/div&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
ooo...fancy...
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.andrewnurse.net/aggbug.ashx?id=538b858e-525e-4a21-9997-c5fc45d72007" /&gt;</description>
      <comments>http://blog.andrewnurse.net/CommentView,guid,538b858e-525e-4a21-9997-c5fc45d72007.aspx</comments>
      <category>Cool Software</category>
      <category>Random Stuff</category>
    </item>
  </channel>
</rss>