<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://www.objectsharp.com/cs/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Justin Lee's Technology Blog</title><link>http://www.objectsharp.com/cs/blogs/jlee/default.aspx</link><description>&lt;br /&gt;Languages, Languages, Languages!</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP2 (Build: 61129.2)</generator><item><title>Another Reason to use Flash Instead of Silverlight</title><link>http://www.objectsharp.com/cs/blogs/jlee/archive/2008/07/01/another-reason-to-use-flash-instead-of-silverlight.aspx</link><pubDate>Wed, 02 Jul 2008 03:40:44 GMT</pubDate><guid isPermaLink="false">4e5c2b59-774a-4189-b009-1bb73818b493:148074</guid><dc:creator>jlee</dc:creator><slash:comments>0</slash:comments><comments>http://www.objectsharp.com/cs/blogs/jlee/comments/148074.aspx</comments><wfw:commentRss>http://www.objectsharp.com/cs/blogs/jlee/commentrss.aspx?PostID=148074</wfw:commentRss><wfw:comment>http://www.objectsharp.com/cs/blogs/jlee/rsscomments.aspx?PostID=148074</wfw:comment><description>&lt;p&gt;Flash content is finally &lt;a href="http://news.cnet.com/8301-10784_3-9982137-7.html"&gt;searchable&lt;/a&gt; by two of the biggest online search engines on the internet, Google and Yahoo.&lt;/p&gt; &lt;p&gt;One of the biggest disadvantage of using Flash content for your dynamic content is simply because it is not searchable, and now with Adobe's new optimized Adobe Flash Player helping both Google and Yahoo to search and index Flash content, this means that there is no excuse left NOT TO USE FLASH on your web sites.&lt;/p&gt; &lt;p&gt;Note that Microsoft Live Search was not included in this partnership.&lt;/p&gt; &lt;p&gt;Now, for those enthusiastic about writing Silverlight content on the web, might I ask, what is Microsoft going to do about this? Both in its Live Search, making it competitive with Google and Yahoo to search Flash content, and also making Silverlight content searchable too. This is the biggest advantage Adobe Flash has over Silverlight now, and if Microsoft doesn't do anything about it, the web will not be convinced about Silverlight, regardless of the &lt;a href="http://news.cnet.com/Silverlight-to-shine-in-NBCs-Olympics-coverage/2100-1026_3-6238260.html"&gt;amount of &lt;strike&gt;bribing&lt;/strike&gt; promoting they can and will do&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;Adobe, we love you and thank you.&lt;/p&gt; &lt;p&gt;To those Silverlight enthusiasts, please get your facts right about Adobe Flash before even bashing Adobe Flash technology. You know who you are.&lt;/p&gt;&lt;img src="http://www.objectsharp.com/cs/aggbug.aspx?PostID=148074" width="1" height="1"&gt;</description><category domain="http://www.objectsharp.com/cs/blogs/jlee/archive/tags/Silverlight/default.aspx">Silverlight</category></item><item><title>Blaming the User</title><link>http://www.objectsharp.com/cs/blogs/jlee/archive/2008/06/23/blaming-the-user.aspx</link><pubDate>Mon, 23 Jun 2008 15:14:16 GMT</pubDate><guid isPermaLink="false">4e5c2b59-774a-4189-b009-1bb73818b493:147067</guid><dc:creator>jlee</dc:creator><slash:comments>0</slash:comments><comments>http://www.objectsharp.com/cs/blogs/jlee/comments/147067.aspx</comments><wfw:commentRss>http://www.objectsharp.com/cs/blogs/jlee/commentrss.aspx?PostID=147067</wfw:commentRss><wfw:comment>http://www.objectsharp.com/cs/blogs/jlee/rsscomments.aspx?PostID=147067</wfw:comment><description>&lt;p&gt;Is it better to have a user implicitly learning how an application work easily by discovery, rather than explicitly learning how an application works through training and books?&lt;/p&gt; &lt;p&gt;If something goes wrong with an application, is it really a "problem between the keyboard and the chair"? Or is it because the "User Experience" isn't sufficient or consistent to assist with implicit learning?&lt;/p&gt; &lt;p&gt;Sometimes people in the "Computer Industry" need to think more about the user and how to ease their pain, instead of blaming them and create more pain for them.&lt;/p&gt; &lt;p&gt;I'm always amazed when a user tells me "It just works! Amazing!" instead of "How do you do this?". That's "User Experience" for you.&lt;/p&gt; &lt;p&gt;Think about it.&lt;/p&gt; &lt;p&gt;This is my rant today.&lt;/p&gt;&lt;img src="http://www.objectsharp.com/cs/aggbug.aspx?PostID=147067" width="1" height="1"&gt;</description><category domain="http://www.objectsharp.com/cs/blogs/jlee/archive/tags/User+Experience/default.aspx">User Experience</category></item><item><title>Links on F# Quotation</title><link>http://www.objectsharp.com/cs/blogs/jlee/archive/2008/06/15/links-on-f-quotation.aspx</link><pubDate>Mon, 16 Jun 2008 00:01:52 GMT</pubDate><guid isPermaLink="false">4e5c2b59-774a-4189-b009-1bb73818b493:146971</guid><dc:creator>jlee</dc:creator><slash:comments>0</slash:comments><comments>http://www.objectsharp.com/cs/blogs/jlee/comments/146971.aspx</comments><wfw:commentRss>http://www.objectsharp.com/cs/blogs/jlee/commentrss.aspx?PostID=146971</wfw:commentRss><wfw:comment>http://www.objectsharp.com/cs/blogs/jlee/rsscomments.aspx?PostID=146971</wfw:comment><description>&lt;p&gt;These are a few links I want to read later on F# Quotations. Quotations are similar to expression trees in C#, but more powerful.&lt;/p&gt; &lt;p&gt;&lt;a href="http://cs.hubfs.net/blogs/tomasp/archive/2006/07/07/413.aspx"&gt;F# - Simple quotations transformation&lt;/a&gt;  &lt;p&gt;&lt;a href="http://devhawk.net/2007/12/19/Practical+F+Parsing+The+Abstract+Syntax+Tree.aspx"&gt;Practical F# Parsing: The Abstract Syntax Tree&lt;/a&gt;  &lt;p&gt;&lt;a href="http://tomasp.net/blog/fsharp-quotation-samples.aspx"&gt;F# Quotations Samples on CodePlex&lt;/a&gt;  &lt;p&gt;&lt;a href="http://tomasp.net/blog/quotvis-reloaded.aspx"&gt;F# quotations visualizer - reloaded!&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://cs.hubfs.net/blogs/f_team/archive/2007/04/07/2662.aspx"&gt;Some Q&amp;amp;A on F# Quotations and LINQ&lt;/a&gt;&lt;/p&gt;&lt;img src="http://www.objectsharp.com/cs/aggbug.aspx?PostID=146971" width="1" height="1"&gt;</description><category domain="http://www.objectsharp.com/cs/blogs/jlee/archive/tags/F_2300_/default.aspx">F#</category></item><item><title>MVP Insider - Q &amp;amp; A with Justin Lee</title><link>http://www.objectsharp.com/cs/blogs/jlee/archive/2008/06/09/mvp-insider-q-amp-a-with-justin-lee.aspx</link><pubDate>Mon, 09 Jun 2008 18:39:21 GMT</pubDate><guid isPermaLink="false">4e5c2b59-774a-4189-b009-1bb73818b493:146345</guid><dc:creator>jlee</dc:creator><slash:comments>0</slash:comments><comments>http://www.objectsharp.com/cs/blogs/jlee/comments/146345.aspx</comments><wfw:commentRss>http://www.objectsharp.com/cs/blogs/jlee/commentrss.aspx?PostID=146345</wfw:commentRss><wfw:comment>http://www.objectsharp.com/cs/blogs/jlee/rsscomments.aspx?PostID=146345</wfw:comment><description>&lt;p&gt;Well, it seems this month I'm up for being interviewed. &lt;a href="http://blogs.msdn.com/cdndevs/archive/2008/06/09/mvp-insider-q-a-with-justin-lee.aspx"&gt;Here's the link to my interview&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://www.objectsharp.com/cs/aggbug.aspx?PostID=146345" width="1" height="1"&gt;</description><category domain="http://www.objectsharp.com/cs/blogs/jlee/archive/tags/C_2300_/default.aspx">C#</category></item><item><title>WPF for Developers and Lead Designers Course</title><link>http://www.objectsharp.com/cs/blogs/jlee/archive/2008/05/27/wpf-for-developers-and-lead-designers-course.aspx</link><pubDate>Tue, 27 May 2008 19:51:26 GMT</pubDate><guid isPermaLink="false">4e5c2b59-774a-4189-b009-1bb73818b493:144474</guid><dc:creator>jlee</dc:creator><slash:comments>0</slash:comments><comments>http://www.objectsharp.com/cs/blogs/jlee/comments/144474.aspx</comments><wfw:commentRss>http://www.objectsharp.com/cs/blogs/jlee/commentrss.aspx?PostID=144474</wfw:commentRss><wfw:comment>http://www.objectsharp.com/cs/blogs/jlee/rsscomments.aspx?PostID=144474</wfw:comment><description>&lt;p&gt;&lt;a href="http://robburke.net"&gt;Rob Burke&lt;/a&gt; is teaching a WPF training course through Toronto-based consultancy &lt;a href="http://www.objectsharp.com/training/coursedetail.aspx?id=8010"&gt;ObjectSharp&lt;/a&gt;. The course is called “&lt;a href="http://www.objectsharp.com/training/coursedetail.aspx?id=8010"&gt;Windows Presentation Foundation for Developers and Lead Designers&lt;/a&gt;,” and, as the title suggests, it offers a hands-on experience designed to give developers and lead designers the knowledge, background, tips and references they’ll need to build smart client applications using the Windows Presentation Foundation. &lt;p&gt;After &lt;a href="http://robburke.net/2008/04/11/mate-this-is-the-future/"&gt;enjoying the process&lt;/a&gt; of training a team of developers and designers to use WPF, this course is the result of turning that material into a course that we could offer here. &lt;p&gt;The inaugural course offering is currently scheduled for &lt;strong&gt;August 13th-15th&lt;/strong&gt;. If you’re interested in taking part, please find &lt;a href="http://www.objectsharp.com/training/coursedetail.aspx?id=8010"&gt;more information about the course on ObjectSharp’s site&lt;/a&gt;. Also, if August 13th is too long for you to wait, or you’re interested in an on-site course, please contact &lt;a href="mailto:training@objectsharp.com"&gt;Julie James&lt;/a&gt;, ObjectSharp’s Training Manager. &lt;p&gt;&lt;a href="http://robburke.net/2008/05/27/wpf-for-developers-and-lead-designers-course/"&gt;More on Rob Burke&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://www.objectsharp.com/cs/aggbug.aspx?PostID=144474" width="1" height="1"&gt;</description><category domain="http://www.objectsharp.com/cs/blogs/jlee/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://www.objectsharp.com/cs/blogs/jlee/archive/tags/User+Experience/default.aspx">User Experience</category></item><item><title>Pex 0.5 Released</title><link>http://www.objectsharp.com/cs/blogs/jlee/archive/2008/05/25/pex-0-5-released.aspx</link><pubDate>Mon, 26 May 2008 00:16:25 GMT</pubDate><guid isPermaLink="false">4e5c2b59-774a-4189-b009-1bb73818b493:144352</guid><dc:creator>jlee</dc:creator><slash:comments>0</slash:comments><comments>http://www.objectsharp.com/cs/blogs/jlee/comments/144352.aspx</comments><wfw:commentRss>http://www.objectsharp.com/cs/blogs/jlee/commentrss.aspx?PostID=144352</wfw:commentRss><wfw:comment>http://www.objectsharp.com/cs/blogs/jlee/rsscomments.aspx?PostID=144352</wfw:comment><description>&lt;p&gt;&lt;strong&gt;&lt;u&gt;What is Pex?&lt;/u&gt;&lt;/strong&gt; &lt;p&gt;&lt;strong&gt;&lt;a href="http://research.microsoft.com/projects/pex"&gt;&lt;img src="http://research.microsoft.com/projects/pex/Images/PexWeb.png"&gt;&lt;/a&gt;&lt;/strong&gt; &lt;p&gt;&lt;strong&gt;Pex generates test inputs &lt;/strong&gt;that cover all, or at least many of the corner cases in your .NET code. These test inputs are plugged into &lt;strong&gt;parameterized&lt;em&gt; &lt;/em&gt;unit test &lt;/strong&gt;that you write. The result is a small unit test suite, where each unit test calls the parameterized unit test with particular test inputs. There is a great &lt;a href="http://research.microsoft.com/pex/default.aspx"&gt;picture on the main Pex page&lt;/a&gt; that illustrates this process. &lt;p&gt;&lt;strong&gt;Pex supports other unit test frameworks &lt;/strong&gt;since the unit tests that Pex generates can be executed by other unit test frameworks without Pex. Pex comes with support for MSTest, the unit test framework of Visual Studio, out of the box. For support for other unit test frameworks, please look at the &lt;a href="http://www.codeplex.com/pex"&gt;Pex Extensions&lt;/a&gt; project. &lt;p&gt;Parameterized unit tests have been around for quite some time already, under several names -- row tests, data-driven tests, theories, etc. &lt;p&gt;What is really unique about &lt;strong&gt;Pex &lt;/strong&gt;is that it &lt;strong&gt;analyzes your .NET code, instruction by instruction&lt;/strong&gt;, to understand what your code is doing. Then, in a fully automatic way, Pex computes relevant test inputs that &lt;strong&gt;trigger the corner cases of the code&lt;/strong&gt;. When you write assertions, Pex will try to come up with test inputs that cause an assertion to fail. &lt;p&gt;&lt;strong&gt;&lt;u&gt;Feedback&lt;/u&gt;&lt;/strong&gt; &lt;p&gt;To ask questions, get help, or just give feedback, please take a look at our &lt;a href="http://research.microsoft.com/pex/community.aspx"&gt;mailing lists&lt;/a&gt;. &lt;p&gt;&lt;strong&gt;&lt;u&gt;Links&lt;/u&gt;&lt;/strong&gt; &lt;p&gt;Homepage: &lt;a title="http://research.microsoft.com/pex/downloads.aspx" href="http://research.microsoft.com/pex"&gt;http://research.microsoft.com/pex&lt;/a&gt; &lt;p&gt;Download: &lt;a title="http://research.microsoft.com/pex/downloads.aspx" href="http://research.microsoft.com/pex/downloads.aspx"&gt;http://research.microsoft.com/pex/downloads.aspx&lt;/a&gt; &lt;p&gt;Nikolai Tillmann's Blog: &lt;a title="http://blogs.msdn.com/nikolait" href="http://blogs.msdn.com/nikolait"&gt;http://blogs.msdn.com/nikolait&lt;/a&gt; &lt;p&gt;Peli de Halleux's Blog: &lt;a title="http://blog.dotnetwiki.org/" href="http://blog.dotnetwiki.org/"&gt;http://blog.dotnetwiki.org/&lt;/a&gt;&lt;/p&gt;&lt;img src="http://www.objectsharp.com/cs/aggbug.aspx?PostID=144352" width="1" height="1"&gt;</description><category domain="http://www.objectsharp.com/cs/blogs/jlee/archive/tags/C_2300_/default.aspx">C#</category></item><item><title>Release of Microsoft Source Analysis for C#</title><link>http://www.objectsharp.com/cs/blogs/jlee/archive/2008/05/25/release-of-microsoft-source-analysis-for-c.aspx</link><pubDate>Mon, 26 May 2008 00:05:55 GMT</pubDate><guid isPermaLink="false">4e5c2b59-774a-4189-b009-1bb73818b493:144351</guid><dc:creator>jlee</dc:creator><slash:comments>0</slash:comments><comments>http://www.objectsharp.com/cs/blogs/jlee/comments/144351.aspx</comments><wfw:commentRss>http://www.objectsharp.com/cs/blogs/jlee/commentrss.aspx?PostID=144351</wfw:commentRss><wfw:comment>http://www.objectsharp.com/cs/blogs/jlee/rsscomments.aspx?PostID=144351</wfw:comment><description>&lt;p&gt;Source Analysis, also known as StyleCop, analyzes C# source code to enforce a set of best practice style and consistency rules. &lt;/p&gt; &lt;p&gt;Source Analysis for C# can be downloaded here: &lt;a href="https://code.msdn.microsoft.com/Release/ProjectReleases.aspx?ProjectName=sourceanalysis"&gt;https://code.msdn.microsoft.com/Release/ProjectReleases.aspx?ProjectName=sourceanalysis&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;Source Analysis Blog: &lt;a title="http://blogs.msdn.com/sourceanalysis" href="http://blogs.msdn.com/sourceanalysis"&gt;http://blogs.msdn.com/sourceanalysis&lt;/a&gt;&lt;/p&gt;&lt;img src="http://www.objectsharp.com/cs/aggbug.aspx?PostID=144351" width="1" height="1"&gt;</description><category domain="http://www.objectsharp.com/cs/blogs/jlee/archive/tags/C_2300_/default.aspx">C#</category></item><item><title>QuickSort in Functional C#</title><link>http://www.objectsharp.com/cs/blogs/jlee/archive/2008/05/23/quicksort-in-functional-c.aspx</link><pubDate>Fri, 23 May 2008 20:44:30 GMT</pubDate><guid isPermaLink="false">4e5c2b59-774a-4189-b009-1bb73818b493:144261</guid><dc:creator>jlee</dc:creator><slash:comments>0</slash:comments><comments>http://www.objectsharp.com/cs/blogs/jlee/comments/144261.aspx</comments><wfw:commentRss>http://www.objectsharp.com/cs/blogs/jlee/commentrss.aspx?PostID=144261</wfw:commentRss><wfw:comment>http://www.objectsharp.com/cs/blogs/jlee/rsscomments.aspx?PostID=144261</wfw:comment><description>&lt;p&gt;Here's a very simple QuickSort algorithm from &lt;a href="http://en.wikipedia.org/wiki/Quick_Sort"&gt;Wikipedia&lt;/a&gt; written in a very Functional way of C#. Notice that it looks very close to the pseudo-code algorithm shown in Wikipedia. The pivot used is just sequence.First(). You can replace the pivot by some random position if you wish.&lt;br&gt;&lt;/p&gt; &lt;p&gt; &lt;div class="csharpcode"&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; IEnumerable&amp;lt;T&amp;gt; QuickSort&amp;lt;T&amp;gt;(&lt;span class="kwrd"&gt;this&lt;/span&gt; IEnumerable&amp;lt;T&amp;gt; sequence) &lt;span class="kwrd"&gt;where&lt;/span&gt; T : IComparable&amp;lt;T&amp;gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   2:  &lt;/span&gt;        {&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   3:  &lt;/span&gt;            &lt;span class="kwrd"&gt;return&lt;/span&gt; !sequence.Any()&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   4:  &lt;/span&gt;                       ? sequence&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   5:  &lt;/span&gt;                       : ((from x &lt;span class="kwrd"&gt;in&lt;/span&gt; sequence.Skip(1)&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   6:  &lt;/span&gt;                           &lt;span class="kwrd"&gt;where&lt;/span&gt; x.CompareTo(sequence.First()) &amp;lt; 0&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   7:  &lt;/span&gt;                           select x)&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   8:  &lt;/span&gt;                             .QuickSort()&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   9:  &lt;/span&gt;                         ).Concat(&lt;span class="kwrd"&gt;new&lt;/span&gt;[] { sequence.First() }).Concat((from x &lt;span class="kwrd"&gt;in&lt;/span&gt; sequence.Skip(1)&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  10:  &lt;/span&gt;                                                                      &lt;span class="kwrd"&gt;where&lt;/span&gt; x.CompareTo(sequence.First()) &amp;gt;= 0&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  11:  &lt;/span&gt;                                                                      select x).QuickSort());&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  12:  &lt;/span&gt;        }&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;I tried making this more fun by using the &lt;a href="http://triplez.mine.nu/blogs/triplez/archive/2007/12/10/recursive-lambda-with-fixed-point-generator.aspx"&gt;Fix Point Generator&lt;/a&gt; which I mentioned previously, and converted that code into a Func&amp;lt;IEnumerable&amp;lt;T&amp;gt;&amp;gt; instead. Here's the code.&lt;/p&gt;
&lt;p&gt;
&lt;div class="csharpcode"&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; Func&amp;lt;T, T&amp;gt; Fix&amp;lt;T&amp;gt;(Func&amp;lt;Func&amp;lt;T, T&amp;gt;, Func&amp;lt;T, T&amp;gt;&amp;gt; F)&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   2:  &lt;/span&gt;        {&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   3:  &lt;/span&gt;            &lt;span class="kwrd"&gt;return&lt;/span&gt; x =&amp;gt; F(Fix(F))(x);&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   4:  &lt;/span&gt;        }&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   5:  &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   6:  &lt;/span&gt;        &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; Main()&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   7:  &lt;/span&gt;        {&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   8:  &lt;/span&gt;            var quicksort = Fix&amp;lt;IEnumerable&amp;lt;&lt;span class="kwrd"&gt;int&lt;/span&gt;&amp;gt;&amp;gt;(&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   9:  &lt;/span&gt;                qsort =&amp;gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  10:  &lt;/span&gt;                sequence =&amp;gt;&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  11:  &lt;/span&gt;                !sequence.Any()&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  12:  &lt;/span&gt;                    ? sequence&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  13:  &lt;/span&gt;                    : qsort(from x &lt;span class="kwrd"&gt;in&lt;/span&gt; sequence.Skip(1)&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  14:  &lt;/span&gt;                            &lt;span class="kwrd"&gt;where&lt;/span&gt; x.CompareTo(sequence.First()) &amp;lt; 0&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  15:  &lt;/span&gt;                            select x)&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  16:  &lt;/span&gt;                          .Concat(&lt;span class="kwrd"&gt;new&lt;/span&gt;[] { sequence.First() })&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  17:  &lt;/span&gt;                          .Concat(qsort(from x &lt;span class="kwrd"&gt;in&lt;/span&gt; sequence.Skip(1)&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  18:  &lt;/span&gt;                                        &lt;span class="kwrd"&gt;where&lt;/span&gt; x.CompareTo(sequence.First()) &amp;gt;= 0&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  19:  &lt;/span&gt;                                        select x)));&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  20:  &lt;/span&gt;        }&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;This is a perfect example of how you can use the &lt;a href="http://triplez.mine.nu/blogs/triplez/archive/2007/12/10/recursive-lambda-with-fixed-point-generator.aspx"&gt;Fix Point Generator&lt;/a&gt; to create your recursive functions on the fly. If you want to make it reusable with an extension method, you can easily convert it to the extension method, or a normal method. Personally I feel that using the &lt;a href="http://triplez.mine.nu/blogs/triplez/archive/2007/12/10/recursive-lambda-with-fixed-point-generator.aspx"&gt;Fix Point Generator&lt;/a&gt; is more intuitive and slightly more readable as oppose to the extension method way of doing things.&lt;/p&gt;
&lt;p&gt;One point to note is that the "Concat" extension only accepts an IEnumerable&amp;lt;T&amp;gt; and not a single item. You can solve this by the above, "new[] { sequence.First() }" which is a cleaner way if you don't want to write your own extension method (which you could too).&lt;/p&gt;
&lt;p&gt;Crazy stuff eh?&lt;/p&gt;&lt;img src="http://www.objectsharp.com/cs/aggbug.aspx?PostID=144261" width="1" height="1"&gt;</description><category domain="http://www.objectsharp.com/cs/blogs/jlee/archive/tags/C_2300_/default.aspx">C#</category></item><item><title>Presentation: Practical Functional Programming in C#</title><link>http://www.objectsharp.com/cs/blogs/jlee/archive/2008/05/15/presentation-practical-functional-programming-in-c.aspx</link><pubDate>Thu, 15 May 2008 13:36:00 GMT</pubDate><guid isPermaLink="false">4e5c2b59-774a-4189-b009-1bb73818b493:143956</guid><dc:creator>jlee</dc:creator><slash:comments>0</slash:comments><comments>http://www.objectsharp.com/cs/blogs/jlee/comments/143956.aspx</comments><wfw:commentRss>http://www.objectsharp.com/cs/blogs/jlee/commentrss.aspx?PostID=143956</wfw:commentRss><wfw:comment>http://www.objectsharp.com/cs/blogs/jlee/rsscomments.aspx?PostID=143956</wfw:comment><description>&lt;p&gt;Here are my slides I've done at &lt;a href="http://www.devteach.com"&gt;DevTeach Toronto 2008&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;a href="http://triplez.mine.nu/files/folders/justin_lee_presentations/entry2222.aspx"&gt;Download it here&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://www.objectsharp.com/cs/aggbug.aspx?PostID=143956" width="1" height="1"&gt;</description><category domain="http://www.objectsharp.com/cs/blogs/jlee/archive/tags/Presentations/default.aspx">Presentations</category></item><item><title>Getting Bluetooth working on Windows Server 2008</title><link>http://www.objectsharp.com/cs/blogs/jlee/archive/2008/05/08/getting-bluetooth-working-on-windows-server-2008.aspx</link><pubDate>Fri, 09 May 2008 00:10:00 GMT</pubDate><guid isPermaLink="false">4e5c2b59-774a-4189-b009-1bb73818b493:143955</guid><dc:creator>jlee</dc:creator><slash:comments>0</slash:comments><comments>http://www.objectsharp.com/cs/blogs/jlee/comments/143955.aspx</comments><wfw:commentRss>http://www.objectsharp.com/cs/blogs/jlee/commentrss.aspx?PostID=143955</wfw:commentRss><wfw:comment>http://www.objectsharp.com/cs/blogs/jlee/rsscomments.aspx?PostID=143955</wfw:comment><description>&lt;p&gt;If your bluetooth adapter is a Broadcom Bluetooth 2.0 EDR, like the "ThinkPad Bluetooth with Enhanced Data Rate" or any Broadcom Bluetooth 2.0 EDR type adapter, you can follow the steps below to get bluetooth working on Windows Server 2008.&lt;/p&gt;&lt;p&gt;&lt;span id="_ctl0_MainContent_PostFlatView"&gt;&lt;span&gt;&lt;p align="left"&gt;&lt;font face="Arial" size="2"&gt;&lt;b&gt;Required&amp;nbsp;for install&lt;/b&gt;:&lt;/font&gt;&lt;/p&gt;
&lt;p align="left"&gt;Vista or WS2008 &lt;b&gt;x86&lt;/b&gt;: &lt;a href="http://www.toshiba-tro.de/tools/bluetooth/BT-stack.zip" title="http://www.toshiba-tro.de/tools/bluetooth/BT-stack.zip"&gt;http://www.toshiba-tro.de/tools/bluetooth/BT-stack.zip&lt;/a&gt;&lt;br&gt;Vista or WS2008 &lt;b&gt;x64&lt;/b&gt;: &lt;a href="http://www.toshiba-tro.de/tools/bluetooth/BT-stack-64bit.zip" title="http://www.toshiba-tro.de/tools/bluetooth/BT-stack-64bit.zip"&gt;http://www.toshiba-tro.de/tools/bluetooth/BT-stack-64bit.zip&lt;/a&gt;&lt;/p&gt;

&lt;p align="left"&gt;Hex Editor, e.g. WinHex or CodePad&lt;br&gt;&amp;nbsp;&lt;/p&gt;
&lt;p align="left"&gt;1. If you down it, you will &lt;b&gt;install this software&lt;/b&gt;. When Toshiba Setup say &lt;b&gt;Plug your BT device&lt;/b&gt;, you'll &lt;b&gt;click to cancel&lt;/b&gt;. Install is succesfull.&lt;/p&gt;

&lt;p align="left"&gt;2. Open &lt;b&gt;Device Manager&lt;/b&gt; (Start | Control Panel | Device Manager) or Start | Run... | &lt;b&gt;devmgmt.msc&lt;/b&gt;&lt;/p&gt;
&lt;blockquote dir="ltr" style="margin-right:0px;"&gt;
&lt;p align="left"&gt;You find in Other devices - Bluetooth dongle. Get &lt;b&gt;Properties&lt;/b&gt; of it. On fold &lt;b&gt;Details&lt;/b&gt;&amp;nbsp;you see &lt;b&gt;Property&lt;/b&gt;, It&amp;nbsp;scroll to &lt;b&gt;Hardware Ids&lt;/b&gt;. In &lt;b&gt;Value&lt;/b&gt; Box u see &lt;b&gt;two line&lt;/b&gt;, e.g.: &lt;/p&gt;
&lt;blockquote dir="ltr" style="margin-right:0px;"&gt;
&lt;blockquote dir="ltr" style="margin-right:0px;"&gt;
&lt;p dir="ltr" style="margin-right:0px;" align="left"&gt;USB\VID_0A5C&amp;amp;PID_2101&amp;amp;REV_0100&lt;/p&gt;
&lt;p dir="ltr" style="margin-right:0px;" align="left"&gt;&lt;font color="#ff0000"&gt;USB\VID_0A5C&amp;amp;PID_2101&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;/blockquote&gt;

&lt;p dir="ltr" style="margin-right:0px;" align="left"&gt;You copy &lt;b&gt;second&lt;/b&gt; line with &lt;b&gt;short Ids&lt;/b&gt; ('&lt;font color="#ff0000"&gt;USB\VID_0A5C&amp;amp;PID_2101&lt;/font&gt;') &lt;br&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p align="left"&gt;3. Now you going &lt;b&gt;to folder&lt;/b&gt;:&lt;br&gt;Vista or WS2008 x86: %PROGRAMFILES%\Toshiba\Bluetooth Toshiba Stack\Drivers\tosrfusb&lt;/p&gt;
&lt;p align="left"&gt;Vista or WS2008 x64: %PROGRAMFILES(x86)%\Toshiba\Bluetooth Toshiba Stack\Drivers\tosrfusb&lt;/p&gt;
&lt;p align="left"&gt;Here&amp;nbsp;are &lt;b&gt;files&lt;/b&gt;: &lt;font color="#ff0000"&gt;tosrfusb.cat&lt;/font&gt;, &lt;font color="#ff0000"&gt;tosrfusb.inf&lt;/font&gt;, tosrfusb.sys&lt;br&gt;You need edited &lt;b&gt;*.cat&lt;/b&gt;, and &lt;b&gt;*.inf&lt;/b&gt; file.&lt;/p&gt;

&lt;p align="left"&gt;4. &lt;b&gt;Open&lt;/b&gt; &lt;font color="#ff0000"&gt;tosrfusb.inf&lt;/font&gt; in &lt;b&gt;Notepad&lt;/b&gt;.exe (e.g. Start | Run... | Notepad.exe)&lt;/p&gt;
&lt;p dir="ltr" style="margin-right:0px;" align="left"&gt;Here you must edited &lt;b&gt;line 161&lt;/b&gt;:&lt;/p&gt;
&lt;blockquote dir="ltr" style="margin-right:0px;"&gt;
&lt;p dir="ltr" style="margin-right:0px;" align="left"&gt;%TosrfUsb.DeviceDesc97%=TosrfUsb_Device,&amp;nbsp; USB\VID_0C24&amp;amp;PID_000F&lt;/p&gt;&lt;/blockquote&gt;
&lt;p dir="ltr" style="margin-right:0px;" align="left"&gt;and &lt;b&gt;line 288&lt;/b&gt;:&lt;/p&gt;
&lt;blockquote dir="ltr" style="margin-right:0px;"&gt;
&lt;p dir="ltr" style="margin-right:0px;" align="left"&gt;%TosrfUsb.DeviceDesc97%=TosrfUsb_Device,&amp;nbsp; USB\VID_0C24&amp;amp;PID_000F&lt;/p&gt;&lt;/blockquote&gt;
&lt;p dir="ltr" style="margin-right:0px;" align="left"&gt;You &lt;b&gt;edit&lt;/b&gt; this lines &lt;b&gt;to&lt;/b&gt;:&lt;/p&gt;
&lt;blockquote dir="ltr" style="margin-right:0px;"&gt;
&lt;p dir="ltr" style="margin-right:0px;" align="left"&gt;%TosrfUsb.DeviceDesc97%=TosrfUsb_Device,&amp;nbsp; &lt;font color="#ff0000"&gt;USB\VID_0A5C&amp;amp;PID_2101&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt;

&lt;p dir="ltr" style="margin-right:0px;" align="left"&gt;&lt;font color="#000000"&gt;And &lt;b&gt;save&lt;/b&gt; as &lt;b&gt;tosrfusb.inf&lt;/b&gt; (&lt;font color="#ff0000"&gt;&lt;b&gt;replace&lt;/b&gt;&lt;/font&gt; original file).&lt;/font&gt; &lt;br&gt;&lt;/p&gt;
&lt;p dir="ltr" style="margin-right:0px;" align="left"&gt;5. &lt;b&gt;Open &lt;/b&gt;&lt;font color="#ff0000"&gt;tosrfusb.cat&lt;/font&gt;&lt;font color="#000000"&gt; in&lt;/font&gt;&amp;nbsp;&lt;b&gt;Hex Editor&lt;/b&gt; (e.g. WinHex, CodePad).&lt;/p&gt;
&lt;blockquote dir="ltr" style="margin-right:0px;"&gt;
&lt;p dir="ltr" style="margin-right:0px;" align="left"&gt;Ctrl+F.. You need line of characters (&lt;font color="#ff0000"&gt;but not find this data as text value&lt;/font&gt;!):&lt;/p&gt;
&lt;p dir="ltr" style="margin-right:0px;" align="left"&gt;4800570049004400390037020410010001042C7500730062005C007600690064005F00300063003200340026007000690064005F0030003000300035&lt;/p&gt;
&lt;p dir="ltr" style="margin-right:0px;" align="left"&gt;or&lt;/p&gt;
&lt;p dir="ltr" style="margin-right:0px;" align="left"&gt;H.W.I.D.9.7.......,u.s.b.\.v.i.d._.0.c.2.4.&amp;amp;.p.i.d._.0.0.0.5&lt;/p&gt;
&lt;p dir="ltr" style="margin-right:0px;" align="left"&gt;or&lt;/p&gt;
&lt;p dir="ltr" style="margin-right:0px;" align="left"&gt;HWID97&amp;nbsp;&amp;nbsp; ,usb\vid_0c24&amp;amp;pid_0005&lt;/p&gt;

&lt;p dir="ltr" style="margin-right:0px;" align="left"&gt;There you must change value help by ASCI table, e.g.:&lt;/p&gt;
&lt;p dir="ltr" style="margin-right:0px;" align="left"&gt;4800570049004400390037020410010001042C7500730062005C007600690064005F00&lt;font color="#ff0000"&gt;30&lt;/font&gt;00&lt;font color="#ff0000"&gt;41&lt;/font&gt;00&lt;font color="#ff0000"&gt;35&lt;/font&gt;00&lt;font color="#ff0000"&gt;43&lt;/font&gt;0026007000690064005F00&lt;font color="#ff0000"&gt;32&lt;/font&gt;00&lt;font color="#ff0000"&gt;31&lt;/font&gt;00&lt;font color="#ff0000"&gt;30&lt;/font&gt;00&lt;font color="#ff0000"&gt;31&lt;/font&gt;&lt;/p&gt;
&lt;p dir="ltr" style="margin-right:0px;" align="left"&gt;or&lt;/p&gt;
&lt;p dir="ltr" style="margin-right:0px;" align="left"&gt;H.W.I.D.9.7.......,u.s.b.\.v.i.d._.&lt;font color="#ff0000"&gt;0&lt;/font&gt;.&lt;font color="#ff0000"&gt;A&lt;/font&gt;.&lt;font color="#ff0000"&gt;5&lt;/font&gt;.&lt;font color="#ff0000"&gt;C&lt;/font&gt;.&amp;amp;.p.i.d._.&lt;font color="#ff0000"&gt;2&lt;/font&gt;.&lt;font color="#ff0000"&gt;1&lt;/font&gt;.&lt;font color="#ff0000"&gt;0&lt;/font&gt;.&lt;font color="#ff0000"&gt;1&lt;/font&gt;&lt;/p&gt;
&lt;p dir="ltr" style="margin-right:0px;" align="left"&gt;&lt;font color="#000000"&gt;or&lt;/font&gt;&lt;/p&gt;
&lt;p dir="ltr" style="margin-right:0px;" align="left"&gt;HWID97&amp;nbsp;&amp;nbsp; ,usb\vid_&lt;font color="#ff0000"&gt;0&lt;/font&gt;&lt;font color="#ff0000"&gt;A&lt;/font&gt;&lt;font color="#ff0000"&gt;5&lt;/font&gt;&lt;font color="#ff0000"&gt;C&lt;/font&gt;&amp;amp;pid_&lt;font color="#ff0000"&gt;2&lt;/font&gt;&lt;font color="#ff0000"&gt;1&lt;/font&gt;&lt;font color="#ff0000"&gt;0&lt;/font&gt;&lt;font color="#ff0000"&gt;1&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p dir="ltr" style="margin-right:0px;" align="left"&gt;&lt;font color="#000000"&gt;And &lt;b&gt;save&lt;/b&gt; as &lt;b&gt;tosrfusb.cat&lt;/b&gt; (&lt;font color="#ff0000"&gt;&lt;b&gt;replace&lt;/b&gt;&lt;/font&gt; original file).&lt;/font&gt;&lt;/p&gt;

&lt;p dir="ltr" style="margin-right:0px;" align="left"&gt;6. Now you can install your BT. &lt;/p&gt;
&lt;blockquote dir="ltr" style="margin-right:0px;"&gt;
&lt;p dir="ltr" style="margin-right:0px;" align="left"&gt;Vista or WS2008 &lt;b&gt;x86&lt;/b&gt;: %PROGRAMFILES%\Toshiba\Bluetooth Toshiba Stack\&lt;b&gt;ECCenter.exe&lt;/b&gt;&lt;/p&gt;
&lt;p align="left"&gt;Vista or WS2008 &lt;b&gt;x64&lt;/b&gt;: %PROGRAMFILES(x86)%\Toshiba\Bluetooth Toshiba Stack\&lt;b&gt;ECCenter.exe&lt;/b&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p dir="ltr" style="margin-right:0px;" align="left"&gt;You &lt;b&gt;must Ignore install not sign drivers&lt;/b&gt; and&amp;nbsp;all is&amp;nbsp;Okay.&lt;/p&gt;&lt;p dir="ltr" style="margin-right:0px;" align="left"&gt;[&lt;a href="http://forums.microsoft.com/TechNet/ShowPost.aspx?PostID=2443540&amp;amp;SiteID=17"&gt;Source: MSDN Forums&lt;/a&gt;] &lt;br&gt;&lt;/p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;img src="http://www.objectsharp.com/cs/aggbug.aspx?PostID=143955" width="1" height="1"&gt;</description><category domain="http://www.objectsharp.com/cs/blogs/jlee/archive/tags/Windows+Server+2008/default.aspx">Windows Server 2008</category></item></channel></rss>