﻿<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:blogChannel="http://backend.userland.com/blogChannelModule" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#">
  <channel>
    <title>jordan.terrell</title>
    <description>Just trying to make sense of things...</description>
    <link>http://blog.jordanterrell.com/</link>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <generator>BlogEngine.NET 2.0.0.36</generator>
    <language>en-US</language>
    <blogChannel:blogRoll>http://blog.jordanterrell.com/opml.axd</blogChannel:blogRoll>
    <blogChannel:blink>http://www.dotnetblogengine.net/syndication.axd?format=rss</blogChannel:blink>
    <dc:creator>Jordan Terrell</dc:creator>
    <dc:title>jordan.terrell</dc:title>
    <geo:lat>0.000000</geo:lat>
    <geo:long>0.000000</geo:long>
    <item>
      <title>Library Stability and Semantic Versioning</title>
      <description>&lt;p&gt;One of the challenges of incubating a new open source software project is figuring out when to make it public.&amp;#160; If you &lt;a href="http://blog.jordanterrell.com/?tag=/commons+framework"&gt;look back at previous posts&lt;/a&gt;, you’ll see that I struggled with that a bit.&amp;#160; It took well over a year after first talking about my &lt;a href="http://github.com/iSynaptic"&gt;Commons library&lt;/a&gt; to even make the source available.&amp;#160; With the availability of &lt;a href="http://nuget.org/"&gt;NuGet&lt;/a&gt;, it has made it supremely easy to publish bits to the world.&amp;#160; Almost too easy.&lt;/p&gt;  &lt;p&gt;So, I’ve been giving some thought to how I want to manage releases of the Commons library.&amp;#160; As with most fledgling open source projects, the first steps are unstable and unpredictable.&amp;#160; This is often indicated by a “0.x.x” version number, stating that this project is not stable.&amp;#160; This is the case with the Commons library.&amp;#160; That said, it is “fairly” stable.&amp;#160; Much of the code contained in the library has been there in its current form for some time.&amp;#160; The areas that have some measure of flux is the implementation of Maybe&amp;lt;T&amp;gt; and Exodata.&lt;/p&gt;  &lt;p&gt;Maybe&amp;lt;T&amp;gt; has in the last few days gone through some breaking changes, primarily because of feedback from &lt;a href="http://channel9.msdn.com/Tags/brian+beckman"&gt;Brian Beckman&lt;/a&gt; himself.&amp;#160; It’s been an absolute thrill to grab his attention and collaborate on this implementation.&amp;#160; After writing such &lt;a href="http://blog.jordanterrell.com/post/Maybe-The-Uh-Stuff-That-Dreams-Are-Made-Of.aspx"&gt;a lengthy post&lt;/a&gt;, I had hoped that Maybe&amp;lt;T&amp;gt; would stay mostly static, with little teaks and bug fixes, but Brian suggested some changes that have dramatically improved the implementation of Maybe&amp;lt;T&amp;gt;.&amp;#160; I anticipate that there will be some more changes in this area as I continue to collaborate with him.&amp;#160; I will be putting a post together in the near future outlining these changes and details of the process we went through to get there.&amp;#160; That said, the code is available if you’d like to inspect the changes to date, and I will probably be releasing a NuGet package soon to reflect these changes.&lt;/p&gt;  &lt;p&gt;Exodata has been static for a little while, but I’ve got some ideas to experiment with before I slap a v1.0 label on the bits.&amp;#160; I haven’t yet blogged about what Exodata is or how to use it, so as expected there hasn’t been feedback driving change in this area.&amp;#160; Expect this to change – I’m already putting a post together to talk about Exodata.&lt;/p&gt;  &lt;p&gt;Library stability, or rather instability, can often scare people away from using open source bits when they are in their infancy.&amp;#160; I will do my best to communicate breaking changes when they are coming during the pre-v1.0 time period.&amp;#160; However, once I hit the v1.0 mark, the rules of &lt;a href="http://semver.org/"&gt;Semantic Versioning&lt;/a&gt; will be adhered to.&amp;#160; In fact, they are being adhered to now, seeing that it allows for breaking changes prior to 1.0.&lt;/p&gt;  &lt;p&gt;I want this library to be something immensely useful for developers who appreciate a functional approach to developing software.&amp;#160; I too am a consumer of this library and will expect stability from it in the future.&amp;#160; I will hold the Commons library to the same standards as we would expect from any other library.&lt;/p&gt;</description>
      <link>http://blog.jordanterrell.com/post/Library-Stability-and-Semantic-Versioning.aspx</link>
      <comments>http://blog.jordanterrell.com/post/Library-Stability-and-Semantic-Versioning.aspx#comment</comments>
      <guid>http://blog.jordanterrell.com/post.aspx?id=55724f38-e208-4581-ae85-873b16c13038</guid>
      <pubDate>Wed, 01 Jun 2011 08:54:55 -0600</pubDate>
      <category>.NET</category>
      <category>Programming</category>
      <dc:publisher>jordan.terrell</dc:publisher>
      <pingback:server>http://blog.jordanterrell.com/pingback.axd</pingback:server>
      <pingback:target>http://blog.jordanterrell.com/post.aspx?id=55724f38-e208-4581-ae85-873b16c13038</pingback:target>
      <slash:comments>1</slash:comments>
      <trackback:ping>http://blog.jordanterrell.com/trackback.axd?id=55724f38-e208-4581-ae85-873b16c13038</trackback:ping>
      <wfw:comment>http://blog.jordanterrell.com/post/Library-Stability-and-Semantic-Versioning.aspx#comment</wfw:comment>
      <wfw:commentRss>http://blog.jordanterrell.com/syndication.axd?post=55724f38-e208-4581-ae85-873b16c13038</wfw:commentRss>
    </item>
    <item>
      <title>Maybe – The Uh, Stuff That Dreams Are Made Of</title>
      <description>&lt;p&gt;&lt;strong&gt;UPDATE 12/10/2011: &lt;/strong&gt;I’ve continued development of the Maybe&amp;lt;T&amp;gt; structure and accompanying operators.&amp;#160; As a result, some of the information in this post is no longer accurate.&amp;#160; That said, the information is still useful as it conveys many of the concepts and practical applications of the Maybe monad.&amp;#160; A future post will highlight the changes in my implementation and some of the lessons I’ve learned since writing this post.&lt;/p&gt;  &lt;hr /&gt;&lt;br /&gt;  &lt;p&gt;&lt;a href="http://www.imdb.com/title/tt0089114/"&gt;&lt;img style="border-right-width: 0px; margin: 0px 10px 0px 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Explorers (1985) film - one of my favorite childhood movies." border="0" alt="Explorers (1985) film - one of my favorite childhood movies." align="left" src="http://blog.jordanterrell.com/image.axd?picture=Explorers1.png" width="244" height="140" /&gt;&lt;/a&gt; &lt;a href="http://blog.jordanterrell.com/post/So-Where-Was-I.aspx"&gt;As I said&lt;/a&gt;, I’ve been having a blast learning more about programming in the functional style.&amp;#160; In fact, over the past 18 months I’ve rewired my brain to think functionally-oriented first and object-oriented second – not something I expected to happen.&lt;/p&gt;  &lt;p&gt;Something that I came across was the concept of &lt;a href="http://en.wikipedia.org/wiki/Monad_%28functional_programming%29"&gt;Monads&lt;/a&gt;.&amp;#160; Monads are everywhere in .NET now and it is a foundational concept in many of the really useful libraries and APIs that are coming out of Microsoft (&lt;a href="http://msdn.microsoft.com/en-us/netframework/aa904594"&gt;LINQ&lt;/a&gt;, &lt;a href="http://msdn.microsoft.com/en-us/library/dd460717.aspx"&gt;Task Parallel Library (TPL)&lt;/a&gt;, &lt;a href="http://msdn.microsoft.com/en-us/data/gg577609"&gt;Reactive Extensions (Rx)&lt;/a&gt;, etc.).&amp;#160; I strongly recommend you &lt;a href="http://channel9.msdn.com/Shows/Going+Deep/Brian-Beckman-Dont-fear-the-Monads"&gt;start learning about Monads&lt;/a&gt;. That said, I’m not going to even try to explain Monads today.&amp;#160; I’m going to talk very practically about the &lt;a href="http://en.wikipedia.org/wiki/Monad_%28functional_programming%29#Maybe_monad"&gt;Maybe monad&lt;/a&gt;, why you would use it, and my implementation of this pattern.&lt;/p&gt;  &lt;h3&gt;IEnumerable&amp;lt;T&amp;gt; - It’s Just A Function&lt;/h3&gt;  &lt;p&gt;How do you feel about the &lt;span style="font-family: consolas"&gt;&lt;strong&gt;IEnumerable&amp;lt;T&amp;gt;&lt;/strong&gt;&lt;/span&gt; interface?&amp;#160; Well, you may appreciate the fact that LINQ to Objects heavily relies on this interface and enables you to do some really cool things in just a few lines of code.&amp;#160; Many a programmer has taken a portion of a program that has numerous nested foreach loops with nested if statements and turned them into a really concise and readable LINQ statement. Thank you &lt;a href="http://en.wikipedia.org/wiki/Functional_programming"&gt;functional programming&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;If you think about it, &lt;span style="font-family: consolas"&gt;&lt;strong&gt;IEnumerable&amp;lt;T&amp;gt;&lt;/strong&gt;&lt;/span&gt; is really just a function.&amp;#160; Yes, I know, it’s an interface.&amp;#160; But please suspend reality for a few moments and think of it like a function.&amp;#160; What does a function do?&amp;#160; It takes some input, and returns some output.&amp;#160; It represents a computation – the ability to compute some value in the future.&amp;#160; Many programming languages allow functions to return at most a single value.&amp;#160; What if we want to return more than one value?&amp;#160; We create data structures that allow us to return multiple values as a single atomic value, for example, an array.&amp;#160; However, arrays require that you compute all the values in the array before can return it from a function.&amp;#160; What if you wanted a function that calculates all prime numbers?&amp;#160; If we use an array, it would never return because we would need an array of infinite size.&amp;#160; Fortunately, we have &lt;span style="font-family: consolas"&gt;&lt;strong&gt;IEnumerable&amp;lt;T&amp;gt;&lt;/strong&gt;&lt;/span&gt; and &lt;a href="http://msdn.microsoft.com/en-us/library/dscyy5s0%28v=vs.80%29.aspx"&gt;iterators&lt;/a&gt; (that enable &lt;a href="http://msdn.microsoft.com/en-us/library/bb943859.aspx"&gt;deferred execution&lt;/a&gt;) to help us with this.&amp;#160; So we can write a method, &lt;span style="font-family: consolas"&gt;&lt;strong&gt;IEnumerable&amp;lt;int&amp;gt; GetPrimes()&lt;/strong&gt;&lt;/span&gt;, and the object it returns (which implements &lt;span style="font-family: consolas"&gt;&lt;strong&gt;IEnumerable&amp;lt;int&amp;gt;&lt;/strong&gt;&lt;/span&gt;) we can think of it as being a function that can &lt;em&gt;compute zero or more&lt;/em&gt; prime numbers at some point in the future when we enumerate over it&lt;em&gt; &lt;/em&gt;(i.e. “execute” the function).&lt;/p&gt;  &lt;p&gt;Part of that last sentence is what I want you to focus on - “compute zero or more”.&amp;#160; Looking at &lt;span style="font-family: consolas"&gt;&lt;strong&gt;IEnumerable&amp;lt;T&amp;gt;&lt;/strong&gt;&lt;/span&gt; generically, we could say that it represents the ability to compute zero or more values regardless of what type &lt;span style="font-family: consolas"&gt;&lt;strong&gt;T&lt;/strong&gt;&lt;/span&gt; is.&amp;#160; We can represent computations that potentially need to return more than one value.&amp;#160; That in and of itself is useful.&amp;#160; However, it becomes extremely powerful when you combine that interface with LINQ’s Standard Query Operators (e.g. &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Select&lt;/strong&gt;&lt;/span&gt;, &lt;strong&gt;&lt;span style="font-family: consolas"&gt;Where&lt;/span&gt;&lt;/strong&gt;, &lt;span style="font-family: consolas"&gt;&lt;strong&gt;GroupBy&lt;/strong&gt;&lt;/span&gt;, &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Aggregate&lt;/strong&gt;&lt;/span&gt;, etc).&amp;#160; Now we are able to express the intent of a fairly complex piece of logic in just a few lines of code.&amp;#160; We are expressing &lt;em&gt;what&lt;/em&gt; we want the program to do and not the monotonous detail of &lt;em&gt;how&lt;/em&gt; we want to do it. We are programming declaratively and with &lt;a href="http://en.wikipedia.org/wiki/Function_composition_%28computer_science%29"&gt;composition&lt;/a&gt;.&amp;#160; It is more maintainable because it is more readable and thus easier to reason on.&amp;#160; Plus, because we aren’t spelling out all the details, framework developers and compiler designers are able to make some intelligent decisions about how to implement the programmers intent, for example, running parts of the program in parallel (e.g. &lt;a href="http://msdn.microsoft.com/en-us/library/dd460688.aspx"&gt;PLINQ&lt;/a&gt;).&amp;#160; No doubt you will agree there are many benefits to programming this way.&lt;/p&gt;  &lt;h3&gt;Zero or &lt;em&gt;One&lt;/em&gt;&lt;/h3&gt;  &lt;p&gt;But what if we don’t want to compute zero or more values?&amp;#160; What if we want to compute zero or &lt;em&gt;one&lt;/em&gt; value?&amp;#160; A classic example is reading from a dictionary.&amp;#160; &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Dictionary&amp;lt;TKey, TValue&amp;gt;&lt;/strong&gt;&lt;/span&gt; has a &lt;span style="font-family: consolas"&gt;&lt;strong&gt;TryGetValue()&lt;/strong&gt;&lt;/span&gt; method that attempts to retrieve a value from the dictionary by key, and, if the value is not in the dictionary, it returns false.&amp;#160; Unfortunately because you need to return two bits of information (1. was the value in the dictionary, and 2. if so, what is the value), &lt;span style="font-family: consolas"&gt;&lt;strong&gt;TryGetValue()&lt;/strong&gt;&lt;/span&gt; uses awkward output arguments to return the value &lt;em&gt;if&lt;/em&gt; it was in the dictionary.&amp;#160; Put in different words, we need a function (&lt;span style="font-family: consolas"&gt;&lt;strong&gt;TryGetValue&lt;/strong&gt;&lt;/span&gt;) to compute (lookup) &lt;em&gt;zero or one&lt;/em&gt; value from the dictionary based on some key.&lt;/p&gt;  &lt;p&gt;Another example might be retrieving data from a database.&amp;#160; Perhaps you have some function that returns a single &lt;span style="font-family: consolas"&gt;&lt;strong&gt;CustomerDto&lt;/strong&gt;&lt;/span&gt; from the database when you give the function a customer Id.&amp;#160; Well, we know we have to handle the scenario when there is no record in the database for the Id provided.&amp;#160; Often we just return null and that may be a perfectly logical way to represent zero customers with that customer Id.&amp;#160; However, we now have a “special” reference to a &lt;span style="font-family: consolas"&gt;&lt;strong&gt;CustomerDto&lt;/strong&gt;&lt;/span&gt; object – the null reference.&amp;#160; How many times has the dreaded &lt;span style="font-family: consolas"&gt;&lt;strong&gt;NullReferenceException&lt;/strong&gt;&lt;/span&gt; visited you?&amp;#160; To protect ourselves against that, we sprinkle in “null checks” all over the place.&amp;#160; It would be nice if we didn’t have to do that.&amp;#160; &lt;span style="font-family: consolas; color: #000000"&gt;&lt;strong&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/b3h38hb0.aspx"&gt;Nullable&amp;lt;T&amp;gt;&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt; is nice because it communicates a little better that “this value could be null” by generally requiring you to use the &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Value&lt;/strong&gt;&lt;/span&gt; property (and hopefully you check the &lt;span style="font-family: consolas"&gt;&lt;strong&gt;HasValue&lt;/strong&gt;&lt;/span&gt; property before you use it).&amp;#160; Unfortunately, by design &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Nullable&amp;lt;T&amp;gt;&lt;/strong&gt;&lt;/span&gt; does not work with reference types. That is because it is trying to model a &lt;em&gt;null&lt;/em&gt; value (which reference types already have) and not the &lt;em&gt;absence&lt;/em&gt; of a value.&amp;#160; Subtle difference, I know, but go with it for now.&lt;/p&gt;  &lt;p&gt;In both of the examples above, we are conceptually trying to represent some computation (a function) that can compute (return) zero or one value.&amp;#160; &lt;span style="font-family: consolas"&gt;&lt;strong&gt;IEnumerable&amp;lt;T&amp;gt;&lt;/strong&gt;&lt;/span&gt; gives us the ability to represent zero or &lt;em&gt;more&lt;/em&gt; values, but that is not what we want.&amp;#160; We need some type that represents zero or &lt;em&gt;one&lt;/em&gt; value.&lt;/p&gt;  &lt;h3&gt;Introduction Maybe&amp;lt;T&amp;gt;&lt;/h3&gt;  &lt;p&gt;That type is &lt;span style="font-family: consolas"&gt;&lt;strong&gt;&lt;a href="https://github.com/iSynaptic/iSynaptic.Commons/blob/master/Application/iSynaptic.Commons/Maybe.cs"&gt;Maybe&amp;lt;T&amp;gt;&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;.&amp;#160; It works with all .NET types; value and reference types.&amp;#160; Here are some simple examples:&lt;/p&gt;  &lt;div id="codeSnippetWrapper"&gt;   &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; height: 129px; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;     &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt;   1:&lt;/span&gt; Maybe&amp;lt;&lt;span style="color: #0000ff"&gt;int&lt;/span&gt;&amp;gt; number = Maybe.Value(42);&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt;   2:&lt;/span&gt; Maybe&amp;lt;&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;&amp;gt; text = Maybe.Value(&lt;span style="color: #006080"&gt;&amp;quot;Hello, World!&amp;quot;&lt;/span&gt;);&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum3"&gt;   3:&lt;/span&gt;&amp;#160; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum4"&gt;   4:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (number.HasValue) { Console.WriteLine(number.Value); }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum5"&gt;   5:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (text.HasValue) { Console.WriteLine(text.Value); }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum6"&gt;   6:&lt;/span&gt;&amp;#160; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum7"&gt;   7:&lt;/span&gt; number = Maybe&amp;lt;&lt;span style="color: #0000ff"&gt;int&lt;/span&gt;&amp;gt;.NoValue;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum8"&gt;   8:&lt;/span&gt; text = Maybe&amp;lt;&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;&amp;gt;.NoValue;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;&lt;a href="http://blog.jordanterrell.com/image.axd?picture=Explorers2.png"&gt;&lt;img style="border-right-width: 0px; margin: 15px 0px 0px 15px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="&amp;quot;The uh, stuff that dreams are made of.&amp;quot; - Quote from Maltese Falcon (never seen it) that was referenced in Explorers." border="0" alt="&amp;quot;The uh, stuff that dreams are made of.&amp;quot; - Quote from Maltese Falcon (never seen it) that was referenced in Explorers." align="right" src="http://blog.jordanterrell.com/image.axd?picture=Explorers2_thumb.png" width="244" height="140" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;First, we see a simple integer value (42) placed into a &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Maybe&amp;lt;T&amp;gt;&lt;/strong&gt;&lt;/span&gt; and assigned to the variable, “number”.&amp;#160; Next, we assigned another constant to a variable, “text”, but this time with a string, demonstrating that this works with both value and reference types.&amp;#160; Then, we write the contents of both variables out to the console, but only if they have a value (which we know they do in this case).&amp;#160; Finally, we re-assign the two variables to &lt;em&gt;not&lt;/em&gt; have a value (&lt;span style="font-family: consolas"&gt;&lt;strong&gt;NoValue&lt;/strong&gt;&lt;/span&gt;), just to demonstrate how to compute the absence of a value.&lt;/p&gt;

&lt;p&gt;At this point you might be thinking, “Big deal. I can just use null reference types and &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Nullable&amp;lt;T&amp;gt;&lt;/strong&gt;&lt;/span&gt; to do the same thing.”&amp;#160; You would probably be right. However, many developers who have spent time with the Maybe monad pattern have found it to be a much more elegant solution.&amp;#160; For one, in my implementation, you will never get a null reference exception using &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Maybe&amp;lt;T&amp;gt;&lt;/strong&gt;&lt;/span&gt; - it is implemented as a value type (struct) and as such cannot be null.&amp;#160; Second, the way to represent the absence of a value (zero) for any type, regardless of whether it is a value or reference type, is the same when you are using &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Maybe&amp;lt;T&amp;gt;&lt;/strong&gt;&lt;/span&gt;.&amp;#160; Consistency is important for code readability and maintainability.&amp;#160; Finally, having a variable of type &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Maybe&amp;lt;T&amp;gt;&lt;/strong&gt;&lt;/span&gt; communicates that it is possible for it to not have a value (‘&lt;a href="http://en.wikipedia.org/wiki/The_Soup_Nazi"&gt;no T for you&lt;/a&gt;…maybe’). &lt;/p&gt;

&lt;p&gt;Having a variable that is a reference type, for example a string, doesn’t tell you whether or not you should expect it to contain the null reference.&amp;#160; If you are being a defensive programmer, you might check to see if it is null before using it - just in case.&amp;#160; Also, when you have a method that returns a reference type, the return type doesn’t tell you whether or not the method can or will return a null.&amp;#160; By using &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Maybe&amp;lt;T&amp;gt;&lt;/strong&gt;&lt;/span&gt;, we can use the type system to clearly indicate that the method might not be able to compute (return) a value.&amp;#160; A great example of this is one I mentioned earlier – using dictionaries:&lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; height: 32px; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt;   1:&lt;/span&gt; var dictionary = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; Dictionary&amp;lt;&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;, &lt;span style="color: #0000ff"&gt;int&lt;/span&gt;&amp;gt;();&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; height: 18px; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt;   2:&lt;/span&gt; Maybe&amp;lt;&lt;span style="color: #0000ff"&gt;int&lt;/span&gt;&amp;gt; number = dictionary.TryGetValue(&lt;span style="color: #006080"&gt;&amp;quot;Foo&amp;quot;&lt;/span&gt;);&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;
  &lt;br /&gt;I created an extension method, &lt;span style="font-family: consolas"&gt;&lt;strong&gt;TryGetValue&lt;/strong&gt;&lt;/span&gt;, that extends &lt;span style="font-family: consolas"&gt;&lt;strong&gt;IDictionary&amp;lt;TKey, TValue&amp;gt;&lt;/strong&gt;&lt;/span&gt; and takes only &lt;em&gt;one&lt;/em&gt; argument - the key to use to lookup the value.&amp;#160; We know this lookup could fail.&amp;#160; The item we are looking for may not be in the dictionary and it would be better if we didn’t throw an exception if we can’t lookup the value.&amp;#160; That is why the &lt;span style="font-family: consolas"&gt;&lt;strong&gt;TryGetValue&lt;/strong&gt;&lt;/span&gt; extension method I created returns a &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Maybe&amp;lt;TValue&amp;gt;&lt;/strong&gt;&lt;/span&gt; - if the value cannot be found in the dictionary it just returns &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Maybe&amp;lt;TValue&amp;gt;.NoValue&lt;/strong&gt;&lt;/span&gt;.&amp;#160; The nice thing about using the &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Maybe&amp;lt;T&amp;gt;&lt;/strong&gt;&lt;/span&gt; in an extension method is that it works with any type. It doesn’t matter if TValue is a value or reference type.&amp;#160; You don’t have to create an extension method for values types, and another one for reference types.&lt;/p&gt;

&lt;p&gt;Did you notice we don’t have the awkward output arguments in the last example?&amp;#160; &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Maybe&amp;lt;T&amp;gt;&lt;/strong&gt;&lt;/span&gt; is almost worth it just for that.&amp;#160; However, if you are still on the fence, I just might be able to convince you that &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Maybe&amp;lt;T&amp;gt;&lt;/strong&gt;&lt;/span&gt; is “the uh, stuff that dreams are made of”.&amp;#160; Well, maybe just that it is really cool and useful.&lt;/p&gt;

&lt;h3&gt;Maybe Is Lazy and Doesn’t Forget&lt;/h3&gt;

&lt;p&gt;One nuance when using &lt;span style="font-family: consolas"&gt;&lt;strong&gt;IEnumerable&amp;lt;T&amp;gt;&lt;/strong&gt;&lt;/span&gt; is that you need to realize that the values it returns often are not computed until you enumerate over, also known as &lt;a href="http://msdn.microsoft.com/en-us/library/bb943859.aspx"&gt;deferred execution&lt;/a&gt;.&amp;#160; &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Maybe&amp;lt;T&amp;gt;&lt;/strong&gt;&lt;/span&gt; works the same way.&amp;#160; It often does not compute it’s value or the absence of a value until you try to use the &lt;span style="font-family: consolas"&gt;&lt;strong&gt;HasValue&lt;/strong&gt;&lt;/span&gt;, &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Value&lt;/strong&gt;&lt;/span&gt;, or &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Exception&lt;/strong&gt;&lt;/span&gt; (more on this in a moment) properties. A symptom of deferred execution is when you write some code with &lt;span style="font-family: consolas"&gt;&lt;strong&gt;IEnumerable&amp;lt;T&amp;gt;&lt;/strong&gt;&lt;/span&gt; or &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Maybe&amp;lt;T&amp;gt;&lt;/strong&gt;&lt;/span&gt; expecting some side effect to occur and nothing happens.&amp;#160; Most of the &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Maybe&amp;lt;T&amp;gt;&lt;/strong&gt;&lt;/span&gt; operators are lazy and if you want to force evaluation you can call &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Run()&lt;/strong&gt;&lt;/span&gt; or &lt;span style="font-family: consolas"&gt;&lt;strong&gt;RunAsync()&lt;/strong&gt;&lt;/span&gt; (operators are discussed below).&lt;/p&gt;

&lt;p&gt;Now, so far you’ve only seen examples that are do not use deferred execution.&amp;#160; Here is an (albeit contrived) example of deferred execution using &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Maybe&amp;lt;T&amp;gt;&lt;/strong&gt;&lt;/span&gt;:&lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; height: 14px; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt;   1:&lt;/span&gt; Maybe&amp;lt;&lt;span style="color: #0000ff"&gt;int&lt;/span&gt;&amp;gt; number = Maybe.Value(() =&amp;gt; 42);&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;The &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Value&lt;/strong&gt;&lt;/span&gt; method lets you pass in a &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Func&amp;lt;T&amp;gt;&lt;/strong&gt;&lt;/span&gt; to calculate it’s value. In this example it only returns 42.&amp;#160; However, it could return something that is expensive to compute.&amp;#160; The function you provide will not get executed until something uses the &lt;span style="font-family: consolas"&gt;&lt;strong&gt;HasValue&lt;/strong&gt;&lt;/span&gt;, &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Value&lt;/strong&gt;&lt;/span&gt;, or &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Exception&lt;/strong&gt;&lt;/span&gt; properties – just like a deferred &lt;span style="font-family: consolas"&gt;&lt;strong&gt;IEnumerable&amp;lt;T&amp;gt;&lt;/strong&gt;&lt;/span&gt; does not execute until you call &lt;span style="font-family: consolas"&gt;&lt;strong&gt;MoveNext()&lt;/strong&gt;&lt;/span&gt; on the enumerator.&lt;/p&gt;

&lt;p&gt;However, unlike &lt;span style="font-family: consolas"&gt;&lt;strong&gt;IEnumerable&amp;lt;T&amp;gt;&lt;/strong&gt;&lt;/span&gt;, once you use one of those properties your function’s results are cached and the function is never called again.&amp;#160; The &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Maybe&amp;lt;T&amp;gt;&lt;/strong&gt;&lt;/span&gt; remembers its value.&amp;#160; It behaves more like &lt;span style="font-family: consolas"&gt;&lt;strong&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/dd642331.aspx"&gt;Lazy&amp;lt;T&amp;gt;&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt; in this case.&amp;#160; In the vast majority of scenarios where you would use &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Maybe&amp;lt;T&amp;gt;&lt;/strong&gt;&lt;/span&gt; this is the behavior that you want.&amp;#160; If you want to re-compute the value, build up the &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Maybe&amp;lt;T&amp;gt;&lt;/strong&gt;&lt;/span&gt; again.&lt;/p&gt;

&lt;h3&gt;Exceptions ≈ NoValue&lt;/h3&gt;

&lt;p&gt;Sometimes when you are trying to compute some value bad stuff happens.&amp;#160; Exceptions are thrown.&amp;#160; One way to look at an exception in this scenario is that it is roughly equal to &lt;span style="font-family: consolas"&gt;&lt;strong&gt;NoValue&lt;/strong&gt;&lt;/span&gt;.&amp;#160; Example: You tried to get a row count from a database table, but the database is down and an exception is thrown.&amp;#160; You were not able to compute the row count because the database is not available.&amp;#160; &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Maybe&amp;lt;T&amp;gt;&lt;/strong&gt;&lt;/span&gt; has an &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Exception&lt;/strong&gt;&lt;/span&gt; property that allows you to capture the exception that prevented you from computing the row count. For example:&lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; height: 36px; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt;   1:&lt;/span&gt; Maybe&amp;lt;&lt;span style="color: #0000ff"&gt;int&lt;/span&gt;&amp;gt; constant = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; Maybe&amp;lt;&lt;span style="color: #0000ff"&gt;int&lt;/span&gt;&amp;gt;(&lt;span style="color: #0000ff"&gt;new&lt;/span&gt; InvalidOperationException());&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt;   2:&lt;/span&gt; Maybe&amp;lt;&lt;span style="color: #0000ff"&gt;int&lt;/span&gt;&amp;gt; lazy = Maybe.Value&amp;lt;&lt;span style="color: #0000ff"&gt;int&lt;/span&gt;&amp;gt;(() =&amp;gt; { &lt;span style="color: #0000ff"&gt;throw&lt;/span&gt; &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; InvalidOperationException(); });&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;In both cases, the &lt;span style="font-family: consolas"&gt;&lt;strong&gt;HasValue&lt;/strong&gt;&lt;/span&gt; property is equal to false and the &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Exception&lt;/strong&gt;&lt;/span&gt; property contains the exception.&amp;#160; In the interest of full disclosure, this feature is not part of the traditional implementation of the Maybe monad.&amp;#160; It is actually part of the &lt;a href="http://www.google.com/search?q=Error+monad"&gt;Error monad&lt;/a&gt;.&amp;#160; That said, these monadic patterns are so complementary that it is useful to combine them into a single implementation.&lt;/p&gt;

&lt;h3&gt;Maybe&amp;lt;T&amp;gt; Entry Points&lt;/h3&gt;

&lt;p&gt;There are a few ways to create instances of &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Maybe&amp;lt;T&amp;gt;&lt;/strong&gt;&lt;/span&gt;.&amp;#160; First, you can use constructors that take in a &lt;span style="font-family: consolas"&gt;&lt;strong&gt;T&lt;/strong&gt;&lt;/span&gt;, a &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Func&amp;lt;T&amp;gt;&lt;/strong&gt;&lt;/span&gt;, or an &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Exception&lt;/strong&gt;&lt;/span&gt;.&amp;#160; You can also use the &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Maybe.Value&lt;/strong&gt;&lt;/span&gt; method overloads that take in a &lt;span style="font-family: consolas"&gt;&lt;strong&gt;T&lt;/strong&gt;&lt;/span&gt; or a &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Func&amp;lt;T&amp;gt;&lt;/strong&gt;&lt;/span&gt; – this often allows the compiler to &lt;a href="http://en.wikipedia.org/wiki/Type_inference"&gt;infer&lt;/a&gt; what type &lt;span style="font-family: consolas"&gt;&lt;strong&gt;T&lt;/strong&gt;&lt;/span&gt; is.&amp;#160; There are a few other ways to create a &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Maybe&amp;lt;T&amp;gt;&lt;/strong&gt;&lt;/span&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Maybe.NotNull&lt;/strong&gt; – This creates a &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Maybe&amp;lt;T&amp;gt;&lt;/strong&gt;&lt;/span&gt; that treats null values as &lt;span style="font-family: consolas"&gt;&lt;strong&gt;NoValue&lt;/strong&gt;&lt;/span&gt;.&amp;#160; This is very helpful later when you are using other operators.&amp;#160; It has support for reference types and &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Nullable&amp;lt;T&amp;gt;&lt;/strong&gt;&lt;/span&gt;.&amp;#160; &lt;span style="font-family: consolas"&gt;&lt;strong&gt;NotNull&lt;/strong&gt;&lt;/span&gt; can be used both as an entry point and as an operator (explained below).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Maybe.Using&lt;/strong&gt; – This creates a &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Maybe&amp;lt;T&amp;gt;&lt;/strong&gt;&lt;/span&gt; that can dispose of a resource after a value has been computed using the resource.&amp;#160; A classic example would be executing some scalar query against a database.&amp;#160; You want to ensure that the connection to the database is disposed after the scalar query is executed. Using can be used both as an entry point and as an operator.&amp;#160; Here is an example of using both &lt;span style="font-family: consolas"&gt;&lt;strong&gt;NotNull&lt;/strong&gt;&lt;/span&gt; and &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Using&lt;/strong&gt;&lt;/span&gt; together:&lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; height: 43px; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt;   1:&lt;/span&gt; Maybe&amp;lt;&lt;span style="color: #0000ff"&gt;int&lt;/span&gt;&amp;gt; rowCount = Maybe&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt;   2:&lt;/span&gt;     .NotNull(connectionString)&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum3"&gt;   3:&lt;/span&gt;     .Using(cns =&amp;gt; ConnectToDb(cns), conn =&amp;gt; conn.GetRowCount());&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;div&gt;&amp;#160;&lt;/div&gt;

&lt;h3&gt;Maybe&amp;lt;T&amp;gt; Operators&lt;/h3&gt;

&lt;p&gt;Remember how LINQ &lt;a href="http://msdn.microsoft.com/en-us/library/bb397896.aspx"&gt;Standard Query Operators&lt;/a&gt; (e.g. &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Select&lt;/strong&gt;&lt;/span&gt;, &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Where&lt;/strong&gt;&lt;/span&gt;, &lt;span style="font-family: consolas"&gt;&lt;strong&gt;GroupBy&lt;/strong&gt;&lt;/span&gt;, etc) make the &lt;span style="font-family: consolas"&gt;&lt;strong&gt;IEnumerable&amp;lt;T&amp;gt;&lt;/strong&gt;&lt;/span&gt; interface so much more powerful?&amp;#160; Well, the same is true of &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Maybe&amp;lt;T&amp;gt;&lt;/strong&gt;&lt;/span&gt;.&amp;#160; I’ve developed a number of really powerful Standard Maybe Operators that make &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Maybe&amp;lt;T&amp;gt;&lt;/strong&gt;&lt;/span&gt; just as powerful as &lt;span style="font-family: consolas"&gt;&lt;strong&gt;IEnumerable&amp;lt;T&amp;gt;&lt;/strong&gt;&lt;/span&gt;.&amp;#160; Keep in mind, all of these operators understand that sometimes there is no value to operate on.&amp;#160; Just like calling &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Select&lt;/strong&gt;&lt;/span&gt; and &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Where&lt;/strong&gt;&lt;/span&gt; against an empty &lt;span style="font-family: consolas"&gt;&lt;strong&gt;IEnumerable&amp;lt;T&amp;gt;&lt;/strong&gt;&lt;/span&gt; results in another empty &lt;span style="font-family: consolas"&gt;&lt;strong&gt;IEnumerable&amp;lt;T&amp;gt;&lt;/strong&gt;&lt;/span&gt;, calling &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Select&lt;/strong&gt;&lt;/span&gt; and &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Where&lt;/strong&gt;&lt;/span&gt; against a &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Maybe&amp;lt;T&amp;gt;&lt;/strong&gt;&lt;/span&gt; that doesn’t have a value results in another &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Maybe&amp;lt;T&amp;gt;&lt;/strong&gt;&lt;/span&gt; that doesn’t have a value.&lt;/p&gt;

&lt;p&gt;I won’t be able to fully explain each operator in this post. In fact, I’m going to intentionally gloss over them quite a bit, but I have unit tests covering them so you can look there for examples.&amp;#160; Additionally, the examples below are written to make them easier to understand and not always for conciseness. I won’t use the &lt;span style="font-family: consolas"&gt;&lt;strong&gt;var&lt;/strong&gt;&lt;/span&gt; keyword, and sometimes I will create temporary variables to help comprehension.&amp;#160; I may end up dedicating a few blog posts to expanding on how each of these operators behave in detail, but for now this should give you an idea of what is possible.&amp;#160; Here is the current list of the Standard Maybe Operators:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;NotNull, Using&lt;/strong&gt; – These were explained above.&amp;#160; They both can be used as an operator and an entry point method.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Select, Coalesce&lt;/strong&gt; – &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Select&lt;/strong&gt;&lt;/span&gt; should be fairly obvious if you’ve done any LINQ development.&amp;#160; It takes the value, if there is one, and selects another value from it.&amp;#160; &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Coalesce&lt;/strong&gt;&lt;/span&gt; combines &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Select&lt;/strong&gt;&lt;/span&gt; with &lt;span style="font-family: consolas"&gt;&lt;strong&gt;NotNull&lt;/strong&gt;&lt;/span&gt;.&amp;#160; Example:&lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; height: 44px; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt;   1:&lt;/span&gt; Maybe&amp;lt;Category&amp;gt; parentCategory = Maybe.Value(product)&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt;   2:&lt;/span&gt;     .Coalesce(x =&amp;gt; x.Category)&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum3"&gt;   3:&lt;/span&gt;     .Select(x =&amp;gt; x.Parent);&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;&amp;#160;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Where, Unless&lt;/strong&gt; – &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Where&lt;/strong&gt;&lt;/span&gt; will also be familiar if you’ve done LINQ development before.&amp;#160; It takes a predicate function (&lt;span style="font-family: consolas"&gt;&lt;strong&gt;Func&amp;lt;T, bool&amp;gt;&lt;/strong&gt;&lt;/span&gt;) as an argument that is called with the value of the &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Maybe&amp;lt;T&amp;gt;&lt;/strong&gt;&lt;/span&gt;, if there is a value, and if the function returns true it returns the original value.&amp;#160; If the function returns false, it returns &lt;span style="font-family: consolas"&gt;&lt;strong&gt;NoValue&lt;/strong&gt;&lt;/span&gt;.&amp;#160; &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Unless&lt;/strong&gt;&lt;/span&gt; works roughly the same, except if flips the result of the predicate function you provide.&amp;#160; It takes a function (&lt;span style="font-family: consolas"&gt;&lt;strong&gt;Func&amp;lt;T, bool&amp;gt;&lt;/strong&gt;&lt;/span&gt;) as an argument that is called with the value of the &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Maybe&amp;lt;T&amp;gt;&lt;/strong&gt;&lt;/span&gt;, if there is a value, and if the function returns false it returns the original value. If the function returns true, it returns &lt;span style="font-family: consolas"&gt;&lt;strong&gt;NoValue&lt;/strong&gt;&lt;/span&gt;.&amp;#160; Example:&lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; height: 49px; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt;   1:&lt;/span&gt; Maybe&amp;lt;&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;&amp;gt; message = Maybe.Value(&lt;span style="color: #006080"&gt;&amp;quot;Hello, World!&amp;quot;&lt;/span&gt;)&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt;   2:&lt;/span&gt;     .Where(x =&amp;gt; x.StartsWith(&lt;span style="color: #006080"&gt;&amp;quot;H&amp;quot;&lt;/span&gt;))&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; height: 22px; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum3"&gt;   3:&lt;/span&gt;     .Unless(x =&amp;gt; x.EndsWith(&lt;span style="color: #006080"&gt;&amp;quot;?&amp;quot;&lt;/span&gt;));&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;&amp;#160;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Or, Join&lt;/strong&gt; – &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Or&lt;/strong&gt;&lt;/span&gt; and &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Join&lt;/strong&gt;&lt;/span&gt; allow you to combine two &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Maybe&amp;lt;T&amp;gt;&lt;/strong&gt;&lt;/span&gt;s.&amp;#160; &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Or&lt;/strong&gt;&lt;/span&gt; will return the value of the first &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Maybe&amp;lt;T&amp;gt;&lt;/strong&gt;&lt;/span&gt;, unless it has no value, and then it will return the value of the second.&amp;#160; Join returns a &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Maybe&lt;/strong&gt;&lt;/span&gt; that combines the two &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Maybe&lt;/strong&gt;&lt;/span&gt;s – either as a &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Maybe&amp;lt;Tuple&amp;lt;T, U&amp;gt;&amp;gt;&lt;/strong&gt;&lt;/span&gt; or you can give it a function that takes the two values and combines them into a custom type.&amp;#160; &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Join&lt;/strong&gt;&lt;/span&gt; returns &lt;span style="font-family: consolas"&gt;&lt;strong&gt;NoValue&lt;/strong&gt;&lt;/span&gt; if either of the two provided &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Maybe&lt;/strong&gt;&lt;/span&gt;s does not have a value. Example:&lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; height: 244px; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt;   1:&lt;/span&gt; Maybe&amp;lt;CustomerDto&amp;gt; cachedDto = dictionary.TryGetValue(id);&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt;   2:&lt;/span&gt; Maybe&amp;lt;CustomerDto&amp;gt; retreivedDto = Maybe.Using(() =&amp;gt; ConnectToDb(), conn =&amp;gt; conn.GetCustomer(id));&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum3"&gt;   3:&lt;/span&gt;&amp;#160; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum4"&gt;   4:&lt;/span&gt; Maybe&amp;lt;StockQuote&amp;gt; latestQuote = Maybe.Value(() =&amp;gt; stockService.GetQuote(&lt;span style="color: #006080"&gt;&amp;quot;LNKD&amp;quot;&lt;/span&gt;));&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum5"&gt;   5:&lt;/span&gt;&amp;#160; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum6"&gt;   6:&lt;/span&gt; Maybe&amp;lt;CustomerQuote&amp;gt; customerQuote = cachedDto.Or(retreivedDto)&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum7"&gt;   7:&lt;/span&gt;     .Join(latestQuote, (dto, quote) =&amp;gt; &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; CustomerQuote(dto.Name, quote.Price));&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum8"&gt;   8:&lt;/span&gt;&amp;#160; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum9"&gt;   9:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;if&lt;/span&gt;(customerQuote.HasValue)&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum10"&gt;  10:&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum11"&gt;  11:&lt;/span&gt;     CustomerQuote q = customerQuote.Value;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum12"&gt;  12:&lt;/span&gt;     Console.WriteLine(&lt;span style="color: #006080"&gt;&amp;quot;Quote for LinkedIn to {0} is: {1}&amp;quot;&lt;/span&gt;, q.Name, q.Price);&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum13"&gt;  13:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum14"&gt;  14:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;else&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; height: 21px; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum15"&gt;  15:&lt;/span&gt;     Console.WriteLine(&lt;span style="color: #006080"&gt;&amp;quot;Unable to retreive quote.&amp;quot;&lt;/span&gt;);&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;&amp;#160;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;With&lt;/strong&gt; – Executes an action against a selected value when evaluated. Example:&lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; height: 28px; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt;   1:&lt;/span&gt; Maybe&amp;lt;&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;&amp;gt; text = Maybe.Value(&lt;span style="color: #006080"&gt;&amp;quot;Hello, World!&amp;quot;&lt;/span&gt;)&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt;   2:&lt;/span&gt;     .With(x =&amp;gt; x.Length, l =&amp;gt; Console.WriteLine(&lt;span style="color: #006080"&gt;&amp;quot;Length of string: {0}&amp;quot;&lt;/span&gt;, l));&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;&amp;#160;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;When&lt;/strong&gt; – Executes an action or replaces a value, on evaluation, when predicate is true. Example:&lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; height: 44px; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt;   1:&lt;/span&gt; Maybe&amp;lt;&lt;span style="color: #0000ff"&gt;int&lt;/span&gt;&amp;gt; nearestOddNumberRoundingUp = Maybe.Value(() =&amp;gt; Console.ReadLine())&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt;   2:&lt;/span&gt;     .Select(x =&amp;gt; &lt;span style="color: #0000ff"&gt;int&lt;/span&gt;.Parse(x))&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum3"&gt;   3:&lt;/span&gt;     .When(x =&amp;gt; x % 2 == 0, x =&amp;gt; x + 1);&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;&amp;#160;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;OnValue, OnNoValue, OnException&lt;/strong&gt; – Executes an action or replaces a values, on evaluation, when the method’s condition is true. Example:&lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; height: 69px; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt;   1:&lt;/span&gt; Maybe&amp;lt;&lt;span style="color: #0000ff"&gt;int&lt;/span&gt;&amp;gt; fortyTwo = Maybe&amp;lt;&lt;span style="color: #0000ff"&gt;int&lt;/span&gt;&amp;gt;.NoValue&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt;   2:&lt;/span&gt;     .OnNoValue(() =&amp;gt; { &lt;span style="color: #0000ff"&gt;throw&lt;/span&gt; &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; InvalidOperationException(); })&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum3"&gt;   3:&lt;/span&gt;     .OnException(ex =&amp;gt; Maybe.Value(42))&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum4"&gt;   4:&lt;/span&gt;     .OnValue(x =&amp;gt; Console.WriteLine(x));&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;&amp;#160;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;ThrowOn, ThrowOnNoValue, ThrowOnException&lt;/strong&gt; – Generally, the &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Maybe&amp;lt;T&amp;gt;&lt;/strong&gt;&lt;/span&gt; operators prevent exceptions that are thrown from escaping the &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Maybe&amp;lt;T&amp;gt;&lt;/strong&gt;&lt;/span&gt;, but instead treat the exception roughly like &lt;span style="font-family: consolas"&gt;&lt;strong&gt;NoValue&lt;/strong&gt;&lt;/span&gt;.&amp;#160; &lt;span style="font-family: consolas"&gt;&lt;strong&gt;ThrowOn&lt;/strong&gt;&lt;/span&gt;, &lt;span style="font-family: consolas"&gt;&lt;strong&gt;ThrowOnNoValue&lt;/strong&gt;&lt;/span&gt;, &lt;span style="font-family: consolas"&gt;&lt;strong&gt;ThrowOnException&lt;/strong&gt;&lt;/span&gt; allows exceptions to immediately escape and bubble up to be handled by standard .NET exception handling. Example:&lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; height: 54px; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt;   1:&lt;/span&gt; Maybe&amp;lt;&lt;span style="color: #0000ff"&gt;int&lt;/span&gt;&amp;gt; neverHaveValue = Maybe.Value(&lt;span style="color: #006080"&gt;&amp;quot;Hello, World!&amp;quot;&lt;/span&gt;)&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt;   2:&lt;/span&gt;     .Select(x =&amp;gt; &lt;span style="color: #0000ff"&gt;int&lt;/span&gt;.Parse(x))&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum3"&gt;   3:&lt;/span&gt;     .ThrowOnException();&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;&amp;#160;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Run, RunAsync&lt;/strong&gt; – Since most operators don’t execute until the &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Maybe&amp;lt;T&amp;gt;&lt;/strong&gt;&lt;/span&gt; is evaluated, &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Run&lt;/strong&gt;&lt;/span&gt; and &lt;span style="font-family: consolas"&gt;&lt;strong&gt;RunAsync&lt;/strong&gt;&lt;/span&gt; force evaluation while still returning a &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Maybe&amp;lt;T&amp;gt;&lt;/strong&gt;&lt;/span&gt; for further processing.&amp;#160; Both allow you to pass in an &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Action&amp;lt;T&amp;gt;&lt;/strong&gt;&lt;/span&gt; to immediately execute some work on the value (if there is one).&amp;#160; &lt;span style="font-family: consolas"&gt;&lt;strong&gt;RunAsync&lt;/strong&gt;&lt;/span&gt; makes use of the Task Parallel Library to evaluate the &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Maybe&amp;lt;T&amp;gt;&lt;/strong&gt;&lt;/span&gt; by default on the thread pool.&amp;#160; It optionally takes in a &lt;span style="font-family: consolas"&gt;&lt;strong&gt;CancellationToken&lt;/strong&gt;&lt;/span&gt;, &lt;span style="font-family: consolas"&gt;&lt;strong&gt;TaskCreationOptions&lt;/strong&gt;&lt;/span&gt;, or &lt;span style="font-family: consolas"&gt;&lt;strong&gt;TaskScheduler&lt;/strong&gt;&lt;/span&gt; to provide additional control over how it runs asynchronously.&lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt;   1:&lt;/span&gt; Maybe&amp;lt;&lt;span style="color: #0000ff"&gt;int&lt;/span&gt;&amp;gt; writeToConsoleImmediately = Maybe.Value(() =&amp;gt; Console.ReadLine())&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt;   2:&lt;/span&gt;     .Select(x =&amp;gt; &lt;span style="color: #0000ff"&gt;int&lt;/span&gt;.Parse(x))&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum3"&gt;   3:&lt;/span&gt;     .OnValue(x =&amp;gt; Console.WriteLine(&lt;span style="color: #006080"&gt;&amp;quot;You entered number: {0}.&amp;quot;&lt;/span&gt;, x))&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum4"&gt;   4:&lt;/span&gt;     .OnException(ex =&amp;gt; Console.WriteLine(&lt;span style="color: #006080"&gt;&amp;quot;You did not enter a number.&amp;quot;&lt;/span&gt;))&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum5"&gt;   5:&lt;/span&gt;     .Run();&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;&amp;#160;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Synchronize&lt;/strong&gt; – Although &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Maybe&amp;lt;T&amp;gt;&lt;/strong&gt;&lt;/span&gt; only evaluates once just like &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Lazy&amp;lt;T&amp;gt;&lt;/strong&gt;&lt;/span&gt; it is not thread-safe by default.&amp;#160; This is by design because there is overheard in thread synchronization.&amp;#160; If two or more threads try to evaluate the &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Maybe&amp;lt;T&amp;gt;&lt;/strong&gt;&lt;/span&gt; at the same time, evaluation will execute multiple times.&amp;#160; To prevent this, use the &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Synchronize&lt;/strong&gt;&lt;/span&gt; method. This is useful when evaluation is very expensive; for example, querying a database or doing some CPU intensive work.&amp;#160; Example:&lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; height: 38px; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt;   1:&lt;/span&gt; Maybe&amp;lt;BigInteger&amp;gt; = Maybe.Value(() =&amp;gt; GetLargePrimeNumber())&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt;   2:&lt;/span&gt;     .Synchronize();&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;&amp;#160;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cast, OfType&lt;/strong&gt; – &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Cast&lt;/strong&gt;&lt;/span&gt; and &lt;span style="font-family: consolas"&gt;&lt;strong&gt;OfType&lt;/strong&gt;&lt;/span&gt; allow you to cast the value (if there is one) to another type.&amp;#160; &lt;span style="font-family: consolas"&gt;&lt;strong&gt;OfType&lt;/strong&gt;&lt;/span&gt; tries to safely cast the value; if it can’t, it returns &lt;span style="font-family: consolas"&gt;&lt;strong&gt;NoValue&lt;/strong&gt;&lt;/span&gt;.&amp;#160; &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Cast&lt;/strong&gt;&lt;/span&gt; tries to directly cast the value; if it fails, it results in a &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Maybe&amp;lt;T&amp;gt;&lt;/strong&gt;&lt;/span&gt; that contains a cast exception. Example:&lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; height: 56px; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;object&lt;/span&gt; obj = &lt;span style="color: #006080"&gt;&amp;quot;Hello, World!&amp;quot;&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt;   2:&lt;/span&gt; Maybe&amp;lt;&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;&amp;gt; text = Maybe.Value(obj)&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum3"&gt;   3:&lt;/span&gt;     .Cast&amp;lt;&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;&amp;gt;();&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;div&gt;&amp;#160;&lt;/div&gt;

&lt;h3&gt;Shedding Maybe&amp;lt;T&amp;gt;&lt;/h3&gt;

&lt;p&gt;At some point you are going to need to get at the underlying value.&amp;#160; There are a few ways of doing this.&amp;#160; All of the methods below evaluate the &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Maybe&amp;lt;T&amp;gt;&lt;/strong&gt;&lt;/span&gt; immediately.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;ToNullable&lt;/strong&gt; – When you are dealing with &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Maybe&amp;lt;T&amp;gt;&lt;/strong&gt;&lt;/span&gt; where &lt;span style="font-family: consolas"&gt;&lt;strong&gt;T&lt;/strong&gt;&lt;/span&gt; is a value type, &lt;span style="font-family: consolas"&gt;&lt;strong&gt;ToNullable&lt;/strong&gt;&lt;/span&gt; will convert the &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Maybe&amp;lt;T&amp;gt;&lt;/strong&gt;&lt;/span&gt; into a &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Nullable&amp;lt;T&amp;gt;&lt;/strong&gt;&lt;/span&gt;. If there is a value, it simply returns the value typed as &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Nullable&amp;lt;T&amp;gt;&lt;/strong&gt;&lt;/span&gt;. If there is no value, it returns the null value typed as &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Nullable&amp;lt;T&amp;gt;&lt;/strong&gt;&lt;/span&gt;.&amp;#160; Example:&lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; height: 38px; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt;   1:&lt;/span&gt; Nullable&amp;lt;&lt;span style="color: #0000ff"&gt;int&lt;/span&gt;&amp;gt; &lt;span style="color: #0000ff"&gt;value&lt;/span&gt; = Maybe&amp;lt;&lt;span style="color: #0000ff"&gt;int&lt;/span&gt;&amp;gt;.NoValue&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt;   2:&lt;/span&gt;     .ToNullable();&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;&amp;#160;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Assign&lt;/strong&gt; – Assign will output the value (if there is one) thru an reference parameter. This is useful if, after calling &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Assign&lt;/strong&gt;&lt;/span&gt;, you want to execute other &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Maybe&amp;lt;T&amp;gt;&lt;/strong&gt;&lt;/span&gt; operators.&lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; height: 89px; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;int&lt;/span&gt; &lt;span style="color: #0000ff"&gt;value&lt;/span&gt; = 0;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt;   2:&lt;/span&gt; Maybe&amp;lt;&lt;span style="color: #0000ff"&gt;int&lt;/span&gt;&amp;gt; number = Maybe.Value(() =&amp;gt; Console.ReadLine())&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum3"&gt;   3:&lt;/span&gt;     .Select(x =&amp;gt; &lt;span style="color: #0000ff"&gt;int&lt;/span&gt;.Parse(x))&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum4"&gt;   4:&lt;/span&gt;     .OnException(42)&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum5"&gt;   5:&lt;/span&gt;     .Assign(&lt;span style="color: #0000ff"&gt;ref&lt;/span&gt; &lt;span style="color: #0000ff"&gt;value&lt;/span&gt;);&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;&amp;#160;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Return&lt;/strong&gt; – If the &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Maybe&amp;lt;T&amp;gt;&lt;/strong&gt;&lt;/span&gt; has a value, &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Return&lt;/strong&gt;&lt;/span&gt; simple returns the value.&amp;#160; If there is no value, &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Return&lt;/strong&gt;&lt;/span&gt; returns the type’s default value (e.g. 0 for an integer).&amp;#160; Alternatively, you can provide a default value it should return if the &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Maybe&amp;lt;T&amp;gt;&lt;/strong&gt;&lt;/span&gt; contains no value.&amp;#160; If the &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Maybe&amp;lt;T&amp;gt;&lt;/strong&gt;&lt;/span&gt; contains an exception, the exception is thrown.&lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;int&lt;/span&gt; &lt;span style="color: #0000ff"&gt;value&lt;/span&gt; = Maybe.Value(&lt;span style="color: #006080"&gt;&amp;quot;27&amp;quot;&lt;/span&gt;)&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt;   2:&lt;/span&gt;     .Select(x =&amp;gt; &lt;span style="color: #0000ff"&gt;int&lt;/span&gt;.Parse(x))&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum3"&gt;   3:&lt;/span&gt;     .Return(42);&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;&amp;#160;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HasValue / Value&lt;/strong&gt; – The most obvious way to get the value out of the &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Maybe&amp;lt;T&amp;gt;&lt;/strong&gt;&lt;/span&gt; is to use the &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Value&lt;/strong&gt;&lt;/span&gt; property.&amp;#160; If there is no value, the &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Value&lt;/strong&gt;&lt;/span&gt; property throws an &lt;span style="font-family: consolas"&gt;&lt;strong&gt;InvalidOperationException&lt;/strong&gt;&lt;/span&gt;.&amp;#160; If the &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Maybe&amp;lt;T&amp;gt;&lt;/strong&gt;&lt;/span&gt; already contains an exception, it re-throws the exception.&amp;#160; Only if there is a value does the &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Value&lt;/strong&gt;&lt;/span&gt; property succeed.&amp;#160; I recommend you check the &lt;span style="font-family: consolas"&gt;&lt;strong&gt;HasValue&lt;/strong&gt;&lt;/span&gt; property before using the &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Value&lt;/strong&gt;&lt;/span&gt; property.&lt;/p&gt;

&lt;h3&gt;Call To Action&lt;/h3&gt;

&lt;p&gt;Many of the methods that I’ve discussed have multiple overloads to handle common use cases.&amp;#160; I really been working hard on my &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Maybe&amp;lt;T&amp;gt;&lt;/strong&gt;&lt;/span&gt; implementation and I think I have something really useful.&amp;#160; Some of my co-workers have made use of it, and it has been proving very useful in making us more productive and precise in our development efforts.&lt;/p&gt;

&lt;p&gt;I want to know what you think of it.&amp;#160; Is it useful?&amp;#160; How could you use it?&amp;#160; How would you improve the implementation?&amp;#160; If you want to help answer those questions, &lt;a href="http://nuget.org/List/Packages/iSynaptic.Commons"&gt;download the iSynaptic.Commons&lt;/a&gt; library off of NuGet.&amp;#160; Feel free to pull down &lt;a href="https://github.com/iSynaptic/iSynaptic.Commons"&gt;the source from Github&lt;/a&gt;.&amp;#160; You’ll notice that I’ve used &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Maybe&amp;lt;T&amp;gt;&lt;/strong&gt;&lt;/span&gt; within the library to implement other features, so with that and the tests, there should be some decent examples.&amp;#160; I’m eager to know what you think.&amp;#160; Comment on this post if you have some feedback.&lt;/p&gt;

&lt;p&gt;In the near future I hope to post some more on this subject, specifically more detail on all the different &lt;span style="font-family: consolas"&gt;&lt;strong&gt;Maybe&amp;lt;T&amp;gt;&lt;/strong&gt;&lt;/span&gt; operators.&lt;/p&gt;</description>
      <link>http://blog.jordanterrell.com/post/Maybe-The-Uh-Stuff-That-Dreams-Are-Made-Of.aspx</link>
      <comments>http://blog.jordanterrell.com/post/Maybe-The-Uh-Stuff-That-Dreams-Are-Made-Of.aspx#comment</comments>
      <guid>http://blog.jordanterrell.com/post.aspx?id=286d4007-0934-41e0-8f39-5379cf6c2ac4</guid>
      <pubDate>Sun, 22 May 2011 17:31:00 -0600</pubDate>
      <category>.NET</category>
      <category>Programming</category>
      <dc:publisher>jordan.terrell</dc:publisher>
      <pingback:server>http://blog.jordanterrell.com/pingback.axd</pingback:server>
      <pingback:target>http://blog.jordanterrell.com/post.aspx?id=286d4007-0934-41e0-8f39-5379cf6c2ac4</pingback:target>
      <slash:comments>2</slash:comments>
      <trackback:ping>http://blog.jordanterrell.com/trackback.axd?id=286d4007-0934-41e0-8f39-5379cf6c2ac4</trackback:ping>
      <wfw:comment>http://blog.jordanterrell.com/post/Maybe-The-Uh-Stuff-That-Dreams-Are-Made-Of.aspx#comment</wfw:comment>
      <wfw:commentRss>http://blog.jordanterrell.com/syndication.axd?post=286d4007-0934-41e0-8f39-5379cf6c2ac4</wfw:commentRss>
    </item>
    <item>
      <title>So Where Was I?</title>
      <description>&lt;p&gt;Like I said, never underestimate the power of a well written regular expression!&lt;/p&gt;  &lt;p&gt;Yes, I know – I said that over a year ago.&amp;#160; Quite obvious that I haven’t been blogging for a while.&amp;#160; Just needed a break and I felt like I had run out of things to say.&amp;#160; Well, I’m back and I’ve got some good things to talk about.&lt;/p&gt;  &lt;p&gt;The last year has been crazy for me.&amp;#160; A lot in my personal life and a lot in my professional life.&amp;#160; I changed employers in May of 2010 and that has been going unbelievably well.&amp;#160; In many respects, I’ve found as close to my dream job as possible, without having to work an insane number of hours or move to the west coast.&lt;/p&gt;  &lt;p&gt;My employer is supportive of employees creating and contributing to open source projects, so I have made some wonderful strides on my &lt;a href="https://github.com/iSynaptic"&gt;iSynaptic projects&lt;/a&gt;.&amp;#160; The &lt;a href="https://github.com/iSynaptic/iSynaptic.Commons"&gt;Commons&lt;/a&gt; library has really been going through a refinement period and has some real gems.&amp;#160; You can find it in the &lt;a href="http://nuget.org/List/Search?packageType=Packages&amp;amp;searchTerm=iSynaptic"&gt;NuGet gallary&lt;/a&gt;.&amp;#160; In the past year, I’ve been learning a ton about programming languages in general and a lot about functional programming specifically.&amp;#160; A common theme in my learning about functional programming has been &lt;a href="http://channel9.msdn.com/Shows/Going+Deep/Brian-Beckman-Dont-fear-the-Monads"&gt;Monads&lt;/a&gt;.&amp;#160; At some point in the future I just might dare to write a blog post on Monads, but it would likely be more heavily focused on the resources I used to learn about and apply Monads.&amp;#160; Speaking of application, the Commons library has an implementation of the Maybe monad, &lt;a href="https://github.com/iSynaptic/iSynaptic.Commons/blob/master/Application/iSynaptic.Commons/Maybe.cs"&gt;Maybe&amp;lt;T&amp;gt;&lt;/a&gt;.&amp;#160; This concept has changed the way that I think about and write code.&amp;#160; I will be dedicating at least one blog post to the pattern and my implementation, and I also plan on giving a talk at the next &lt;a href="http://www.twincitiescodecamp.com"&gt;Twin Cities Code Camp&lt;/a&gt; on it (if they’ll have me!).&lt;/p&gt;  &lt;p&gt;One other piece of functionality that I am particularly happy with is Exodata.&amp;#160; The idea came from an &lt;a href="https://github.com/Aethon"&gt;extremely talented co-worker&lt;/a&gt;, but the implementation is all mine.&amp;#160; I’ve been using the tagline “Ioc for Data”, mostly to grab the attention of others, however I think it is so much more than that.&amp;#160; This too will be the subject of a blog post or two, and perhaps a Code Camp talk as well.&lt;/p&gt;  &lt;p&gt;One other thing – I got to develop a major feature in NUnit - &lt;a href="https://blueprints.launchpad.net/nunitv2/+spec/action-attributes"&gt;Action Attributes&lt;/a&gt;!&amp;#160; It was an idea that I had been sitting on for a while and even contemplated writing a testing framework in order to implement.&amp;#160; Fortunately, when I pitched the idea to the NUnit team they seemed to like the idea and it is targeted for the 2.6 release of NUnit.&lt;/p&gt;  &lt;p&gt;So stay tuned! Here are some things that I plan to talk about:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Maybe&amp;lt;T&amp;gt; &lt;/li&gt;    &lt;li&gt;Exodata &lt;/li&gt;    &lt;li&gt;NUnit Action Attributes &lt;/li&gt;    &lt;li&gt;Command Query Responsibility Segregation (CQRS) &lt;/li&gt;    &lt;li&gt;Event Sourcing &lt;/li&gt;    &lt;li&gt;Messaging &lt;/li&gt;    &lt;li&gt;Task Parallel Library (TPL) and TPL Dataflow &lt;/li&gt;    &lt;li&gt;Reactive Framework &lt;/li&gt;    &lt;li&gt;Distributed Source Control &lt;/li&gt;    &lt;li&gt;General Functional Programming Concepts &lt;/li&gt; &lt;/ul&gt;</description>
      <link>http://blog.jordanterrell.com/post/So-Where-Was-I.aspx</link>
      <comments>http://blog.jordanterrell.com/post/So-Where-Was-I.aspx#comment</comments>
      <guid>http://blog.jordanterrell.com/post.aspx?id=5f875776-f13f-4c65-b044-8ef3b0b005e8</guid>
      <pubDate>Thu, 19 May 2011 21:16:59 -0600</pubDate>
      <category>.NET</category>
      <category>Programming</category>
      <dc:publisher>jordan.terrell</dc:publisher>
      <pingback:server>http://blog.jordanterrell.com/pingback.axd</pingback:server>
      <pingback:target>http://blog.jordanterrell.com/post.aspx?id=5f875776-f13f-4c65-b044-8ef3b0b005e8</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://blog.jordanterrell.com/trackback.axd?id=5f875776-f13f-4c65-b044-8ef3b0b005e8</trackback:ping>
      <wfw:comment>http://blog.jordanterrell.com/post/So-Where-Was-I.aspx#comment</wfw:comment>
      <wfw:commentRss>http://blog.jordanterrell.com/syndication.axd?post=5f875776-f13f-4c65-b044-8ef3b0b005e8</wfw:commentRss>
    </item>
    <item>
      <title>Never Underestimate A Well Written Regular Expression</title>
      <description>&lt;p&gt;A couple of weeks ago, Kirill Osenkov &lt;a href="http://blogs.msdn.com/kirillosenkov/archive/2010/03/25/interview-question.aspx"&gt;posted an interview question&lt;/a&gt; that got the attention of a few .NET developers, myself included.&amp;#160; Like a moth to a flame, we were all eager to present a solution to this interview question:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;In a given .NET string, assume there are line breaks in standard \r\n form (basically Environment.NewLine). &lt;/p&gt;    &lt;p&gt;Write a method that inserts a space between two consecutive line breaks to separate any two line breaks from each other.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Roughly 20 answers were given in the &lt;a href="http://blogs.msdn.com/kirillosenkov/archive/2010/03/25/interview-question.aspx#comments"&gt;comments&lt;/a&gt; to Kirill’s post, some with subtle differences, some with completely different approaches.&amp;#160; Some were even written in F#.&lt;/p&gt;  &lt;p&gt;When I first saw the interview question, I very quickly came to my answer:&lt;/p&gt;  &lt;div&gt;   &lt;div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&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, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; output = Regex.Replace(input, &lt;span style="color: #006080"&gt;@&amp;quot;(\r\n)(?=\r\n)&amp;quot;&lt;/span&gt;, &lt;span style="color: #006080"&gt;&amp;quot;$1 &amp;quot;&lt;/span&gt;);&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;My answer uses &lt;a href="http://en.wikipedia.org/wiki/Regular_expression"&gt;Regular Expressions&lt;/a&gt;, which is a concise language to search text, sometimes in complex ways.&amp;#160; I first became aware of Regular Expressions in 2004, and I was immediately enamored with them.&amp;#160; I had always written complex search functions using operations like IndexOf() or directly accessing character arrays.&amp;#160; Text searching always seemed slow to me, but I later realized that it was just my poorly written code.&amp;#160; Very quickly I dove into learning the Regular Expression language (at least the dialect in .NET), and found many uses for it.&lt;/p&gt;

&lt;p&gt;I’ve found since then that many developers are either unaware or fearful of Regular Expressions.&amp;#160; I’ll admit, some expressions that I’ve seen look &lt;strong&gt;&lt;em&gt;very&lt;/em&gt;&lt;/strong&gt; cryptic and intimidating.&amp;#160; But they are very powerful.&amp;#160; Plus they have the benefit of &lt;em&gt;usually &lt;/em&gt;being very fast (although you can write slow ones).&lt;/p&gt;

&lt;p&gt;During the discussion in the comments of Kirill’s post, it became obvious that performance is something to be considered in such a routine.&amp;#160; As a result, Rik Hemsley &lt;a href="http://blogs.msdn.com/kirillosenkov/archive/2010/03/25/interview-question.aspx#9987510"&gt;commented&lt;/a&gt; that he had created a &lt;a href="http://sites.google.com/site/rikkus/kirill-osenkov-s-interview-question"&gt;benchmarking test bed&lt;/a&gt; to run each suggested solution.&amp;#160; Here are the results:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blog.jordanterrell.com/image.axd?picture=image.png"&gt;&lt;img title="image" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="459" alt="image" src="http://blog.jordanterrell.com/image.axd?picture=image_thumb.png" width="401" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;My solution came out as the best performing.&amp;#160; I say this, not to gloat - because in reality I’m just using what Microsoft wrote for us to use. I say it because I wanted to show that knowing about and using Regular Expressions is important when you need to parse text.&amp;#160; I’m sure that someone could come up with a better performing solution, but for a one-liner, Regular Expressions are hard to beat.&lt;/p&gt;

&lt;p&gt;If you interested in learning about Regular Expressions in .NET, the &lt;a href="http://msdn.microsoft.com/en-us/library/az24scfc%28VS.71%29.aspx"&gt;MSDN documentation&lt;/a&gt; is pretty good.&amp;#160; Plus there are &lt;a href="http://www.amazon.com/exec/obidos/ASIN/1565922573/topendtech-20"&gt;books&lt;/a&gt; that you can read on them as well as &lt;a href="http://regexlib.com/"&gt;sites&lt;/a&gt; that have examples.&lt;/p&gt;</description>
      <link>http://blog.jordanterrell.com/post/Never-Underestimate-A-Well-Written-Regular-Expression.aspx</link>
      <comments>http://blog.jordanterrell.com/post/Never-Underestimate-A-Well-Written-Regular-Expression.aspx#comment</comments>
      <guid>http://blog.jordanterrell.com/post.aspx?id=ac3c71d5-4f48-4698-bdea-31deee950dd1</guid>
      <pubDate>Tue, 06 Apr 2010 11:36:48 -0600</pubDate>
      <category>.NET</category>
      <category>Programming</category>
      <dc:publisher>jordan.terrell</dc:publisher>
      <pingback:server>http://blog.jordanterrell.com/pingback.axd</pingback:server>
      <pingback:target>http://blog.jordanterrell.com/post.aspx?id=ac3c71d5-4f48-4698-bdea-31deee950dd1</pingback:target>
      <slash:comments>2</slash:comments>
      <trackback:ping>http://blog.jordanterrell.com/trackback.axd?id=ac3c71d5-4f48-4698-bdea-31deee950dd1</trackback:ping>
      <wfw:comment>http://blog.jordanterrell.com/post/Never-Underestimate-A-Well-Written-Regular-Expression.aspx#comment</wfw:comment>
      <wfw:commentRss>http://blog.jordanterrell.com/syndication.axd?post=ac3c71d5-4f48-4698-bdea-31deee950dd1</wfw:commentRss>
    </item>
    <item>
      <title>State Machine ViewModel</title>
      <description>&lt;p&gt;&lt;a href="http://www.jasonbock.net"&gt;Jason Bock&lt;/a&gt; recently wrote &lt;a href="http://www.jasonbock.net/JB/Default.aspx?blog=entry.0f221e047de740ee90722b248933a28d"&gt;a post on turning WPF Binding errors into exceptions&lt;/a&gt;.&amp;#160; When I first started to get into WPF development, I too found that the binding system was significantly better (i.e. actually worked) that Microsoft’s previous attempts to do UI binding.&amp;#160; That said, I also found, as Jason did, that WPF’s binding system was less than helpful when you fat-fingered a binding.&amp;#160; I did learn that there we &lt;a href="http://bea.stollnitz.com/blog/?p=52"&gt;many ways that you could get debugging output&lt;/a&gt; from the binding system, but I never took it to the level that Jason did and turned the binding errors into exceptions.&amp;#160; I’m sure I’ll find his binding extension useful in the future.&lt;/p&gt;  &lt;h3&gt;Sometimes Invisible Binding Errors are Okay&lt;/h3&gt;  &lt;p&gt;However, I did make a &lt;a href="http://www.jasonbock.net/JB/Default.aspx?blog=entry.0f221e047de740ee90722b248933a28d#835336cbab304977a7cb0e134aed1a83"&gt;comment&lt;/a&gt; on Jason’s post that later on I found a use for not having exceptions be thrown on data binding issues errors.&amp;#160; There is a pattern that I’ve used on one or two WPF applications where I host a collection of “screens”, which are just UserControls, in a single Window, and the visibility of the UserControls is driven by the DataContext of the Window.&amp;#160; The DataContext is both a ViewModel in the &lt;a href="http://en.wikipedia.org/wiki/Model_View_ViewModel"&gt;Model-View-ViewModel&lt;/a&gt; pattern, and an implementation of the &lt;a href="http://en.wikipedia.org/wiki/State_pattern"&gt;State pattern&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;The difference is that, in a traditional State pattern implementation, you typically have a base class or interface that defines &lt;strong&gt;&lt;em&gt;all of the input or operations&lt;/em&gt;&lt;/strong&gt; that all the states need to respond to.&amp;#160; However, with a state-based ViewModel and WPFs &lt;strong&gt;&lt;em&gt;dynamic&lt;/em&gt;&lt;/strong&gt; binding system you will see this is not necessary.&lt;/p&gt;  &lt;p&gt;Let’s start with a simple scenario, a wizard-like, step-by-step WPF application for taking simple feedback comments from users.&amp;#160; Let’s say the list of states is: AskForComment, CaptureName, CaptureEmail, CaptureText, and Thanks.&amp;#160; Clicking the next button will transition from one state to the next, changing the DataContext of the Window to the new state.&amp;#160; As the state changes, the WPF binding system will be notified of this.&amp;#160; It will attempt to rebind the visibility of all the UserControls to the new DataContext, which is the new state, and depending on the state, different UserControls will be visible.&amp;#160; The UserControls that are &lt;em&gt;not&lt;/em&gt; visible, will have binding errors, but since they are not visible and thus not in use, the errors can be ignored.&amp;#160; The user can happily enter information into the newly visible control, unaware of any errors.&lt;/p&gt;  &lt;p&gt;I’ve created a &lt;a href="http://blog.jordanterrell.com/public/WpfStateViewModel.zip"&gt;sample application&lt;/a&gt; that shows one way this could be implemented. If you look at the MainWindow.xaml, you will see five UserControls that represent the different views as the states change.&amp;#160; Each of them has their Visibility property bound to the current state through a StateVisibilityConverter.&amp;#160; Inside each UserControl, various elements are bound to properties on the DataContext that may or may not exists, depending on what state you are in – but again, that doesn’t matter – if the properties don’t exist, the UserControl should not be visible.&lt;/p&gt;  &lt;p&gt;The key takeaway is that sometimes you can use the lack of exceptions on WPF binding errors to your advantage, and I would venture a guess that Microsoft decided not to throw exceptions on binding errors to enable scenarios like this.&lt;/p&gt;</description>
      <link>http://blog.jordanterrell.com/post/State-Machine-ViewModel.aspx</link>
      <comments>http://blog.jordanterrell.com/post/State-Machine-ViewModel.aspx#comment</comments>
      <guid>http://blog.jordanterrell.com/post.aspx?id=fa1017c5-83e2-496c-9b57-1219a5c6e615</guid>
      <pubDate>Fri, 19 Mar 2010 08:09:19 -0600</pubDate>
      <category>.NET</category>
      <category>Programming</category>
      <dc:publisher>jordan.terrell</dc:publisher>
      <pingback:server>http://blog.jordanterrell.com/pingback.axd</pingback:server>
      <pingback:target>http://blog.jordanterrell.com/post.aspx?id=fa1017c5-83e2-496c-9b57-1219a5c6e615</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://blog.jordanterrell.com/trackback.axd?id=fa1017c5-83e2-496c-9b57-1219a5c6e615</trackback:ping>
      <wfw:comment>http://blog.jordanterrell.com/post/State-Machine-ViewModel.aspx#comment</wfw:comment>
      <wfw:commentRss>http://blog.jordanterrell.com/syndication.axd?post=fa1017c5-83e2-496c-9b57-1219a5c6e615</wfw:commentRss>
    </item>
    <item>
      <title>Taking a Break</title>
      <description>&lt;p&gt;Just wanted to let everyone know I’m taking a short break from blogging right now (if you haven’t already guessed).&amp;#160; However, I will return!&lt;/p&gt;</description>
      <link>http://blog.jordanterrell.com/post/Taking-a-Break.aspx</link>
      <comments>http://blog.jordanterrell.com/post/Taking-a-Break.aspx#comment</comments>
      <guid>http://blog.jordanterrell.com/post.aspx?id=d63ccffc-fe94-4581-95e6-d74a76769539</guid>
      <pubDate>Thu, 28 Jan 2010 14:22:36 -0600</pubDate>
      <category>General</category>
      <dc:publisher>jordan.terrell</dc:publisher>
      <pingback:server>http://blog.jordanterrell.com/pingback.axd</pingback:server>
      <pingback:target>http://blog.jordanterrell.com/post.aspx?id=d63ccffc-fe94-4581-95e6-d74a76769539</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://blog.jordanterrell.com/trackback.axd?id=d63ccffc-fe94-4581-95e6-d74a76769539</trackback:ping>
      <wfw:comment>http://blog.jordanterrell.com/post/Taking-a-Break.aspx#comment</wfw:comment>
      <wfw:commentRss>http://blog.jordanterrell.com/syndication.axd?post=d63ccffc-fe94-4581-95e6-d74a76769539</wfw:commentRss>
    </item>
    <item>
      <title>“M” and Oslo’s Future</title>
      <description>&lt;p&gt;If you’re at all interested in &lt;a href="http://msdn.microsoft.com/en-us/oslo/default.aspx"&gt;Oslo&lt;/a&gt;, you may be looking forward to the &lt;a href="http://microsoftpdc.com/"&gt;2009 PDC&lt;/a&gt; to see the direction it is going to take.&amp;#160; As of yesterday, we got a &lt;a href="http://www.douglaspurdy.com/2009/11/10/from-oslo-to-sql-server-modeling/"&gt;small preview of that direction&lt;/a&gt; – and to be honest, without having all the nitty-gritty details that I hope will come out of the PDC, I’m concerned and disappointed – and &lt;a href="http://www.douglaspurdy.com/2009/11/10/from-oslo-to-sql-server-modeling/#comments"&gt;I’m not the only one who feels this way&lt;/a&gt;.&lt;/p&gt;  &lt;h3&gt;“M” Interacting with the Database – Please Don’t!&lt;/h3&gt;  &lt;p&gt;I understand that using DSLs and modeling is an excellent way to capture and manipulate data that can be used by applications.&amp;#160; However, this quote from &lt;a href="http://www.douglaspurdy.com/2009/11/10/from-oslo-to-sql-server-modeling/"&gt;Doug’s post&lt;/a&gt; is what concerns me (emphasis is my doing):&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;Time after time we heard that “M” would make &lt;strong&gt;interacting with the database&lt;/strong&gt; easier&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;The “M” language and tooling should have &lt;em&gt;absolutely nothing&lt;/em&gt; to do with interacting with the database.&amp;#160; The fact that Microsoft has heard “time after time” that people would like to use “M” to interact with the database strikes me as a problem with many people not understanding what I believe “M” was envisioned to do and should be used for.&amp;#160; “M” (MGrammer, MGraph, MSchema) and its supporting tooling should be about the definition and runtime representation of models and languages used to create and manipulate instances of models.&amp;#160; It is my strong opinion that this functionality should have no &lt;em&gt;direct dependency&lt;/em&gt; on databases or database interaction.&amp;#160; The core foundational value I saw in Oslo was a shared platform providing:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;A DSL definition language (MGrammer) &lt;/li&gt;    &lt;li&gt;A lowest common denominator representation of a model (MGraph) &lt;/li&gt;    &lt;li&gt;Model schema definition and validation (MSchema) &lt;/li&gt;    &lt;li&gt;Tooling (Intellipad, m.exe, possible VS integration, etc…) &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;What is so sadly ironic is that Microsoft recognized this from the beginning.&amp;#160; During many presentations at the 2008 PDC, the bond between developers and text and text editors was mentioned.&amp;#160; Microsoft knew they needed to have a first class story to tell when it came to text, and that was how “M” was born.&lt;/p&gt;  &lt;h3&gt;The Repository and Quadrant&lt;/h3&gt;  &lt;p&gt;My opinion of Repository is that it is a mistake to try to tackle Repository with the first release of Oslo.&amp;#160; Even during the 2008 PDC presentations it felt like the Repository was &lt;em&gt;a solution in search of a problem&lt;/em&gt;.&amp;#160; I understand the value in being able to use models to define runtime execution characteristics of an application (e.g. HTML, XAML, WCF Service Descriptions, etc), but how many have you seen that execute their models from a SQL Server database?!?!? There might be a small class of applications where it makes sense to store and execute a model from a database, but my guess is that more often than not a model would either be stored in or transformed into something that looks nothing like a database.&amp;#160; Perhaps it would be embedded into an application redistributable as code or an embedded resource or persisted as a file.&amp;#160; Perhaps it is never persisted.&amp;#160; Regardless, if the model is to be persisted, that should be a &lt;a href="http://en.wikipedia.org/wiki/Single_responsibility_principle"&gt;separate responsibility&lt;/a&gt;.&amp;#160; Repository is a “nice to have”, but honestly I can’t see using it much, if at all.&lt;/p&gt;  &lt;p&gt;As for Quadrant, I don’t feel versed enough in Quadrant’s capabilities to voice a strong opinion.&amp;#160; I do see value it having a common tool for visualizing and manipulating models.&amp;#160; However, I would spend my “development dollars” less on Quadrant for Oslo’s first release, and more on the “M” language and tooling.&lt;/p&gt;  &lt;h3&gt;Concerned, but Hopeful&lt;/h3&gt;  &lt;p&gt;Douglas has made it clear that there is &lt;a href="http://www.douglaspurdy.com/2009/11/10/on-sql-server-modeling/"&gt;more information coming about the “M” and DSL story&lt;/a&gt;.&amp;#160; I for one hope that “M” can stand alone from Repository, Quadrant, SQL Server, and anything to do with databases.&amp;#160; If this is not the case, I hope the Oslo team hears loud and clear that it should make some fundamental changes.&lt;/p&gt;  &lt;p&gt;However, if “M” does stand alone, this post and the comments from others should help to keep it that way – even when “time after time” people associate “M” with database interaction.&lt;/p&gt;</description>
      <link>http://blog.jordanterrell.com/post/m-and-oslos-future.aspx</link>
      <comments>http://blog.jordanterrell.com/post/m-and-oslos-future.aspx#comment</comments>
      <guid>http://blog.jordanterrell.com/post.aspx?id=0d9fa41b-0e49-4374-a9e0-0adb10655d78</guid>
      <pubDate>Wed, 11 Nov 2009 11:37:00 -0600</pubDate>
      <category>Programming</category>
      <category>.NET</category>
      <dc:publisher>jordan.terrell</dc:publisher>
      <pingback:server>http://blog.jordanterrell.com/pingback.axd</pingback:server>
      <pingback:target>http://blog.jordanterrell.com/post.aspx?id=0d9fa41b-0e49-4374-a9e0-0adb10655d78</pingback:target>
      <slash:comments>2</slash:comments>
      <trackback:ping>http://blog.jordanterrell.com/trackback.axd?id=0d9fa41b-0e49-4374-a9e0-0adb10655d78</trackback:ping>
      <wfw:comment>http://blog.jordanterrell.com/post/m-and-oslos-future.aspx#comment</wfw:comment>
      <wfw:commentRss>http://blog.jordanterrell.com/syndication.axd?post=0d9fa41b-0e49-4374-a9e0-0adb10655d78</wfw:commentRss>
    </item>
    <item>
      <title>Scott Chacon – Git Documentation Master</title>
      <description>&lt;p&gt;As I’ve continued my investigation into &lt;a href="http://git-scm.com/"&gt;Git&lt;/a&gt;, a name kept appearing whenever I found excellent Git documentation.&amp;#160; That name is &lt;a href="http://jointheconversation.org/"&gt;Scott Chacon&lt;/a&gt;.&amp;#160; This is a person who &lt;a href="http://blog.jordanterrell.com/post/Favor-Concepts-Over-Commands.aspx"&gt;favors concepts over commands&lt;/a&gt;, and I immensely appreciate his efforts in demystifying Git.&amp;#160; I’ve found three resources that he, to one extent or another, has authored – all of which are great.&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;The &lt;a href="http://book.git-scm.com/"&gt;Git Community Book&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://progit.org/"&gt;Pro Git&lt;/a&gt; (published by Apress, available online for free)&lt;/li&gt;    &lt;li&gt;&lt;a href="http://peepcode.com/products/git-internals-pdf"&gt;Git Internals&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Of the three resources, for someone starting out I would recommend the &lt;a href="http://peepcode.com/products/git-internals-pdf"&gt;Git Internals&lt;/a&gt; PDF.&amp;#160; It’s concise and simple to understand, and I’ve already seen one person who, more or less was anti-Git, read it in an hour and become pro-Git.&amp;#160; The other two resources are excellent as well.&lt;/p&gt;  &lt;p&gt;I have to hand it to Scott, he sure knows his Git.&amp;#160; He just also knows how best to teach it.&lt;/p&gt;</description>
      <link>http://blog.jordanterrell.com/post/Scott-Chacon-e28093-Git-Documentation-Master.aspx</link>
      <comments>http://blog.jordanterrell.com/post/Scott-Chacon-e28093-Git-Documentation-Master.aspx#comment</comments>
      <guid>http://blog.jordanterrell.com/post.aspx?id=92cec3e1-c355-4989-a471-9c5e06d1788a</guid>
      <pubDate>Fri, 30 Oct 2009 08:48:57 -0600</pubDate>
      <category>Programming</category>
      <dc:publisher>jordan.terrell</dc:publisher>
      <pingback:server>http://blog.jordanterrell.com/pingback.axd</pingback:server>
      <pingback:target>http://blog.jordanterrell.com/post.aspx?id=92cec3e1-c355-4989-a471-9c5e06d1788a</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://blog.jordanterrell.com/trackback.axd?id=92cec3e1-c355-4989-a471-9c5e06d1788a</trackback:ping>
      <wfw:comment>http://blog.jordanterrell.com/post/Scott-Chacon-e28093-Git-Documentation-Master.aspx#comment</wfw:comment>
      <wfw:commentRss>http://blog.jordanterrell.com/syndication.axd?post=92cec3e1-c355-4989-a471-9c5e06d1788a</wfw:commentRss>
    </item>
    <item>
      <title>iSynaptic.Commons Lives</title>
      <description>&lt;p&gt;The &lt;a href="http://blog.jordanterrell.com/post/iSynaptic-Commons-Release-On-Hold.aspx"&gt;last time I talked about iSynaptic.Commons&lt;/a&gt; was in July of 2008.&amp;nbsp; Basically I said that I was putting the release on hold.&amp;nbsp; Well, &lt;a href="http://github.com/iSynaptic/iSynaptic.Commons"&gt;I&amp;rsquo;ve finally released it&lt;/a&gt; under the MS-PL license.&lt;/p&gt;
&lt;p&gt;My reason for releasing it is by no means because it is complete.&amp;nbsp; It is no where near there.&amp;nbsp; I&amp;rsquo;ve got a lot of work yet to do on it, and I&amp;rsquo;ve got many things that I want to completely change or remove.&amp;nbsp; So my recommendation is that you don&amp;rsquo;t go use the code in a project you intend for it to keep stable, because it is going to be a moving target for now (i.e. there will be breaking changes).&amp;nbsp; Especially the Text.Parsing namespace and the Xml namespace.&amp;nbsp; Those were very naive and simplistic, and I will be replacing.&lt;/p&gt;
&lt;p&gt;However, my primary reason for releasing it is to get feedback.&amp;nbsp; I don&amp;rsquo;t expect much at first, but I want it to be something I can talk about in this blog, and solicit direct feedback about specific parts of the framework.&lt;/p&gt;
&lt;p&gt;Finally, I talked about iSynaptic.SolutionBuild and iSynaptic.Modeling in &lt;a href="http://blog.jordanterrell.com/post/iSynaptic-Commons-Release-On-Hold.aspx"&gt;my previous iSynaptic.Commons post&lt;/a&gt;.&amp;nbsp; SolutionBuild exists and is in partially working order.&amp;nbsp; I will, at some point, be working on moving this into a public repository.&amp;nbsp; I may even change SolutionBuild to be based on &lt;a href="http://www.microsoft.com/powershell"&gt;PowerShell&lt;/a&gt;, and possibly &lt;a href="http://code.google.com/p/psake/"&gt;psake&lt;/a&gt;.&amp;nbsp; As for the Modeling project, I&amp;rsquo;ve re-envisioned it under a different project I&amp;rsquo;m calling &lt;a href="http://github.com/iSynaptic/iSynaptic.Core"&gt;iSynaptic.Core&lt;/a&gt;.&amp;nbsp;&amp;nbsp; Currently Core doesn&amp;rsquo;t exists (other than the repository being stubbed out), but what I wanted to accomplish with the Modeling project will be wrapped into the Core project.&amp;nbsp; Core will depend on Commons (Commons being a lower-level framework).&amp;nbsp; Likely, some of what is in Commons will be pushed into Core &amp;ndash; I want to keep Commons lightweight, but useful.&amp;nbsp; Besides rolling Modeling into Core, details on what Core will be is something for a future post.&amp;nbsp; I don&amp;rsquo;t necessarily want to talk about it, until I have something to show.&lt;/p&gt;
&lt;p&gt;Initially, my activity on all of these initiatives will be light.&amp;nbsp; I have numerous projects that are work related that I need to complete, and other non-development personal obligations as well.&amp;nbsp; This is just me taking the first step&amp;hellip;&lt;/p&gt;</description>
      <link>http://blog.jordanterrell.com/post/iSynapticCommons-Lives.aspx</link>
      <comments>http://blog.jordanterrell.com/post/iSynapticCommons-Lives.aspx#comment</comments>
      <guid>http://blog.jordanterrell.com/post.aspx?id=1e22f996-aaaa-4e84-82f7-833b3b5b09c7</guid>
      <pubDate>Fri, 30 Oct 2009 08:35:00 -0600</pubDate>
      <category>.NET</category>
      <category>Programming</category>
      <dc:publisher>jordan.terrell</dc:publisher>
      <pingback:server>http://blog.jordanterrell.com/pingback.axd</pingback:server>
      <pingback:target>http://blog.jordanterrell.com/post.aspx?id=1e22f996-aaaa-4e84-82f7-833b3b5b09c7</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://blog.jordanterrell.com/trackback.axd?id=1e22f996-aaaa-4e84-82f7-833b3b5b09c7</trackback:ping>
      <wfw:comment>http://blog.jordanterrell.com/post/iSynapticCommons-Lives.aspx#comment</wfw:comment>
      <wfw:commentRss>http://blog.jordanterrell.com/syndication.axd?post=1e22f996-aaaa-4e84-82f7-833b3b5b09c7</wfw:commentRss>
    </item>
    <item>
      <title>Fowler’s DSL Book Milestone</title>
      <description>&lt;p&gt;Martin Fowler just updated his &lt;a href="http://martinfowler.com/bliki/DslBookRoadmap.html"&gt;roadmap for his upcoming DSL book&lt;/a&gt;.&amp;#160; I can’t wait to get it!&lt;/p&gt;</description>
      <link>http://blog.jordanterrell.com/post/Fowlere28099s-DSL-Book-Milestone.aspx</link>
      <comments>http://blog.jordanterrell.com/post/Fowlere28099s-DSL-Book-Milestone.aspx#comment</comments>
      <guid>http://blog.jordanterrell.com/post.aspx?id=5e85d6f5-cb6d-48e7-b1ec-aaac8ff6a765</guid>
      <pubDate>Wed, 21 Oct 2009 14:08:07 -0600</pubDate>
      <category>Programming</category>
      <dc:publisher>jordan.terrell</dc:publisher>
      <pingback:server>http://blog.jordanterrell.com/pingback.axd</pingback:server>
      <pingback:target>http://blog.jordanterrell.com/post.aspx?id=5e85d6f5-cb6d-48e7-b1ec-aaac8ff6a765</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://blog.jordanterrell.com/trackback.axd?id=5e85d6f5-cb6d-48e7-b1ec-aaac8ff6a765</trackback:ping>
      <wfw:comment>http://blog.jordanterrell.com/post/Fowlere28099s-DSL-Book-Milestone.aspx#comment</wfw:comment>
      <wfw:commentRss>http://blog.jordanterrell.com/syndication.axd?post=5e85d6f5-cb6d-48e7-b1ec-aaac8ff6a765</wfw:commentRss>
    </item>
    <item>
      <title>Favor Concepts Over Commands</title>
      <description>&lt;p&gt;Finally, I understand &lt;a href="http://git-scm.com/"&gt;Git&lt;/a&gt;!!!&lt;/p&gt;  &lt;p&gt;For a while I’ve been scratching my head on why so many people are jumping on the &lt;a href="http://git-scm.com/"&gt;Git&lt;/a&gt; bandwagon.&amp;#160; I understood conceptually the benefits of a Distributed Version Control System (DVCS), but every time I sat down to learn &lt;a href="http://git-scm.com/"&gt;Git&lt;/a&gt; I ended up more confused than when I started.&lt;/p&gt;  &lt;p&gt;I even bought a book - &lt;a href="http://www.amazon.com/exec/obidos/ASIN/1934356158/topendtech-20"&gt;Pragmatic Version Control Using Git&lt;/a&gt;.&amp;#160; Even after going through that book I still didn’t get it.&amp;#160; I was drowning in a sea of commands and I understood the basics of adding and committing files, however, outside of that I was finding myself getting into trouble and not having a clue on how to work through it.&amp;#160; I tried using some visual tooling to help, but it didn’t.&amp;#160; I attributed it to &lt;a href="http://git-scm.com/"&gt;Git&lt;/a&gt; being far to complicated (and in some ways it is compared to other VCSes), and stopped trying to learn &lt;a href="http://git-scm.com/"&gt;Git&lt;/a&gt; with a plan to pick it up in the future.&amp;#160; &lt;em&gt;Much&lt;/em&gt; later in the future.&lt;/p&gt;  &lt;p&gt;Then I stumbled on a book that, although being published by Apress, is available in &lt;a href="http://progit.org/"&gt;open source form&lt;/a&gt; – &lt;a href="http://www.amazon.com/exec/obidos/ASIN/1430218339/topendtech-20"&gt;Pro Git&lt;/a&gt;.&amp;#160; Not much time had passed since my last attempt, so I wasn’t really enthusiastic about reading another &lt;a href="http://git-scm.com/"&gt;Git&lt;/a&gt; book, so I semi-begrudgingly read chapter 1.&amp;#160; Still, I wasn’t excited – chapter 1 covered the same stuff that was in &lt;a href="http://www.amazon.com/exec/obidos/ASIN/1934356158/topendtech-20"&gt;Pragmatic Version Control Using Git&lt;/a&gt;.&amp;#160; Chapter 2 wasn’t that much better – just a laundry list of commands that you are presented with.&lt;/p&gt;  &lt;p&gt;Honestly, I don’t know why I kept reading, but I’m SO glad I did.&amp;#160; Chapter 3 is where things just clicked.&amp;#160; The author started to use visualizations to show how &lt;a href="http://git-scm.com/"&gt;Git&lt;/a&gt; works, and he started to explain all the underlying concepts of how &lt;a href="http://git-scm.com/"&gt;Git&lt;/a&gt; represents things.&amp;#160; As each command is executed, he would show a visualization of how the &lt;a href="http://git-scm.com/"&gt;Git&lt;/a&gt; repository changed, and that further reinforced the conceptual ideas.&amp;#160; Thru the rest of the book the visualizations were used and this added so much to the value of the content.&lt;/p&gt;  &lt;p&gt;I finally understand &lt;a href="http://git-scm.com/"&gt;Git&lt;/a&gt; and I will be slowly moving over to it as my main VCS – replacing Subversion.&amp;#160; I still think that the supporting tools need to mature (e.g. Visual Git tools – I don’t like command prompt source control), but the basic toolkit is rock solid.&lt;/p&gt;  &lt;p&gt;If you want to learn &lt;a href="http://git-scm.com/"&gt;Git&lt;/a&gt;, I strongly suggest you buy &lt;a href="http://www.amazon.com/exec/obidos/ASIN/1430218339/topendtech-20"&gt;Pro Git&lt;/a&gt; (support the author).&amp;#160; If you plan to teach &lt;a href="http://git-scm.com/"&gt;Git&lt;/a&gt; using any medium (e.g. book, blog, talk), please favor teaching concepts over commands – your audience just might git [&lt;a href="http://en.wikipedia.org/wiki/Sic"&gt;&lt;em&gt;sic&lt;/em&gt;&lt;/a&gt;] it!&lt;/p&gt;</description>
      <link>http://blog.jordanterrell.com/post/Favor-Concepts-Over-Commands.aspx</link>
      <comments>http://blog.jordanterrell.com/post/Favor-Concepts-Over-Commands.aspx#comment</comments>
      <guid>http://blog.jordanterrell.com/post.aspx?id=d26357cc-7493-4796-a5f0-fec3d8a17040</guid>
      <pubDate>Mon, 19 Oct 2009 13:25:03 -0600</pubDate>
      <category>Programming</category>
      <category>General</category>
      <dc:publisher>jordan.terrell</dc:publisher>
      <pingback:server>http://blog.jordanterrell.com/pingback.axd</pingback:server>
      <pingback:target>http://blog.jordanterrell.com/post.aspx?id=d26357cc-7493-4796-a5f0-fec3d8a17040</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://blog.jordanterrell.com/trackback.axd?id=d26357cc-7493-4796-a5f0-fec3d8a17040</trackback:ping>
      <wfw:comment>http://blog.jordanterrell.com/post/Favor-Concepts-Over-Commands.aspx#comment</wfw:comment>
      <wfw:commentRss>http://blog.jordanterrell.com/syndication.axd?post=d26357cc-7493-4796-a5f0-fec3d8a17040</wfw:commentRss>
    </item>
    <item>
      <title>Google Wave = Social Networking Crack</title>
      <description>&lt;p&gt;At least according to others…&lt;/p&gt;  &lt;p&gt;I’ve not received an invitation to &lt;a href="http://wave.google.com"&gt;Google Wave&lt;/a&gt; yet.&amp;#160; But from looking at &lt;a href="http://scobleizer.com/2009/10/01/google-wave-crashes-on-beach-of-overhype/"&gt;Robert Scoble&lt;/a&gt; and &lt;a href="http://www.louisgray.com/live/2009/10/google-wave-hits-shore-flash-flood.html"&gt;Louis Gray’s&lt;/a&gt; blog posts, it may be a bit overhyped and overemphasize real-time communication.&amp;#160; It makes me think of people who watch the stock market real-time – every little fluctuation in a stock price or derivative causes a corresponding fluctuation in their heart rhythm.&amp;#160; Not for me.&lt;/p&gt;  &lt;p&gt;I’ve found use for certain social networking sites, but I fall into the camp that doesn’t feel compelled to monitor the goings on of my friends and associates on a daily or even weekly basis.&amp;#160; Some social networking platforms I’ve seen bring the worst out of people and they encourage so much drama.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://wave.google.com"&gt;Google Wave&lt;/a&gt;, in some ways, aims to bring many of this social networking paradigms together into a unified platform.&amp;#160; Definitely something I’ll try and may even find use for – but so far, based on what I’ve read and seen – it might be something I group into what I affectionately call: Social Networking Crack.&lt;/p&gt;</description>
      <link>http://blog.jordanterrell.com/post/Google-Wave-3d-Social-Networking-Crack.aspx</link>
      <comments>http://blog.jordanterrell.com/post/Google-Wave-3d-Social-Networking-Crack.aspx#comment</comments>
      <guid>http://blog.jordanterrell.com/post.aspx?id=1162e50d-dbe7-4e37-af5d-abcf3b9357c5</guid>
      <pubDate>Fri, 02 Oct 2009 10:19:53 -0600</pubDate>
      <category>General</category>
      <dc:publisher>jordan.terrell</dc:publisher>
      <pingback:server>http://blog.jordanterrell.com/pingback.axd</pingback:server>
      <pingback:target>http://blog.jordanterrell.com/post.aspx?id=1162e50d-dbe7-4e37-af5d-abcf3b9357c5</pingback:target>
      <slash:comments>2</slash:comments>
      <trackback:ping>http://blog.jordanterrell.com/trackback.axd?id=1162e50d-dbe7-4e37-af5d-abcf3b9357c5</trackback:ping>
      <wfw:comment>http://blog.jordanterrell.com/post/Google-Wave-3d-Social-Networking-Crack.aspx#comment</wfw:comment>
      <wfw:commentRss>http://blog.jordanterrell.com/syndication.axd?post=1162e50d-dbe7-4e37-af5d-abcf3b9357c5</wfw:commentRss>
    </item>
    <item>
      <title>DNUG Talk: Follow Up</title>
      <description>&lt;p&gt;I think last night’s talk I gave on Domain Driven Design was a success.&amp;#160; I received good feedback from those who attended.&amp;#160; We had around 50 attendees.&amp;#160; A good number of people had never heard of Domain Driven Design (which was surprising to me), many had heard of it but didn’t know much about it, and one or two people had read &lt;a href="http://www.amazon.com/exec/obidos/ASIN/0321125215/topendtech-20"&gt;the book&lt;/a&gt;.&amp;#160; It was exactly the audience makeup I was targeting.&lt;/p&gt;  &lt;p&gt;Domain Driven Design is not an easy topic to introduce.&amp;#160; It’s very broad, at times very complex and intricate, and it is a very conceptual topic – that is to say, it is more about how you think and communicate about a domain (business problem/solution space), and less about how you write software around the domain.&lt;/p&gt;  &lt;p&gt;I outlined a number of &lt;a href="http://wiki.jordanterrell.com/DDDResources.ashx"&gt;follow up resources&lt;/a&gt; – frankly a LOT of follow up resources.&amp;#160; Domain Driven Design isn’t something that you are going to pick up in a few months; it is going to take time to absorb and apply.&amp;#160; There are technical concerns that often influence how you apply Domain Driven Design, and those concerns can often be addressed with other documented patterns – that’s why I provided &lt;a href="http://wiki.jordanterrell.com/DDDResources.ashx"&gt;supporting resources&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;If you came to my talk, I’d appreciate any feedback you’d like to offer.&amp;#160; I’m giving the talk again at the &lt;a href="http://www.twincitiescodecamp.com/TCCC/Default.aspx"&gt;Twin Cities Code Camp&lt;/a&gt; on October 24.&amp;#160; That is going to be a challenge – I only have 75 minutes at that venue, and I easily used 90 minutes last night (excluding discussion about follow up resources).&lt;/p&gt;  &lt;p&gt;Thanks to everyone who came!&lt;/p&gt;</description>
      <link>http://blog.jordanterrell.com/post/DNUG-Talk-Follow-Up.aspx</link>
      <comments>http://blog.jordanterrell.com/post/DNUG-Talk-Follow-Up.aspx#comment</comments>
      <guid>http://blog.jordanterrell.com/post.aspx?id=38f4748d-f745-4574-829a-7a688cc9349b</guid>
      <pubDate>Fri, 02 Oct 2009 10:01:42 -0600</pubDate>
      <category>Programming</category>
      <dc:publisher>jordan.terrell</dc:publisher>
      <pingback:server>http://blog.jordanterrell.com/pingback.axd</pingback:server>
      <pingback:target>http://blog.jordanterrell.com/post.aspx?id=38f4748d-f745-4574-829a-7a688cc9349b</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://blog.jordanterrell.com/trackback.axd?id=38f4748d-f745-4574-829a-7a688cc9349b</trackback:ping>
      <wfw:comment>http://blog.jordanterrell.com/post/DNUG-Talk-Follow-Up.aspx#comment</wfw:comment>
      <wfw:commentRss>http://blog.jordanterrell.com/syndication.axd?post=38f4748d-f745-4574-829a-7a688cc9349b</wfw:commentRss>
    </item>
    <item>
      <title>DNUG Talk: Intro to Domain Driven Design</title>
      <description>&lt;p&gt;I’m giving a talk today at the &lt;a href="http://www.ilmservice.com/twincitiesnet/"&gt;Twin Cities .NET User Group&lt;/a&gt;, sponsored by ILM and hosted at Microsoft.&amp;#160; I chose to give it on Domain Driven Design because it is something that I’ve been learning since 2005, but there still seems to be many people who don’t know what it’s about.&amp;#160; I’ve received lots of feedback from people expressing interest in the topic, so hopefully we’ll see a good turn out.&lt;/p&gt;  &lt;p&gt;I’ll be posting the resources after the talk – stay tuned!&lt;/p&gt;</description>
      <link>http://blog.jordanterrell.com/post/DNUG-Talk-Intro-to-Domain-Driven-Design.aspx</link>
      <comments>http://blog.jordanterrell.com/post/DNUG-Talk-Intro-to-Domain-Driven-Design.aspx#comment</comments>
      <guid>http://blog.jordanterrell.com/post.aspx?id=6e86b47d-3294-4083-8da0-02b2d9442ee6</guid>
      <pubDate>Thu, 01 Oct 2009 07:51:57 -0600</pubDate>
      <category>Programming</category>
      <dc:publisher>jordan.terrell</dc:publisher>
      <pingback:server>http://blog.jordanterrell.com/pingback.axd</pingback:server>
      <pingback:target>http://blog.jordanterrell.com/post.aspx?id=6e86b47d-3294-4083-8da0-02b2d9442ee6</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://blog.jordanterrell.com/trackback.axd?id=6e86b47d-3294-4083-8da0-02b2d9442ee6</trackback:ping>
      <wfw:comment>http://blog.jordanterrell.com/post/DNUG-Talk-Intro-to-Domain-Driven-Design.aspx#comment</wfw:comment>
      <wfw:commentRss>http://blog.jordanterrell.com/syndication.axd?post=6e86b47d-3294-4083-8da0-02b2d9442ee6</wfw:commentRss>
    </item>
    <item>
      <title>Kindle: Where Does My Feedback Go?</title>
      <description>&lt;p&gt;I recently provided &lt;a href="http://blog.jordanterrell.com/post/Review-Kindle-DX.aspx"&gt;a review&lt;/a&gt; of my &lt;a href="http://www.amazon.com/Kindle-DX-Amazons-Wireless-Generation/dp/B0015TCML0?tag=topendtech-20"&gt;Kindle DX&lt;/a&gt; experience – and it continues to be a positive one.&amp;#160; The “screensaver” that runs on the Kindle rotates through a number of images, the last of which displays an email address that you can use to provide feedback and suggestions about your Kindle experience.&amp;#160; I’ve done this twice, and here are the suggestions I’ve provided:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;strong&gt;Organization&lt;/strong&gt;       &lt;ul&gt;       &lt;li&gt;I would like the ability to mark books/documents as read or unread. &lt;/li&gt;        &lt;li&gt;I would like the ability to mark items as private or public - show only public items on power up - provide some way to navigate to private items &lt;/li&gt;        &lt;li&gt;I would like the ability to apply arbitrary tags to items - allow me to filter the item list by one or more tags &lt;/li&gt;     &lt;/ul&gt;   &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Screensaver settings&lt;/strong&gt;       &lt;ul&gt;       &lt;li&gt;Allow the user to specify the amount of idle time the Kindle waits before it enters the &amp;quot;screensaver mode&amp;quot; &lt;/li&gt;        &lt;li&gt;Allow the user to change the images used - some of them I really don't like (one or two I personally find mildly offensive) and I have turn the Kindle on and then off just to change it &lt;/li&gt;        &lt;li&gt;Allow the user to disable the use of images - blank out the screen and display a simple message indicating that the Kindle has gone to sleep &lt;/li&gt;     &lt;/ul&gt;   &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;PDF Support Enhancements&lt;/strong&gt;       &lt;ul&gt;       &lt;li&gt;Add indexing/searching support across multiple PDF files - I realize this will not work with PDFs are are just images of text &lt;/li&gt;        &lt;li&gt;Support dictionary look up of words in PDF files that contain text &lt;/li&gt;     &lt;/ul&gt;   &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;After submitting this feedback, I received the following message:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font size="1"&gt;Hello,        &lt;br /&gt;Thanks for writing about Kindle DX feedback.         &lt;br /&gt;I'll send your comments to our Kindle team for consideration.         &lt;br /&gt;Strong customer feedback like yours helps us continue to improve the service we provide, and we're glad you took time to write to us.&amp;#160; It is always important for us to hear how customers react to all aspects.         &lt;br /&gt;Thanks for your interest in Amazon Kindle.         &lt;br /&gt;Please let us know if this e-mail resolved your question:         &lt;br /&gt;If yes, click here:         &lt;br /&gt;&lt;/font&gt;&lt;a href="http://www.amazon.com/rsvp-y?c=xxxxxxxxx"&gt;&lt;font size="1"&gt;http://www.amazon.com/rsvp-y?c=xxxxxxxxx&lt;/font&gt;&lt;/a&gt;&lt;font size="1"&gt;        &lt;br /&gt;If not, click here:         &lt;br /&gt;&lt;/font&gt;&lt;a href="http://www.amazon.com/rsvp-n?c=xxxxxxxxxx"&gt;&lt;font size="1"&gt;http://www.amazon.com/rsvp-n?c=xxxxxxxxxx&lt;/font&gt;&lt;/a&gt;&lt;font size="1"&gt;        &lt;br /&gt;Please note: this e-mail was sent from an address that cannot accept incoming e-mail.         &lt;br /&gt;To contact us about an unrelated issue, please visit the Help section of our web site.&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;     &lt;br /&gt;&lt;font size="1"&gt;Best regards,        &lt;br /&gt;Prakash         &lt;br /&gt;Amazon.com         &lt;br /&gt;We're Building Earth's Most Customer-Centric Company         &lt;br /&gt;&lt;/font&gt;&lt;a href="http://www.amazon.com/your-account"&gt;&lt;font size="1"&gt;http://www.amazon.com/your-account&lt;/font&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Pretty standard boiler-plate “thanks for submitting your feedback” message.&amp;#160; Now, I’m not complaining about this message – it is the expected initial response.&lt;/p&gt;  &lt;p&gt;However, I have not a clue where my feedback has gone or what is being done with it.&amp;#160; Did the product team review it?&amp;#160; Has it been added to a backlog of feature enhancements the development team is working on?&amp;#160; Or is it just rotting in a database somewhere?&lt;/p&gt;  &lt;p&gt;I don’t think Amazon has done a good job of &lt;em&gt;communicating&lt;/em&gt; the future roadmap of improvements and fixes to the Kindle platform and devices.&amp;#160; Even if they never plan to add enhancements, I am in some ways I’m okay with that – I really enjoy the Kindle experience as it is today.&amp;#160; But by giving me an avenue to submit feedback, Amazon has created an expectation that my feedback will somehow be acted upon.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Anyone at Amazon want to clue me in on what happens with the feedback from Kindle users?&lt;/strong&gt;&lt;/p&gt;</description>
      <link>http://blog.jordanterrell.com/post/Kindle-Where-Does-My-Feedback-Go.aspx</link>
      <comments>http://blog.jordanterrell.com/post/Kindle-Where-Does-My-Feedback-Go.aspx#comment</comments>
      <guid>http://blog.jordanterrell.com/post.aspx?id=6023baef-9cd4-4d17-9430-3e62c5596e4a</guid>
      <pubDate>Wed, 12 Aug 2009 13:55:56 -0600</pubDate>
      <category>General</category>
      <dc:publisher>jordan.terrell</dc:publisher>
      <pingback:server>http://blog.jordanterrell.com/pingback.axd</pingback:server>
      <pingback:target>http://blog.jordanterrell.com/post.aspx?id=6023baef-9cd4-4d17-9430-3e62c5596e4a</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://blog.jordanterrell.com/trackback.axd?id=6023baef-9cd4-4d17-9430-3e62c5596e4a</trackback:ping>
      <wfw:comment>http://blog.jordanterrell.com/post/Kindle-Where-Does-My-Feedback-Go.aspx#comment</wfw:comment>
      <wfw:commentRss>http://blog.jordanterrell.com/syndication.axd?post=6023baef-9cd4-4d17-9430-3e62c5596e4a</wfw:commentRss>
    </item>
  </channel>
</rss>