<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet type='text/xsl' href='http://claudiolassala.spaces.live.com/mmm2008-07-24_12.50/rsspretty.aspx?rssquery=en-US;http%3a%2f%2fclaudiolassala.spaces.live.com%2fblog%2ffeed.rss' version='1.0'?><rss version="2.0" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:msn="http://schemas.microsoft.com/msn/spaces/2005/rss" xmlns:live="http://schemas.microsoft.com/live/spaces/2006/rss" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:cf="http://www.microsoft.com/schemas/rss/core/2005" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Claudio Lassala in Software Development: Blog</title><description /><link>http://claudiolassala.spaces.live.com/blog</link><language>en-US</language><pubDate>Tue, 26 Aug 2008 17:21:46 GMT</pubDate><lastBuildDate>Tue, 26 Aug 2008 17:21:46 GMT</lastBuildDate><generator>Microsoft Spaces v1.1</generator><docs>http://www.rssboard.org/rss-specification</docs><ttl>60</ttl><cf:parentRSS>http://claudiolassala.spaces.live.com/feed.rss</cf:parentRSS><live:type>blog</live:type><live:identity><live:id>-2115370061417702190</live:id><live:alias>claudiolassala</live:alias></live:identity><image><title>Claudio Lassala in Software Development: Blog</title><url>http://blufiles.storage.live.com/y1pu8g3Szkr330LC-wJv-jL2oj1nrFXNNu2H1hVcabkItg2T1VBa3O8dIYThb4RDuDr</url><link>http://claudiolassala.spaces.live.com/blog</link></image><cf:listinfo><cf:group ns="http://schemas.microsoft.com/live/spaces/2006/rss" element="typelabel" label="Type" /><cf:group ns="http://schemas.microsoft.com/live/spaces/2006/rss" element="tag" label="Tag" /><cf:group element="category" label="Category" /><cf:sort element="pubDate" label="Date" data-type="date" default="true" /><cf:sort element="title" label="Title" data-type="string" /><cf:sort ns="http://purl.org/rss/1.0/modules/slash/" element="comments" label="Comments" data-type="number" /></cf:listinfo><item><title>Up for a geek dinner in Houston?</title><link>http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!871.entry</link><description>&lt;p&gt;In case you haven't heard of it, check out information about Houston &lt;a href="http://www.mkoby.com/2008/08/26/houston-altnet-geek-dinner-3/" target="_blank"&gt;Alt.NET Geek Dinner #3&lt;/a&gt;. Topics we're likely to be babbling about are: &lt;ul&gt; &lt;li&gt;Code Clarity / Fluent Interfaces / Code without comments &lt;li&gt;Model View Presenter pattern &lt;li&gt;Continuous Integration&lt;/ul&gt; &lt;p&gt;If you feel like eating pizza and talking with other geeks, make sure to join us there.&lt;img src="http://c.services.spaces.live.com/CollectionWebService/c.gif?cid=-2115370061417702190&amp;page=RSS%3a+Up+for+a+geek+dinner+in+Houston%3f&amp;referrer=" width="1px" height="1px" border="0" alt=""&gt;&lt;img style="position:absolute" alt="" width="0px" height="0px" src="http://c.live.com/c.gif?NC=31263&amp;amp;NA=1149&amp;amp;PI=73329&amp;amp;RF=&amp;amp;DI=3919&amp;amp;PS=85545&amp;amp;TP=claudiolassala.spaces.live.com&amp;amp;GT1=claudiolassala"&gt;</description><category>None</category><comments>http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!871.entry#comment</comments><guid isPermaLink="true">http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!871.entry</guid><pubDate>Tue, 26 Aug 2008 17:21:46 GMT</pubDate><slash:comments>0</slash:comments><msn:type>blogentry</msn:type><live:type>blogentry</live:type><live:typelabel>Blog entry</live:typelabel><wfw:commentRss>http://claudiolassala.spaces.live.com/blog/cns!E2A4B22308B39CD2!871/comments/feed.rss</wfw:commentRss><wfw:comment>http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!871.entry#comment</wfw:comment><dcterms:modified>2008-08-26T17:21:46Z</dcterms:modified></item><item><title>C# In Depth - Great book</title><link>http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!862.entry</link><description>&lt;p&gt;Back from my visit to Brazil, and ready to start blogging again.  :) &lt;p&gt;During this last trip I've read the following book: &lt;p&gt; &lt;table border=0&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td valign=top&gt;&lt;img src="http://ecx.images-amazon.com/images/I/41oFdTsrz9L._SL75_.jpg" border=1&gt; &lt;td valign=top&gt;&lt;b&gt;C# in Depth: What you need to master C# 2 and 3&lt;/b&gt;&lt;br&gt;by Jon Skeet&lt;br&gt;&lt;br&gt;&lt;a href="http://www.amazon.com/C-Depth-What-need-master/dp/1933988363%3FSubscriptionId%3D0525E2PQ81DD7ZTWTK82%26tag%3Dws%26linkCode%3Dsp1%26camp%3D2025%26creative%3D165953%26creativeASIN%3D1933988363"&gt;Read more about this title...&lt;/a&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p&gt;I decided to read it because of &lt;a href="http://blog.jpboodhoo.com/BookReviewCInDepth.aspx" target="_blank"&gt;JP's review&lt;/a&gt;. After reading a few pages, I knew I had to read the book cover to cover, and that's what I did. The book covers briefly some key aspects of C#, important things introduced in v2.0 (such as Generics, anonymous delegates, etc.), and then the new features in v. 3.0.  &lt;p&gt;For me, the book was a great refresher for things I already knew, as well as it gave me a lot of insight on things I certainly didn't know (such as a more thorough understanding of expression trees, lambda expressions, etc.). I'll definitely have to go back to a few chapters in order to fully grasp some of the things presented there. &lt;p&gt;I believe this is a must-read book for any C# developer.&lt;img src="http://c.services.spaces.live.com/CollectionWebService/c.gif?cid=-2115370061417702190&amp;page=RSS%3a+C%23+In+Depth+-+Great+book&amp;referrer=" width="1px" height="1px" border="0" alt=""&gt;&lt;img style="position:absolute" alt="" width="0px" height="0px" src="http://c.live.com/c.gif?NC=31263&amp;amp;NA=1149&amp;amp;PI=73329&amp;amp;RF=&amp;amp;DI=3919&amp;amp;PS=85545&amp;amp;TP=claudiolassala.spaces.live.com&amp;amp;GT1=claudiolassala"&gt;</description><comments>http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!862.entry#comment</comments><guid isPermaLink="true">http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!862.entry</guid><pubDate>Tue, 05 Aug 2008 19:17:30 GMT</pubDate><slash:comments>0</slash:comments><msn:type>blogentry</msn:type><live:type>blogentry</live:type><live:typelabel>Blog entry</live:typelabel><wfw:commentRss>http://claudiolassala.spaces.live.com/blog/cns!E2A4B22308B39CD2!862/comments/feed.rss</wfw:commentRss><wfw:comment>http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!862.entry#comment</wfw:comment><dcterms:modified>2008-08-05T19:17:30Z</dcterms:modified></item><item><title>Speaking at the HDNUG in August</title><link>http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!841.entry</link><description>&lt;p&gt;I'll be speaking at the &lt;a href="http://www.hdnug.org/" target="_blank"&gt;Houston .NET User Group&lt;/a&gt; on August 14. This is the abstract: &lt;p&gt;&lt;b&gt;Refactoring, Patterns, new language features, code quality, and more!&lt;/b&gt; &lt;p&gt;&lt;em&gt;Command design pattern, Lambda Expressions, Extension Methods, fluent interfaces, refactoring, test-driven development, writing elegant code, and more. This session will cover a little bit of many things learned from projects I’ve been working on. We expect every attendee to learn a few tricks that can be applied immediately, and also to feel encouraged to go out and research more on whatever area appeals the most. Besides learning those things, we really hope attendees will start thinking and approaching their code in a different way.&lt;/em&gt; &lt;p&gt;I like this talk a lot, and got some pretty good feedback from people who have seen it before, so I'm certainly looking forward to it. See you there! &lt;p&gt;P.S.: Now back to my &amp;quot;&lt;em&gt;vacation&lt;/em&gt;&amp;quot; in Brazil.  :)&lt;img src="http://c.services.spaces.live.com/CollectionWebService/c.gif?cid=-2115370061417702190&amp;page=RSS%3a+Speaking+at+the+HDNUG+in+August&amp;referrer=" width="1px" height="1px" border="0" alt=""&gt;&lt;img style="position:absolute" alt="" width="0px" height="0px" src="http://c.live.com/c.gif?NC=31263&amp;amp;NA=1149&amp;amp;PI=73329&amp;amp;RF=&amp;amp;DI=3919&amp;amp;PS=85545&amp;amp;TP=claudiolassala.spaces.live.com&amp;amp;GT1=claudiolassala"&gt;</description><comments>http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!841.entry#comment</comments><guid isPermaLink="true">http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!841.entry</guid><pubDate>Thu, 17 Jul 2008 13:34:26 GMT</pubDate><slash:comments>0</slash:comments><msn:type>blogentry</msn:type><live:type>blogentry</live:type><live:typelabel>Blog entry</live:typelabel><wfw:commentRss>http://claudiolassala.spaces.live.com/blog/cns!E2A4B22308B39CD2!841/comments/feed.rss</wfw:commentRss><wfw:comment>http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!841.entry#comment</wfw:comment><dcterms:modified>2008-07-17T13:34:26Z</dcterms:modified></item><item><title>Material from last night's presentation at the C# SIG</title><link>http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!818.entry</link><description>&lt;p&gt;I think the presentation last night went pretty well, and I get some great feedback from the attendees, so that's always good.  :) &lt;p&gt;We’ve covered a LOT of ground: &lt;p&gt;Refactoring, separation of concerns, test-driven development, Command design pattern, Action delegate, multi-threading, lambda expressions, fluent interfaces, object mappers, extension methods… Of couse, everything in small doses, just trying to raise awareness about those things. &lt;p&gt;It all started with a simple WinForm app, going through the cycle of adding code to Click events on buttons, and then refactoring things out of the UI, extending it to support keyboard binding, designing a &lt;a href="http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!503.entry" target="_blank"&gt;shortcut controller&lt;/a&gt; in a test-first style, doing more refactoring and using the Action delegate and refactoring the code to the Command pattern, then improving things a bit so to support asynchronous commands… then I’ve quickly covered &lt;a href="http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!731.entry" target="_blank"&gt;object mappers and lambda expressions&lt;/a&gt;, and finally how to &lt;a href="http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!710.entry" target="_blank"&gt;improve test code using extension methods and fluent interfaces&lt;/a&gt;. &lt;p&gt;The source code can be downloaded &lt;a href="www.lassala.net/files/events/claudiolassala-houstonhalpc-csharp-jun2008.zip" target="_blank"&gt;here&lt;/a&gt;. &lt;p&gt;Some people asked me how they can learn more about this stuff, and where to go find resources about it. Here are a few links to some of my previous blog entries that may help: &lt;p&gt;&lt;a href="http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!460.entry" target="_blank"&gt;Good Resources on Test-Driven Development (TDD)&lt;/a&gt; &lt;p&gt;&lt;a href="http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!666.entry" target="_blank"&gt;Learning in spiral&lt;/a&gt; &lt;p&gt;&lt;a href="http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!691.entry" target="_blank"&gt;The whole testing thing...&lt;/a&gt; &lt;p&gt;&lt;a href="http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!124.entry" target="_blank"&gt;Test-Driven.NET: a great little tool&lt;/a&gt;&lt;img src="http://c.services.spaces.live.com/CollectionWebService/c.gif?cid=-2115370061417702190&amp;page=RSS%3a+Material+from+last+night's+presentation+at+the+C%23+SIG&amp;referrer=" width="1px" height="1px" border="0" alt=""&gt;&lt;img style="position:absolute" alt="" width="0px" height="0px" src="http://c.live.com/c.gif?NC=31263&amp;amp;NA=1149&amp;amp;PI=73329&amp;amp;RF=&amp;amp;DI=3919&amp;amp;PS=85545&amp;amp;TP=claudiolassala.spaces.live.com&amp;amp;GT1=claudiolassala"&gt;</description><comments>http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!818.entry#comment</comments><guid isPermaLink="true">http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!818.entry</guid><pubDate>Wed, 18 Jun 2008 18:52:10 GMT</pubDate><slash:comments>0</slash:comments><msn:type>blogentry</msn:type><live:type>blogentry</live:type><live:typelabel>Blog entry</live:typelabel><wfw:commentRss>http://claudiolassala.spaces.live.com/blog/cns!E2A4B22308B39CD2!818/comments/feed.rss</wfw:commentRss><wfw:comment>http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!818.entry#comment</wfw:comment><dcterms:modified>2008-06-18T18:52:10Z</dcterms:modified></item><item><title>Speaking at the Hal-PC C# SIG next week</title><link>http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!812.entry</link><description>&lt;p&gt;Next week I'll be speaking at the &lt;a href="http://www.hal-pc.org/CsharpSIG/" target="_blank"&gt;Hal-PC C# SIG&lt;/a&gt; in Houston. This is something that came up last minute. &lt;a href="http://www.markusegger.com/" target="_blank"&gt;Markus&lt;/a&gt; was booked to present there but won't be able to, so I was asked to fill in for him. &lt;p&gt;The session is going to be a &amp;quot;C# Tips and Tricks&amp;quot;, where I'll be covering a bunch of things. The abstract is: &lt;p&gt;&lt;em&gt;Claudio will cover a number of tips and techniques he has used in recent project work, including the command design pattern, Lambda expressions, extension methods, fluent interfaces, refactoring, and more. His objective is to present a few tricks that attendees can apply immediately and to inspire them to learn more about the other, more extensive topics covered.&lt;/em&gt; &lt;p&gt;Hope to see some of you out there!  :)&lt;img src="http://c.services.spaces.live.com/CollectionWebService/c.gif?cid=-2115370061417702190&amp;page=RSS%3a+Speaking+at+the+Hal-PC+C%23+SIG+next+week&amp;referrer=" width="1px" height="1px" border="0" alt=""&gt;&lt;img style="position:absolute" alt="" width="0px" height="0px" src="http://c.live.com/c.gif?NC=31263&amp;amp;NA=1149&amp;amp;PI=73329&amp;amp;RF=&amp;amp;DI=3919&amp;amp;PS=85545&amp;amp;TP=claudiolassala.spaces.live.com&amp;amp;GT1=claudiolassala"&gt;</description><comments>http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!812.entry#comment</comments><guid isPermaLink="true">http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!812.entry</guid><pubDate>Wed, 11 Jun 2008 15:30:46 GMT</pubDate><slash:comments>0</slash:comments><msn:type>blogentry</msn:type><live:type>blogentry</live:type><live:typelabel>Blog entry</live:typelabel><wfw:commentRss>http://claudiolassala.spaces.live.com/blog/cns!E2A4B22308B39CD2!812/comments/feed.rss</wfw:commentRss><wfw:comment>http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!812.entry#comment</wfw:comment><dcterms:modified>2008-06-11T15:30:46Z</dcterms:modified></item><item><title>Checking out the Source Analysis for C#</title><link>http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!779.entry</link><description>&lt;p&gt;I've just spent about 30 minutes checking out the recently announced &lt;a href="http://blogs.msdn.com/sourceanalysis/archive/2008/05/23/announcing-the-release-of-microsoft-source-analysis.aspx" target="_blank"&gt;Microsoft Source Analysis for C#&lt;/a&gt;. I definitely love the idea, but I'm not sure I'll be using it just yet. Here are some of my impressions (again, I haven't spent a lot of time on it yet)... &lt;h3&gt;All using directives must be placed inside of the namespace&lt;/h3&gt; &lt;p&gt;Hmm, but VS itself violates that rule on every class we create...! &lt;p&gt;&lt;a href="http://blufiles.storage.msn.com/y1p9XbMVtHb_l_fPBMYEoI-FuYu5thGXqFzNm6_HqiZ1IPxyGCah2Xtjf7xly2nPHOIlTQQezzKvJc?PARTNER=WRITER"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=278 alt=Fig01 src="http://blufiles.storage.msn.com/y1p9XbMVtHb_l9P_0H5Cv1z5uMUrZv-d1z6Wgm0FhBquwJHSjGBZJw5ZqqmNBic9PFqMEhSZqMjXaQ?PARTNER=WRITER" width=369 border=0&gt;&lt;/a&gt;  &lt;h3&gt;The property must not be placed on a single line. The opening and closing curly brackets must each be placed on their own line&lt;/h3&gt; &lt;p&gt;Huh? But that an auto-implemented property. What would we want to split that into multiple lines?! &lt;p&gt;&lt;a href="http://blufiles.storage.msn.com/y1p9XbMVtHb_l_OSYkUFMXBKCUTB8vpis018AXADTcBdL71Z8Q3dkdHsT-4DJe2tdW-I6Vr7q0jVWU?PARTNER=WRITER"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=282 alt=Fig02 src="http://blufiles.storage.msn.com/y1p9XbMVtHb_l__NOCjU-ZgPhIXO1f3IK-muWTTMR9H6Tz53gmK6s7LzIxiFIv-y6ZrikyqKtSvmbc?PARTNER=WRITER" width=442 border=0&gt;&lt;/a&gt;  &lt;h3&gt;Variable names must not start with 'm_'&lt;/h3&gt; &lt;p&gt;Hmpf, that's the standard with have here at the company... &lt;p&gt;&lt;a href="http://jqcylq.blu.livefilestore.com/y1pThk01ejVEdvi8T66gvnt-kLP0fKPKxk05j5Fwpn2eenOVITanI6umJbj3UOZjh_aA2A1QjhZnd9HnC06Te167Q?PARTNER=WRITER"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=251 alt=Fig03 src="http://blu1.storage.msn.com/y1pbZLRuaQrtrxINUYVO_qTuC7f7a7ZtchuhuLDJ_uPJI6y8lrDvYv9X1DGHrEFg5HL5dlLNOor574trSN1NuozeO1O7P81aOh6?PARTNER=WRITER" width=587 border=0&gt;&lt;/a&gt;  &lt;h3&gt;A closing curly bracket must not be preceded by a blank line&lt;/h3&gt; &lt;p&gt;Ok, this one I like.  &lt;p&gt;&lt;a href="http://blu1.storage.msn.com/y1pbZLRuaQrtrwdi3FnXRihseyW-_oREXRR30D9-ggSzKBk3TRSPY1DbMaqWBIfmOAoxaRABLAstktuy20Y_Ptb78ifAVtZguoq?PARTNER=WRITER"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=349 alt=Fig04 src="http://blu1.storage.msn.com/y1pbZLRuaQrtry169wGOMUBJRO-gayZ2pjmvE2njpBkRC1JJcylhmoS_Spkv3TbOwDWPSsvcNQVJ22bythxBmxIEzCvoEMHrBGh?PARTNER=WRITER" width=405 border=0&gt;&lt;/a&gt;  &lt;h3&gt;Tabs are not allowed. Use spaces instead&lt;/h3&gt; &lt;p&gt;Huh? Thanks, but no, thanks. I've seen a lot of people complaining online about this one too. What's the problem with using tabs?? &lt;p&gt;&lt;a href="http://jqcylq.blu.livefilestore.com/y1pKz40HfnjnHXWnTu7rQ6zz7kr83_Jm_I00032gE-MAAOz_Csd7YNUv20TPGuaHCUFLCRbDT10b-XejwpG_wKEVQRb_V8TZewd?PARTNER=WRITER"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=233 alt=Fig05 src="http://blu1.storage.msn.com/y1pbZLRuaQrtrxR9X9Y87Vp9fewIPgyVqw9QiqVDiZFkm9QScM0gf0AcmE1eRApvMp67nl_XeyheYw8APizlLZdhF2QCCPtBKEr?PARTNER=WRITER" width=548 border=0&gt;&lt;/a&gt; &lt;h3&gt;The call ... must begin with 'this.'... &lt;/h3&gt; &lt;p&gt;Ah, I like that one. This is something we've made as part of our guideline here, but couldn't use FxCop to trap for that, since the 'this.' doesn't make into the IL.  &lt;p&gt;Now, the problem here is that, again, the code that VS generates violates this rule all over the place, such as on the example below: &lt;p&gt;&lt;a href="http://blu1.storage.msn.com/y1pbZLRuaQrtryNTfxmQ0fdhjKEd_NtFyyN4Y9JwX4kfluk6P9C_dN_o-ECPstjO7RgkZTvORDz1LPBI3uAgkWWUlK7Df-n5ltd?PARTNER=WRITER"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=336 alt=Fig06 src="http://blu1.storage.msn.com/y1pbZLRuaQrtrxUvkG4XF7PI8j1Q33q207RHXNFVf-5pdOPxYTioO-lzHqFmyL4H8vWeeZwm9dmXcgNRircYwXZN0UgpSFzww5-?PARTNER=WRITER" width=538 border=0&gt;&lt;/a&gt;  &lt;p&gt;I'll continue to use this tool to see if it's going to stick with me. I've tried it on a very small project, and got 246 violations; the vast majority where produced by code generated by VS. On a big project, I'd probably end up with a LOT more violations, so I'm not sure I can live with that. I believe there is a way to disable some of the rules, but haven't looked for it just yet... &lt;p&gt;Anyway, I do appreciate Microsoft releasing tools like this one. Hopefully, more and more developers will start paying more attention to how they write code.&lt;img src="http://c.services.spaces.live.com/CollectionWebService/c.gif?cid=-2115370061417702190&amp;page=RSS%3a+Checking+out+the+Source+Analysis+for+C%23&amp;referrer=" width="1px" height="1px" border="0" alt=""&gt;&lt;img style="position:absolute" alt="" width="0px" height="0px" src="http://c.live.com/c.gif?NC=31263&amp;amp;NA=1149&amp;amp;PI=73329&amp;amp;RF=&amp;amp;DI=3919&amp;amp;PS=85545&amp;amp;TP=claudiolassala.spaces.live.com&amp;amp;GT1=claudiolassala"&gt;</description><comments>http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!779.entry#comment</comments><guid isPermaLink="true">http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!779.entry</guid><pubDate>Tue, 27 May 2008 22:24:54 GMT</pubDate><slash:comments>8</slash:comments><msn:type>blogentry</msn:type><live:type>blogentry</live:type><live:typelabel>Blog entry</live:typelabel><wfw:commentRss>http://claudiolassala.spaces.live.com/blog/cns!E2A4B22308B39CD2!779/comments/feed.rss</wfw:commentRss><wfw:comment>http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!779.entry#comment</wfw:comment><dcterms:modified>2008-05-27T22:24:54Z</dcterms:modified></item><item><title>Interesting training material</title><link>http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!766.entry</link><description>&lt;p&gt;As an MVP, I got offered a license to &lt;a href="http://www.innerworkings.com/" target="_blank"&gt;InnerWorkings&lt;/a&gt; training material. I've been checking out some of it, and it looks pretty interesting.  &lt;p&gt;I noticed they had some material on Domain-Driven Design Patterns, Enterprise Patterns, and some related topics that I'm always interested on, so I decided to try it out. &lt;p&gt;There is a &amp;quot;Developer Interface&amp;quot; app, where we keep all the material purchased. Each course has a number of tasks, and each task presents the scenario to be solved, the challenges, and reference material (with links to chapter of great books such as Eric Evan's on &lt;a href="http://www.innerworkings.com/" target="_blank"&gt;Domain-Driven Design&lt;/a&gt;). &lt;p&gt;&lt;a href="http://jqcylq.blu.livefilestore.com/y1pThk01ejVEdtOSj3Cxbe4or8vZh7V5dzq-2aQBkHqi9khwgyW45KVc563-BGb7zRCSmy62a1IGgPXZxS-Jtriiw?PARTNER=WRITER"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=302 alt=Fig01 src="http://jqcylq.blu.livefilestore.com/y1pKz40HfnjnHVGBYHf-KUrKWTiVAkckIiMCa5JxSqaKBxPGoYGA_22fdBh3Yzs6w_4wRE6EoTJZEQFN-829HYooz9ppwaG1r9S?PARTNER=WRITER" width=608 border=0&gt;&lt;/a&gt; &lt;p&gt;The task provides a way to launch the sample project in Visual Studio. Once in VS, we get an &amp;quot;InnerWorkings&amp;quot; Tool Window that gives us quick access to the problems we need to address in the solution, and the useful links.  &lt;p&gt;You can either try to address the problems by yourself, or cheat and see the solution. Once you're done with it, you may click the 'Judge Project Code&amp;quot; button that gets added to VS to have your code analyzed to see if you've implemented things in the way that was expected.     &lt;p&gt;I'll certainly be checking out some of the other courses they have available (I need to catch up with some stuff such as WCF, WPF, Silverlight, LINQ to XML, etc.).&lt;a href="http://blufiles.storage.msn.com/y1p9XbMVtHb_l982pcSDzK4we14VzeQlcXZwAobZiXDcA9KaMu_SBvjT7gKQ9yLXxU2zbkykkNWads?PARTNER=WRITER"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=430 alt=Fig02 src="http://blu1.storage.msn.com/y1pbZLRuaQrtryyz5l10a4-vBJHdDSl9LPgpLi3f2xxR2t46RxGrlIIob87ZcJMB27UUKCod_rmeWvzb3jdJiK89kB6uccOvpYT?PARTNER=WRITER" width=174 border=0&gt;&lt;/a&gt;&lt;img src="http://c.services.spaces.live.com/CollectionWebService/c.gif?cid=-2115370061417702190&amp;page=RSS%3a+Interesting+training+material&amp;referrer=" width="1px" height="1px" border="0" alt=""&gt;&lt;img style="position:absolute" alt="" width="0px" height="0px" src="http://c.live.com/c.gif?NC=31263&amp;amp;NA=1149&amp;amp;PI=73329&amp;amp;RF=&amp;amp;DI=3919&amp;amp;PS=85545&amp;amp;TP=claudiolassala.spaces.live.com&amp;amp;GT1=claudiolassala"&gt;</description><comments>http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!766.entry#comment</comments><guid isPermaLink="true">http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!766.entry</guid><pubDate>Tue, 27 May 2008 20:30:19 GMT</pubDate><slash:comments>0</slash:comments><msn:type>blogentry</msn:type><live:type>blogentry</live:type><live:typelabel>Blog entry</live:typelabel><wfw:commentRss>http://claudiolassala.spaces.live.com/blog/cns!E2A4B22308B39CD2!766/comments/feed.rss</wfw:commentRss><wfw:comment>http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!766.entry#comment</wfw:comment><dcterms:modified>2008-05-27T20:32:36Z</dcterms:modified></item><item><title>Getting rid of the slow help engine in Visual Studio</title><link>http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!747.entry</link><description>&lt;p&gt;It's been a few years already since the last time I've installed VS' help (MSDN) on my machines. The thing is huge, slow to come up, and it didn't use to be that good. I just got used to using a &lt;a href="http://www.bayden.com/SlickRun/" target="_blank"&gt;SlickRun&lt;/a&gt; magicword to quickly search google, which searches not only MSDN, but also other resources (often much better than MSDN) such as CodeProject, blogs, etc. Since I'm connected almost 100% of the time, why use the slow local MSDN library? &lt;p&gt;Also, every once in a while a reach for the F2 key in order to start a &amp;quot;rename&amp;quot; refactoring in Visual Studio, and and up pressing F1 by mistake, and then there go 2 minutes of my life, waiting for the help window to come up (even though, again, I don't even have MSDN installed). &lt;p&gt;Talking to Mike today, I remembered I used to have a little VS macro that'd search on Google the text I have selected in VS. I thought it'd be good to just re-map the F1 key to that macro. It solves to problems: allows me to quickly perform a Google search from VS, and it doesn't get me stuck waiting for the VS help window to come up if I've hit the F1 key by mistake.  :) &lt;p&gt;You can find an example of such macro &lt;a href="http://www.codeproject.com/KB/macros/googlemacro.aspx" target="_blank"&gt;here&lt;/a&gt;. In order to change the keybinding, go to Tools-Options-Keyboard, search for the &amp;quot;GoogleSearch&amp;quot; macro, and bind the F1 key to it. &lt;p&gt;&lt;a href="http://jqcylq.blu.livefilestore.com/y1pThk01ejVEdvD71ewJEQndqNJEsJiRxu_H8-StyxIDv2kWeuG6mgmhOC9GXcb1l3Sk0ri60sMdmX9iDD3UKPABw?PARTNER=WRITER"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=348 alt=F1 src="http://blu1.storage.msn.com/y1pbZLRuaQrtryNFyrpon_0V0L1V_wQ2Sv_biTpvxXBEwUCRkGqgrsIJ3bRnYI6FWJg4penvemOwE0GJ1nNkfQoah9qBM3UpUiG?PARTNER=WRITER" width=585 border=0&gt;&lt;/a&gt;&lt;img src="http://c.services.spaces.live.com/CollectionWebService/c.gif?cid=-2115370061417702190&amp;page=RSS%3a+Getting+rid+of+the+slow+help+engine+in+Visual+Studio&amp;referrer=" width="1px" height="1px" border="0" alt=""&gt;&lt;img style="position:absolute" alt="" width="0px" height="0px" src="http://c.live.com/c.gif?NC=31263&amp;amp;NA=1149&amp;amp;PI=73329&amp;amp;RF=&amp;amp;DI=3919&amp;amp;PS=85545&amp;amp;TP=claudiolassala.spaces.live.com&amp;amp;GT1=claudiolassala"&gt;</description><comments>http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!747.entry#comment</comments><guid isPermaLink="true">http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!747.entry</guid><pubDate>Fri, 16 May 2008 20:27:57 GMT</pubDate><slash:comments>0</slash:comments><msn:type>blogentry</msn:type><live:type>blogentry</live:type><live:typelabel>Blog entry</live:typelabel><wfw:commentRss>http://claudiolassala.spaces.live.com/blog/cns!E2A4B22308B39CD2!747/comments/feed.rss</wfw:commentRss><wfw:comment>http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!747.entry#comment</wfw:comment><dcterms:modified>2008-05-16T20:27:57Z</dcterms:modified></item><item><title>Matching my own record: 5 and a half years at EPS!</title><link>http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!744.entry</link><description>&lt;p&gt;Wow, today, May 16 2008, I'm matching my personal record at working with a company: 5 and a half years, or to be more precise, 2003 days.  :) &lt;p&gt;Here's a little history:  &lt;ul&gt; &lt;li&gt;I've had my first full-time job when I was 12. It lasted only for a full week; I just couldn't stand the boss.  :) &lt;li&gt;When I was 14, I took a temporary job (also full-time), filling in for a friend for a full month.  &lt;li&gt;The next Monday when I was done with the previous job, I was hired by a company across the hall: that was the company where I had stayed for 5 years and a half years. I started as a courier. After a year, I got promoted to a financial clerk (at the age of 15). Almost three years later, got promoted to a programmer/analyst. &lt;li&gt;From the previous job I went to a new company, as an IT guy (doing mostly software development, but also a lot of computer setup, networking, hardware, user support, etc.). I worked there for about 3 years. &lt;li&gt;Next, new company, now dedicated to software development. Worked there for about 14 months. &lt;li&gt;On to another company, where I've worked for about 8 or 9 months.&lt;/ul&gt; &lt;p&gt;The reader have probably noticed the pattern: after the company where I've worked for over 5 years, my stay at every job was getting shorter and shorter.  &lt;p&gt;Eventually I've decided to go solo as an independent consultant. I had my clients, I've put together some conferences for software developers, etc. That lasted for about 8 months. I wanted to have no strings attached to any company because at that time there was a good chance EPS would be hiring me, so I wanted to make sure I could join the company at any time. And that happened in November of 2002.  &lt;p&gt;The rest, as they say, is history.  :)&lt;img src="http://c.services.spaces.live.com/CollectionWebService/c.gif?cid=-2115370061417702190&amp;page=RSS%3a+Matching+my+own+record%3a+5+and+a+half+years+at+EPS!&amp;referrer=" width="1px" height="1px" border="0" alt=""&gt;&lt;img style="position:absolute" alt="" width="0px" height="0px" src="http://c.live.com/c.gif?NC=31263&amp;amp;NA=1149&amp;amp;PI=73329&amp;amp;RF=&amp;amp;DI=3919&amp;amp;PS=85545&amp;amp;TP=claudiolassala.spaces.live.com&amp;amp;GT1=claudiolassala"&gt;</description><comments>http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!744.entry#comment</comments><guid isPermaLink="true">http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!744.entry</guid><pubDate>Fri, 16 May 2008 15:01:31 GMT</pubDate><slash:comments>0</slash:comments><msn:type>blogentry</msn:type><live:type>blogentry</live:type><live:typelabel>Blog entry</live:typelabel><wfw:commentRss>http://claudiolassala.spaces.live.com/blog/cns!E2A4B22308B39CD2!744/comments/feed.rss</wfw:commentRss><wfw:comment>http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!744.entry#comment</wfw:comment><dcterms:modified>2008-05-16T15:01:31Z</dcterms:modified></item><item><title>Material from Tulsa School of Dev 2008 is online</title><link>http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!742.entry</link><description>&lt;p&gt;I've just uploaded the material I've presented last week at the Tulsa School of Dev 2008. The material includes slide decks and source code for my three sessions (C# 3.0, Design Patterns, and LINQ).  &lt;p&gt;The material can be downloaded &lt;a href="www.lassala.net/files/events/claudiolassala-tulsaschoolofdev2008.zip" target="_blank"&gt;here&lt;/a&gt;.&lt;img src="http://c.services.spaces.live.com/CollectionWebService/c.gif?cid=-2115370061417702190&amp;page=RSS%3a+Material+from+Tulsa+School+of+Dev+2008+is+online&amp;referrer=" width="1px" height="1px" border="0" alt=""&gt;&lt;img style="position:absolute" alt="" width="0px" height="0px" src="http://c.live.com/c.gif?NC=31263&amp;amp;NA=1149&amp;amp;PI=73329&amp;amp;RF=&amp;amp;DI=3919&amp;amp;PS=85545&amp;amp;TP=claudiolassala.spaces.live.com&amp;amp;GT1=claudiolassala"&gt;</description><comments>http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!742.entry#comment</comments><guid isPermaLink="true">http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!742.entry</guid><pubDate>Thu, 15 May 2008 15:40:10 GMT</pubDate><slash:comments>0</slash:comments><msn:type>blogentry</msn:type><live:type>blogentry</live:type><live:typelabel>Blog entry</live:typelabel><wfw:commentRss>http://claudiolassala.spaces.live.com/blog/cns!E2A4B22308B39CD2!742/comments/feed.rss</wfw:commentRss><wfw:comment>http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!742.entry#comment</wfw:comment><dcterms:modified>2008-05-15T15:40:10Z</dcterms:modified></item><item><title>Attributes on constants? Haven't thought about that...</title><link>http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!740.entry</link><description>&lt;p&gt;I'm currently reading &lt;a href="http://www.codeproject.com/KB/architecture/DotNetMVPFramework_Part2.aspx" target="_blank"&gt;this article&lt;/a&gt; on &lt;a href="http://www.codeproject.com" target="_blank"&gt;CodeProject&lt;/a&gt; where the author is creating an MVP framework (seems like a good article so far...). In there, the author applies attributes to constants of a type. I had never thought that was actually possible. I want to make sure I keep that at the back of my mind, because I think I'll be using it sometime soon.  &lt;p&gt;As a quick reminder, this is how that can be implemented: &lt;div&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none"&gt;&lt;span style="color:#0000ff"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff"&gt;class&lt;/span&gt; SomeClass
{
    [Special(&lt;span style="color:#006080"&gt;&amp;quot;Some special attribute&amp;quot;&lt;/span&gt;)]
    &lt;span style="color:#0000ff"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff"&gt;const&lt;/span&gt; &lt;span style="color:#0000ff"&gt;string&lt;/span&gt; SomeConst = &lt;span style="color:#006080"&gt;&amp;quot;This is some constant&amp;quot;&lt;/span&gt;;
}

&lt;span style="color:#0000ff"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff"&gt;class&lt;/span&gt; SpecialAttribute : Attribute
{
    &lt;span style="color:#0000ff"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff"&gt;string&lt;/span&gt; Foo { get; set; }
    &lt;span style="color:#0000ff"&gt;public&lt;/span&gt; SpecialAttribute(&lt;span style="color:#0000ff"&gt;string&lt;/span&gt; foo)
    {
        Foo = foo;
    }
}
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://weblogs.asp.net/whaggard/archive/2003/02/20/2708.aspx" target="_blank"&gt;This blog post&lt;/a&gt; has a handy method to get a list of constants defined on a type (including its baseclasses):
&lt;div&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none"&gt;&lt;span style="color:#008000"&gt;/// &amp;lt;SUMMARY&amp;gt;&lt;/span&gt;
&lt;span style="color:#008000"&gt;/// This method will return all the constants from a particular&lt;/span&gt;
&lt;span style="color:#008000"&gt;/// type including the constants from all the base types&lt;/span&gt;
&lt;span style="color:#008000"&gt;/// &amp;lt;/SUMMARY&amp;gt;&lt;/span&gt;
&lt;span style="color:#008000"&gt;/// &amp;lt;PARAM NAME=&amp;quot;TYPE&amp;quot;&amp;gt;type to get the constants for&amp;lt;/PARAM&amp;gt;&lt;/span&gt;
&lt;span style="color:#008000"&gt;/// &amp;lt;RETURNS&amp;gt;array of FieldInfos for all the constants&amp;lt;/RETURNS&amp;gt;&lt;/span&gt;
&lt;span style="color:#0000ff"&gt;private&lt;/span&gt; FieldInfo[] GetConstants(System.Type type)
{
    ArrayList constants = &lt;span style="color:#0000ff"&gt;new&lt;/span&gt; ArrayList();

    FieldInfo[] fieldInfos = type.GetFields(
        &lt;span style="color:#008000"&gt;// Gets all public and static fields&lt;/span&gt;

        BindingFlags.Public | BindingFlags.Static |
        &lt;span style="color:#008000"&gt;// This tells it to get the fields from all base types as well&lt;/span&gt;

        BindingFlags.FlattenHierarchy);

    &lt;span style="color:#008000"&gt;// Go through the list and only pick out the constants&lt;/span&gt;
    &lt;span style="color:#0000ff"&gt;foreach&lt;/span&gt; (FieldInfo fi &lt;span style="color:#0000ff"&gt;in&lt;/span&gt; fieldInfos)
        &lt;span style="color:#008000"&gt;// IsLiteral determines if its value is written at &lt;/span&gt;
        &lt;span style="color:#008000"&gt;//   compile time and not changeable&lt;/span&gt;
        &lt;span style="color:#008000"&gt;// IsInitOnly determine if the field can be set &lt;/span&gt;
        &lt;span style="color:#008000"&gt;//   in the body of the constructor&lt;/span&gt;
        &lt;span style="color:#008000"&gt;// for C# a field which is readonly keyword would have both true &lt;/span&gt;
        &lt;span style="color:#008000"&gt;//   but a const field would have only IsLiteral equal to true&lt;/span&gt;
        &lt;span style="color:#0000ff"&gt;if&lt;/span&gt; (fi.IsLiteral &amp;amp;&amp;amp; !fi.IsInitOnly)
            constants.Add(fi);

    &lt;span style="color:#008000"&gt;// Return an array of FieldInfos&lt;/span&gt;
    &lt;span style="color:#0000ff"&gt;return&lt;/span&gt; (FieldInfo[])constants.ToArray(&lt;span style="color:#0000ff"&gt;typeof&lt;/span&gt;(FieldInfo));
}&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;And here's a little test method to show how to get the attributes out of the constants of a type:
&lt;div&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none"&gt;[TestMethod]
&lt;span style="color:#0000ff"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff"&gt;void&lt;/span&gt; TestMethod1()
{
    SomeClass obj = &lt;span style="color:#0000ff"&gt;new&lt;/span&gt; SomeClass();

    FieldInfo[] fields = GetConstants(obj.GetType());

    Assert.AreEqual(1, fields.Length);
    Assert.AreEqual(&lt;span style="color:#006080"&gt;&amp;quot;SomeConst&amp;quot;&lt;/span&gt;, fields[0].Name);

    &lt;span style="color:#0000ff"&gt;object&lt;/span&gt;[] attribs = fields[0].GetCustomAttributes(&lt;span style="color:#0000ff"&gt;false&lt;/span&gt;);
    Assert.AreEqual(1, attribs.Length);

    SpecialAttribute special = attribs[0] &lt;span style="color:#0000ff"&gt;as&lt;/span&gt; SpecialAttribute;
    Assert.IsNotNull(special);
    Assert.AreEqual(&lt;span style="color:#006080"&gt;&amp;quot;Some special attribute&amp;quot;&lt;/span&gt;, special.Foo);
    
}
&lt;/pre&gt;&lt;/div&gt;&lt;img src="http://c.services.spaces.live.com/CollectionWebService/c.gif?cid=-2115370061417702190&amp;page=RSS%3a+Attributes+on+constants%3f+Haven't+thought+about+that...&amp;referrer=" width="1px" height="1px" border="0" alt=""&gt;&lt;img style="position:absolute" alt="" width="0px" height="0px" src="http://c.live.com/c.gif?NC=31263&amp;amp;NA=1149&amp;amp;PI=73329&amp;amp;RF=&amp;amp;DI=3919&amp;amp;PS=85545&amp;amp;TP=claudiolassala.spaces.live.com&amp;amp;GT1=claudiolassala"&gt;</description><comments>http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!740.entry#comment</comments><guid isPermaLink="true">http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!740.entry</guid><pubDate>Thu, 15 May 2008 14:48:59 GMT</pubDate><slash:comments>0</slash:comments><msn:type>blogentry</msn:type><live:type>blogentry</live:type><live:typelabel>Blog entry</live:typelabel><wfw:commentRss>http://claudiolassala.spaces.live.com/blog/cns!E2A4B22308B39CD2!740/comments/feed.rss</wfw:commentRss><wfw:comment>http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!740.entry#comment</wfw:comment><dcterms:modified>2008-05-15T14:48:59Z</dcterms:modified></item><item><title>Vista gets on my nerves...</title><link>http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!737.entry</link><description>&lt;p&gt;This is just stupid: I have a folder somewhere that I've created. It's not under any security sensitive folder such as Program Files or Windows. I've copied some files into that folder. Then, I tried deleting the files. Vista asks me  typical security questions, and I say &amp;quot;yes, just delete the damn files&amp;quot;. Eventually it just comes back to me and tells me &amp;quot;access is denied&amp;quot;. &lt;p&gt;Then I try moving the files into a subfolder. It has no problems with that. Tried deleting the subfolder; no luck. Moved the files back to the original location.  &lt;p&gt;Next, I try opening a Command Prompt, running it as admin. I tried deleting the files there, no success either.  &lt;p&gt;Finally, I tried running Windows Explorer as admin, and voila, the stupid thing lets me delete the files that I HAVE CREATED!!! Oh joy. How hard should it be for me to delete a stupid file that I've created myself, sitting on a folder that I've also created, outside of any O.S. folder???&lt;img src="http://c.services.spaces.live.com/CollectionWebService/c.gif?cid=-2115370061417702190&amp;page=RSS%3a+Vista+gets+on+my+nerves...&amp;referrer=" width="1px" height="1px" border="0" alt=""&gt;&lt;img style="position:absolute" alt="" width="0px" height="0px" src="http://c.live.com/c.gif?NC=31263&amp;amp;NA=1149&amp;amp;PI=73329&amp;amp;RF=&amp;amp;DI=3919&amp;amp;PS=85545&amp;amp;TP=claudiolassala.spaces.live.com&amp;amp;GT1=claudiolassala"&gt;</description><comments>http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!737.entry#comment</comments><guid isPermaLink="true">http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!737.entry</guid><pubDate>Wed, 14 May 2008 23:16:00 GMT</pubDate><slash:comments>0</slash:comments><msn:type>blogentry</msn:type><live:type>blogentry</live:type><live:typelabel>Blog entry</live:typelabel><wfw:commentRss>http://claudiolassala.spaces.live.com/blog/cns!E2A4B22308B39CD2!737/comments/feed.rss</wfw:commentRss><wfw:comment>http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!737.entry#comment</wfw:comment><dcterms:modified>2008-05-14T23:16:00Z</dcterms:modified></item><item><title>Lambda Expression and Object Mappers</title><link>http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!731.entry</link><description>&lt;p&gt;Here's a simple implementation of an object mapper using lambda expressions that I've shown yesterday at the &lt;a href="http://www.schoolofdev.com/" target="_blank"&gt;Tulsa School of Dev&lt;/a&gt;. Say we need to copy some data from one object to another. For this example my objects are a Book and an AlternateBook. The class are shown below: &lt;div&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none"&gt;&lt;span style="color:#0000ff"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff"&gt;class&lt;/span&gt; Book
{
    &lt;span style="color:#0000ff"&gt;public&lt;/span&gt; Book()
    {
    }

    &lt;span style="color:#0000ff"&gt;public&lt;/span&gt; Book(&lt;span style="color:#0000ff"&gt;string&lt;/span&gt; title, &lt;span style="color:#0000ff"&gt;int&lt;/span&gt; yearPublished)
    {
        Title = title;
        YearPublished = yearPublished;
    }

    &lt;span style="color:#0000ff"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff"&gt;string&lt;/span&gt; Title { get; set; }
    &lt;span style="color:#0000ff"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff"&gt;int&lt;/span&gt; YearPublished { get; set; }
    &lt;span style="color:#0000ff"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff"&gt;string&lt;/span&gt; AuthorFirstName { get; set; }
    &lt;span style="color:#0000ff"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff"&gt;string&lt;/span&gt; AuthorLastName { get; set; }
}

&lt;span style="color:#0000ff"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff"&gt;class&lt;/span&gt; AlternateBook
{
    &lt;span style="color:#0000ff"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff"&gt;string&lt;/span&gt; AuthorFullName { get; set; }
    &lt;span style="color:#0000ff"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff"&gt;string&lt;/span&gt; Title { get; set; }
}&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;I could have a mapper that worked like this:
&lt;div&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none"&gt;Mapper mapper = &lt;span style="color:#0000ff"&gt;new&lt;/span&gt; Mapper(book, alternateBook);
mapper.AddMap(&lt;span style="color:#006080"&gt;&amp;quot;Title&amp;quot;&lt;/span&gt;, &lt;span style="color:#006080"&gt;&amp;quot;Title&amp;quot;&lt;/span&gt;);
mapper.AddMap(&lt;span style="color:#006080"&gt;&amp;quot;AuthorFirstName&amp;quot;&lt;/span&gt;, &lt;span style="color:#006080"&gt;&amp;quot;AuthorFullName&amp;quot;&lt;/span&gt;);
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;That approach would have some problems, though:
&lt;ul&gt;
&lt;li&gt;The properties are mapped using string literals, which means we don't benefit from strong-typing or IntelliSense (bugs could easily arise because of typos or properties that don't exist on the objects); 
&lt;li&gt;The properties have a 1:1 mapping, which in the sample above wouldn't really work, since I had to map &amp;quot;AuthorFullName&amp;quot; directly to &amp;quot;AuthorFirstName&amp;quot;, as oppose AuthorFirstName and AutorLastName. 
&lt;li&gt;The mapper would have to use Reflection to look up the properties on the given objects and then assign their values (not the most optimized way of doing it...).&lt;/ul&gt;
&lt;p&gt;The approach using Lambda expression would look like this:
&lt;div&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none"&gt;&lt;p&gt;var mapper = &lt;span style="color:#0000ff"&gt;new&lt;/span&gt; Mapper&amp;lt;Book, AlternateBook&amp;gt;();

mapper.AddMapping((b, ab) =&amp;gt; ab.Title = b.Title);
mapper.AddMapping((b, ab) =&amp;gt; ab.AuthorFullName = b.AuthorFirstName + &lt;span style="color:#006080"&gt;&amp;quot; &amp;quot;&lt;/span&gt; + &lt;br&gt;                                                 b.AuthorLastName);
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Points to note:
&lt;ul&gt;
&lt;li&gt;As I instantiate the Mapper I provide the type of objects as Generic parameters; 
&lt;li&gt;The &lt;strong&gt;AddMapping&lt;/strong&gt; method takes in lambda expressions that receive two parameters (&lt;strong&gt;b&lt;/strong&gt; and &lt;strong&gt;ab&lt;/strong&gt;, for book and alternate book, respectively), which I then use to set the mapping. That gives me both strong-typing and IntelliSense support. 
&lt;li&gt;The lambda expression also opens up control over how things are pushed into the target object. In the sample below, I can format how the alternate book's AuthorFullName property gets populated; 
&lt;li&gt;Since the lambda expression is compiled down to a delegate, there's no Reflection involved, so the code should run faster when executed.&lt;/ul&gt;
&lt;p&gt;Now, in case you're not familiar with lambdas yet: the expression does NOT get executed when we are passing it as a parameter to the AddMapping method. At that point we are only registering the m apping; the actual execution occurs whenever we want it to. I would probably, say, at the application start, register all mappings I'm likely to use. Eventually, when I need to actually process the mapping (copying some data from one object to another), I can just call the ApplyMapping, passing in the objects involved with the mapping. For example:
&lt;div&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none"&gt;&lt;p&gt;Book book = &lt;span style="color:#0000ff"&gt;new&lt;/span&gt; Book 
{ 
    AuthorFirstName = &lt;span style="color:#006080"&gt;&amp;quot;Claudio&amp;quot;&lt;/span&gt;, 
    AuthorLastName = &lt;span style="color:#006080"&gt;&amp;quot;Lassala&amp;quot;&lt;/span&gt;, 
    Title = &lt;span style="color:#006080"&gt;&amp;quot;Some book&amp;quot;&lt;/span&gt; 
};

AlternateBook alternateBook = &lt;span style="color:#0000ff"&gt;new&lt;/span&gt; AlternateBook();&lt;br&gt;
mapper.ApplyMappingsTo(book, alternateBook);

Console.WriteLine(
    &lt;span style="color:#006080"&gt;&amp;quot;Book:&amp;quot;&lt;/span&gt;+
    &lt;span style="color:#006080"&gt;&amp;quot;\r\n  Title: &amp;quot;&lt;/span&gt;+ book.Title +
    &lt;span style="color:#006080"&gt;&amp;quot;\r\n  AuthorFirstName: &amp;quot;&lt;/span&gt; + book.AuthorFirstName +
    &lt;span style="color:#006080"&gt;&amp;quot;\r\n  AuthorLastName: &amp;quot;&lt;/span&gt; + book.AuthorLastName);

Console.WriteLine(
    &lt;span style="color:#006080"&gt;&amp;quot;\r\nAlternateBook:&amp;quot;&lt;/span&gt; +
    &lt;span style="color:#006080"&gt;&amp;quot;\r\n  Title: &amp;quot;&lt;/span&gt; + alternateBook.Title +
    &lt;span style="color:#006080"&gt;&amp;quot;\r\n  AuthorFullName: &amp;quot;&lt;/span&gt; + alternateBook.AuthorFullName);
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The code above should produce the following results:
&lt;p&gt;&lt;a href="http://blufiles.storage.msn.com/y1p9XbMVtHb_l9i7WXnw-SRFoOCZz7QClKliqKfk3tc8LKTXwjEaFAgJE4jiWVCVAYuK1TovV37tB0?PARTNER=WRITER"&gt;&lt;img height=169 alt=lambda src="http://blufiles.storage.msn.com/y1p9XbMVtHb_l8Mrd-6wxPU3N0Fn2_VKVOTu5g06MJ3SdzssW6LDMS2Wtp4sjMj-8ieQZUNR75sw9I?PARTNER=WRITER" width=350 border=0&gt;&lt;/a&gt;
&lt;p&gt;So, how's the &lt;strong&gt;Mapper&lt;/strong&gt; class implemented? Here we go:
&lt;div&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none"&gt;&lt;span style="color:#0000ff"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff"&gt;class&lt;/span&gt; Mapper&amp;lt;TSource, TTarget&amp;gt;
{
    &lt;span style="color:#0000ff"&gt;private&lt;/span&gt; Collection&amp;lt;Action&amp;lt;TSource, TTarget&amp;gt;&amp;gt; m_Mappings = 
                    &lt;span style="color:#0000ff"&gt;new&lt;/span&gt; Collection&amp;lt;Action&amp;lt;TSource, TTarget&amp;gt;&amp;gt;();
    &lt;span style="color:#0000ff"&gt;public&lt;/span&gt; Collection&amp;lt;Action&amp;lt;TSource, TTarget&amp;gt;&amp;gt; Mappings
    {
        get { &lt;span style="color:#0000ff"&gt;return&lt;/span&gt; m_Mappings; }
    }

    &lt;span style="color:#0000ff"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff"&gt;void&lt;/span&gt; AddMapping(Action&amp;lt;TSource, TTarget&amp;gt; action)
    {
        Mappings.Add(action);
    }

    &lt;span style="color:#0000ff"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff"&gt;void&lt;/span&gt; ApplyMappingsTo(TSource source, TTarget target)
    {
        &lt;span style="color:#0000ff"&gt;foreach&lt;/span&gt; (var mapping &lt;span style="color:#0000ff"&gt;in&lt;/span&gt; Mappings)
        {
            mapping(source, target);
        }
    }
}
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The class keeps a list of all the mappings within its &lt;strong&gt;Mappings&lt;/strong&gt; collection, which is a collection of &lt;strong&gt;Action&amp;lt;TSource, TTarget&amp;gt;&lt;/strong&gt; delegates. Both &lt;strong&gt;TSource&lt;/strong&gt; and &lt;strong&gt;TTarget&lt;/strong&gt; are Generic types provided to the class. The &lt;strong&gt;AddMaping &lt;/strong&gt;method takes in the delegate (which we pass in as a lambda) and adds it to the Mappings collection. The &lt;strong&gt;ApplyMappingsTo&lt;/strong&gt; method  takes in instances for the source and target object, iterates through the Mappings collection, and invokes each mapping (don't forget it, the mapping is a delegate).  
&lt;p&gt;That's it. Again, this is just a simple implementation. I'm pretty sure there's a lot of improvements to be done on top of this, and there's definitely something some people wrote out there around the same lines; I'll be looking for that myself in order to see how I can improve this.
&lt;p&gt;For instance, one thing that pops up is: what if the developer messed up and specified the mapping going from the target to the source instead? Like so:
&lt;div&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none"&gt;&lt;p&gt;mapper.AddMapping((b, ab) =&amp;gt; b.Title = ab.Title);&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;We certainly don't want to copy the title from the Alternate Book to the Book object. I don't know of way yet to have the compiler catch that problem (any ideas?). During runtime, though, I know I could have the AddMapping method analyze the Expression Tree for the lambda it was given, and make sure that the target appears at the &lt;strong&gt;left side&lt;/strong&gt; of the = sign, and the target appears at the &lt;strong&gt;right side&lt;/strong&gt;.
&lt;p&gt;Another improvement that could be made is some optimization. For instance, itake the following code snippet:
&lt;div&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none"&gt;&lt;p&gt;mapper.AddMapping((b, ab) =&amp;gt; ab.AuthorFullName = b.AuthorFirstName + &lt;span style="color:#006080"&gt;&amp;quot; &amp;quot;&lt;/span&gt; + &lt;br&gt;                                                 b.AuthorLastName);&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;There, the developer has used string concatenation to build up the value to be assigned to the property. The AddMapping method could have some logic that analyzes the expression tree, and if it finds something like string concatenation, it could replace that with using a StringBuilder. Of course, such optimization should only be done if we can clearly see that as being something that we really needed to squeeze better performance out of.
&lt;p&gt;Also, it'd be convenient to have the mapper just figure out what properties to copy from the source to the target by looking for properties that map 1:1 (that is, property name and type exist on both objects), and then let the developer only supply special mappings for properties that require transformation. 
&lt;p&gt;I'll be doing some more research on better ways to do this kind of stuff.&lt;img src="http://c.services.spaces.live.com/CollectionWebService/c.gif?cid=-2115370061417702190&amp;page=RSS%3a+Lambda+Expression+and+Object+Mappers&amp;referrer=" width="1px" height="1px" border="0" alt=""&gt;&lt;img style="position:absolute" alt="" width="0px" height="0px" src="http://c.live.com/c.gif?NC=31263&amp;amp;NA=1149&amp;amp;PI=73329&amp;amp;RF=&amp;amp;DI=3919&amp;amp;PS=85545&amp;amp;TP=claudiolassala.spaces.live.com&amp;amp;GT1=claudiolassala"&gt;</description><comments>http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!731.entry#comment</comments><guid isPermaLink="true">http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!731.entry</guid><pubDate>Tue, 13 May 2008 14:38:00 GMT</pubDate><slash:comments>2</slash:comments><msn:type>blogentry</msn:type><live:type>blogentry</live:type><live:typelabel>Blog entry</live:typelabel><wfw:commentRss>http://claudiolassala.spaces.live.com/blog/cns!E2A4B22308B39CD2!731/comments/feed.rss</wfw:commentRss><wfw:comment>http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!731.entry#comment</wfw:comment><dcterms:modified>2008-05-13T14:38:54Z</dcterms:modified></item><item><title>The Temple of the King</title><link>http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!726.entry</link><description>&lt;p&gt;After some pretty tough weeks with a lot of work and little sleep, I spent an afternoon with my friends Milton and Lucas having some fun making some home-recording of Rainbow's Temple of the King. Nothing like having some fun to relieve some of the stress.  :) &lt;p&gt;Check it out:  &lt;p&gt;&lt;a href="http://www.youtube.com/watch?v=BefV66tSyEI"&gt;http://www.youtube.com/watch?v=BefV66tSyEI&lt;/a&gt;&lt;img src="http://c.services.spaces.live.com/CollectionWebService/c.gif?cid=-2115370061417702190&amp;page=RSS%3a+The+Temple+of+the+King&amp;referrer=" width="1px" height="1px" border="0" alt=""&gt;&lt;img style="position:absolute" alt="" width="0px" height="0px" src="http://c.live.com/c.gif?NC=31263&amp;amp;NA=1149&amp;amp;PI=73329&amp;amp;RF=&amp;amp;DI=3919&amp;amp;PS=85545&amp;amp;TP=claudiolassala.spaces.live.com&amp;amp;GT1=claudiolassala"&gt;</description><comments>http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!726.entry#comment</comments><guid isPermaLink="true">http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!726.entry</guid><pubDate>Mon, 12 May 2008 06:21:56 GMT</pubDate><slash:comments>0</slash:comments><msn:type>blogentry</msn:type><live:type>blogentry</live:type><live:typelabel>Blog entry</live:typelabel><wfw:commentRss>http://claudiolassala.spaces.live.com/blog/cns!E2A4B22308B39CD2!726/comments/feed.rss</wfw:commentRss><wfw:comment>http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!726.entry#comment</wfw:comment><dcterms:modified>2008-05-12T06:21:56Z</dcterms:modified></item><item><title>The Twitter thing is not so bad after all</title><link>http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!724.entry</link><description>&lt;p&gt;&lt;a href="http://claudiolassala.spaces.live.com/blog/cns!E2A4B22308B39CD2!700.entry" target="_blank"&gt;A few weeks ago I&lt;/a&gt; mentioned I had broken down and signed up for &lt;a href="http://twitter.com//ClaudioLassala" target="_blank"&gt;Twitter&lt;/a&gt;. Even though I have not yet fell for it yet, I do some of its value. It does have an obvious problem: if you're not careful, you can quickly get carried away and become and totally unproductive person. What I've been doing is to have a Twitter client open in one of my computers, and every once in a while I check out what my peers are up to (usually on short breaks or when my computer is taking to long to process something). &lt;p&gt;Here are the things I've either experienced or seen that I kind of dig: &lt;ul&gt; &lt;li&gt;This morning I had to go from the hotel to the campus where the Tulsa &lt;a href="http://www.schoolofdev.com/" target="_blank"&gt;School of Dev&lt;/a&gt; was going to take place. I was supposed to start my keynote at 9am, so I came down to the hotel's lobby at around 7:50am, thinking I'd get a shuttle and be at the campus at around 8:15am (I had no idea how far the place was). Somebody from the hotel tells me they wouldn't drive to the place. Somebody else says they would. Twenty minutes later a &amp;quot;definitive&amp;quot; word comes that they really would not take me there. Ok, no problem, but they could have me told that before, right? Anyway, I asked whether they could just call for a cab, which they said they would. Another 40 minutes go by, and nothing. They called the cab company 4 or 5 times, and on the last time, the company says they don't have a cab in the area (it's not like I was in the middle of nowhere; I was in downtown...). Well, I start barking at people, and eventually one of the hotel's drivers says he's taking me to the place, and that it didn't take 10 minutes for us to get there (while we're on our way, the hotel calls the guy to say he's in trouble because he wasn't supposed to take me). What the hell? It's 10 minutes away from the hotel!! What's their problem? Anyway, around 8:30am, I had twittered expressing my frustrating with my wait for a cab. When I got to the auditorium, at 9:01am, Dave said he had seen my twitter, so he knew I should be getting there anytime soon. I didn't have Dave's cell phone number, so I was just hoping he'd be checking on Twitter. So I was actually glad I used Twitter for that (yes, I did give the hotel's manager an earful when I got back there this evening).&lt;br&gt; &lt;li&gt;Every once in a while I see somebody twittering links to articles or blog post on things that I'm personally interested in.&lt;br&gt; &lt;li&gt;I end up connecting with people in ways I would not have even imagined before. For instance, in my list of friends and followers, I have a mix of people who are personal friends, and people who knows me from the software development community (people who follows this blog, sees me presenting, or reads my articles). The other day I twittered to say I had finished watching the first season of &lt;a href="http://www.nbc.com/Heroes/" target="_blank"&gt;Heroes&lt;/a&gt;, and all of a sudden I start getting replies from people who also enjoyed the show, and I've ended up learning about some other things related to the series that I didn't know about (such as the fact that there are short graphic novels on the series' website that extend episodes and provide more details about characters and things like that). I really like this social aspect where a person ends up relating to another by means of other things they like but wouldn't know they shared it because they usually meet in the realm of, say, software development.&lt;br&gt; &lt;li&gt;You learn some fun tidbits, like when &lt;a href="http://twitter.com/rickstrahl" target="_blank"&gt;Rick&lt;/a&gt; smashed his bass sometime in the 80's and had to borrow one from Testament.  :)&lt;br&gt; &lt;li&gt;Some people (&lt;a href="http://blogs.dovetailsoftware.com/blogs/kmiller/archive/2008/04/15/creating-a-twitter-integration.aspx" target="_blank"&gt;like Kevin Miller&lt;/a&gt;) are already finding ways to use Twitter to produce some business value.&lt;/ul&gt; &lt;p&gt;One other thing I'm not liking about it right now is the fact that I don't own an *&lt;strong&gt;i&lt;/strong&gt;*Phone, I just own &lt;strong&gt;*a*&lt;/strong&gt; phone; a regular Sony phone that has a tiny little web browser, which makes it *&lt;strong&gt;really&lt;/strong&gt;* hard to type anything on it and post to Twitter, or to follow posts. And an iPhone isn't getting in my budget plans for the foreseen feature (there's just too many other things taking higher priority). &lt;p&gt;Note: I was typing this post offline; when I got online, I saw a tweet from somebody pointing out to a post by &lt;a href="http://west-wind.com/weblog/posts/350103.aspx" target="_blank"&gt;Rick&lt;/a&gt; that's very similar to this one of mine.  :)&lt;img src="http://c.services.spaces.live.com/CollectionWebService/c.gif?cid=-2115370061417702190&amp;page=RSS%3a+The+Twitter+thing+is+not+so+bad+after+all&amp;referrer=" width="1px" height="1px" border="0" alt=""&gt;&lt;img style="position:absolute" alt="" width="0px" height="0px" src="http://c.live.com/c.gif?NC=31263&amp;amp;NA=1149&amp;amp;PI=73329&amp;amp;RF=&amp;amp;DI=3919&amp;amp;PS=85545&amp;amp;TP=claudiolassala.spaces.live.com&amp;amp;GT1=claudiolassala"&gt;</description><comments>http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!724.entry#comment</comments><guid isPermaLink="true">http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!724.entry</guid><pubDate>Sat, 10 May 2008 23:51:25 GMT</pubDate><slash:comments>0</slash:comments><msn:type>blogentry</msn:type><live:type>blogentry</live:type><live:typelabel>Blog entry</live:typelabel><wfw:commentRss>http://claudiolassala.spaces.live.com/blog/cns!E2A4B22308B39CD2!724/comments/feed.rss</wfw:commentRss><wfw:comment>http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!724.entry#comment</wfw:comment><dcterms:modified>2008-05-10T23:51:25Z</dcterms:modified></item><item><title>Tulsa's School of Dev</title><link>http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!717.entry</link><description>&lt;p&gt;This Saturday I'll be speaking at the &lt;a href="http://www.schoolofdev.com/default.aspx" target="_blank"&gt;Tulsa's School of Dev&lt;/a&gt;. I've had a great time last year, so I'm looking forward to going there again, do some presentations, attend others, and meet some old buddies there. &lt;p&gt;Here  are the talks I'll be delivering: &lt;ul&gt; &lt;li&gt;Keynote: Using the New Features in C# 3.0 &lt;li&gt;Design Patterns in .NET &lt;li&gt;Intro to LINQ&lt;/ul&gt; &lt;p&gt;The full agenda can be found &lt;a href="http://www.schoolofdev.com/Tulsa/2008/pages/Agenda.aspx" target="_blank"&gt;here&lt;/a&gt;. &lt;p&gt;That's a free event, so make sure to check it out!&lt;img src="http://c.services.spaces.live.com/CollectionWebService/c.gif?cid=-2115370061417702190&amp;page=RSS%3a+Tulsa's+School+of+Dev&amp;referrer=" width="1px" height="1px" border="0" alt=""&gt;&lt;img style="position:absolute" alt="" width="0px" height="0px" src="http://c.live.com/c.gif?NC=31263&amp;amp;NA=1149&amp;amp;PI=73329&amp;amp;RF=&amp;amp;DI=3919&amp;amp;PS=85545&amp;amp;TP=claudiolassala.spaces.live.com&amp;amp;GT1=claudiolassala"&gt;</description><comments>http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!717.entry#comment</comments><guid isPermaLink="true">http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!717.entry</guid><pubDate>Mon, 05 May 2008 20:16:58 GMT</pubDate><slash:comments>1</slash:comments><msn:type>blogentry</msn:type><live:type>blogentry</live:type><live:typelabel>Blog entry</live:typelabel><wfw:commentRss>http://claudiolassala.spaces.live.com/blog/cns!E2A4B22308B39CD2!717/comments/feed.rss</wfw:commentRss><wfw:comment>http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!717.entry#comment</wfw:comment><dcterms:modified>2008-05-05T20:16:58Z</dcterms:modified></item><item><title>Improving tests with Extension Methods</title><link>http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!710.entry</link><description>&lt;p&gt;In my constant search for making it easier to write tests for common things in our framework, I believe I was able to clear some things up by using extension methods. Not that this hasn't been done before, it's just that I want to document how I got to it so that I can use this post to explain the approach to other people (and maybe help somebody else learning about this).  :) &lt;p&gt;The scenario is: we need some clean and easy way to test validity of entities after business rules have been evaluated. One approach would be to write the test like so:&lt;br&gt; &lt;div&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none"&gt;&lt;p&gt;[TestMethod]
&lt;span style="color:#0000ff"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff"&gt;void&lt;/span&gt; SomeTest()
{
    CustomerEntity entity = &lt;span style="color:#0000ff"&gt;new&lt;/span&gt; CustomerEntity();
   
    &lt;span style="color:#0000ff"&gt;bool&lt;/span&gt; entityViolatesRule = &lt;span style="color:#0000ff"&gt;false&lt;/span&gt;;&lt;br&gt;
    &lt;span style="color:#008000"&gt;// make the checks and assign true/false to the entityViolatesRule variable&lt;br&gt;&lt;/span&gt;
    Assert.IsTrue(entityViolatesRule, &lt;span style="color:#006080"&gt;&amp;quot;Some assertion message...&amp;quot;&lt;/span&gt;);
}&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;em&gt;Disclaimer: nope, I don't name my tests like that. It's just that the test name isn't important here!&lt;/em&gt;
&lt;p&gt;The test would need whatever logic necessary for checking whether the entity violates a given rule, and then call an assertion for it.
&lt;p&gt;In order to clean that up a little bit, I created a &lt;strong&gt;Violates&lt;/strong&gt; extension method on my Entity class. The extension is only meant to be used by tests. The method takes in a &lt;strong&gt;RuleViolationExpectation&lt;/strong&gt; object, meant to carry the expectations for the violation of a specific rule. An assertion would be called from within that method:&lt;br&gt;
&lt;div&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none"&gt;&lt;p&gt;&lt;span style="color:#0000ff"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff"&gt;static&lt;/span&gt; &lt;span style="color:#0000ff"&gt;class&lt;/span&gt; EntityTestExtensions
{
    &lt;span style="color:#0000ff"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff"&gt;static&lt;/span&gt; &lt;span style="color:#0000ff"&gt;void&lt;/span&gt; Violates(&lt;span style="color:#0000ff"&gt;this&lt;/span&gt; Entity entity, RuleViolationExpectation expectation)
    {
        &lt;span style="color:#0000ff"&gt;bool&lt;/span&gt; entityViolatesRule = &lt;span style="color:#0000ff"&gt;false&lt;/span&gt;;&lt;br&gt;        &lt;span style="color:#008000"&gt;// some code that looks at the expectation and checks&lt;/span&gt; &lt;br&gt;        &lt;span style="color:#008000"&gt;// whether the entity meets the expectation...&lt;/span&gt; 
        Assert.IsTrue(entityViolatesRule, &lt;span style="color:#006080"&gt;&amp;quot;Some assertion message...&amp;quot;&lt;/span&gt;);
    }
}&lt;/pre&gt;&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;The &lt;strong&gt;RuleViolationExpectation&lt;/strong&gt; class looks like this:&lt;br&gt;&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none"&gt;&lt;span style="color:#0000ff"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff"&gt;class&lt;/span&gt; RuleViolationExpectation
{
    &lt;span style="color:#0000ff"&gt;public&lt;/span&gt; Entity Entity { get; set; }
    &lt;span style="color:#0000ff"&gt;public&lt;/span&gt; Type RuleType { get; set; }
    &lt;span style="color:#0000ff"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff"&gt;string&lt;/span&gt; Message { get; set; }
    &lt;span style="color:#0000ff"&gt;public&lt;/span&gt; ViolationLevel Level { get; set; }
}&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The test could now look like this: &lt;br&gt;
&lt;div&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none"&gt;[TestMethod]
&lt;span style="color:#0000ff"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff"&gt;void&lt;/span&gt; SomeTest()
{
    CustomerEntity entity = &lt;span style="color:#0000ff"&gt;new&lt;/span&gt; CustomerEntity();

    entity.Violates(&lt;span style="color:#0000ff"&gt;new&lt;/span&gt; RuleViolationExpectation 
                    { 
                        RuleType = &lt;span style="color:#0000ff"&gt;typeof&lt;/span&gt;(CustomerNameIsValidRule), 
                        Level = ViolationLevel.Violation, 
                        Message = &lt;span style="color:#006080"&gt;&amp;quot;Customer name must...&amp;quot;&lt;/span&gt; 
                    });
}&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;I liked that better because I got rid of the Assert, as well as any logic that checks whether the entity violates the rule according to the expectation. Now all the developer has to do is to call the Violates method on the entity, passing in the expectation, and the framework does the rest (verification and assertion).
&lt;p&gt;One thing bothered me, though: the call to the method read sort of funny, kind of like &amp;quot;&lt;em&gt;entity violatates rule violation expectation...&lt;/em&gt;&amp;quot;. That didn't really express the intent well: it's not that the &amp;quot;entity violates a rule violation expectation&amp;quot;.... it's more like the &amp;quot;entity should violate a specific rule according to the given expectation&amp;quot;.
&lt;p&gt;I then rewrote the test based on how I'd like it to read for better comprehension:&lt;br&gt;
&lt;div&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none"&gt;[TestMethod]
&lt;span style="color:#0000ff"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff"&gt;void&lt;/span&gt; SomeTest()
{
    CustomerEntity entity = &lt;span style="color:#0000ff"&gt;new&lt;/span&gt; CustomerEntity();

    entity.Violates&amp;lt;CustomerNameIsValidRule&amp;gt;()
          .WithMessage(&lt;span style="color:#006080"&gt;&amp;quot;Customer name must blah blah blah...&amp;quot;&lt;/span&gt;)
          .OnLevel(ViolationLevel.Violation)
          .Verify();
}&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;I thought that read much better. It's more like &lt;strong&gt;&amp;quot;entity violates the CustomerNameIsValid rule, with a message like 'Customer name must blah blah blah...', and on level Violation, so Verify all of that for me&amp;quot;&lt;/strong&gt;. For the records, the other level option is &lt;em&gt;Warning&lt;/em&gt;.
&lt;p&gt;Notice that from the call to Violates on, that's really just a long chained method call, split up into several lines just to make the code easier to read, without requiring horizontal scrolling.
&lt;p&gt;In order to enable such syntax, I've added one more extension method to my EntityTestExtensions class:&lt;br&gt;
&lt;div&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none"&gt;&lt;span style="color:#0000ff"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff"&gt;static&lt;/span&gt; RuleViolationExpectation Violates&amp;lt;TRule&amp;gt;(&lt;span style="color:#0000ff"&gt;this&lt;/span&gt; Entity entity)
    &lt;span style="color:#0000ff"&gt;where&lt;/span&gt; TRule : Rule
{
    RuleViolationExpectation expectation = &lt;span style="color:#0000ff"&gt;new&lt;/span&gt; RuleViolationExpectation();
    expectation.Entity = entity;
    expectation.RuleType = &lt;span style="color:#0000ff"&gt;typeof&lt;/span&gt;(TRule);
    &lt;span style="color:#0000ff"&gt;return&lt;/span&gt; expectation;
}&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The method takes the expected rule type as a generic type, instantiates the RuleViolationExpectationViolation class, associates the expectation with the entity, assigns the type of rule to the expectation, and returns it.
&lt;p&gt;Next, I created a RuleViolationExpectationExtensions class, and added extension methods to it, like so:&lt;br&gt;
&lt;div&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none"&gt;&lt;span style="color:#0000ff"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff"&gt;static&lt;/span&gt; &lt;span style="color:#0000ff"&gt;class&lt;/span&gt; RuleViolationExpectationExtensions
{
    &lt;span style="color:#0000ff"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff"&gt;static&lt;/span&gt; RuleViolationExpectation WithMessage(&lt;span style="color:#0000ff"&gt;this&lt;/span&gt; RuleViolationExpectation expectation, &lt;br&gt;                                                       &lt;span style="color:#0000ff"&gt;string&lt;/span&gt; message)
    {
        expectation.Message = message;
        &lt;span style="color:#0000ff"&gt;return&lt;/span&gt; expectation;
    }

    &lt;span style="color:#0000ff"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff"&gt;static&lt;/span&gt; RuleViolationExpectation OnLevel(&lt;span style="color:#0000ff"&gt;this&lt;/span&gt; RuleViolationExpectation expectation, &lt;br&gt;                                                   ViolationLevel level)
    {
        expectation.Level = level;
        &lt;span style="color:#0000ff"&gt;return&lt;/span&gt; expectation;
    }

    &lt;span style="color:#0000ff"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff"&gt;static&lt;/span&gt; &lt;span style="color:#0000ff"&gt;void&lt;/span&gt; Verify(&lt;span style="color:#0000ff"&gt;this&lt;/span&gt; RuleViolationExpectation expectation)
    {
        expectation.Entity.Violates(expectation);
    }
}&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Each method extends the RuleViolationExpectation class, and takes in the value for one of the properties we need to assign on the expectation, we assign it, and then returns the expectation back to the caller. Got it? It's just a bunch of methods acting upon the same object. 
&lt;p&gt;The Verify method is the one that works a period (&amp;quot;.&amp;quot;) at the end of the sentence, by telling the framework we're done setting up the expectation, and it's time to verify the entity against the expectation. The method just leverages the Violates method that we already have on the entity; the one that takes in the RuleViolationExpectation object.
&lt;p&gt;The actual implementation I've done for this in our framework is more complex and complete; the expectation class has a couple more properties that we need to check for, and it also has logic that validates the expectation so to make sure the developer has provided everything the framework needs in order to verify the entity against the expectation. If there's piece missing, the framework call an assertion and tells the developer what's missing.
&lt;p&gt;Also, I've created a &lt;a href="http://www.devexpress.com/Products/NET/IDETools/CodeRush/" target="_blank"&gt;CodeRush&lt;/a&gt; template that makes it REALLY easy for developer to write the code and not miss any piece. The way it works is: I put the name of my entity variable into the clipboard and then type &lt;strong&gt;rve&lt;/strong&gt; (&lt;strong&gt;R&lt;/strong&gt;ule &lt;strong&gt;V&lt;/strong&gt;iolation &lt;strong&gt;E&lt;/strong&gt;xpectation, but I'll probably change this), and I get this:
&lt;p&gt;&lt;a href="http://blufiles.storage.msn.com/y1p9XbMVtHb_l_OfD19SJ3Da2bWHxrmHk8ifFuZfOJkZz887IW3JzoypC7QIs6kH2IerKK3vK1-QMg?PARTNER=WRITER"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=107 alt="clip_image001" src="http://blufiles.storage.msn.com/y1p9XbMVtHb_l9XWr2KVDks0C4RWuPxYicmn6fWAfJ-wu_w9THojy6zs3aP9a8hHuTfNHx6lxfHIaQ?PARTNER=WRITER" width=449 border=0&gt;&lt;/a&gt;
&lt;p&gt;All the developer then needs to do is to fill in the expectations, hitting enter to go through the &amp;quot;fields&amp;quot; (orange highlighted areas) in the code:
&lt;p&gt;&lt;a href="http://blufiles.storage.msn.com/y1p9XbMVtHb_l_0Ub0NsNO8Kc8SEJA0hnJPiSpfHm7SeY2XnIb9AicixeLu_a2Ht2tlmjyLOR8H0QI?PARTNER=WRITER"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=105 alt="clip_image001[7]" src="http://blufiles.storage.msn.com/y1p9XbMVtHb_l-7SfzADg26O1wrVDyWNDARQSeqSsxDlpwtfYlo8GB8kEgKKf2eebZ6UURxh6NOJuo?PARTNER=WRITER" width=448 border=0&gt;&lt;/a&gt;
&lt;p&gt;Moving along with a test-first approach, I'm already thinking that the developer can write the test first for the rules evaluation verification, and then I'll write a plug-in that will read the call to &amp;quot;Violates...&amp;quot; and generate the business rule, where the dev then only needs to write the actual business logic. In case the test hasn't been created first, I can also have a plug-in that'll look at an existing business rule and then create the test based on it. 
&lt;p&gt;I believe such approach has very little friction even for developer who aren't not entirely comfortable with TDD and test-first. What do &lt;strong&gt;you&lt;/strong&gt; think?&lt;img src="http://c.services.spaces.live.com/CollectionWebService/c.gif?cid=-2115370061417702190&amp;page=RSS%3a+Improving+tests+with+Extension+Methods&amp;referrer=" width="1px" height="1px" border="0" alt=""&gt;&lt;img style="position:absolute" alt="" width="0px" height="0px" src="http://c.live.com/c.gif?NC=31263&amp;amp;NA=1149&amp;amp;PI=73329&amp;amp;RF=&amp;amp;DI=3919&amp;amp;PS=85545&amp;amp;TP=claudiolassala.spaces.live.com&amp;amp;GT1=claudiolassala"&gt;</description><comments>http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!710.entry#comment</comments><guid isPermaLink="true">http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!710.entry</guid><pubDate>Tue, 22 Apr 2008 15:52:16 GMT</pubDate><slash:comments>0</slash:comments><msn:type>blogentry</msn:type><live:type>blogentry</live:type><live:typelabel>Blog entry</live:typelabel><wfw:commentRss>http://claudiolassala.spaces.live.com/blog/cns!E2A4B22308B39CD2!710/comments/feed.rss</wfw:commentRss><wfw:comment>http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!710.entry#comment</wfw:comment><dcterms:modified>2008-04-22T15:53:51Z</dcterms:modified></item><item><title>Putting LINQ queries together, one piece at a time</title><link>http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!705.entry</link><description>&lt;p&gt;Last week, good pal &lt;a href="http://codebetter.com/blogs/rodpaddock/Default.aspx" target="_blank"&gt;Rod Paddock&lt;/a&gt; asked me an interesting question about LINQ, and I think this may be useful to others (not that the answer may not already be out there somewhere, of course...). &lt;p&gt;The main scenario was that different queries had to be run depending on some options. The &lt;strong&gt;from&lt;/strong&gt; and &lt;strong&gt;select&lt;/strong&gt; parts of the query where pretty much the same; the parts that varied were the &lt;strong&gt;where&lt;/strong&gt; and &lt;strong&gt;orderby&lt;/strong&gt; ones. Here's some code to illustrate a simplified scenario: &lt;p&gt;  &lt;div&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none"&gt;Collection&amp;lt;&lt;span style="color:#0000ff"&gt;string&lt;/span&gt;&amp;gt; months = &lt;span style="color:#0000ff"&gt;new&lt;/span&gt; Collection&amp;lt;&lt;span style="color:#0000ff"&gt;string&lt;/span&gt;&amp;gt; { &lt;span style="color:#006080"&gt;&amp;quot;January&amp;quot;&lt;/span&gt;, &lt;span style="color:#006080"&gt;&amp;quot;February&amp;quot;&lt;/span&gt;, 
    &lt;span style="color:#006080"&gt;&amp;quot;March&amp;quot;&lt;/span&gt;, &lt;span style="color:#006080"&gt;&amp;quot;April&amp;quot;&lt;/span&gt;, &lt;span style="color:#006080"&gt;&amp;quot;May&amp;quot;&lt;/span&gt;, &lt;span style="color:#006080"&gt;&amp;quot;June&amp;quot;&lt;/span&gt;, &lt;span style="color:#006080"&gt;&amp;quot;July&amp;quot;&lt;/span&gt;, &lt;span style="color:#006080"&gt;&amp;quot;August&amp;quot;&lt;/span&gt;, &lt;span style="color:#006080"&gt;&amp;quot;September&amp;quot;&lt;/span&gt;, &lt;span style="color:#006080"&gt;&amp;quot;October&amp;quot;&lt;/span&gt;, 
    &lt;span style="color:#006080"&gt;&amp;quot;November&amp;quot;&lt;/span&gt;, &lt;span style="color:#006080"&gt;&amp;quot;December&amp;quot;&lt;/span&gt; };

IEnumerable&amp;lt;&lt;span style="color:#0000ff"&gt;string&lt;/span&gt;&amp;gt; query = &lt;span style="color:#0000ff"&gt;null&lt;/span&gt;;

&lt;span style="color:#0000ff"&gt;int&lt;/span&gt;? minNumberOfLetters = 5;

&lt;span style="color:#0000ff"&gt;if&lt;/span&gt; (minNumberOfLetters.HasValue)
{
    query = from m &lt;span style="color:#0000ff"&gt;in&lt;/span&gt; months
            &lt;span style="color:#0000ff"&gt;where&lt;/span&gt; m.Length &amp;gt;= minNumberOfLetters
            select m;
}
&lt;span style="color:#0000ff"&gt;else&lt;/span&gt;
{
    query = from m &lt;span style="color:#0000ff"&gt;in&lt;/span&gt; months
            &lt;span style="color:#0000ff"&gt;where&lt;/span&gt; m.Length &amp;gt;= minNumberOfLetters
            select m;
}

&lt;span style="color:#0000ff"&gt;bool&lt;/span&gt; shouldOrderByLength = &lt;span style="color:#0000ff"&gt;true&lt;/span&gt;;

&lt;span style="color:#0000ff"&gt;if&lt;/span&gt; (shouldOrderByLength)
{
    query = from m &lt;span style="color:#0000ff"&gt;in&lt;/span&gt; months
            &lt;span style="color:#0000ff"&gt;where&lt;/span&gt; m.Length &amp;gt;= minNumberOfLetters
            orderby m.Length
            select m;
}

&lt;span style="color:#0000ff"&gt;foreach&lt;/span&gt; (var item &lt;span style="color:#0000ff"&gt;in&lt;/span&gt; query)
{
    Console.WriteLine(item);
}&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The code should query only months whose name length is equals to or greater than &lt;strong&gt;minNumberOfLetter&lt;/strong&gt; (in the sample above, that'd be 5), unless that variable holds a null, in which case all months should be returned. Also, the query should be ordered by the length of months names, in case &lt;strong&gt;shouldOrderByLength&lt;/strong&gt; is true (obvioulsy, both minNumberOfLetter and shouldOrderByLenght wouldn't be hard-coded, but instead, read from user input or whatever...).
&lt;p&gt;The main problem with such code is that there's a lot of redundancy in the queries. What if, for instance, instead of doing &lt;strong&gt;select m&lt;/strong&gt;, we wanted to do select &lt;strong&gt;m.ToUpper()&lt;/strong&gt;? We'd need to make that change in multiple places.
&lt;p&gt;Queries can be broken up into smaller pieces. Queries don't get executed until they're iterated over, either by using in a &lt;strong&gt;foreach&lt;/strong&gt; block, or calling &lt;strong&gt;ToList()&lt;/strong&gt; on it (which uses a foreach internally...). That means we can tweak with them until right before the iteration happens.
&lt;p&gt;So, we can refactor the previous code where we first declare the part that doesn't vary in the query:
&lt;div&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none"&gt;var query = from m &lt;span style="color:#0000ff"&gt;in&lt;/span&gt; months select m;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Remember, the query above does NOT get executed just yet; we are just &lt;em&gt;&lt;strong&gt;defining&lt;/strong&gt;&lt;/em&gt; it, but &lt;em&gt;&lt;strong&gt;not executing&lt;/strong&gt;&lt;/em&gt; it (think of it as building a SQL query by concatenating strings, and eventually executing the query against the database).
&lt;p&gt;Then we can add the &lt;strong&gt;where&lt;/strong&gt; clause to the query if appropriate:
&lt;div&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none"&gt;&lt;span style="color:#0000ff"&gt;if&lt;/span&gt; (minNumberOfLetters.HasValue)
{
    query = query.Where((&lt;span style="color:#0000ff"&gt;string&lt;/span&gt; m) =&amp;gt; m.Length &amp;gt;= minNumberOfLetters);
}&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Same with the &lt;strong&gt;orderby&lt;/strong&gt; clause:
&lt;div&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none"&gt;&lt;span style="color:#0000ff"&gt;if&lt;/span&gt; (shouldOrderByLength)
{
    query = query.OrderBy((&lt;span style="color:#0000ff"&gt;string&lt;/span&gt; m) =&amp;gt; m.Length);
}&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Whenever we're done building the query, then we can iterate over it as needed.
&lt;p&gt;Another cool thing we can do: say we need to order the query according to some specific logic; for example, if some variable is true we want to order the query by the month's name, otherwise we want .to order it by the name's length. That could be done something like this:
&lt;p&gt; 
&lt;div&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none"&gt;Func&amp;lt;&lt;span style="color:#0000ff"&gt;string&lt;/span&gt;, &lt;span style="color:#0000ff"&gt;object&lt;/span&gt;&amp;gt; orderBy = &lt;span style="color:#0000ff"&gt;null&lt;/span&gt;;

&lt;span style="color:#0000ff"&gt;if&lt;/span&gt; (orderByName)
{
    orderBy = (&lt;span style="color:#0000ff"&gt;string&lt;/span&gt; m) =&amp;gt; m;
}
&lt;span style="color:#0000ff"&gt;else&lt;/span&gt;
{
    orderBy = (&lt;span style="color:#0000ff"&gt;string&lt;/span&gt; m) =&amp;gt; m.Length;
}

query = query.OrderBy(orderBy);
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Basically, we declare a Func&amp;lt;string, object&amp;gt; variable that is going to hold the expression for ordering. In the if-block we assign a lambda expression to the variable accordingly. Finally, we add the call to OrderBy to the query, passing in the expression.
&lt;p&gt;Here's the complete final code, in case you want to mess with it:
&lt;p&gt; 
&lt;div&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none"&gt;Collection&amp;lt;&lt;span style="color:#0000ff"&gt;string&lt;/span&gt;&amp;gt; months = &lt;span style="color:#0000ff"&gt;new&lt;/span&gt; Collection&amp;lt;&lt;span style="color:#0000ff"&gt;string&lt;/span&gt;&amp;gt; { &lt;span style="color:#006080"&gt;&amp;quot;January&amp;quot;&lt;/span&gt;, &lt;span style="color:#006080"&gt;&amp;quot;February&amp;quot;&lt;/span&gt;, &lt;span style="color:#006080"&gt;&amp;quot;March&amp;quot;&lt;/span&gt;, &lt;br&gt;&lt;span style="color:#006080"&gt;                  &amp;quot;April&amp;quot;&lt;/span&gt;, &lt;span style="color:#006080"&gt;&amp;quot;May&amp;quot;&lt;/span&gt;, &lt;span style="color:#006080"&gt;&amp;quot;June&amp;quot;&lt;/span&gt;, &lt;span style="color:#006080"&gt;&amp;quot;July&amp;quot;&lt;/span&gt;, &lt;span style="color:#006080"&gt;&amp;quot;August&amp;quot;&lt;/span&gt;, &lt;span style="color:#006080"&gt;&amp;quot;September&amp;quot;&lt;/span&gt;, &lt;span style="color:#006080"&gt;&amp;quot;October&amp;quot;&lt;/span&gt;, &lt;br&gt;&lt;span style="color:#006080"&gt;                  &amp;quot;November&amp;quot;&lt;/span&gt;, &lt;span style="color:#006080"&gt;&amp;quot;December&amp;quot;&lt;/span&gt; };

var query = from m &lt;span style="color:#0000ff"&gt;in&lt;/span&gt; months select m;

&lt;span style="color:#0000ff"&gt;int&lt;/span&gt;? minNumberOfLetters = 5;

&lt;span style="color:#0000ff"&gt;if&lt;/span&gt; (minNumberOfLetters.HasValue)
{
    query = query.Where((&lt;span style="color:#0000ff"&gt;string&lt;/span&gt; m) =&amp;gt; m.Length &amp;gt;= minNumberOfLetters);
}

&lt;span style="color:#0000ff"&gt;bool&lt;/span&gt; shouldOrderByLength = &lt;span style="color:#0000ff"&gt;true&lt;/span&gt;;

&lt;span style="color:#0000ff"&gt;if&lt;/span&gt; (shouldOrderByLength)
{
    query = query.OrderBy((&lt;span style="color:#0000ff"&gt;string&lt;/span&gt; m) =&amp;gt; m.Length);
}

&lt;span style="color:#0000ff"&gt;bool&lt;/span&gt; orderByName = &lt;span style="color:#0000ff"&gt;true&lt;/span&gt;;

Func&amp;lt;&lt;span style="color:#0000ff"&gt;string&lt;/span&gt;, &lt;span style="color:#0000ff"&gt;object&lt;/span&gt;&amp;gt; orderBy = &lt;span style="color:#0000ff"&gt;null&lt;/span&gt;;

&lt;span style="color:#0000ff"&gt;if&lt;/span&gt; (orderByName)
{
    orderBy = (&lt;span style="color:#0000ff"&gt;string&lt;/span&gt; m) =&amp;gt; m;
}
&lt;span style="color:#0000ff"&gt;else&lt;/span&gt;
{
    orderBy = (&lt;span style="color:#0000ff"&gt;string&lt;/span&gt; m) =&amp;gt; m.Length;
}

&lt;span style="color:#0000ff"&gt;if&lt;/span&gt; (orderBy != &lt;span style="color:#0000ff"&gt;null&lt;/span&gt;)
{
    query = query.OrderBy(orderBy);
}

&lt;span style="color:#0000ff"&gt;foreach&lt;/span&gt; (var item &lt;span style="color:#0000ff"&gt;in&lt;/span&gt; query)
{
    Console.WriteLine(item);
}&lt;/pre&gt;&lt;/div&gt;&lt;img src="http://c.services.spaces.live.com/CollectionWebService/c.gif?cid=-2115370061417702190&amp;page=RSS%3a+Putting+LINQ+queries+together%2c+one+piece+at+a+time&amp;referrer=" width="1px" height="1px" border="0" alt=""&gt;&lt;img style="position:absolute" alt="" width="0px" height="0px" src="http://c.live.com/c.gif?NC=31263&amp;amp;NA=1149&amp;amp;PI=73329&amp;amp;RF=&amp;amp;DI=3919&amp;amp;PS=85545&amp;amp;TP=claudiolassala.spaces.live.com&amp;amp;GT1=claudiolassala"&gt;</description><comments>http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!705.entry#comment</comments><guid isPermaLink="true">http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!705.entry</guid><pubDate>Mon, 21 Apr 2008 15:49:09 GMT</pubDate><slash:comments>1</slash:comments><msn:type>blogentry</msn:type><live:type>blogentry</live:type><live:typelabel>Blog entry</live:typelabel><wfw:commentRss>http://claudiolassala.spaces.live.com/blog/cns!E2A4B22308B39CD2!705/comments/feed.rss</wfw:commentRss><wfw:comment>http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!705.entry#comment</wfw:comment><dcterms:modified>2008-04-21T15:51:17Z</dcterms:modified></item><item><title>Ok, ok, I'm signing up for this Twitter thing...</title><link>http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!700.entry</link><description>&lt;p&gt;&lt;a href="http://www.markusegger.com/blog" target="_blank"&gt;Markus&lt;/a&gt; has been harassing me about to get into these &lt;a href="http://www.facebook.com/" target="_blank"&gt;Facebook&lt;/a&gt; and &lt;a href="http://www.twitter.com" target="_blank"&gt;Twitter&lt;/a&gt; things. I've signed up for Facebook a few weeks ago (even though I don't waste my time with those little applications they have there...). Now he's been on my tail saying I have to do this Twitter thing, which I have seen people talking a lot about it, but I still can't really see &lt;strong&gt;why&lt;/strong&gt; I'd want to use it.   :) &lt;p&gt;I've decided to give it a go... let's see... I'll either get hooked, or just not use it for too long.  It seems to me like a new spin to the whole &lt;a href="http://en.wikipedia.org/wiki/Big_Brother_(TV_series)" target="_blank"&gt;Big Brother&lt;/a&gt; thing. :) &lt;p&gt;Well, anyways, I'm there: &lt;a title="http://twitter.com//ClaudioLassala" href="http://twitter.com/ClaudioLassala"&gt;http://twitter.com/ClaudioLassala&lt;/a&gt;&lt;img src="http://c.services.spaces.live.com/CollectionWebService/c.gif?cid=-2115370061417702190&amp;page=RSS%3a+Ok%2c+ok%2c+I'm+signing+up+for+this+Twitter+thing...&amp;referrer=" width="1px" height="1px" border="0" alt=""&gt;&lt;img style="position:absolute" alt="" width="0px" height="0px" src="http://c.live.com/c.gif?NC=31263&amp;amp;NA=1149&amp;amp;PI=73329&amp;amp;RF=&amp;amp;DI=3919&amp;amp;PS=85545&amp;amp;TP=claudiolassala.spaces.live.com&amp;amp;GT1=claudiolassala"&gt;</description><comments>http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!700.entry#comment</comments><guid isPermaLink="true">http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!700.entry</guid><pubDate>Thu, 17 Apr 2008 04:15:48 GMT</pubDate><slash:comments>4</slash:comments><msn:type>blogentry</msn:type><live:type>blogentry</live:type><live:typelabel>Blog entry</live:typelabel><wfw:commentRss>http://claudiolassala.spaces.live.com/blog/cns!E2A4B22308B39CD2!700/comments/feed.rss</wfw:commentRss><wfw:comment>http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!700.entry#comment</wfw:comment><dcterms:modified>2008-04-17T04:15:48Z</dcterms:modified></item><item><title>At the MVP Summit this week</title><link>http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!694.entry</link><description>&lt;p&gt;I'm out to Seattle for the MVP Summit 2008 the whole week. Always fun to be here. It's great to get together with all these people, from all over the world, that I got to know over the Internet throughout the years. &lt;p&gt;It's just very cool to hang out with people from so many different countries, coming from very different cultures, speaking very different languages, but at this point they're all focused into discussing the things they passionately work with.&lt;img src="http://c.services.spaces.live.com/CollectionWebService/c.gif?cid=-2115370061417702190&amp;page=RSS%3a+At+the+MVP+Summit+this+week&amp;referrer=" width="1px" height="1px" border="0" alt=""&gt;&lt;img style="position:absolute" alt="" width="0px" height="0px" src="http://c.live.com/c.gif?NC=31263&amp;amp;NA=1149&amp;amp;PI=73329&amp;amp;RF=&amp;amp;DI=3919&amp;amp;PS=85545&amp;amp;TP=claudiolassala.spaces.live.com&amp;amp;GT1=claudiolassala"&gt;</description><comments>http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!694.entry#comment</comments><guid isPermaLink="true">http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!694.entry</guid><pubDate>Tue, 15 Apr 2008 01:06:46 GMT</pubDate><slash:comments>0</slash:comments><msn:type>blogentry</msn:type><live:type>blogentry</live:type><live:typelabel>Blog entry</live:typelabel><wfw:commentRss>http://claudiolassala.spaces.live.com/blog/cns!E2A4B22308B39CD2!694/comments/feed.rss</wfw:commentRss><wfw:comment>http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!694.entry#comment</wfw:comment><dcterms:modified>2008-04-15T01:06:46Z</dcterms:modified></item><item><title>Failed assertion throws an exception...</title><link>http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!692.entry</link><description>&lt;p&gt;Hmm, this is something I did not know: when a testing framework's &lt;em&gt;Assert&lt;/em&gt; method fails, an exception gets thrown. We don't actually see that exception, because the framework catches it. We usually don't see it because tests normally look like this: &lt;div&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none"&gt;[Test]
&lt;span style="color:#0000ff"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff"&gt;void&lt;/span&gt; SomeTest()
{
    Assert.IsTrue(&lt;span style="color:#0000ff"&gt;false&lt;/span&gt;, &lt;span style="color:#006080"&gt;&amp;quot;whatever&amp;quot;&lt;/span&gt;);
}&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;However, say the test was written like this:
&lt;div&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none"&gt;[Test]
&lt;span style="color:#0000ff"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff"&gt;void&lt;/span&gt; Test()
{
    &lt;span style="color:#0000ff"&gt;try&lt;/span&gt;
    {
        Assert.IsTrue(&lt;span style="color:#0000ff"&gt;false&lt;/span&gt;, &lt;span style="color:#006080"&gt;&amp;quot;whatever&amp;quot;&lt;/span&gt;);
    }
    &lt;span style="color:#0000ff"&gt;catch&lt;/span&gt; (Exception ex)
    {
        Console.WriteLine(ex.GetType().FullName);
    }
}&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;We get the following printed on the Output window:
&lt;p&gt;NUnit.Framework.AssertionException
&lt;p&gt;So why would somebody ever write a test like the one above, you may ask, right? Well, like I &lt;a href="http://claudiolassala.spaces.live.com/blog/cns!E2A4B22308B39CD2!691.entry" target="_blank"&gt;mentioned&lt;/a&gt; the other day, I wrote a framework for integration tests that has a bunch of assertions for some things so that the developer doesn't have to write those over and over again. Even though those things are hidden from the developer, I try to capture as much information as possible, and if any assertion fails, I give all the details to the developer so that he know exactly what failed during the integration.
&lt;p&gt;When running a specific test here, I noticed that I was getting some extra information that shouldn't really be there, and that was because one assertion was failing and was getting trapped by a try/catch somewhere, and after some digging I actually realized this behavior of assertions throwing &amp;quot;AssertionException&amp;quot;'s. &lt;img src="http://c.services.spaces.live.com/CollectionWebService/c.gif?cid=-2115370061417702190&amp;page=RSS%3a+Failed+assertion+throws+an+exception...&amp;referrer=" width="1px" height="1px" border="0" alt=""&gt;&lt;img style="position:absolute" alt="" width="0px" height="0px" src="http://c.live.com/c.gif?NC=31263&amp;amp;NA=1149&amp;amp;PI=73329&amp;amp;RF=&amp;amp;DI=3919&amp;amp;PS=85545&amp;amp;TP=claudiolassala.spaces.live.com&amp;amp;GT1=claudiolassala"&gt;</description><comments>http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!692.entry#comment</comments><guid isPermaLink="true">http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!692.entry</guid><pubDate>Fri, 11 Apr 2008 18:46:43 GMT</pubDate><slash:comments>1</slash:comments><msn:type>blogentry</msn:type><live:type>blogentry</live:type><live:typelabel>Blog entry</live:typelabel><wfw:commentRss>http://claudiolassala.spaces.live.com/blog/cns!E2A4B22308B39CD2!692/comments/feed.rss</wfw:commentRss><wfw:comment>http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!692.entry#comment</wfw:comment><dcterms:modified>2008-04-11T18:46:43Z</dcterms:modified></item><item><title>The whole testing thing...</title><link>http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!691.entry</link><description>&lt;p&gt;I keep hearing how developers say it's kind of hard to get their minds around this testing thing, so I was then thinking to myself: &amp;quot;&lt;em&gt;how did I get into this, by the way?&lt;/em&gt;&amp;quot; &lt;p&gt;It was at &lt;a href="http://www.devteach.com" target="_blank"&gt;DevTeach&lt;/a&gt; 2003 when I first heard about unit testing. &lt;a href="http://twitter.com/sbellware" target="_blank"&gt;Scott Bellware&lt;/a&gt; was presenting a session about it. I decided to sit in and see what that was all about. Scott showed &lt;a href="http://www.nunit.org" target="_blank"&gt;NUnit&lt;/a&gt;, and how to write some unit tests (sorry, that's as much I can remember so many years later...). &lt;p&gt;&lt;a href="http://blufiles.storage.msn.com/y1p9XbMVtHb_l96C4vDabLIOdc83ThKV-x5ABji2HBaEOpk-D2mKFSKt-wLjSXbXjSPjW2SF44Cx_4?PARTNER=WRITER"&gt;&lt;img height=330 alt="questions[5]" src="http://blufiles.storage.msn.com/y1p9XbMVtHb_l8VXy9I3aeq6DahKqFnwkZZTjnbdlC8-aqXmLfQogaa-fytTeUXMOSPPaH9aePOFDY?PARTNER=WRITER" width=316 align=right border=0&gt;&lt;/a&gt;Right after seeing that session, I decided to start writing some tests for some new code I was writing. At the time, I was writing the test after I wrote the production code, still trying to figure that NUnit thing. I was pretty pleased by having automated tests for some of my code.  &lt;p&gt;Late in 2005, the same Scott came to Houston to present a full-day TDD workshop.  Again, that was kind of long ago, and my memory is fuzzy. I remember Scott touched on dependencies, mock objects, how Test-Driven Development (TDD) helps keeping track whether the implementation is going on or off track, etc. I guess that was when I've heard of using TDD more as a design methodology than as a testing methodology, but I'm sure I didn't quite *get* the idea back then.   &lt;p&gt;Around that same time, I was working on a project here where we've decided we wanted developers to write more tests. We were using NUnit, and writing &amp;quot;&lt;em&gt;integration&lt;/em&gt;&amp;quot; tests, not &amp;quot;&lt;em&gt;unit&lt;/em&gt;&amp;quot; tests (as I came to realize later). We were writing tests to make sure the data put into our business entities were being saved and retrieved correctly to and from the database. &lt;p&gt;Right before starting off a new project (early in 2006), I looked back and noticed that a lot of redundant code was being written for those tests (instantiate entity, stick test values to its properties, save it, reload it, check to make sure the values saved are the ones expected, delete it, and have assertions all around to make sure things were working).  &lt;p&gt;Decided to make that easier, I wrote a testing framework that'd do all that boring and repetitive work for the developers. For each business entity, the developer would create a test fixture class, make it inherit from a baseclass from my framework, override a method to provide test data to be pushed onto the entity, and give the baseclass the type of entity under test. The framework would then take care of doing all the heavy lifting and report any problems to the developer by means of assertions with as much detailed information possible (which property has failed, in which process, why, what could be causing it, etc.). &lt;p&gt;We had also noticed how much of a pain it was to create some specific test data that a given entity needed in order for it to be properly tested. I've then added some helper methods to my test framework that allowed the developer to pretty much ask for &amp;quot;5 entities of type Customer for tests&amp;quot;, or something like that, and the framework would take care of creating those, giving it back to the developer (who could also tweak with the test entities, of course), and then cleaning it up afterwards. &lt;p&gt;The framework worked well, and the great thing about it was that it was pretty easy to get some good code coverage with those tests. However, at the time I *thought* we were doing &lt;strong&gt;unit&lt;/strong&gt; tests, but we were actually doing &lt;strong&gt;integration&lt;/strong&gt; tests. It finally downed on me that we should also be able to test things in isolation. That is, if what we need to test is a business rule, we shouldn't need a live connection to the database, or even a data access layer for that matter. &amp;quot;&lt;em&gt;A-ha, so that's what those &lt;strong&gt;mock objects&lt;/strong&gt; are all about, then&amp;quot;&lt;/em&gt;, I thought to myself.  &lt;p&gt;With that in mind, I decided to improve our testing framework so to make it easier for our developers to write unit tests for our business rules, so that they didn't have to worry about the dependencies we have in our middle-tier framework in order to do so. After I've done some research on mock frameworks, I've decided to go with &lt;a href="http://www.typemock.com" target="_blank"&gt;TypeMock&lt;/a&gt;, which I wrap up in my own special framework for testing our middle-tier components.  &lt;p&gt;I'm currently working on rewriting some pieces of our testing framework in order to make use of some of the new features in C# 3.0 (such as object and collection initializers, lambda expressions, extension methods, etc.). This allowed me to clean up my API's a lot (or so I think). &lt;p&gt;Everything I've mentioned so far has definitely improved my skills with doing TDD as a &amp;quot;testing&amp;quot; methodology, trying to make sure our code has some tests around it. That is something that most developers have a better time understanding and trying to do it, so that's certainly valid. &lt;p&gt;Doing TDD as a &amp;quot;design&amp;quot; methodology is something eventually I got the idea and decided to start practicing it. This is definitely much harder for developers to get used to, because it really requires a different approach to writing software; different from what they've been doing for so many years now. However, like it's been said over and over again by other people, when you really stick with TDD, then you start feeling bad about any code you write that you didn't design beforehand, test-first. &lt;p&gt;By no means am I saying that I have mastered TDD (far from that), but I'm just certain that the code I wrote test-first is of much higher quality. Not only I believe my design is more solid (both because of the thought I've put through the design, but also because of the &lt;em&gt;side-effect&lt;/em&gt; of getting the implementation under test), but I find it's much easier to explain something to another developer by showing her the tests first, and then digging into the implementation. &lt;p&gt;I have been reading a lot of books, articles, websites, blog posts, other people's code, etc., trying to improve my approach to TDD (which always entertains me by getting blown away by some code other people write). This has been great, and I plan to continue doing so. &lt;p&gt;I'll probably have some more posts coming this way on the subject, as I get my mind around this thing.  :)&lt;img src="http://c.services.spaces.live.com/CollectionWebService/c.gif?cid=-2115370061417702190&amp;page=RSS%3a+The+whole+testing+thing...&amp;referrer=" width="1px" height="1px" border="0" alt=""&gt;&lt;img style="position:absolute" alt="" width="0px" height="0px" src="http://c.live.com/c.gif?NC=31263&amp;amp;NA=1149&amp;amp;PI=73329&amp;amp;RF=&amp;amp;DI=3919&amp;amp;PS=85545&amp;amp;TP=claudiolassala.spaces.live.com&amp;amp;GT1=claudiolassala"&gt;</description><comments>http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!691.entry#comment</comments><guid isPermaLink="true">http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!691.entry</guid><pubDate>Thu, 10 Apr 2008 03:37:36 GMT</pubDate><slash:comments>2</slash:comments><msn:type>blogentry</msn:type><live:type>blogentry</live:type><live:typelabel>Blog entry</live:typelabel><wfw:commentRss>http://claudiolassala.spaces.live.com/blog/cns!E2A4B22308B39CD2!691/comments/feed.rss</wfw:commentRss><wfw:comment>http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!691.entry#comment</wfw:comment><dcterms:modified>2008-04-10T03:37:36Z</dcterms:modified></item><item><title>Consider creating a custom collection</title><link>http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!678.entry</link><description>&lt;p&gt;It's happened to me a few times when I create a property of a type List&amp;lt;T&amp;gt; or Collection&amp;lt;T&amp;gt;, where T is something simple such as a string or an int, and then later I regret I've done so. For instance, the other day I had the following scenario (I've changed things around in order to make it a little simpler for this post): &lt;p&gt;I have some class that had a Parameter property of type Collection&amp;lt;string&amp;gt;: &lt;div&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none"&gt;&lt;span style="color:#0000ff"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff"&gt;class&lt;/span&gt; SomeClass
{
    &lt;span style="color:#0000ff"&gt;private&lt;/span&gt; Collection&amp;lt;&lt;span style="color:#0000ff"&gt;string&lt;/span&gt;&amp;gt; m_Parameters = &lt;span style="color:#0000ff"&gt;new&lt;/span&gt; Collection&amp;lt;&lt;span style="color:#0000ff"&gt;string&lt;/span&gt;&amp;gt;();
    &lt;span style="color:#0000ff"&gt;public&lt;/span&gt; Collection&amp;lt;&lt;span style="color:#0000ff"&gt;string&lt;/span&gt;&amp;gt; Parameters
    {
        get { &lt;span style="color:#0000ff"&gt;return&lt;/span&gt; m_Parameters; }
        set { m_Parameters = &lt;span style="color:#0000ff"&gt;value&lt;/span&gt;; }
    }

    &lt;span style="color:#0000ff"&gt;public&lt;/span&gt; SomeClass()
    {
        &lt;span style="color:#0000ff"&gt;this&lt;/span&gt;.Parameters(&lt;span style="color:#006080"&gt;&amp;quot;A&amp;quot;&lt;/span&gt;);
        &lt;span style="color:#0000ff"&gt;this&lt;/span&gt;.Parameters(&lt;span style="color:#006080"&gt;&amp;quot;B&amp;quot;&lt;/span&gt;);
        &lt;span style="color:#0000ff"&gt;this&lt;/span&gt;.Parameters(&lt;span style="color:#006080"&gt;&amp;quot;C&amp;quot;&lt;/span&gt;);
    }
}&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt; It used to work great when all I needed was a list of parameters there:
&lt;div&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none"&gt;SomeClass foo = &lt;span style="color:#0000ff"&gt;new&lt;/span&gt; SomeClass();
&lt;span style="color:#0000ff"&gt;foreach&lt;/span&gt; (&lt;span style="color:#0000ff"&gt;string&lt;/span&gt; parameter &lt;span style="color:#0000ff"&gt;in&lt;/span&gt; foo.Parameters)
{
    Console.WriteLine(parameter);
}&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;However, in order to support something new feature, I also needed to store the old and new values for the parameter. Hmpf. Now, instead of a Collection of strings, I need a collection of something else. I then created a Parameter class, with the specific properties I needed:
&lt;div&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none"&gt;&lt;span style="color:#0000ff"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff"&gt;class&lt;/span&gt; Parameter
{
    &lt;span style="color:#0000ff"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff"&gt;string&lt;/span&gt; ParameterName { get; &lt;span style="color:#0000ff"&gt;private&lt;/span&gt; set; }
    &lt;span style="color:#0000ff"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff"&gt;object&lt;/span&gt; OldValue { get; &lt;span style="color:#0000ff"&gt;private&lt;/span&gt; set; }
    &lt;span style="color:#0000ff"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff"&gt;object&lt;/span&gt; NewValue { get; &lt;span style="color:#0000ff"&gt;private&lt;/span&gt; set; }

    &lt;span style="color:#0000ff"&gt;public&lt;/span&gt; Parameter(&lt;span style="color:#0000ff"&gt;string&lt;/span&gt; parameterName, &lt;span style="color:#0000ff"&gt;object&lt;/span&gt; oldValue, &lt;span style="color:#0000ff"&gt;object&lt;/span&gt; newValue)
    {
        ParameterName = parameterName;
        OldValue = oldValue;
        NewValue = newValue;
    }
}&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Nothing too fancy. At this point I can change my Collection&amp;lt;string&amp;gt; to Collection&amp;lt;Parameter&amp;gt;. Obviously, I'll also have to change any code that works with that collection, since the generic type for the collection has changed:
&lt;div&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none"&gt;SomeClass foo = &lt;span style="color:#0000ff"&gt;new&lt;/span&gt; SomeClass();
 &lt;span style="color:#0000ff"&gt;foreach&lt;/span&gt; (Parameter parameter &lt;span style="color:#0000ff"&gt;in&lt;/span&gt; foo.Parameters)
 {
     Console.WriteLine(parameter.ParameterName);
     Console.WriteLine(parameter.OldValue);
     Console.WriteLine(parameter.NewValue);
 }&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;If I had gone with a richer type to begin with, I wouldn't have to change any caller of that collection; if I needed more information, all I'd have to do was to add more properties to the Parameter class. In this one case, making the change wasn't such a big deal because my property was exposed only within the assembly; if it was exposed as a public property, than that'd be a major breaking change because I'd have no clue as to who else would be using it in other assemblies.
&lt;p&gt;That makes me think whenever I'm declaring a Collection or List of &lt;em&gt;something&lt;/em&gt;, I should put a little more thought into whether it's likely that I'll need some extra information associated with it, and if so, I should create a special type for it.
&lt;p&gt;Also, it turns out that what I really needed was some sort of dictionary, because I wanted to look up items by a given key (in this case, the parameter's name). The Collection&amp;lt;T&amp;gt; doesn't give me that behavior, but the &lt;a href="http://msdn2.microsoft.com/en-us/library/ms132439.aspx" target="_blank"&gt;KeyedCollection&amp;lt;TKey, TItem&amp;gt;&lt;/a&gt;  does, so I created a ParameterCollection like so:
&lt;div&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none"&gt;&lt;span style="color:#0000ff"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff"&gt;class&lt;/span&gt; ParameterCollection : KeyedCollection&amp;lt;&lt;span style="color:#0000ff"&gt;string&lt;/span&gt;, Parameter&amp;gt;
{
    &lt;span style="color:#0000ff"&gt;protected&lt;/span&gt; &lt;span style="color:#0000ff"&gt;override&lt;/span&gt; &lt;span style="color:#0000ff"&gt;string&lt;/span&gt; GetKeyForItem(Parameter item)
    {
        &lt;span style="color:#0000ff"&gt;return&lt;/span&gt; item.ParameterName;
    }
}&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The class uses a string as the key (which is the ParameterName), and the Parameter as the value. So my SomeClass class ended up like this:
&lt;div&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none"&gt;&lt;span style="color:#0000ff"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff"&gt;class&lt;/span&gt; SomeClass
{
    &lt;span style="color:#0000ff"&gt;private&lt;/span&gt; ParamaterCollection m_Parameters = &lt;span style="color:#0000ff"&gt;new&lt;/span&gt; ParamaterCollection();
    &lt;span style="color:#0000ff"&gt;public&lt;/span&gt; ParamaterCollection Parameters
    {
        get { &lt;span style="color:#0000ff"&gt;return&lt;/span&gt; m_Parameters; }
        set { m_Parameters = &lt;span style="color:#0000ff"&gt;value&lt;/span&gt;; }
    }

    &lt;span style="color:#0000ff"&gt;public&lt;/span&gt; SomeClass()
    {
        &lt;span style="color:#0000ff"&gt;this&lt;/span&gt;.Parameters.Add(&lt;span style="color:#0000ff"&gt;new&lt;/span&gt; Parameter(&lt;span style="color:#006080"&gt;&amp;quot;A&amp;quot;&lt;/span&gt;, &lt;span style="color:#006080"&gt;&amp;quot;A old value&amp;quot;&lt;/span&gt;, &lt;span style="color:#006080"&gt;&amp;quot;A new value&amp;quot;&lt;/span&gt;));
        &lt;span style="color:#0000ff"&gt;this&lt;/span&gt;.Parameters.Add(&lt;span style="color:#0000ff"&gt;new&lt;/span&gt; Parameter(&lt;span style="color:#006080"&gt;&amp;quot;B&amp;quot;&lt;/span&gt;, &lt;span style="color:#006080"&gt;&amp;quot;B old value&amp;quot;&lt;/span&gt;, &lt;span style="color:#006080"&gt;&amp;quot;B new value&amp;quot;&lt;/span&gt;));
        &lt;span style="color:#0000ff"&gt;this&lt;/span&gt;.Parameters.Add(&lt;span style="color:#0000ff"&gt;new&lt;/span&gt; Parameter(&lt;span style="color:#006080"&gt;&amp;quot;C&amp;quot;&lt;/span&gt;, &lt;span style="color:#006080"&gt;&amp;quot;C old value&amp;quot;&lt;/span&gt;, &lt;span style="color:#006080"&gt;&amp;quot;C new value&amp;quot;&lt;/span&gt;));
    }
}&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;And besides using a regular foreach, I can also access the elements like this:
&lt;div&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none"&gt;Console.WriteLine(foo.Parameters[&lt;span style="color:#006080"&gt;&amp;quot;A&amp;quot;&lt;/span&gt;].OldValue);
Console.WriteLine(foo.Parameters[&lt;span style="color:#006080"&gt;&amp;quot;B&amp;quot;&lt;/span&gt;].OldValue);
&lt;/pre&gt;&lt;/div&gt;&lt;img src="http://c.services.spaces.live.com/CollectionWebService/c.gif?cid=-2115370061417702190&amp;page=RSS%3a+Consider+creating+a+custom+collection&amp;referrer=" width="1px" height="1px" border="0" alt=""&gt;&lt;img style="position:absolute" alt="" width="0px" height="0px" src="http://c.live.com/c.gif?NC=31263&amp;amp;NA=1149&amp;amp;PI=73329&amp;amp;RF=&amp;amp;DI=3919&amp;amp;PS=85545&amp;amp;TP=claudiolassala.spaces.live.com&amp;amp;GT1=claudiolassala"&gt;</description><comments>http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!678.entry#comment</comments><guid isPermaLink="true">http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!678.entry</guid><pubDate>Thu, 03 Apr 2008 16:24:46 GMT</pubDate><slash:comments>5</slash:comments><msn:type>blogentry</msn:type><live:type>blogentry</live:type><live:typelabel>Blog entry</live:typelabel><wfw:commentRss>http://claudiolassala.spaces.live.com/blog/cns!E2A4B22308B39CD2!678/comments/feed.rss</wfw:commentRss><wfw:comment>http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!678.entry#comment</wfw:comment><dcterms:modified>2008-04-03T16:24:46Z</dcterms:modified></item><item><title>How's the band doing...?</title><link>http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!677.entry</link><description>&lt;p&gt;Some of you know that I play guitar in a &lt;a href="http://www.descentintomadness.com/" target="_blank"&gt;local band&lt;/a&gt; on what's left of my spare time. Every once in a while somebody ask me how the band is doing, so I guess I'll just post a general reply here. &lt;p&gt;Sometime last year we started recording 4 songs for our new demo. It's been taking awhile because we've been on and off for many months (business trips, Holidays, etc.), but now we have a recent mix of the songs online. You can check it out here: &lt;p&gt;&lt;a href="http://www.garageband.com/song?|pe1|S8LTM0LdsaSjZVawYGg" target="_blank"&gt;King of the Blind&lt;/a&gt; &lt;p&gt;&lt;a href="http://www.garageband.com/song?|pe1|S8LTM0LdsaSjZlOwZm8" target="_blank"&gt;Legacy of Nothing&lt;/a&gt; &lt;p&gt;&lt;a href="http://www.garageband.com/song?|pe1|S8LTM0LdsaSjZVG_YG0" target="_blank"&gt;Chains of Cruelty&lt;/a&gt; &lt;p&gt;&lt;a href="http://www.garageband.com/song?|pe1|S8LTM0LdsaSjZFaxYWs" target="_blank"&gt;Century of Lies&lt;/a&gt; &lt;p&gt;If you're into Heavy Metal, let me know what you think. If you're not, I already know what you think.  :) &lt;p&gt;We're currently working on a new song, which is going to be part of this demo. We've recorded some of it, and hopefully will finish it in the next few weeks. It's more of a ballad type of song, but with very strong lyrics. Definitely something to add some diversity to our set list. &lt;p&gt;We're still in our search for a drummer and a bass player, so if you know somebody in the Houston area that may be interested, please let me know. &lt;img src="http://c.services.spaces.live.com/CollectionWebService/c.gif?cid=-2115370061417702190&amp;page=RSS%3a+How's+the+band+doing...%3f&amp;referrer=" width="1px" height="1px" border="0" alt=""&gt;&lt;img style="position:absolute" alt="" width="0px" height="0px" src="http://c.live.com/c.gif?NC=31263&amp;amp;NA=1149&amp;amp;PI=73329&amp;amp;RF=&amp;amp;DI=3919&amp;amp;PS=85545&amp;amp;TP=claudiolassala.spaces.live.com&amp;amp;GT1=claudiolassala"&gt;</description><comments>http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!677.entry#comment</comments><guid isPermaLink="true">http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!677.entry</guid><pubDate>Tue, 01 Apr 2008 01:16:12 GMT</pubDate><slash:comments>2</slash:comments><msn:type>blogentry</msn:type><live:type>blogentry</live:type><live:typelabel>Blog entry</live:typelabel><wfw:commentRss>http://claudiolassala.spaces.live.com/blog/cns!E2A4B22308B39CD2!677/comments/feed.rss</wfw:commentRss><wfw:comment>http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!677.entry#comment</wfw:comment><dcterms:modified>2008-04-01T01:16:12Z</dcterms:modified></item><item><title>Some .NET, .NET for VFP developers, and Milos training coming up</title><link>http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!676.entry</link><description>&lt;p&gt;We have a bunch of training coming up in May, covering .NET development, .NET for VFP developers, and &lt;a href="http://www.milossolutionplatform.com/" target="_blank"&gt;Milos&lt;/a&gt;. The training is structured so that you can pick and choose what parts of it you want to participate on. &lt;p&gt;Make sure to check for details &lt;a href="http://www.vfpconversion.com/Training.aspx" target="_blank"&gt;here&lt;/a&gt;, &lt;a href="http://www.vfpconversion.com/Blog.aspx?blogid=1b208937-2232-4b48-9a12-8c89f98ce08f&amp;amp;blog=us:Mike&amp;amp;messageid=aed02cf6-851b-4cd1-938f-b1833e5e801b" target="_blank"&gt;here&lt;/a&gt;, and &lt;a href="http://www.markusegger.com/Blog/Development.aspx?messageid=99ae964b-ea39-44d3-a459-130c677eeab5" target="_blank"&gt;here&lt;/a&gt;.&lt;img src="http://c.services.spaces.live.com/CollectionWebService/c.gif?cid=-2115370061417702190&amp;page=RSS%3a+Some+.NET%2c+.NET+for+VFP+developers%2c+and+Milos+training+coming+up&amp;referrer=" width="1px" height="1px" border="0" alt=""&gt;&lt;img style="position:absolute" alt="" width="0px" height="0px" src="http://c.live.com/c.gif?NC=31263&amp;amp;NA=1149&amp;amp;PI=73329&amp;amp;RF=&amp;amp;DI=3919&amp;amp;PS=85545&amp;amp;TP=claudiolassala.spaces.live.com&amp;amp;GT1=claudiolassala"&gt;</description><comments>http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!676.entry#comment</comments><guid isPermaLink="true">http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!676.entry</guid><pubDate>Fri, 28 Mar 2008 21:52:47 GMT</pubDate><slash:comments>0</slash:comments><msn:type>blogentry</msn:type><live:type>blogentry</live:type><live:typelabel>Blog entry</live:typelabel><wfw:commentRss>http://claudiolassala.spaces.live.com/blog/cns!E2A4B22308B39CD2!676/comments/feed.rss</wfw:commentRss><wfw:comment>http://claudiolassala.spaces.live.com/Blog/cns!E2A4B22308B39CD2!676.entry#comm