<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" version="2.0">
  <channel>
    <title>Interoperability Happens</title>
    <link>http://blogs.tedneward.com/</link>
    <description>Ted's takes on the enterprise Java, .NET and Web services communities and technologies</description>
    <copyright>Ted Neward</copyright>
    <lastBuildDate>Sun, 14 Feb 2010 11:41:34 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 1.9.7067.0</generator>
    <managingEditor>tneward@tedneward.com</managingEditor>
    <webMaster>tneward@tedneward.com</webMaster>
    <item>
      <trackback:ping>http://blogs.tedneward.com/Trackback.aspx?guid=e04221b4-bd81-4aa6-9867-4b8d6010a7a5</trackback:ping>
      <pingback:server>http://blogs.tedneward.com/pingback.aspx</pingback:server>
      <pingback:target>http://blogs.tedneward.com/PermaLink,guid,e04221b4-bd81-4aa6-9867-4b8d6010a7a5.aspx</pingback:target>
      <dc:creator>Ted Neward</dc:creator>
      <wfw:comment>http://blogs.tedneward.com/CommentView,guid,e04221b4-bd81-4aa6-9867-4b8d6010a7a5.aspx</wfw:comment>
      <wfw:commentRss>http://blogs.tedneward.com/SyndicationService.asmx/GetEntryCommentsRss?guid=e04221b4-bd81-4aa6-9867-4b8d6010a7a5</wfw:commentRss>
      <slash:comments>5</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
A couple of days ago, a buddy of mine, Scott Hanselman, wrote <a href="http://www.hanselman.com/blog/BackToBasicsC4MethodOverloadingAndDynamicTypes.aspx" target="_blank">a
nice little intro to the "dynamic" type in C# 4.0</a>. In particular, I
like (though don't necessarily 100% agree with) his one-sentence summation of dynamic
as <em>"There's no way for you or I to know the type of this now, compiler, so
let's hope that the runtime figures it out."</em> It's an interesting characterization,
but my disagreement with his characterization is not the point here, at least not
of this particular blog entry.
</p>
        <p>
I've been waiting for it for a while, ever since C# 4 was announced, and sure enough,
here we go: Scott's blog is the victim of the <em>Static-Typing Fundamentalist</em>,
the bearded and grizzled veteran of the Static/Dynamic Code Wars, come out to proclaim
the sins of dynamic programming, the evils of those who use(d) it, and why C#/C++/Java
was so much better than Visual Basic/Ruby/Python/whatever. Be careful of these creatures.
They rival Al-Qaeda in their ferocity and zeal, Fox News in their attention to detail
and evidence, and George Bush in their pronouncements of gloom and doom for the future
if we don't <em>act now and eliminate this evil</em>.
</p>
        <p>
Allow me to quote (liberally) from <a href="http://robert-seder.myopenid.com/" target="_blank">Rob</a>'s <a href="http://www.hanselman.com/blog/CommentView.aspx?guid=FC406BB6-2218-4481-A6BA-CD1E12994D74" target="_blank">comment
on Scott's blog</a>, and comment in turn as we go:
</p>
        <blockquote>
          <p>
It's such a shame that you promote this stuff. You should've seen the horrific devastation
that "Variant" caused in the old VB days. Variant single-handedly create
job security for so many people since the late 90's, because of the horrible, horrible,
horrible things that developers did with that ridiculous, 12-byte data type!
</p>
        </blockquote>
        <p>
I just love it when people make comments like "horrific devastation". Nothing
like a little hyperbole to liven things up! I mean, it didn't cause exceptions, it
didn't make code hard to read, it didn't make it tricky for developers to modify and
refactor safely, it leveled cities! burned forests! slaughtered kittens! and even
worse, it was <em>12 bytes in size!</em></p>
        <p>
Never mind the fact that Visual Basic developers frequently churned out apps twice,
three, five times faster than their C++ cousins did. (I know this—I was one of those
C++ developers, and routinely mocked the VB guys across the hall for their crappy
language and code.... until they built an app in a few days that I tried to build
at home in C++ and gave up after two weeks. And all the damn thing did was basic dialogs-and-data
kinds of stuff, too.)
</p>
        <blockquote>
          <p>
This weak-typing with late-binding is just such a bad idea. I know you'll say "But
wait, these are powerful tools that skilled developers can leverage!" - and maybe
so, but 98% of the people that truly use these sorts of techniques out in the real
world, are unskilled developers making a mess of software all across this great land,
because the compiler is so forgiving. 
</p>
        </blockquote>
        <p>
Ah, the "All Developers (Except Me) Are Idiots" argument. I love this one—the
hubris involved here is just too precious for words. I have no doubt that the author
of this post, being (of course) the classically-trained object-oriented developer
and therefore too smart/disciplined/experienced/whatever to fall into such a ridiculous
temptation as to use dynamic typing, would never use this feature except in the Most
Dire of Emergencies, but his fellow programmers, all of them being <em>much</em> less
disciplined/smart/trained/whatever than he is, will fall for the temptation and write
code that levels cities! burns forests! kills kittens! and worse, uses 12 bytes! (Oh,
wait, it's only 3 bytes, because dynamic is just a placeholder for an object reference,
and all object references are 3 bytes in the CLR. Or at least they used to be—I admit,
I haven't checked in CLR 4.) Those poor souls, they won't have any hope! There they'll
be, staring at Visual Studio, wanting <em>desperately</em> to do the Right Thing,
and that evil little programmer devil on their shoulder (probably wearing a T-shirt
that says, "P3rl is l33t" or something equally blasphemous) will whisper,
"You know, if you just make it a dynamic, you can get the compiler to shut up
and you can go home early...."
</p>
        <p>
Oh, right—sorry, I forgot. That devil will whisper, "You know, if you write this
code in Visual Basic .NET, you can make the entire codebase Option Strict Off and
Option Explicit Off, make the compiler shut up and you can go home early...."
Hell, they've been whispering <em>that</em> bit of subversion since 2001. And ye Gods!
The leveled cities! burned forests! cute little kitten bodies! all over the place!
It's fortunate that we C# developers have kept all those Visual Basic developers on
the straight-and-narrow path of <strike>true salvation</strike> static typing.
</p>
        <blockquote>
          <p>
This is a huge step backwards for C#, in my opinion - and creates the same scenario
VB always did - where it is so forgiving, that it allows developers to write horrible
code and you won't so much as see a compiler warning!! I've always tauted that C#
was better, simply because it gave the developer "tough love", and forced
him/her to be better coder and to "make good choices"! :-)
</p>
        </blockquote>
        <p>
Ah, yes, the C# compiler and its "tough love". The "prefer compile
errors over runtime errors" argument, vis-a-vis Scott Meyers' "Effective
C++" circa 1994 or so. It's vastly preferable to see errors early, before the
big demo in front of the VP/President/potential customer. (Anybody who disagrees with
this obviously hasn't had a demo fail in front of a VP/President/potential customer.)
How fortunate that the C# compiler catches all these ugly errors at compile-time,
like
</p>
        <div style="border-bottom: silver 1px solid; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'Courier New', courier, monospace; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
          <div style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum1"> 1:</span>
              <span style="color: #0000ff">static</span>
              <span style="color: #0000ff">void</span> DoSomething()</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum2"> 2:</span> {</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum3"> 3:</span> List&lt;<span style="color: #0000ff">object</span>&gt;
intList = <span style="color: #0000ff">new</span> List&lt;<span style="color: #0000ff">object</span>&gt;();</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum4"> 4:</span> intList.Add(5);</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum5"> 5:</span>
              <span style="color: #0000ff">string</span> s
= (<span style="color: #0000ff">string</span>) intList[0];</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum6"> 6:</span> Console.WriteLine(s);</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum7"> 7:</span> }</pre>
            <!--CRLF-->
          </div>
        </div>
        <p>
... because boy, that would be <em>embarrassing</em> if it didn't. I mean, can you
imagine the horror other disciplined/smart/experienced developers would feel if a
lenient compiler actually allowed code like this:
</p>
        <div style="border-bottom: silver 1px solid; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'Courier New', courier, monospace; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
          <div style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum1"> 1:</span>
              <span style="color: #0000ff">class</span> Point</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum2"> 2:</span> {</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum3"> 3:</span>
              <span style="color: #0000ff">internal</span>
              <span style="color: #0000ff">int</span> x;</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum4"> 4:</span>
              <span style="color: #0000ff">internal</span>
              <span style="color: #0000ff">int</span> y;</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum5"> 5:</span>
              <span style="color: #0000ff">public</span> Point(<span style="color: #0000ff">int</span> x, <span style="color: #0000ff">int</span> y)</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum6"> 6:</span> {</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum7"> 7:</span> x
= x;</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum8"> 8:</span> y
= y;</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum9"> 9:</span> }</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum10"> 10:</span> }</pre>
            <!--CRLF-->
          </div>
        </div>
        <p>
or this:
</p>
        <div style="border-bottom: silver 1px solid; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'Courier New', courier, monospace; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
          <div style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum1"> 1:</span>
              <span style="color: #0000ff">class</span> Point</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum2"> 2:</span> {</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum3"> 3:</span>
              <span style="color: #0000ff">internal</span>
              <span style="color: #0000ff">int</span> x;</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum4"> 4:</span>
              <span style="color: #0000ff">internal</span>
              <span style="color: #0000ff">int</span> y;</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum5"> 5:</span>
              <span style="color: #0000ff">public</span> Point(<span style="color: #0000ff">int</span> x, <span style="color: #0000ff">int</span> y)</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum6"> 6:</span> {</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum7"> 7:</span>
              <span style="color: #0000ff">this</span>.x
= x;</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum8"> 8:</span>
              <span style="color: #0000ff">this</span>.y
= y;</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum9"> 9:</span> }</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum10"> 10:</span>
              <span style="color: #0000ff">public</span>
              <span style="color: #0000ff">override</span>
              <span style="color: #0000ff">string</span> ToString()</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum11"> 11:</span> {</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum12"> 12:</span>
              <span style="color: #0000ff">return</span> String.Format(<span style="color: #006080">"({0},{1})"</span>,
x, y);</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum13"> 13:</span> }</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum14"> 14:</span> }</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum15"> 15:</span>
              <span style="color: #0000ff">static</span>
              <span style="color: #0000ff">void</span> DoSomething()</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum16"> 16:</span> {</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum17"> 17:</span> Point
pt = <span style="color: #0000ff">new</span> Point(12, 12);</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum18"> 18:</span> pt.GetType()</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum19"> 19:</span> .GetField(<span style="color: #006080">"x"</span>,
BindingFlags.Instance | </pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum20"> 20:</span> BindingFlags.NonPublic)</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum21"> 21:</span> .SetValue(pt,
24);</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum22"> 22:</span> Console.WriteLine(pt);</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum23"> 23:</span> }</pre>
            <!--CRLF-->
          </div>
        </div>
        <p>
to compile? Cities! Forests! Kittens! Thank <em>God</em> C# isn't that kind of lustfully
promiscuous... I mean, "lenient"... compiler!
</p>
        <p>
(Now if only we could tout blog comment engines with spellcheck....)
</p>
        <blockquote>
          <p>
Specific to this blog post, if you are doing somewhere where you can't even quantify
what the data type that is coming back? Guess waht, you've got yourself a bad design. 
</p>
        </blockquote>
        <p>
Wow. There's just no arguing with that one. I mean, knowing the actual type on which
the method is being dispatched is such a <em>huge</em> part of the C# development
experience:
</p>
        <div style="border-bottom: silver 1px solid; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'Courier New', courier, monospace; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
          <div style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum1"> 1:</span>
              <span style="color: #0000ff">static</span>
              <span style="color: #0000ff">void</span> DoSomething()</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum2"> 2:</span> {</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum3"> 3:</span> List&lt;Point&gt;
ptList = <span style="color: #0000ff">new</span> List&lt;Point&gt;();</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum4"> 4:</span> ptList.Add(<span style="color: #0000ff">new</span> Point(12,
12));</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum5"> 5:</span>
              <span style="color: #0000ff">object</span> o
= ptList[0];</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum6"> 6:</span> Console.WriteLine(o.ToString());</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum7"> 7:</span> }</pre>
            <!--CRLF-->
          </div>
        </div>
        <p>
Gah. Just the <em>thought</em> of not knowing the concrete type on which the method
is being dispatched gives me the heebie-jeebies.
</p>
        <blockquote>
          <p>
Just because the framework allows you use weak-typing and late-binding, doesn't mean
you should - nor should you endorse it's use, in my opinion. 
</p>
        </blockquote>
        <p>
Somebody better tell all those users of NHibernate, NUnit, Spring.NET, MEF and all
those other Reflection-based tools... including WinForms, ASP.NET, WPF, Workflow and
WCF, come to think about it... that they're using frameworks that clearly were designed
by idiots. (The <em>gall</em> of those people.)
</p>
        <blockquote>
          <p>
I'm just saying, it's a shame that popular "nerd celebrities" like you (and
I mean zero offense by that!) - endorse all this loosey-goosey typing. I say that
becuase I've never seen a single case where weak typing or late binding: A) made a
design better or B) where it didn't make the component or application worse, because
it was a looser design.
</p>
        </blockquote>
        <p>
I'm so glad you were here to set Scott and me straight, Rob. Because otherwise, we
might actually get something done. God <em>forbid</em>.
</p>
        <p>
Little tidbits of thought for those who are still thinking about this one.
</p>
        <ul>
          <li>
            <a href="http://olabini.com/blog/2008/06/fractal-programming/" target="_blank">Ola
Bini describes the application of the right language at the right level of the stack</a> as
a three-layer pyramid.</li>
          <li>
Any C# or Java developer who's not writing unit tests to test their code "because
the compiler will catch all those errors" and provide "tough love"
needs to be fired. <em>Immediately.</em> I cannot conceive of a situation where unit
tests can be passed over in favor of static typing in a professionally-responsible
development project. (Oh, don't mis-read that, I can see lots of situations where
unit tests aren't necessary. But not on code that's going to reach Production.)</li>
          <li>
The argument for the degree of static typing in C# or Java is completely indefensible
compared to what statically-typed type-inferenced languages like Haskell, F# or Scala
provide. And their syntax frequently looks like "let x = [ 1; 2; 3; 4; ]",
which isn't all that far off from what a dynamically-typed language looks like, despite
very very different things happening under the compiler's hood. Until you, the Statically-Typed
Fundamentalist, have written code in a Haskell/ML-derived language, you have no right
arguing the merits of static typing. (In fact, that's probably also true if you've
never written code in Ruby, Python, or PowerShell, either.)</li>
          <li>
There's lots more arguments the Static-Typing Fundamentalist can throw, by the way.
I'm disappointed Rob never mentioned performance, for one—that's a classic line of
attack, too. Never mind the fact that most of those guys are still looping down and
doing other silly micro-optimizations because that's way C++ taught them to do it....</li>
          <li>
Oh, and <em>never ever</em> show the Static Typing Fundamentalist an XML document
and using something like XPath to extract data from it. They inevitably fall into
XML Schema and the "if we just write the schema flexibly enough" and....
The last time I did that.... I still visit his gravesite, all these years later, and
it still hurts, losing him that way.</li>
          <li>
Java guys argued against dynamic typing for years, too... until they tried Groovy
and JRuby and Clojure. Now.... not so much.</li>
        </ul>
        <p>
Peace out.
</p>
        <img width="0" height="0" src="http://blogs.tedneward.com/aggbug.ashx?id=e04221b4-bd81-4aa6-9867-4b8d6010a7a5" />
        <br />
        <hr />
Enterprise consulting, mentoring or instruction. Java, C++, .NET or XML services.
1-day or multi-day workshops available. <a href="mailto:ted@tedneward.com">Contact
me for details</a>.</body>
      <title>Don't Fear the dynamic/VARIANT/Reaper....</title>
      <guid isPermaLink="false">http://blogs.tedneward.com/PermaLink,guid,e04221b4-bd81-4aa6-9867-4b8d6010a7a5.aspx</guid>
      <link>http://blogs.tedneward.com/2010/02/14/Dont+Fear+The+DynamicVARIANTReaper.aspx</link>
      <pubDate>Sun, 14 Feb 2010 11:41:34 GMT</pubDate>
      <description>&lt;p&gt;
A couple of days ago, a buddy of mine, Scott Hanselman, wrote &lt;a href="http://www.hanselman.com/blog/BackToBasicsC4MethodOverloadingAndDynamicTypes.aspx" target="_blank"&gt;a
nice little intro to the &amp;quot;dynamic&amp;quot; type in C# 4.0&lt;/a&gt;. In particular, I
like (though don't necessarily 100% agree with) his one-sentence summation of dynamic
as &lt;em&gt;&amp;quot;There's no way for you or I to know the type of this now, compiler, so
let's hope that the runtime figures it out.&amp;quot;&lt;/em&gt; It's an interesting characterization,
but my disagreement with his characterization is not the point here, at least not
of this particular blog entry.
&lt;/p&gt;
&lt;p&gt;
I've been waiting for it for a while, ever since C# 4 was announced, and sure enough,
here we go: Scott's blog is the victim of the &lt;em&gt;Static-Typing Fundamentalist&lt;/em&gt;,
the bearded and grizzled veteran of the Static/Dynamic Code Wars, come out to proclaim
the sins of dynamic programming, the evils of those who use(d) it, and why C#/C++/Java
was so much better than Visual Basic/Ruby/Python/whatever. Be careful of these creatures.
They rival Al-Qaeda in their ferocity and zeal, Fox News in their attention to detail
and evidence, and George Bush in their pronouncements of gloom and doom for the future
if we don't &lt;em&gt;act now and eliminate this evil&lt;/em&gt;.
&lt;/p&gt;
&lt;p&gt;
Allow me to quote (liberally) from &lt;a href="http://robert-seder.myopenid.com/" target="_blank"&gt;Rob&lt;/a&gt;'s &lt;a href="http://www.hanselman.com/blog/CommentView.aspx?guid=FC406BB6-2218-4481-A6BA-CD1E12994D74" target="_blank"&gt;comment
on Scott's blog&lt;/a&gt;, and comment in turn as we go:
&lt;/p&gt;
&lt;blockquote&gt; 
&lt;p&gt;
It's such a shame that you promote this stuff. You should've seen the horrific devastation
that &amp;quot;Variant&amp;quot; caused in the old VB days. Variant single-handedly create
job security for so many people since the late 90's, because of the horrible, horrible,
horrible things that developers did with that ridiculous, 12-byte data type!
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
I just love it when people make comments like &amp;quot;horrific devastation&amp;quot;. Nothing
like a little hyperbole to liven things up! I mean, it didn't cause exceptions, it
didn't make code hard to read, it didn't make it tricky for developers to modify and
refactor safely, it leveled cities! burned forests! slaughtered kittens! and even
worse, it was &lt;em&gt;12 bytes in size!&lt;/em&gt;
&lt;/p&gt;
&lt;p&gt;
Never mind the fact that Visual Basic developers frequently churned out apps twice,
three, five times faster than their C++ cousins did. (I know this—I was one of those
C++ developers, and routinely mocked the VB guys across the hall for their crappy
language and code.... until they built an app in a few days that I tried to build
at home in C++ and gave up after two weeks. And all the damn thing did was basic dialogs-and-data
kinds of stuff, too.)
&lt;/p&gt;
&lt;blockquote&gt; 
&lt;p&gt;
This weak-typing with late-binding is just such a bad idea. I know you'll say &amp;quot;But
wait, these are powerful tools that skilled developers can leverage!&amp;quot; - and maybe
so, but 98% of the people that truly use these sorts of techniques out in the real
world, are unskilled developers making a mess of software all across this great land,
because the compiler is so forgiving. 
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
Ah, the &amp;quot;All Developers (Except Me) Are Idiots&amp;quot; argument. I love this one—the
hubris involved here is just too precious for words. I have no doubt that the author
of this post, being (of course) the classically-trained object-oriented developer
and therefore too smart/disciplined/experienced/whatever to fall into such a ridiculous
temptation as to use dynamic typing, would never use this feature except in the Most
Dire of Emergencies, but his fellow programmers, all of them being &lt;em&gt;much&lt;/em&gt; less
disciplined/smart/trained/whatever than he is, will fall for the temptation and write
code that levels cities! burns forests! kills kittens! and worse, uses 12 bytes! (Oh,
wait, it's only 3 bytes, because dynamic is just a placeholder for an object reference,
and all object references are 3 bytes in the CLR. Or at least they used to be—I admit,
I haven't checked in CLR 4.) Those poor souls, they won't have any hope! There they'll
be, staring at Visual Studio, wanting &lt;em&gt;desperately&lt;/em&gt; to do the Right Thing,
and that evil little programmer devil on their shoulder (probably wearing a T-shirt
that says, &amp;quot;P3rl is l33t&amp;quot; or something equally blasphemous) will whisper,
&amp;quot;You know, if you just make it a dynamic, you can get the compiler to shut up
and you can go home early....&amp;quot;
&lt;/p&gt;
&lt;p&gt;
Oh, right—sorry, I forgot. That devil will whisper, &amp;quot;You know, if you write this
code in Visual Basic .NET, you can make the entire codebase Option Strict Off and
Option Explicit Off, make the compiler shut up and you can go home early....&amp;quot;
Hell, they've been whispering &lt;em&gt;that&lt;/em&gt; bit of subversion since 2001. And ye Gods!
The leveled cities! burned forests! cute little kitten bodies! all over the place!
It's fortunate that we C# developers have kept all those Visual Basic developers on
the straight-and-narrow path of &lt;strike&gt;true salvation&lt;/strike&gt; static typing.
&lt;/p&gt;
&lt;blockquote&gt; 
&lt;p&gt;
This is a huge step backwards for C#, in my opinion - and creates the same scenario
VB always did - where it is so forgiving, that it allows developers to write horrible
code and you won't so much as see a compiler warning!! I've always tauted that C#
was better, simply because it gave the developer &amp;quot;tough love&amp;quot;, and forced
him/her to be better coder and to &amp;quot;make good choices&amp;quot;! :-)
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
Ah, yes, the C# compiler and its &amp;quot;tough love&amp;quot;. The &amp;quot;prefer compile
errors over runtime errors&amp;quot; argument, vis-a-vis Scott Meyers' &amp;quot;Effective
C++&amp;quot; circa 1994 or so. It's vastly preferable to see errors early, before the
big demo in front of the VP/President/potential customer. (Anybody who disagrees with
this obviously hasn't had a demo fail in front of a VP/President/potential customer.)
How fortunate that the C# compiler catches all these ugly errors at compile-time,
like
&lt;/p&gt;
&lt;div style="border-bottom: silver 1px solid; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
&lt;div style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt; 1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;static&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; DoSomething()&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt; 2:&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum3"&gt; 3:&lt;/span&gt; List&amp;lt;&lt;span style="color: #0000ff"&gt;object&lt;/span&gt;&amp;gt;
intList = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; List&amp;lt;&lt;span style="color: #0000ff"&gt;object&lt;/span&gt;&amp;gt;();&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum4"&gt; 4:&lt;/span&gt; intList.Add(5);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum5"&gt; 5:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; s
= (&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;) intList[0];&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum6"&gt; 6:&lt;/span&gt; Console.WriteLine(s);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum7"&gt; 7:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;
... because boy, that would be &lt;em&gt;embarrassing&lt;/em&gt; if it didn't. I mean, can you
imagine the horror other disciplined/smart/experienced developers would feel if a
lenient compiler actually allowed code like this:
&lt;/p&gt;
&lt;div style="border-bottom: silver 1px solid; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
&lt;div style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt; 1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; Point&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt; 2:&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum3"&gt; 3:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;internal&lt;/span&gt; &lt;span style="color: #0000ff"&gt;int&lt;/span&gt; x;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum4"&gt; 4:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;internal&lt;/span&gt; &lt;span style="color: #0000ff"&gt;int&lt;/span&gt; y;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum5"&gt; 5:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; Point(&lt;span style="color: #0000ff"&gt;int&lt;/span&gt; x, &lt;span style="color: #0000ff"&gt;int&lt;/span&gt; y)&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum6"&gt; 6:&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum7"&gt; 7:&lt;/span&gt; x
= x;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum8"&gt; 8:&lt;/span&gt; y
= y;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum9"&gt; 9:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; 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;/div&gt;
&lt;/div&gt;
&lt;p&gt;
or this:
&lt;/p&gt;
&lt;div style="border-bottom: silver 1px solid; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
&lt;div style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt; 1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; Point&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt; 2:&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum3"&gt; 3:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;internal&lt;/span&gt; &lt;span style="color: #0000ff"&gt;int&lt;/span&gt; x;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum4"&gt; 4:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;internal&lt;/span&gt; &lt;span style="color: #0000ff"&gt;int&lt;/span&gt; y;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum5"&gt; 5:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; Point(&lt;span style="color: #0000ff"&gt;int&lt;/span&gt; x, &lt;span style="color: #0000ff"&gt;int&lt;/span&gt; y)&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum6"&gt; 6:&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum7"&gt; 7:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;this&lt;/span&gt;.x
= x;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum8"&gt; 8:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;this&lt;/span&gt;.y
= y;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum9"&gt; 9:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum10"&gt; 10:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;override&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; ToString()&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum11"&gt; 11:&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum12"&gt; 12:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; String.Format(&lt;span style="color: #006080"&gt;&amp;quot;({0},{1})&amp;quot;&lt;/span&gt;,
x, y);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; 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; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum14"&gt; 14:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum15"&gt; 15:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;static&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; DoSomething()&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum16"&gt; 16:&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum17"&gt; 17:&lt;/span&gt; Point
pt = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; Point(12, 12);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum18"&gt; 18:&lt;/span&gt; pt.GetType()&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum19"&gt; 19:&lt;/span&gt; .GetField(&lt;span style="color: #006080"&gt;&amp;quot;x&amp;quot;&lt;/span&gt;,
BindingFlags.Instance | &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum20"&gt; 20:&lt;/span&gt; BindingFlags.NonPublic)&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum21"&gt; 21:&lt;/span&gt; .SetValue(pt,
24);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum22"&gt; 22:&lt;/span&gt; Console.WriteLine(pt);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum23"&gt; 23:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;
to compile? Cities! Forests! Kittens! Thank &lt;em&gt;God&lt;/em&gt; C# isn't that kind of lustfully
promiscuous... I mean, &amp;quot;lenient&amp;quot;... compiler!
&lt;/p&gt;
&lt;p&gt;
(Now if only we could tout blog comment engines with spellcheck....)
&lt;/p&gt;
&lt;blockquote&gt; 
&lt;p&gt;
Specific to this blog post, if you are doing somewhere where you can't even quantify
what the data type that is coming back? Guess waht, you've got yourself a bad design. 
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
Wow. There's just no arguing with that one. I mean, knowing the actual type on which
the method is being dispatched is such a &lt;em&gt;huge&lt;/em&gt; part of the C# development
experience:
&lt;/p&gt;
&lt;div style="border-bottom: silver 1px solid; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
&lt;div style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt; 1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;static&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; DoSomething()&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt; 2:&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum3"&gt; 3:&lt;/span&gt; List&amp;lt;Point&amp;gt;
ptList = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; List&amp;lt;Point&amp;gt;();&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum4"&gt; 4:&lt;/span&gt; ptList.Add(&lt;span style="color: #0000ff"&gt;new&lt;/span&gt; Point(12,
12));&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum5"&gt; 5:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;object&lt;/span&gt; o
= ptList[0];&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum6"&gt; 6:&lt;/span&gt; Console.WriteLine(o.ToString());&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum7"&gt; 7:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;
Gah. Just the &lt;em&gt;thought&lt;/em&gt; of not knowing the concrete type on which the method
is being dispatched gives me the heebie-jeebies.
&lt;/p&gt;
&lt;blockquote&gt; 
&lt;p&gt;
Just because the framework allows you use weak-typing and late-binding, doesn't mean
you should - nor should you endorse it's use, in my opinion. 
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
Somebody better tell all those users of NHibernate, NUnit, Spring.NET, MEF and all
those other Reflection-based tools... including WinForms, ASP.NET, WPF, Workflow and
WCF, come to think about it... that they're using frameworks that clearly were designed
by idiots. (The &lt;em&gt;gall&lt;/em&gt; of those people.)
&lt;/p&gt;
&lt;blockquote&gt; 
&lt;p&gt;
I'm just saying, it's a shame that popular &amp;quot;nerd celebrities&amp;quot; like you (and
I mean zero offense by that!) - endorse all this loosey-goosey typing. I say that
becuase I've never seen a single case where weak typing or late binding: A) made a
design better or B) where it didn't make the component or application worse, because
it was a looser design.
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
I'm so glad you were here to set Scott and me straight, Rob. Because otherwise, we
might actually get something done. God &lt;em&gt;forbid&lt;/em&gt;.
&lt;/p&gt;
&lt;p&gt;
Little tidbits of thought for those who are still thinking about this one.
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://olabini.com/blog/2008/06/fractal-programming/" target="_blank"&gt;Ola
Bini describes the application of the right language at the right level of the stack&lt;/a&gt; as
a three-layer pyramid.&lt;/li&gt;
&lt;li&gt;
Any C# or Java developer who's not writing unit tests to test their code &amp;quot;because
the compiler will catch all those errors&amp;quot; and provide &amp;quot;tough love&amp;quot;
needs to be fired. &lt;em&gt;Immediately.&lt;/em&gt; I cannot conceive of a situation where unit
tests can be passed over in favor of static typing in a professionally-responsible
development project. (Oh, don't mis-read that, I can see lots of situations where
unit tests aren't necessary. But not on code that's going to reach Production.)&lt;/li&gt;
&lt;li&gt;
The argument for the degree of static typing in C# or Java is completely indefensible
compared to what statically-typed type-inferenced languages like Haskell, F# or Scala
provide. And their syntax frequently looks like &amp;quot;let x = [ 1; 2; 3; 4; ]&amp;quot;,
which isn't all that far off from what a dynamically-typed language looks like, despite
very very different things happening under the compiler's hood. Until you, the Statically-Typed
Fundamentalist, have written code in a Haskell/ML-derived language, you have no right
arguing the merits of static typing. (In fact, that's probably also true if you've
never written code in Ruby, Python, or PowerShell, either.)&lt;/li&gt;
&lt;li&gt;
There's lots more arguments the Static-Typing Fundamentalist can throw, by the way.
I'm disappointed Rob never mentioned performance, for one—that's a classic line of
attack, too. Never mind the fact that most of those guys are still looping down and
doing other silly micro-optimizations because that's way C++ taught them to do it....&lt;/li&gt;
&lt;li&gt;
Oh, and &lt;em&gt;never ever&lt;/em&gt; show the Static Typing Fundamentalist an XML document
and using something like XPath to extract data from it. They inevitably fall into
XML Schema and the &amp;quot;if we just write the schema flexibly enough&amp;quot; and....
The last time I did that.... I still visit his gravesite, all these years later, and
it still hurts, losing him that way.&lt;/li&gt;
&lt;li&gt;
Java guys argued against dynamic typing for years, too... until they tried Groovy
and JRuby and Clojure. Now.... not so much.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
Peace out.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blogs.tedneward.com/aggbug.ashx?id=e04221b4-bd81-4aa6-9867-4b8d6010a7a5" /&gt;
&lt;br /&gt;
&lt;hr /&gt;
Enterprise consulting, mentoring or instruction. Java, C++, .NET or XML services.
1-day or multi-day workshops available. &lt;a href="mailto:ted@tedneward.com"&gt;Contact
me for details&lt;/a&gt;.</description>
      <comments>http://blogs.tedneward.com/CommentView,guid,e04221b4-bd81-4aa6-9867-4b8d6010a7a5.aspx</comments>
      <category>.NET</category>
      <category>C#</category>
      <category>C++</category>
      <category>F#</category>
      <category>Industry</category>
      <category>Java/J2EE</category>
      <category>Languages</category>
      <category>Parrot</category>
      <category>Python</category>
      <category>Ruby</category>
      <category>Scala</category>
      <category>Visual Basic</category>
      <category>WCF</category>
    </item>
    <item>
      <trackback:ping>http://blogs.tedneward.com/Trackback.aspx?guid=4b2137dd-11cc-4ad5-8771-5906f2759273</trackback:ping>
      <pingback:server>http://blogs.tedneward.com/pingback.aspx</pingback:server>
      <pingback:target>http://blogs.tedneward.com/PermaLink,guid,4b2137dd-11cc-4ad5-8771-5906f2759273.aspx</pingback:target>
      <dc:creator>Ted Neward</dc:creator>
      <wfw:comment>http://blogs.tedneward.com/CommentView,guid,4b2137dd-11cc-4ad5-8771-5906f2759273.aspx</wfw:comment>
      <wfw:commentRss>http://blogs.tedneward.com/SyndicationService.asmx/GetEntryCommentsRss?guid=4b2137dd-11cc-4ad5-8771-5906f2759273</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Cruising the Web late last night, I ran across <a href="http://blogs.techrepublic.com.com/10things/?p=1297" target="_blank">"10
things you can do to advance your career as a developer"</a>, summarized below:
</p>
        <ol>
          <li>
Build a PC 
</li>
          <li>
Participate in an online forum and help others 
</li>
          <li>
Man the help desk 
</li>
          <li>
Perform field service 
</li>
          <li>
Perform DBA functions 
</li>
          <li>
Perform all phases of the project lifecycle 
</li>
          <li>
Recognize and learn the latest technologies 
</li>
          <li>
Be an independent contractor 
</li>
          <li>
Lead a project, supervise, or manage 
</li>
          <li>
Seek additional education 
</li>
        </ol>
        <p>
I agreed with some of them, I disagreed with others, and in general felt like they
were a little too high-level to be of real use. For example, "Seek additional
education" seems entirely too vague: In what? How much? How often? And "Recognize
and learn the latest technologies" is something like offering advice to the Olympic
fencing silver medalist and saying, "You should have tried harder".
</p>
        <p>
So, in the great spirit of "Not Invented Here", I present my own list; as
usual, I welcome comment and argument. And, also as usual, caveats apply, since not
everybody will be in precisely the same place and be looking for the same things.
In general, though, whether you're looking to kick-start your career or just "kick
it up a notch", I believe this list will help, because these ideas have been
of help to me at some point or another in my own career.
</p>
        <h3>
          <strong>
            <em>10: Build a PC.</em>
          </strong>
        </h3>
        <p>
Yes, even developers have to know about hardware. More importantly, a developer at
a small organization or team will find himself in a position where he has to take
on some system administrator roles, and sometimes that means grabbing a screwdriver,
getting a little dusty and dirty, and swapping hardware around. Having said this,
though, once you've done it once or twice, leave it alone—the hardware game is an
ever-shifting and ever-changing game (much like software is, surprise surprise), and
it's been my experience that most of us only really have the time to pursue one or
the other.
</p>
        <p>
By the way, "PC" there is something of a generic term—build a Linux box,
build a Windows box, or "build" a Mac OS box (meaning, buy a Mac Pro and
trick it out a little—add more memory, add another hard drive, and so on), they all
get you comfortable with snapping parts together, and discovering just how ridiculously
simple the whole thing really is.
</p>
        <p>
And for the record, once you've done it, go ahead and go back to buying pre-built
systems or laptops—I've never found building a PC to be any cheaper than buying one
pre-built. Particularly for PC systems, I prefer to use smaller local vendors where
I can customize and trick out the box. If you're a Mac, that's not really an option
unless you're into the "Hackintosh" thing, which is quite possibly the logical
equivalent to "Build a PC". Having never done it myself, though, I can't
say how useful that is as an educational action.
</p>
        <h3>
        </h3>
        <h3>
        </h3>
        <h3>
        </h3>
        <h3>
          <strong>
            <em>9: Pick a destination</em>
          </strong>
        </h3>
        <p>
Do you want to run a team of your own? Become an independent contractor? Teach programming
classes? Speak at conferences? Move up into higher management and get out of the programming
game altogether? Everybody's got a different idea of what they consider to be the
"ideal" career, but it's amazing how many people don't really think about
what they want their career path to be.
</p>
        <p>
A wise man once said, "The journey of a thousand miles begins with a single step."
I disagree: The journey of a thousand miles begins with the damn map. You have to
know where you want to go, and a rough idea of how to get there, before you can really
start with that single step. Otherwise, you're just wandering, which in itself isn't
a bad thing, but isn't going to get you to a destination except by random chance.
(Sometimes that's not a bad result, but at least then you're openly admitting that
you're leaving your career in the hands of chance. If you're OK with that, skip to
the next item. If you're not, read on.)
</p>
        <p>
Lay out explicitly (as in, write it down someplace) what kind of job you're wanting
to grow into, and then lay out a couple of scenarios that move you closer towards
that goal. Can you grow within the company you're in? (Have others been able to?)
Do you need to quit and strike out on your own? Do you want to lead a team of your
own? (Are there new projects coming in to the company that you could put yourself
forward as a potential tech lead?) And so on.
</p>
        <p>
Once you've identified the destination, now you can start thinking about steps to
get there. 
</p>
        <p>
If you want to become a speaker, put your name forward to give some presentations
at the local technology user group, or volunteer to hold a "brown bag" session
at the company. Sign up with Toastmasters to hone your speaking technique. Watch other
speakers give technical talks, and see what they do that you don't, and vice versa. 
</p>
        <p>
If you want to be a tech lead, start by quietly assisting other members of the team
get their work done. Help them debug thorny problems. Answer questions they have.
Offer yourself up as a resource for dealing with hard problems.
</p>
        <p>
If you want to slowly move up the management chain, look to get into the project management
side of things. Offer to be a point of contact for the users. Learn the business better.
Sit down next to one of your users and watch their interaction with the existing software,
and try to see the system from their point of view.
</p>
        <p>
And so on.
</p>
        <h3>
          <strong>
            <em>8: Be a bell curve</em>
          </strong>
        </h3>
        <p>
Frequently, at conferences, attendees ask me how I got to know so much on so many
things. In some ways, I'm reminded of the story of a world-famous concert pianist
giving a concert at Carnegie Hall—when a gushing fan said, "I'd give my life
to be able to play like that", the pianist responded quietly, "I did".
But as much as I'd like to leave you with the impression that I've dedicated my entire
life to knowing everything I could about this industry, that would be something of
a lie. The truth is, I don't know anywhere near as much as I'd like, and I'm always
poking my head into new areas. Thank God for my ADD, that's all I can say on that
one.
</p>
        <p>
For the rest of you, though, that's not feasible, and not really practical, particularly
since I have an advantage that the "working" programmer doesn't—I have set
aside weeks or months in which to do nothing more than study a new technology or language.
</p>
        <p>
Back in the early days of my career, though, when I was holding down the 9-to-5, I
was a Windows/C++ programmer. I was working with the Borland C++ compiler and its
associated framework, the ObjectWindows Library (OWL), extending and maintaining applications
written in it. One contracting client wanted me to work with Microsoft MFC instead
of OWL. Another one was storing data into a relational database using ODBC. And so
on. Slowly, over time, I built up a "bell curve"-looking collection of skills
that sort of "hovered" around the central position of C++/Windows.
</p>
        <p>
Then, one day, a buddy of mine mentioned the team on which he was a project manager
was looking for new blood. They were doing web applications, something with which
I had zero experience—this was completely outside of my bell curve. HTML, HTTP, Cold
Fusion, NetDynamics (an early Java app server), this was way out of my range, though
at least NetDynamics was a <em>little</em> similar, since it was basically a server-side
application framework, and I had some experience with app frameworks from my C++ days.
So, resting on my C++ experience, I started flirting with Java, and so on.
</p>
        <p>
Before long, my "bell curve" had been readjusted to have Java more or less
at its center, and I found that experience in C++ still worked out here—what I knew
about ODBC turned out to be incredibly useful in understanding JDBC, what I knew about
DLLs from Windows turned out to be helpful in understanding Java's dynamic loading
model, and of course syntactically Java looked a lot like C++ even though it behaved
a little bit differently under the hood. (One article author suggested that Java was
closer to Smalltalk than C++, and that prompted me to briefly flirt with Smalltalk
before I concluded said author was out of his frakking mind.)
</p>
        <p>
All of this happened over roughly a three-year period, by the way.
</p>
        <p>
The point here is that you won't be able to assimilate the entire industry in a single
sitting, so pick something that's relatively close to what you already know, and use
your experience as a springboard to learn something that's new, yet possibly-if-not-probably
useful to your current job. You don't have to be a deep expert in it, and the further
away it is from what you do, the less you really need to know about it (hence the
bell curve metaphor), but you're still exposing yourself to new ideas and new concepts
and new tools/technologies that still could be applicable to what you do on a daily
basis. Over time the "center" of your bell curve may drift away from what
you've done to include new things, and that's OK.
</p>
        <h3>
          <strong>
            <em>7: Learn one new thing every year</em>
          </strong>
        </h3>
        <p>
In the last tip, I told you to branch out slowly from what you know. In this tip,
I'm telling you to go throw a dart at something entirely unfamiliar to you and learn
it. Yes, I realize this sounds contradictory. It's because those who stick to only
what they know end up missing the radical shifts of direction that the industry hits
every half-decade or so until it's mainstream and commonplace and "everybody's
doing it".
</p>
        <p>
In their amazing book "The Pragmatic Programmer", Dave Thomas and Andy Hunt
suggest that you learn one new programming language every year. I'm going to amend
that somewhat—not because there aren't enough languages in the world to keep you on
that pace for the rest of your life—far from it, if that's what you want, go learn
Ruby, F#, Scala, Groovy, Clojure, Icon, Io, Erlang, Haskell and Smalltalk, then come
back to me for the list for 2020—but because languages aren't the only thing that
we as developers need to explore. There's a lot of movement going on in areas beyond
languages, and you don't want to be the last kid on the block to know they're happening.
</p>
        <p>
Consider this list: object databases (<a href="http://www.db4o.com" target="_blank">db4o</a>)
and/or the "NoSQL" movement (<a href="http://www.mongodb.org/display/DOCS/Tutorial" target="_blank">MongoDB</a>).
Dependency injection and composable architectures (<a href="http://www.springframework.org" target="_blank">Spring</a>, <a href="http://mef.codeplex.com" target="_blank">MEF</a>).
A dynamic language (<a href="http://www.rubyforge.org" target="_blank">Ruby</a>, <a href="http://www.python.org" target="_blank">Python</a>, <a href="http://www.ecmascript.org" target="_blank">ECMAScript</a>).
A functional language (<a href="http://msdn.microsoft.com/en-us/fsharp/default.aspx" target="_blank">F#</a>, <a href="http://www.scala-lang.org" target="_blank">Scala</a>, <a href="http://www.haskell.org" target="_blank">Haskell</a>).
A Lisp (Common Lisp, <a href="http://clojure.org" target="_blank">Clojure</a>, Scheme,
Nu). A mobile platform (iPhone, Android). "Space"-based architecture (<a href="http://www.gigaspaces.com" target="_blank">Gigaspaces</a>,
Terracotta). Rich UI platforms (Flash/Flex, Silverlight). Browser enhancements (AJAX,
jQuery, HTML 5) and how they're different from the rich UI platforms. And this is
without adding any of the "obvious" stuff, like Cloud, to the list.
</p>
        <p>
(I'm not convinced Cloud is something worth learning this year, anyway.)
</p>
        <p>
You get through that list, you're operating outside of your comfort zone, and chances
are, your boss' comfort zone, which puts you into the enviable position of being somebody
who can advise him around those technologies. <em>DO NOT TAKE THIS TO MEAN YOU MUST
KNOW THEM DEEPLY.</em> Just having a passing familiarity with them can be enough. <em>DO
NOT TAKE THIS TO MEAN YOU SHOULD PROPOSE USING THEM ON THE NEXT PROJECT.</em> In fact,
sometimes the most compelling evidence that you really know where and when they should
be used is when you suggest stealing ideas from the thing, rather than trying to force-fit
the thing onto the project as a whole.
</p>
        <h3>
          <strong>
            <em>6: Practice, practice, practice</em>
          </strong>
        </h3>
        <p>
Speaking of the concert pianist, somebody once asked him how to get to Carnegie Hall.
HIs answer: "Practice, my boy, practice."
</p>
        <p>
The same is true here. You're not going to get to be a better developer without practice.
Volunteer some time—even if it's just an hour a week—on an open-source project, or
start one of your own. Heck, it doesn't even have to be an "open source"
project—just create some requirements of your own, solve a problem that a family member
is having, or rewrite the project you're on as an interesting side-project. Do the
Nike thing and "Just do it". Write some Scala code. Write some F# code.
Once you're past "hello world", write the Scala code to use db4o as a persistent
storage. Wire it up behind Tapestry. Or write straight servlets in Scala. And so on.
</p>
        <h3>
          <strong>
            <em>5: Turn off the TV</em>
          </strong>
        </h3>
        <p>
Speaking of marketing slogans, if you're like most Americans, surveys have shown that
you watch about four hours of TV a day, or 28 hours of TV a week. In that same amount
of time (28 hours over 1 week), you could read the entire set of poems by Maya Angelou,
one F. Scott Fitzgerald novel, all poems by T.S.Eliot, 2 plays by Thornton Wilder,
or all 150 Psalms of the Bible. An average reader, reading just one hour a day, can
finish an "average-sized" book (let's assume about the size of a novel)
in a week, which translates to 52 books a year.
</p>
        <p>
Let's assume a technical book is going to take slightly longer, since it's a bit deeper
in concept and requires you to spend some time experimenting and typing in code; let's
assume that reading and going through the exercises of an average technical book will
require 4 weeks (a month) instead of just one week. That's 12 new tools/languages/frameworks/ideas
you'd be learning per year.
</p>
        <p>
All because you stopped watching David Caruso turn to the camera, whip his sunglasses
off and say something stupid. (I guess it's not his fault; <em>CSI:Miami</em> is a
crap show. The other two are actually not bad, but <em>Miami</em> just makes me retch.) 
</p>
        <p>
After all, when's the last time that David Caruso or the rest of that show did anything
that was even remotely realistic from a computer perspective? (I always laugh out
loud every time they run a database search against some national database on a completely
non-indexable criteria—like a partial license plate number—and it comes back in seconds.
What the hell database are THEY using? I want it!) Soon as you hear The Who break
into that riff, flip off the TV (or set it to mute) and pick up the book on the nightstand
and boost your career. (And hopefully sink Caruso's.)
</p>
        <p>
Or, if you just can't give up your weekly dose of Caruso, then put the book in the
bathroom. Think about it—how much time do you spend in there a week?
</p>
        <p>
And this gets even better when you get a Kindle or other e-reader that accepts PDFs,
or the book you're interested in is natively supported in the e-readers' format. Now
you have it with you for lunch, waiting at dinner for your food to arrive, or while
you're sitting guard on your 10-year-old so he doesn't sneak out of his room after
his bedtime to play more XBox.
</p>
        <h3>
          <strong>
            <em>4: Have a life</em>
          </strong>
        </h3>
        <p>
Speaking of XBox, don't slave your life to work. Pursue other things. Scientists have
repeatedly discovered that exercise helps keep the mind in shape, so take a couple
of hours a week (buh-bye, <em>American Idol</em>) and go get some exercise. Pick up
a new sport you've never played before, or just go work out at the gym. (This year
I'm doing Hopkido and fencing.) Read some nontechnical books. (I recommend anything
by Malcolm Gladwell as a starting point.) Spend time with your family, if you have
one—mine spends at least six or seven hours a week playing "family games"
like <a href="http://www.realitycheckgames.com/Products/127-the-settlers-of-catan.aspx" target="_blank">Settlers
of Catan</a>, <a href="http://www.realitycheckgames.com/Products/113-dominion.aspx" target="_blank">Dominion</a>, <a href="http://www.realitycheckgames.com/Products/88-to-court-the-king.aspx" target="_blank">To
Court The King</a>, <a href="http://www.realitycheckgames.com/Products/98-munchkin.aspx" target="_blank">Munchkin</a>,
and other non-traditional games, usually over lunch or dinner. I also belong to an
informal "Game Night club" in Redmond consisting of several Microsoft employees
and their families, as well as outsiders. And so on. Heck, go to a local bar and watch
the game, and you'll meet some really interesting people. And some boring people,
too, but you don't have to talk to them during the next game if you don't want.
</p>
        <p>
This isn't just about maintaining a healthy work-life balance—it's also about having
interests that other people can latch on to, qualities that will make you more "human"
and more interesting as a person, and make you more attractive and "connectable"
and stand out better in their mind when they hear that somebody they know is looking
for a software developer. This will also help you connect better with your users,
because like it or not, they do <em>not</em> get your puns involving Klingon. (Besides,
the geek stereotype is SO 90's, and it's time we let the world know that.)
</p>
        <p>
Besides, you never know when having some depth in other areas—philosophy, music, art,
physics, sports, whatever—will help you create an analogy that will explain some thorny
computer science concept to a non-technical person and get past a communication roadblock.
</p>
        <h3>
          <strong>
            <em>3: Practice on a cadaver</em>
          </strong>
        </h3>
        <p>
Long before they scrub up for their first surgery on a human, medical students practice
on dead bodies. It's grisly, it's not something we really want to think about, but
when you're the one going under the general anesthesia, would you rather see the surgeon
flipping through the "How-To" manual, "just to refresh himself"?
</p>
        <p>
Diagnosing and debugging a software system can be a hugely puzzling trial, largely
because there are so many possible "moving parts" that are creating the
problem. Compound that with certain bugs that only appear when multiple users are
interacting at the same time, and you've got a recipe for disaster when a production
bug suddenly threatens to jeopardize the company's online revenue stream. Do you really
want to be sitting in the production center, flipping through "How-To"'s
and FAQs online while your boss looks on and your CEO is counting every minute by
the thousands of dollars?
</p>
        <p>
Take a tip from the med student: long before the thing goes into production, introduce
a bug, deploy the code into a virtual machine, then hand it over to a buddy and let
him try to track it down. Have him do the same for you. Or if you can't find a buddy
to help you, do it to yourself (but try not to cheat or let your knowledge of where
the bug is color your reactions). How do you know the bug is there? Once you know
it's there, how do you determine what kind of bug it is? Where do you start looking
for it? How would you track it down without attaching a debugger or otherwise disrupting
the system's operations? (Remember, we can't always just attach an IDE and step through
the code on a production server.) How do you patch the running system? And so on.
</p>
        <p>
Remember, you can either learn these things under controlled circumstances, learn
them while you're in the "hot seat", so to speak, or not learn them at all
and see how long the company keeps you around.
</p>
        <h3>
          <strong>
            <em>2: Administer the system</em>
          </strong>
        </h3>
        <p>
Take off your developer hat for a while—a week, a month, a quarter, whatever—and be
one of those thankless folks who have to keep the system running. Wear the pager that
goes off at 3AM when a server goes down. Stay all night doing one of those "server
upgrades" that have to be done in the middle of the night because the system
can't be upgraded while users are using it. Answer the phones or chat requests of
those hapless users who can't figure out why they can't find the record they just
entered into the system, and after a half-hour of thinking it must be a bug, ask them
if they remembered to check the "Save this record" checkbox on the UI (which
had to be there because the developers were told it had to be there) before submitting
the form. Try adding a user. Try removing a user. Try changing the user's password.
Learn what a real joy having seven different properties/XML/configuration files scattered
all over the system really is.
</p>
        <p>
Once you've done that, particularly on a system that you built and tossed over the
fence into production and thought that was the end of it, you'll understand just why
it's so important to keep the system administrators in mind when you're building a
system for production. And why it's critical to be able to have a system that tells
you when it's down, instead of having to go hunting up the answer when a VP tells
you it is (usually because he's just gotten an outage message from a customer or client).
</p>
        <h3>
          <strong>
            <em>1: Cultivate a peer group</em>
          </strong>
        </h3>
        <p>
Yes, you can join an online forum, ask questions, answer questions, and learn that
way, but that's a poor substitute for physical human contact once in a while. Like
it or not, various sociological and psychological studies confirm that a "connection"
is really still best made when eyeballs meet flesh. (The "disassociative"
nature of email is what makes it so easy to be rude or flamboyant or downright violent
in email when we would never say such things in person.) Go to conferences, join a
user group, even start one of your own if you can't find one. Yes, the online avenues
are still open to you—read blogs, join mailing lists or newsgroups—but don't lose
sight of human-to-human contact.
</p>
        <p>
While we're at it, don't create a peer group of people that all look to you for answers—as
flattering as that feels, and as much as we do learn by providing answers, frequently
we rise (or fall) to the level of our peers—have at least one peer group that's overwhelmingly
smarter than you, and as scary as it might be, venture to offer an answer or two to
that group when a question comes up. You don't have to be right—in fact, it's often
vastly more educational to be wrong. Just maintain an attitude that says "I have
no ego wrapped up in being right or wrong", and take the entire experience as
a learning opportunity.
</p>
        <img width="0" height="0" src="http://blogs.tedneward.com/aggbug.ashx?id=4b2137dd-11cc-4ad5-8771-5906f2759273" />
        <br />
        <hr />
Enterprise consulting, mentoring or instruction. Java, C++, .NET or XML services.
1-day or multi-day workshops available. <a href="mailto:ted@tedneward.com">Contact
me for details</a>.</body>
      <title>10 Things To Improve Your Development Career</title>
      <guid isPermaLink="false">http://blogs.tedneward.com/PermaLink,guid,4b2137dd-11cc-4ad5-8771-5906f2759273.aspx</guid>
      <link>http://blogs.tedneward.com/2010/01/19/10+Things+To+Improve+Your+Development+Career.aspx</link>
      <pubDate>Tue, 19 Jan 2010 10:02:01 GMT</pubDate>
      <description>&lt;p&gt;
Cruising the Web late last night, I ran across &lt;a href="http://blogs.techrepublic.com.com/10things/?p=1297" target="_blank"&gt;&amp;quot;10
things you can do to advance your career as a developer&amp;quot;&lt;/a&gt;, summarized below:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
Build a PC 
&lt;/li&gt;
&lt;li&gt;
Participate in an online forum and help others 
&lt;/li&gt;
&lt;li&gt;
Man the help desk 
&lt;/li&gt;
&lt;li&gt;
Perform field service 
&lt;/li&gt;
&lt;li&gt;
Perform DBA functions 
&lt;/li&gt;
&lt;li&gt;
Perform all phases of the project lifecycle 
&lt;/li&gt;
&lt;li&gt;
Recognize and learn the latest technologies 
&lt;/li&gt;
&lt;li&gt;
Be an independent contractor 
&lt;/li&gt;
&lt;li&gt;
Lead a project, supervise, or manage 
&lt;/li&gt;
&lt;li&gt;
Seek additional education 
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
I agreed with some of them, I disagreed with others, and in general felt like they
were a little too high-level to be of real use. For example, &amp;quot;Seek additional
education&amp;quot; seems entirely too vague: In what? How much? How often? And &amp;quot;Recognize
and learn the latest technologies&amp;quot; is something like offering advice to the Olympic
fencing silver medalist and saying, &amp;quot;You should have tried harder&amp;quot;.
&lt;/p&gt;
&lt;p&gt;
So, in the great spirit of &amp;quot;Not Invented Here&amp;quot;, I present my own list; as
usual, I welcome comment and argument. And, also as usual, caveats apply, since not
everybody will be in precisely the same place and be looking for the same things.
In general, though, whether you're looking to kick-start your career or just &amp;quot;kick
it up a notch&amp;quot;, I believe this list will help, because these ideas have been
of help to me at some point or another in my own career.
&lt;/p&gt;
&lt;h3&gt;&lt;strong&gt;&lt;em&gt;10: Build a PC.&lt;/em&gt;&lt;/strong&gt; 
&lt;/h3&gt;
&lt;p&gt;
Yes, even developers have to know about hardware. More importantly, a developer at
a small organization or team will find himself in a position where he has to take
on some system administrator roles, and sometimes that means grabbing a screwdriver,
getting a little dusty and dirty, and swapping hardware around. Having said this,
though, once you've done it once or twice, leave it alone—the hardware game is an
ever-shifting and ever-changing game (much like software is, surprise surprise), and
it's been my experience that most of us only really have the time to pursue one or
the other.
&lt;/p&gt;
&lt;p&gt;
By the way, &amp;quot;PC&amp;quot; there is something of a generic term—build a Linux box,
build a Windows box, or &amp;quot;build&amp;quot; a Mac OS box (meaning, buy a Mac Pro and
trick it out a little—add more memory, add another hard drive, and so on), they all
get you comfortable with snapping parts together, and discovering just how ridiculously
simple the whole thing really is.
&lt;/p&gt;
&lt;p&gt;
And for the record, once you've done it, go ahead and go back to buying pre-built
systems or laptops—I've never found building a PC to be any cheaper than buying one
pre-built. Particularly for PC systems, I prefer to use smaller local vendors where
I can customize and trick out the box. If you're a Mac, that's not really an option
unless you're into the &amp;quot;Hackintosh&amp;quot; thing, which is quite possibly the logical
equivalent to &amp;quot;Build a PC&amp;quot;. Having never done it myself, though, I can't
say how useful that is as an educational action.
&lt;/p&gt;
&lt;h3&gt;
&lt;/h3&gt;
&lt;h3&gt;
&lt;/h3&gt;
&lt;h3&gt;
&lt;/h3&gt;
&lt;h3&gt;&lt;strong&gt;&lt;em&gt;9: Pick a destination&lt;/em&gt;&lt;/strong&gt;
&lt;/h3&gt;
&lt;p&gt;
Do you want to run a team of your own? Become an independent contractor? Teach programming
classes? Speak at conferences? Move up into higher management and get out of the programming
game altogether? Everybody's got a different idea of what they consider to be the
&amp;quot;ideal&amp;quot; career, but it's amazing how many people don't really think about
what they want their career path to be.
&lt;/p&gt;
&lt;p&gt;
A wise man once said, &amp;quot;The journey of a thousand miles begins with a single step.&amp;quot;
I disagree: The journey of a thousand miles begins with the damn map. You have to
know where you want to go, and a rough idea of how to get there, before you can really
start with that single step. Otherwise, you're just wandering, which in itself isn't
a bad thing, but isn't going to get you to a destination except by random chance.
(Sometimes that's not a bad result, but at least then you're openly admitting that
you're leaving your career in the hands of chance. If you're OK with that, skip to
the next item. If you're not, read on.)
&lt;/p&gt;
&lt;p&gt;
Lay out explicitly (as in, write it down someplace) what kind of job you're wanting
to grow into, and then lay out a couple of scenarios that move you closer towards
that goal. Can you grow within the company you're in? (Have others been able to?)
Do you need to quit and strike out on your own? Do you want to lead a team of your
own? (Are there new projects coming in to the company that you could put yourself
forward as a potential tech lead?) And so on.
&lt;/p&gt;
&lt;p&gt;
Once you've identified the destination, now you can start thinking about steps to
get there. 
&lt;/p&gt;
&lt;p&gt;
If you want to become a speaker, put your name forward to give some presentations
at the local technology user group, or volunteer to hold a &amp;quot;brown bag&amp;quot; session
at the company. Sign up with Toastmasters to hone your speaking technique. Watch other
speakers give technical talks, and see what they do that you don't, and vice versa. 
&lt;/p&gt;
&lt;p&gt;
If you want to be a tech lead, start by quietly assisting other members of the team
get their work done. Help them debug thorny problems. Answer questions they have.
Offer yourself up as a resource for dealing with hard problems.
&lt;/p&gt;
&lt;p&gt;
If you want to slowly move up the management chain, look to get into the project management
side of things. Offer to be a point of contact for the users. Learn the business better.
Sit down next to one of your users and watch their interaction with the existing software,
and try to see the system from their point of view.
&lt;/p&gt;
&lt;p&gt;
And so on.
&lt;/p&gt;
&lt;h3&gt;&lt;strong&gt;&lt;em&gt;8: Be a bell curve&lt;/em&gt;&lt;/strong&gt;
&lt;/h3&gt;
&lt;p&gt;
Frequently, at conferences, attendees ask me how I got to know so much on so many
things. In some ways, I'm reminded of the story of a world-famous concert pianist
giving a concert at Carnegie Hall—when a gushing fan said, &amp;quot;I'd give my life
to be able to play like that&amp;quot;, the pianist responded quietly, &amp;quot;I did&amp;quot;.
But as much as I'd like to leave you with the impression that I've dedicated my entire
life to knowing everything I could about this industry, that would be something of
a lie. The truth is, I don't know anywhere near as much as I'd like, and I'm always
poking my head into new areas. Thank God for my ADD, that's all I can say on that
one.
&lt;/p&gt;
&lt;p&gt;
For the rest of you, though, that's not feasible, and not really practical, particularly
since I have an advantage that the &amp;quot;working&amp;quot; programmer doesn't—I have set
aside weeks or months in which to do nothing more than study a new technology or language.
&lt;/p&gt;
&lt;p&gt;
Back in the early days of my career, though, when I was holding down the 9-to-5, I
was a Windows/C++ programmer. I was working with the Borland C++ compiler and its
associated framework, the ObjectWindows Library (OWL), extending and maintaining applications
written in it. One contracting client wanted me to work with Microsoft MFC instead
of OWL. Another one was storing data into a relational database using ODBC. And so
on. Slowly, over time, I built up a &amp;quot;bell curve&amp;quot;-looking collection of skills
that sort of &amp;quot;hovered&amp;quot; around the central position of C++/Windows.
&lt;/p&gt;
&lt;p&gt;
Then, one day, a buddy of mine mentioned the team on which he was a project manager
was looking for new blood. They were doing web applications, something with which
I had zero experience—this was completely outside of my bell curve. HTML, HTTP, Cold
Fusion, NetDynamics (an early Java app server), this was way out of my range, though
at least NetDynamics was a &lt;em&gt;little&lt;/em&gt; similar, since it was basically a server-side
application framework, and I had some experience with app frameworks from my C++ days.
So, resting on my C++ experience, I started flirting with Java, and so on.
&lt;/p&gt;
&lt;p&gt;
Before long, my &amp;quot;bell curve&amp;quot; had been readjusted to have Java more or less
at its center, and I found that experience in C++ still worked out here—what I knew
about ODBC turned out to be incredibly useful in understanding JDBC, what I knew about
DLLs from Windows turned out to be helpful in understanding Java's dynamic loading
model, and of course syntactically Java looked a lot like C++ even though it behaved
a little bit differently under the hood. (One article author suggested that Java was
closer to Smalltalk than C++, and that prompted me to briefly flirt with Smalltalk
before I concluded said author was out of his frakking mind.)
&lt;/p&gt;
&lt;p&gt;
All of this happened over roughly a three-year period, by the way.
&lt;/p&gt;
&lt;p&gt;
The point here is that you won't be able to assimilate the entire industry in a single
sitting, so pick something that's relatively close to what you already know, and use
your experience as a springboard to learn something that's new, yet possibly-if-not-probably
useful to your current job. You don't have to be a deep expert in it, and the further
away it is from what you do, the less you really need to know about it (hence the
bell curve metaphor), but you're still exposing yourself to new ideas and new concepts
and new tools/technologies that still could be applicable to what you do on a daily
basis. Over time the &amp;quot;center&amp;quot; of your bell curve may drift away from what
you've done to include new things, and that's OK.
&lt;/p&gt;
&lt;h3&gt;&lt;strong&gt;&lt;em&gt;7: Learn one new thing every year&lt;/em&gt;&lt;/strong&gt;
&lt;/h3&gt;
&lt;p&gt;
In the last tip, I told you to branch out slowly from what you know. In this tip,
I'm telling you to go throw a dart at something entirely unfamiliar to you and learn
it. Yes, I realize this sounds contradictory. It's because those who stick to only
what they know end up missing the radical shifts of direction that the industry hits
every half-decade or so until it's mainstream and commonplace and &amp;quot;everybody's
doing it&amp;quot;.
&lt;/p&gt;
&lt;p&gt;
In their amazing book &amp;quot;The Pragmatic Programmer&amp;quot;, Dave Thomas and Andy Hunt
suggest that you learn one new programming language every year. I'm going to amend
that somewhat—not because there aren't enough languages in the world to keep you on
that pace for the rest of your life—far from it, if that's what you want, go learn
Ruby, F#, Scala, Groovy, Clojure, Icon, Io, Erlang, Haskell and Smalltalk, then come
back to me for the list for 2020—but because languages aren't the only thing that
we as developers need to explore. There's a lot of movement going on in areas beyond
languages, and you don't want to be the last kid on the block to know they're happening.
&lt;/p&gt;
&lt;p&gt;
Consider this list: object databases (&lt;a href="http://www.db4o.com" target="_blank"&gt;db4o&lt;/a&gt;)
and/or the &amp;quot;NoSQL&amp;quot; movement (&lt;a href="http://www.mongodb.org/display/DOCS/Tutorial" target="_blank"&gt;MongoDB&lt;/a&gt;).
Dependency injection and composable architectures (&lt;a href="http://www.springframework.org" target="_blank"&gt;Spring&lt;/a&gt;, &lt;a href="http://mef.codeplex.com" target="_blank"&gt;MEF&lt;/a&gt;).
A dynamic language (&lt;a href="http://www.rubyforge.org" target="_blank"&gt;Ruby&lt;/a&gt;, &lt;a href="http://www.python.org" target="_blank"&gt;Python&lt;/a&gt;, &lt;a href="http://www.ecmascript.org" target="_blank"&gt;ECMAScript&lt;/a&gt;).
A functional language (&lt;a href="http://msdn.microsoft.com/en-us/fsharp/default.aspx" target="_blank"&gt;F#&lt;/a&gt;, &lt;a href="http://www.scala-lang.org" target="_blank"&gt;Scala&lt;/a&gt;, &lt;a href="http://www.haskell.org" target="_blank"&gt;Haskell&lt;/a&gt;).
A Lisp (Common Lisp, &lt;a href="http://clojure.org" target="_blank"&gt;Clojure&lt;/a&gt;, Scheme,
Nu). A mobile platform (iPhone, Android). &amp;quot;Space&amp;quot;-based architecture (&lt;a href="http://www.gigaspaces.com" target="_blank"&gt;Gigaspaces&lt;/a&gt;,
Terracotta). Rich UI platforms (Flash/Flex, Silverlight). Browser enhancements (AJAX,
jQuery, HTML 5) and how they're different from the rich UI platforms. And this is
without adding any of the &amp;quot;obvious&amp;quot; stuff, like Cloud, to the list.
&lt;/p&gt;
&lt;p&gt;
(I'm not convinced Cloud is something worth learning this year, anyway.)
&lt;/p&gt;
&lt;p&gt;
You get through that list, you're operating outside of your comfort zone, and chances
are, your boss' comfort zone, which puts you into the enviable position of being somebody
who can advise him around those technologies. &lt;em&gt;DO NOT TAKE THIS TO MEAN YOU MUST
KNOW THEM DEEPLY.&lt;/em&gt; Just having a passing familiarity with them can be enough. &lt;em&gt;DO
NOT TAKE THIS TO MEAN YOU SHOULD PROPOSE USING THEM ON THE NEXT PROJECT.&lt;/em&gt; In fact,
sometimes the most compelling evidence that you really know where and when they should
be used is when you suggest stealing ideas from the thing, rather than trying to force-fit
the thing onto the project as a whole.
&lt;/p&gt;
&lt;h3&gt;&lt;strong&gt;&lt;em&gt;6: Practice, practice, practice&lt;/em&gt;&lt;/strong&gt;
&lt;/h3&gt;
&lt;p&gt;
Speaking of the concert pianist, somebody once asked him how to get to Carnegie Hall.
HIs answer: &amp;quot;Practice, my boy, practice.&amp;quot;
&lt;/p&gt;
&lt;p&gt;
The same is true here. You're not going to get to be a better developer without practice.
Volunteer some time—even if it's just an hour a week—on an open-source project, or
start one of your own. Heck, it doesn't even have to be an &amp;quot;open source&amp;quot;
project—just create some requirements of your own, solve a problem that a family member
is having, or rewrite the project you're on as an interesting side-project. Do the
Nike thing and &amp;quot;Just do it&amp;quot;. Write some Scala code. Write some F# code.
Once you're past &amp;quot;hello world&amp;quot;, write the Scala code to use db4o as a persistent
storage. Wire it up behind Tapestry. Or write straight servlets in Scala. And so on.
&lt;/p&gt;
&lt;h3&gt;&lt;strong&gt;&lt;em&gt;5: Turn off the TV&lt;/em&gt;&lt;/strong&gt;
&lt;/h3&gt;
&lt;p&gt;
Speaking of marketing slogans, if you're like most Americans, surveys have shown that
you watch about four hours of TV a day, or 28 hours of TV a week. In that same amount
of time (28 hours over 1 week), you could read the entire set of poems by Maya Angelou,
one F. Scott Fitzgerald novel, all poems by T.S.Eliot, 2 plays by Thornton Wilder,
or all 150 Psalms of the Bible. An average reader, reading just one hour a day, can
finish an &amp;quot;average-sized&amp;quot; book (let's assume about the size of a novel)
in a week, which translates to 52 books a year.
&lt;/p&gt;
&lt;p&gt;
Let's assume a technical book is going to take slightly longer, since it's a bit deeper
in concept and requires you to spend some time experimenting and typing in code; let's
assume that reading and going through the exercises of an average technical book will
require 4 weeks (a month) instead of just one week. That's 12 new tools/languages/frameworks/ideas
you'd be learning per year.
&lt;/p&gt;
&lt;p&gt;
All because you stopped watching David Caruso turn to the camera, whip his sunglasses
off and say something stupid. (I guess it's not his fault; &lt;em&gt;CSI:Miami&lt;/em&gt; is a
crap show. The other two are actually not bad, but &lt;em&gt;Miami&lt;/em&gt; just makes me retch.) 
&lt;/p&gt;
&lt;p&gt;
After all, when's the last time that David Caruso or the rest of that show did anything
that was even remotely realistic from a computer perspective? (I always laugh out
loud every time they run a database search against some national database on a completely
non-indexable criteria—like a partial license plate number—and it comes back in seconds.
What the hell database are THEY using? I want it!) Soon as you hear The Who break
into that riff, flip off the TV (or set it to mute) and pick up the book on the nightstand
and boost your career. (And hopefully sink Caruso's.)
&lt;/p&gt;
&lt;p&gt;
Or, if you just can't give up your weekly dose of Caruso, then put the book in the
bathroom. Think about it—how much time do you spend in there a week?
&lt;/p&gt;
&lt;p&gt;
And this gets even better when you get a Kindle or other e-reader that accepts PDFs,
or the book you're interested in is natively supported in the e-readers' format. Now
you have it with you for lunch, waiting at dinner for your food to arrive, or while
you're sitting guard on your 10-year-old so he doesn't sneak out of his room after
his bedtime to play more XBox.
&lt;/p&gt;
&lt;h3&gt;&lt;strong&gt;&lt;em&gt;4: Have a life&lt;/em&gt;&lt;/strong&gt;
&lt;/h3&gt;
&lt;p&gt;
Speaking of XBox, don't slave your life to work. Pursue other things. Scientists have
repeatedly discovered that exercise helps keep the mind in shape, so take a couple
of hours a week (buh-bye, &lt;em&gt;American Idol&lt;/em&gt;) and go get some exercise. Pick up
a new sport you've never played before, or just go work out at the gym. (This year
I'm doing Hopkido and fencing.) Read some nontechnical books. (I recommend anything
by Malcolm Gladwell as a starting point.) Spend time with your family, if you have
one—mine spends at least six or seven hours a week playing &amp;quot;family games&amp;quot;
like &lt;a href="http://www.realitycheckgames.com/Products/127-the-settlers-of-catan.aspx" target="_blank"&gt;Settlers
of Catan&lt;/a&gt;, &lt;a href="http://www.realitycheckgames.com/Products/113-dominion.aspx" target="_blank"&gt;Dominion&lt;/a&gt;, &lt;a href="http://www.realitycheckgames.com/Products/88-to-court-the-king.aspx" target="_blank"&gt;To
Court The King&lt;/a&gt;, &lt;a href="http://www.realitycheckgames.com/Products/98-munchkin.aspx" target="_blank"&gt;Munchkin&lt;/a&gt;,
and other non-traditional games, usually over lunch or dinner. I also belong to an
informal &amp;quot;Game Night club&amp;quot; in Redmond consisting of several Microsoft employees
and their families, as well as outsiders. And so on. Heck, go to a local bar and watch
the game, and you'll meet some really interesting people. And some boring people,
too, but you don't have to talk to them during the next game if you don't want.
&lt;/p&gt;
&lt;p&gt;
This isn't just about maintaining a healthy work-life balance—it's also about having
interests that other people can latch on to, qualities that will make you more &amp;quot;human&amp;quot;
and more interesting as a person, and make you more attractive and &amp;quot;connectable&amp;quot;
and stand out better in their mind when they hear that somebody they know is looking
for a software developer. This will also help you connect better with your users,
because like it or not, they do &lt;em&gt;not&lt;/em&gt; get your puns involving Klingon. (Besides,
the geek stereotype is SO 90's, and it's time we let the world know that.)
&lt;/p&gt;
&lt;p&gt;
Besides, you never know when having some depth in other areas—philosophy, music, art,
physics, sports, whatever—will help you create an analogy that will explain some thorny
computer science concept to a non-technical person and get past a communication roadblock.
&lt;/p&gt;
&lt;h3&gt;&lt;strong&gt;&lt;em&gt;3: Practice on a cadaver&lt;/em&gt;&lt;/strong&gt;
&lt;/h3&gt;
&lt;p&gt;
Long before they scrub up for their first surgery on a human, medical students practice
on dead bodies. It's grisly, it's not something we really want to think about, but
when you're the one going under the general anesthesia, would you rather see the surgeon
flipping through the &amp;quot;How-To&amp;quot; manual, &amp;quot;just to refresh himself&amp;quot;?
&lt;/p&gt;
&lt;p&gt;
Diagnosing and debugging a software system can be a hugely puzzling trial, largely
because there are so many possible &amp;quot;moving parts&amp;quot; that are creating the
problem. Compound that with certain bugs that only appear when multiple users are
interacting at the same time, and you've got a recipe for disaster when a production
bug suddenly threatens to jeopardize the company's online revenue stream. Do you really
want to be sitting in the production center, flipping through &amp;quot;How-To&amp;quot;'s
and FAQs online while your boss looks on and your CEO is counting every minute by
the thousands of dollars?
&lt;/p&gt;
&lt;p&gt;
Take a tip from the med student: long before the thing goes into production, introduce
a bug, deploy the code into a virtual machine, then hand it over to a buddy and let
him try to track it down. Have him do the same for you. Or if you can't find a buddy
to help you, do it to yourself (but try not to cheat or let your knowledge of where
the bug is color your reactions). How do you know the bug is there? Once you know
it's there, how do you determine what kind of bug it is? Where do you start looking
for it? How would you track it down without attaching a debugger or otherwise disrupting
the system's operations? (Remember, we can't always just attach an IDE and step through
the code on a production server.) How do you patch the running system? And so on.
&lt;/p&gt;
&lt;p&gt;
Remember, you can either learn these things under controlled circumstances, learn
them while you're in the &amp;quot;hot seat&amp;quot;, so to speak, or not learn them at all
and see how long the company keeps you around.
&lt;/p&gt;
&lt;h3&gt;&lt;strong&gt;&lt;em&gt;2: Administer the system&lt;/em&gt;&lt;/strong&gt;
&lt;/h3&gt;
&lt;p&gt;
Take off your developer hat for a while—a week, a month, a quarter, whatever—and be
one of those thankless folks who have to keep the system running. Wear the pager that
goes off at 3AM when a server goes down. Stay all night doing one of those &amp;quot;server
upgrades&amp;quot; that have to be done in the middle of the night because the system
can't be upgraded while users are using it. Answer the phones or chat requests of
those hapless users who can't figure out why they can't find the record they just
entered into the system, and after a half-hour of thinking it must be a bug, ask them
if they remembered to check the &amp;quot;Save this record&amp;quot; checkbox on the UI (which
had to be there because the developers were told it had to be there) before submitting
the form. Try adding a user. Try removing a user. Try changing the user's password.
Learn what a real joy having seven different properties/XML/configuration files scattered
all over the system really is.
&lt;/p&gt;
&lt;p&gt;
Once you've done that, particularly on a system that you built and tossed over the
fence into production and thought that was the end of it, you'll understand just why
it's so important to keep the system administrators in mind when you're building a
system for production. And why it's critical to be able to have a system that tells
you when it's down, instead of having to go hunting up the answer when a VP tells
you it is (usually because he's just gotten an outage message from a customer or client).
&lt;/p&gt;
&lt;h3&gt;&lt;strong&gt;&lt;em&gt;1: Cultivate a peer group&lt;/em&gt;&lt;/strong&gt;
&lt;/h3&gt;
&lt;p&gt;
Yes, you can join an online forum, ask questions, answer questions, and learn that
way, but that's a poor substitute for physical human contact once in a while. Like
it or not, various sociological and psychological studies confirm that a &amp;quot;connection&amp;quot;
is really still best made when eyeballs meet flesh. (The &amp;quot;disassociative&amp;quot;
nature of email is what makes it so easy to be rude or flamboyant or downright violent
in email when we would never say such things in person.) Go to conferences, join a
user group, even start one of your own if you can't find one. Yes, the online avenues
are still open to you—read blogs, join mailing lists or newsgroups—but don't lose
sight of human-to-human contact.
&lt;/p&gt;
&lt;p&gt;
While we're at it, don't create a peer group of people that all look to you for answers—as
flattering as that feels, and as much as we do learn by providing answers, frequently
we rise (or fall) to the level of our peers—have at least one peer group that's overwhelmingly
smarter than you, and as scary as it might be, venture to offer an answer or two to
that group when a question comes up. You don't have to be right—in fact, it's often
vastly more educational to be wrong. Just maintain an attitude that says &amp;quot;I have
no ego wrapped up in being right or wrong&amp;quot;, and take the entire experience as
a learning opportunity.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blogs.tedneward.com/aggbug.ashx?id=4b2137dd-11cc-4ad5-8771-5906f2759273" /&gt;
&lt;br /&gt;
&lt;hr /&gt;
Enterprise consulting, mentoring or instruction. Java, C++, .NET or XML services.
1-day or multi-day workshops available. &lt;a href="mailto:ted@tedneward.com"&gt;Contact
me for details&lt;/a&gt;.</description>
      <comments>http://blogs.tedneward.com/CommentView,guid,4b2137dd-11cc-4ad5-8771-5906f2759273.aspx</comments>
      <category>.NET</category>
      <category>C#</category>
      <category>C++</category>
      <category>Conferences</category>
      <category>Development Processes</category>
      <category>F#</category>
      <category>Flash</category>
      <category>Industry</category>
      <category>Java/J2EE</category>
      <category>Languages</category>
      <category>LLVM</category>
      <category>Mac OS</category>
      <category>Parrot</category>
      <category>Python</category>
      <category>Reading</category>
      <category>Ruby</category>
      <category>Scala</category>
      <category>Security</category>
      <category>Social</category>
      <category>Solaris</category>
      <category>Visual Basic</category>
      <category>VMWare</category>
      <category>WCF</category>
      <category>Windows</category>
      <category>XML Services</category>
    </item>
    <item>
      <trackback:ping>http://blogs.tedneward.com/Trackback.aspx?guid=c95a7acd-a467-4c8e-a72a-2b8d3acee495</trackback:ping>
      <pingback:server>http://blogs.tedneward.com/pingback.aspx</pingback:server>
      <pingback:target>http://blogs.tedneward.com/PermaLink,guid,c95a7acd-a467-4c8e-a72a-2b8d3acee495.aspx</pingback:target>
      <dc:creator>Ted Neward</dc:creator>
      <wfw:comment>http://blogs.tedneward.com/CommentView,guid,c95a7acd-a467-4c8e-a72a-2b8d3acee495.aspx</wfw:comment>
      <wfw:commentRss>http://blogs.tedneward.com/SyndicationService.asmx/GetEntryCommentsRss?guid=c95a7acd-a467-4c8e-a72a-2b8d3acee495</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I'm excited to say that TechEd has accepted my pre-conference proposal, <em>Multiparadigmatic
C#</em>, where the abstract reads:
</p>
        <blockquote>
          <p>
C# has grown from “just” an object-oriented language into a language that is capable
of expressing several different paradigms of software development: object-oriented,
functional, and dynamic. In this session, developers will learn how to approach programming
in C# to use each of these approaches, and when.
</p>
        </blockquote>
        <p>
If you're interested in seeing C# used in a variety of different ways, come on out.
</p>
        <p>
And if you're not going to <a href="http://northamerica.msteched.com/?CR_CC=100280254&amp;WT.srch=1&amp;CR_SCC=100280254&amp;fbid=xvt_cg-ExsG" target="_blank">TechEd</a>....
why not? It's in New Orleans, folks!
</p>
        <img width="0" height="0" src="http://blogs.tedneward.com/aggbug.ashx?id=c95a7acd-a467-4c8e-a72a-2b8d3acee495" />
        <br />
        <hr />
Enterprise consulting, mentoring or instruction. Java, C++, .NET or XML services.
1-day or multi-day workshops available. <a href="mailto:ted@tedneward.com">Contact
me for details</a>.</body>
      <title>2010 TechEd PreCon: Multiparadigmatic C#</title>
      <guid isPermaLink="false">http://blogs.tedneward.com/PermaLink,guid,c95a7acd-a467-4c8e-a72a-2b8d3acee495.aspx</guid>
      <link>http://blogs.tedneward.com/2010/01/15/2010+TechEd+PreCon+Multiparadigmatic+C.aspx</link>
      <pubDate>Fri, 15 Jan 2010 07:49:53 GMT</pubDate>
      <description>&lt;p&gt;
I'm excited to say that TechEd has accepted my pre-conference proposal, &lt;em&gt;Multiparadigmatic
C#&lt;/em&gt;, where the abstract reads:
&lt;/p&gt;
&lt;blockquote&gt; 
&lt;p&gt;
C# has grown from “just” an object-oriented language into a language that is capable
of expressing several different paradigms of software development: object-oriented,
functional, and dynamic. In this session, developers will learn how to approach programming
in C# to use each of these approaches, and when.
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
If you're interested in seeing C# used in a variety of different ways, come on out.
&lt;/p&gt;
&lt;p&gt;
And if you're not going to &lt;a href="http://northamerica.msteched.com/?CR_CC=100280254&amp;amp;WT.srch=1&amp;amp;CR_SCC=100280254&amp;amp;fbid=xvt_cg-ExsG" target="_blank"&gt;TechEd&lt;/a&gt;....
why not? It's in New Orleans, folks!
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blogs.tedneward.com/aggbug.ashx?id=c95a7acd-a467-4c8e-a72a-2b8d3acee495" /&gt;
&lt;br /&gt;
&lt;hr /&gt;
Enterprise consulting, mentoring or instruction. Java, C++, .NET or XML services.
1-day or multi-day workshops available. &lt;a href="mailto:ted@tedneward.com"&gt;Contact
me for details&lt;/a&gt;.</description>
      <comments>http://blogs.tedneward.com/CommentView,guid,c95a7acd-a467-4c8e-a72a-2b8d3acee495.aspx</comments>
      <category>.NET</category>
      <category>C#</category>
      <category>C++</category>
      <category>Conferences</category>
      <category>F#</category>
      <category>Industry</category>
      <category>Languages</category>
      <category>Python</category>
      <category>Reading</category>
      <category>Review</category>
      <category>Ruby</category>
      <category>Visual Basic</category>
      <category>WCF</category>
      <category>Windows</category>
      <category>XML Services</category>
    </item>
    <item>
      <trackback:ping>http://blogs.tedneward.com/Trackback.aspx?guid=b60b096c-5148-4a72-9aa4-b2a317990f4b</trackback:ping>
      <pingback:server>http://blogs.tedneward.com/pingback.aspx</pingback:server>
      <pingback:target>http://blogs.tedneward.com/PermaLink,guid,b60b096c-5148-4a72-9aa4-b2a317990f4b.aspx</pingback:target>
      <dc:creator>Ted Neward</dc:creator>
      <wfw:comment>http://blogs.tedneward.com/CommentView,guid,b60b096c-5148-4a72-9aa4-b2a317990f4b.aspx</wfw:comment>
      <wfw:commentRss>http://blogs.tedneward.com/SyndicationService.asmx/GetEntryCommentsRss?guid=b60b096c-5148-4a72-9aa4-b2a317990f4b</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
But too impatient to read a whole book on it? Try the 6-panel <a href="http://refcardz.dzone.com/refcardz/essential-f?oid=ban00021-0" target="_blank">RefCard</a> that <a href="http://leibnizdream.wordpress.com/" target="_blank">Chance
Coble</a> and I put together for <a href="http://refcardz.dzone.com/" target="_blank">DZone</a>.
Free download.
</p>
        <p>
Or, for the more patient type, wait for the books that Chance and I (<a href="http://www.wiley.com/WileyCDA/WileyTitle/productCd-047052801X.html" target="_blank">Professional
F#</a>) are each writing; they're remarkably complementary, at least from what Chance
has told me about his.
</p>
        <p>
Which reminds me.... if you've not already noticed, <a href="http://www.amazon.com/Professional-F-1-0-Ted-Neward/dp/047052801X" target="_blank">Pro
F# is now up in Amazon</a>. Call me a romantic fool, but I get just a little thrill
run down my spine every time a new book of mine shows up on Amazon, and just a slightly
bigger one when it shows up on a shelf (which will happen shortly after VS 2010 hits
the streets). Nothing like that little surge of energy to give you the boost you need
to cross the finish line. :-)
</p>
        <img width="0" height="0" src="http://blogs.tedneward.com/aggbug.ashx?id=b60b096c-5148-4a72-9aa4-b2a317990f4b" />
        <br />
        <hr />
Enterprise consulting, mentoring or instruction. Java, C++, .NET or XML services.
1-day or multi-day workshops available. <a href="mailto:ted@tedneward.com">Contact
me for details</a>.</body>
      <title>Interested in F#?</title>
      <guid isPermaLink="false">http://blogs.tedneward.com/PermaLink,guid,b60b096c-5148-4a72-9aa4-b2a317990f4b.aspx</guid>
      <link>http://blogs.tedneward.com/2010/01/07/Interested+In+F.aspx</link>
      <pubDate>Thu, 07 Jan 2010 23:28:13 GMT</pubDate>
      <description>&lt;p&gt;
But too impatient to read a whole book on it? Try the 6-panel &lt;a href="http://refcardz.dzone.com/refcardz/essential-f?oid=ban00021-0" target="_blank"&gt;RefCard&lt;/a&gt; that &lt;a href="http://leibnizdream.wordpress.com/" target="_blank"&gt;Chance
Coble&lt;/a&gt; and I put together for &lt;a href="http://refcardz.dzone.com/" target="_blank"&gt;DZone&lt;/a&gt;.
Free download.
&lt;/p&gt;
&lt;p&gt;
Or, for the more patient type, wait for the books that Chance and I (&lt;a href="http://www.wiley.com/WileyCDA/WileyTitle/productCd-047052801X.html" target="_blank"&gt;Professional
F#&lt;/a&gt;) are each writing; they're remarkably complementary, at least from what Chance
has told me about his.
&lt;/p&gt;
&lt;p&gt;
Which reminds me.... if you've not already noticed, &lt;a href="http://www.amazon.com/Professional-F-1-0-Ted-Neward/dp/047052801X" target="_blank"&gt;Pro
F# is now up in Amazon&lt;/a&gt;. Call me a romantic fool, but I get just a little thrill
run down my spine every time a new book of mine shows up on Amazon, and just a slightly
bigger one when it shows up on a shelf (which will happen shortly after VS 2010 hits
the streets). Nothing like that little surge of energy to give you the boost you need
to cross the finish line. :-)
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blogs.tedneward.com/aggbug.ashx?id=b60b096c-5148-4a72-9aa4-b2a317990f4b" /&gt;
&lt;br /&gt;
&lt;hr /&gt;
Enterprise consulting, mentoring or instruction. Java, C++, .NET or XML services.
1-day or multi-day workshops available. &lt;a href="mailto:ted@tedneward.com"&gt;Contact
me for details&lt;/a&gt;.</description>
      <comments>http://blogs.tedneward.com/CommentView,guid,b60b096c-5148-4a72-9aa4-b2a317990f4b.aspx</comments>
      <category>.NET</category>
      <category>C#</category>
      <category>F#</category>
      <category>Languages</category>
      <category>Ruby</category>
      <category>Scala</category>
      <category>WCF</category>
      <category>Windows</category>
      <category>XML Services</category>
    </item>
    <item>
      <trackback:ping>http://blogs.tedneward.com/Trackback.aspx?guid=680b8296-ba07-4230-b067-edceaf04e84b</trackback:ping>
      <pingback:server>http://blogs.tedneward.com/pingback.aspx</pingback:server>
      <pingback:target>http://blogs.tedneward.com/PermaLink,guid,680b8296-ba07-4230-b067-edceaf04e84b.aspx</pingback:target>
      <dc:creator>Ted Neward</dc:creator>
      <wfw:comment>http://blogs.tedneward.com/CommentView,guid,680b8296-ba07-4230-b067-edceaf04e84b.aspx</wfw:comment>
      <wfw:commentRss>http://blogs.tedneward.com/SyndicationService.asmx/GetEntryCommentsRss?guid=680b8296-ba07-4230-b067-edceaf04e84b</wfw:commentRss>
      <slash:comments>5</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Here we go again—another year, another set of predictions revisited and offered up
for the next 12 months. And maybe, if I'm feeling really ambitious, I'll take that
shot I thought about last year and try predicting for the decade. Without further
ado, I'll go back and revisit, unedited, my predictions for 2009 ("<strong>THEN</strong>"),
and pontificate on those subjects for 2010 before adding any new material/topics.
Just for convenience, <a href="http://blogs.tedneward.com/2009/01/01/2009+Predictions+2008+Predictions+Revisited.aspx" target="_blank">here's
a link back to last years' predictions</a>.
</p>
        <p>
Last year's predictions went something like this (complete with basketball-scoring):
</p>
        <ul>
          <li>
            <strong>THEN: </strong>"Cloud" will become the next "ESB" or "SOA",
in that it will be something that everybody will talk about, but few will understand
and even fewer will do anything with. (Considering the widespread disparity in the
definition of the term, this seems like a no-brainer.) <strong>NOW:</strong> Oh, yeah.
Straight up. I get two points for this one. Does <em>anyone</em> have a working definition
of "cloud" that applies to all of the major vendors' implementations? <em>Ted,
2; Wrongness, 0</em>.</li>
          <li>
            <strong>THEN: </strong>Interest in Scala will continue to rise, as will the number
of detractors who point out that Scala is too hard to learn. <strong>NOW:</strong> Two
points for this one, too. Not a hard one, mind you, but one of those "pass-and-shoot"
jumpers from twelve feet out. James Strachan even tweeted about this earlier today,
pointing out this comparison. As more Java developers who think of themselves as smart
people try to pick up Scala and fail, the numbers of sour grapes responses like "Scala's
too complex, and who needs that functional stuff anyway?" will continue to rise
in 2010. <em>Ted, 4; Wrongness, 0</em>.</li>
          <li>
            <strong>THEN</strong>: Interest in F# will continue to rise, as will the number of
detractors who point out that F# is too hard to learn. (Hey, the two really are cousins,
and the fortunes of one will serve as a pretty good indication of the fortunes of
the other, and both really seem to be on the same arc right now.) <strong>NOW:</strong> Interestingly
enough, I haven't heard as many F# detractors as Scala detractors, possibly because
I think F# hasn't really reached the masses of .NET developers the way that Scala
has managed to find its way in front of Java developers. I think that'll change mighty
quickly in 2010, though, once VS 2010 hits the streets. <em>Ted, 4; Wrongness 2</em>.</li>
          <li>
            <strong>THEN</strong>
            <em>:</em> Interest in all kinds of functional languages will
continue to rise, and more than one person will take a hint from Bob "crazybob"
Lee and liken functional programming to AOP, for good and for ill. People who took
classes on Haskell in college will find themselves reaching for their old college
textbooks again. <strong>NOW:</strong> Yep, I'm claiming two points on this one, if
only because a bunch of Haskell books shipped this year, and they'll be the last to
do so for about five years after this. (By the way, does anybody still remember aspects?)
But I'm going the opposite way with this one now; yes, there's Haskell, and yes, there's
Erlang, and yes, there's a lot of other functional languages out there, but who cares?
They're hard to learn, they don't always translate well to other languages, and developers
want languages that work on the platform they use on a daily basis, and that means
F# and Scala or Clojure, or its simply not an option. <em>Ted 6; Wrongness 2</em>.</li>
          <li>
            <strong>THEN</strong>
            <em>:</em> The iPhone is going to be hailed as "the enterprise
development platform of the future", and companies will be rolling out apps to
it. Look for Quicken iPhone edition, PowerPoint and/or Keynote iPhone edition, along
with connectors to hook the iPhone up to a presentation device, and (I'll bet) a World
of Warcraft iPhone client (legit or otherwise). iPhone is the new hotness in the mobile
space, and people will flock to it madly. <strong>NOW:</strong> Two more points, but
let's be honest—this was a fast-break layup, no work required on my part. <em>Ted
8; Wrongness 2.</em></li>
          <li>
            <strong>THEN</strong>: Another Oslo CTP will come out, and it will bear only a superficial
resemblance to the one that came out in October at PDC. Betting on Oslo right now
is a fools' bet, not because of any inherent weakness in the technology, but just
because it's way too early in the cycle to be thinking about for anything vaguely
resembling production code. <strong>NOW:</strong> If you've worked at all with Oslo,
you might argue with me, but I'm still taking my two points. The two CTPs were pretty
different in a number of ways. <em>Ted 10; Wrongness 2.</em></li>
          <li>
            <strong>THEN</strong>: The IronPython and IronRuby teams will find some serious versioning
issues as they try to manage the DLR versioning story between themselves and the CLR
as a whole. An initial hack will result, which will be codified into a standard practice
when .NET 4.0 ships. Then the next release of IPy or IRb will have to try and slip
around its restrictions in 2010/2011. By 2012, IPy and IRb will have to be shipping
as part of Visual Studio just to put the releases back into lockstep with one another
(and the rest of the .NET universe). <strong>NOW:</strong> Pressure is still building.
Let's see what happens by the time VS 2010 ships, and then see what the IPy/IRb teams
start to do to adjust to the versioning issues that arise. <em>Ted 8; Wrongness 2.</em></li>
          <li>
            <strong>THEN</strong>: The death of JSR-277 will spark an uprising among the two leading
groups hoping to foist it off on the Java community--OSGi and Maven--while the rest
of the Java world will breathe a huge sigh of relief and look to see what "modularity"
means in Java 7. Some of the alpha geeks in Java will start using--if not building--JDK
7 builds just to get a heads-up on its impact, and be quietly surprised and, I dare
say, perhaps even pleased. <strong>NOW:</strong> Ah, Ted, you really should never
underestimate the community's willingness to take a bad idea, strip all the goodness
out of it, and then cycle it back into the mix as something completely different yet
somehow just as dangerous and crazy. I give you Project Jigsaw. <em>Ted 10; Wrongness
2;</em></li>
          <li>
            <strong>THEN</strong>: The invokedynamic JSR will leapfrog in importance to the top
of the list. <strong>NOW:</strong> The invokedynamic JSR begat interest in other languages
on the JVM. The interest in other languages on the JVM begat the need to start thinking
about how to support them in the Java libraries. The need to start thinking about
supporting those languages begat a "Holy sh*t moment" somewhere inside Sun
and led them to (re-)propose closures for JDK 7. And in local sports news, Ted notched
up two more points on the scoreboard. <em>Ted 12; Wrongness 2.</em></li>
          <li>
            <strong>THEN</strong>: Another Windows 7 CTP will come out, and it will spawn huge
media interest that will eventually be remembered as Microsoft promises, that will
eventually be remembered as Microsoft guarantees, that will eventually be remembered
as Microsoft FUD and "promising much, delivering little". Microsoft ain't
always at fault for the inflated expectations people have--sometimes, yes, perhaps
even a lot of times, but not always. <strong>NOW:</strong> And then, just when the
game started to turn into a runaway, airballs started to fly. The Windows7 release
shipped, and contrary to what I expected, the general response to it was pretty warm.
Yes, there were a few issues that emerged, but overall the media liked it, the masses
liked it, and Microsoft seemed to have dodged a bullet. <em>Ted 12; Wrongness 5.</em></li>
          <li>
            <strong>THEN</strong>: Apple will begin to legally threaten the clone market again,
except this time somebody's going to get the DOJ involved. (Yes, this is the iPhone/iTunes
prediction from last year, carrying over. I still expect this to happen.) <strong>NOW:</strong> What
clones? The only people trying to clone Macs are those who are building Hackintosh
machines, and Apple can't sue them so long as they're using licensed copies of Mac
OS X (as far as I know). Which has never stopped them from trying, mind you, and I
still think Steve has some part of his brain whispering to him at night, calculating
all the hardware sales lost to Hackintosh netbooks out there. But in any event, that's
another shot missed. <em>Ted 12; Wrongness 7.</em></li>
          <li>
            <strong>THEN</strong>: Alpha-geek developers will start creating their own languages
(even if they're obscure or bizarre ones like Shakespeare or Ook#) just to have that
listed on their resume as the DSL/custom language buzz continues to build. <strong>NOW:</strong> I
give you Ioke. If I'd extended this to include outdated CPU interpreters, I'd have
made that three-pointer from half-court instead of just the top of the key. <em>Ted
14; Wrongness 7.</em></li>
          <li>
            <strong>THEN</strong>: Roy Fielding will officially disown most of the "REST"ful
authors and software packages available. Nobody will care--or worse, somebody looking
to make a name for themselves will proclaim that Roy "doesn't really understand
REST". And they'll be right--Roy doesn't understand what <em>they</em> consider
to be REST, and the fact that he created the term will be of no importance anymore.
Being "REST"ful will equate to "I did it myself!", complete with
expectations of a gold star and a lollipop. <strong>NOW:</strong> Does anybody in
the REST community care what Roy Fielding wrote way back when? I keep seeing "REST"ful
systems that seem to have designers who've never heard of Roy, or his thesis. Roy
hasn't officially disowned them, but damn if he doesn't seem close to it. Still....
No points. <em>Ted 14; Wrongness 9.</em></li>
          <li>
            <strong>THEN</strong>: The Parrot guys will make at least one more minor point release.
Nobody will notice or care, except for a few doggedly stubborn Perl hackers. They
will find themselves having nightmares of previous lives carrying around OS/2 books
and Amiga paraphernalia. Perl 6 will celebrate it's seventh... or is it eighth?...
anniversary of being announced, and nobody will notice. <strong>NOW:</strong> Does
anybody still follow Perl 6 development? Has the spec even been written yet? Google
on "Perl 6 release", and you get varying reports: "It'll ship 'when
it's ready'", "There are no such dates because this isn't a commericially-backed
effort", and "Spring 2010". Swish—nothin' but net. <em>Ted 16; Wrongness
9.</em></li>
          <li>
            <strong>THEN</strong>: The debate around "Scrum Certification" will rise
to a fever pitch as short-sighted money-tight companies start looking for reasons
to cut costs and either buy into agile at a superficial level and watch it fail, or
start looking to cut the agilists from their company in order to replace them with
cheaper labor. <strong>NOW:</strong> Agile has become another adjective meaning "best
practices", and as such, has essentially lost its meaning. Just ask Scott Bellware. <em>Ted
18; Wrongness 9.</em></li>
          <li>
            <strong>THEN</strong>: Adobe will continue to make Flex and AIR look more like C#
and the CLR even as Microsoft tries to make Silverlight look more like Flash and AIR.
Web designers will now get to experience the same fun that back-end web developers
have enjoyed for near-on a decade, as shops begin to artificially partition themselves
up as either "Flash" shops or "Silverlight" shops. <strong>NOW:</strong> Not
sure how to score this one—I haven't seen the explicit partitioning happen yet, but
the two environments definitely still seem to be looking to start tromping on each
others' turf, particularly when we look at the rapid releases coming from the Silverlight
team. <em>Ted 16; Wrongness 11.</em></li>
          <li>
            <strong>THEN</strong>: Gartner will still come knocking, looking to hire me for outrageous
sums of money to do nothing but blog and wax prophetic. <strong>NOW:</strong> Still
no job offers. Damn. Ah, well. <em>Ted 16; Wrongness 13.</em></li>
        </ul>
        <p>
A close game. Could've gone either way. *shrug* Ah, well. It was silly to try and
score it in basketball metaphor, anyway—that's the last time I watch ESPN before writing
this.
</p>
        <p>
For 2010, I predict....
</p>
        <ul>
          <li>
            <em>... I will offer 3- and 4-day training classes on F# and Scala, among other things.</em> OK,
that's not fair—yes, I have the materials, I just need to work out locations and times.
Contact me if you're interested in a private class, by the way.</li>
          <li>
            <em>... I will publish two books, one on F# and one on Scala.</em> OK, OK, another
plug. Or, rather, more of a resolution. One will be the "Professional F#"
I'm doing for Wiley/Wrox, the other isn't yet finalized. But it'll either be published
through a publisher, or self-published, by JavaOne 2010.</li>
          <li>
            <em>... DSLs will either "succeed" this year, or begin the short slide into
the dustbin of obscure programming ideas.</em> Domain-specific language advocates
have to put up some kind of strawman for developers to learn from and poke at, or
the whole concept will just fade away. Martin's book will help, if it ships this year,
but even that might not be enough to generate interest if it doesn't have some kind
of large-scale applicability in it. Patterns and refactoring and enterprise containers
all had a huge advantage in that developers could see pretty easily what the problem
was they solved; DSLs haven't made that clear yet.</li>
          <li>
            <em>... functional languages will start to see a backlash.</em> I hate to say it,
but "getting" the functional mindset is hard, and there's precious few resources
that are making it easy for mainstream (read: O-O) developers make that adjustment,
far fewer than there was during the procedural-to-object shift. If the functional
community doesn't want to become mainstream, then mainstream developers will find
ways to take functional's most compelling gateway use-case (parallel/concurrent programming)
and find a way to "git 'er done" in the traditional O-O approach, probably
through software transactional memory, and functional languages like Haskell and Erlang
will be relegated to the "What Might Have Been" of computer science history.
Not sure what I mean? Try this: walk into a functional language forum, and ask what
a monad is. Nobody yet has been able to produce an answer that doesn't involve math
theory, or that does involve a practical domain-object-based example. In fact, nobody
has really said why (or if) monads are even still useful. Or catamorphisms. Or any
of the other dime-store words that the functional community likes to toss around.</li>
          <li>
            <em>... Visual Studio 2010 will ship on time, and be one of the buggiest and/or slowest
releases in its history.</em> I hate to make this prediction, because I really don't
want to be right, but there's just so much happening in the Visual Studio refactoring
effort that it makes me incredibly nervous. Widespread adoption of VS2010 will wait
until SP1 at the earliest. In fact....</li>
          <li>
            <em>... Visual Studio 2010 SP 1 will ship within three months of the final product.</em> Microsoft
knows that people wait until SP 1 to think about upgrading, so they'll just plan for
an eager SP 1 release, and hope that managers will be too hung over from the New Year
(still) to notice that the necessary shakeout time hasn't happened.</li>
          <li>
            <em>... Apple will ship a tablet with multi-touch on it, and it will flop horribly.</em> Not
sure why I think this, but I just don't think the multi-touch paradigm that Apple
has cooked up for the iPhone will carry over to a tablet/laptop device. That won't
stop them from shipping it, and it won't stop Apple fan-boiz from buying it, but that's
about where the interest will end.</li>
          <li>
            <em>... JDK 7 closures will be debated for a few weeks, then become a fait accompli
as the Java community shrugs its collective shoulders.</em> Frankly, I think the Java
community has exhausted its interest in debating new language features for Java. Recent
college grads and open-source groups with an axe to grind will continue to try and
make an issue out of this, but I think the overall Java community just... doesn't...
care. They just want to see JDK 7 ship someday.</li>
          <li>
            <em>... Scala either "pops" in 2010, or begins to fall apart.</em> By "pops",
I mean reaches a critical mass of developers interested in using it, enough to convince
somebody to create a company around it, a la G2One.</li>
          <li>
            <em>... Oracle is going to make a serious "cloud" play, probably by offering
an Oracle-hosted version of Azure or AppEngine.</em> Oracle loves the enterprise space
too much, and derives too much money from it, to not at least appear to have some
kind of offering here. Now that they own Java, they'll marry it up against OpenSolaris,
the Oracle database, and throw the whole thing into a series of server centers all
over the continent, and call it "Oracle 12c" (c for Cloud, of course) or
something.</li>
          <li>
            <em>... Spring development will slow to a crawl and start to take a left turn toward
cloud ideas.</em> VMWare bought SpringSource for a reason, and I believe it's entirely
centered around VMWare's movement into the cloud space—they want to be more than "just"
a virtualization tool. Spring + Groovy makes a compelling development stack, particularly
if VMWare does some interesting hooks-n-hacks to make Spring a virtualization environment
in its own right somehow. But from a practical perspective, any community-driven development
against Spring is all but basically dead. The source may be downloadable later, like
the VMWare Player code is, but making contributions back? Fuhgeddabowdit.</li>
          <li>
            <em>... the explosion of e-book readers brings the Kindle 2009 edition way down to
size.</em> The era of the e-book reader is here, and honestly, while I'm glad I have
a Kindle, I'm expecting that I'll be dusting it off a shelf in a few years. Kinda
like I do with my iPods from a few years ago.</li>
          <li>
            <em>... "social networking" becomes the "Web 2.0" of 2010.</em> In
other words, using the term will basically identify you as a tech wannabe and clearly
out of touch with the bleeding edge.</li>
          <li>
            <em>... Facebook becomes a developer platform requirement.</em> I don't pretend to
know anything about Facebook—I'm not even on it, which amazes my family to no end—but
clearly Facebook is one of those mechanisms by which people reach each other, and
before long, it'll start showing up as a developer requirement for companies looking
to hire. If you're looking to build out your resume to make yourself attractive to
companies in 2010, mad Facebook skillz might not be a bad investment.</li>
          <li>
            <em>... Nintendo releases an open SDK for building games for its next-gen DS-based
device.</em> With the spectacular success of games on the iPhone, Nintendo clearly
must see that they're missing a huge opportunity every day developers can't write
games for the Nintendo DS that are easily downloadable to the device for playing.
Nintendo is not stupid—if they don't open up the SDK and promote "casual"
games like those on the iPhone and those that can now be downloaded to the Zune or
the XBox, they risk being marginalized out of existence.</li>
        </ul>
        <p>
And for the next decade, I predict....
</p>
        <ul>
          <li>
            <em>... colleges and unversities will begin issuing e-book reader devices to students.</em> It's
a helluvalot cheaper than issuing laptops or netbooks, and besides....</li>
          <li>
            <em>... netbooks and e-book readers will merge before the decade is out.</em> Let's
be honest—if the e-book reader could do email and browse the web, you have almost
the perfect paperback-sized mobile device. As for the credit-card sized mobile device....</li>
          <li>
            <em>... mobile phones will all but disappear as they turn into what PDAs tried to
be.</em> "The iPhone makes calls? Really? You mean Voice-over-IP, right? No,
wait, over cell signal? It can <em>do </em>that? Wow, there's really an app for everything,
isn't there?"</li>
          <li>
            <em>... wireless formats will skyrocket in importance all around the office and home.</em> Combine
the iPhone's Bluetooth (or something similar yet lower-power-consuming) with an equally-capable
(Bluetooth or otherwise) projector, and suddenly many executives can leave their netbook
or laptop at home for a business presentation. Throw in the Whispersync-aware e-book
reader/netbook-thing, and now most executives have absolutely zero reason to carry
anything but their e-book/netbook and their phone/PDA. The day somebody figures out
an easy way to combine Bluetooth with PayPal on the iPhone or Android phone, we will
have more or less made pocket change irrelevant. And believe me, that day will happen
before the end of the decade.</li>
          <li>
            <em>... either Android or Windows Mobile will gain some serious market share against
the iPhone the day they figure out how to support an open and unrestricted AppStore-like
app acquisition model.</em> Let's be honest, the attraction of iTunes and AppStore
is that I can see an "Oh, cool!" app on a buddy's iPhone, and have it on
mine less than 30 seconds later. If Android or WinMo can figure out how to offer that
same kind of experience without the draconian AppStore policies to go with it, they'll
start making up lost ground on iPhone in a hurry.</li>
          <li>
            <em>... Apple becomes the DOJ target of the decade.</em> Microsoft was it in the 2000's,
and Apple's stunning rising success is going to put it squarely in the sights of monopolist
accusations before long. Coupled with the unfortunate health distractions that Steve
Jobs has to deal with, Apple's going to get hammered pretty hard by the end of the
decade, but it will have mastered enough market share and mindshare to weather it
as Microsoft has.</li>
          <li>
            <em>... Google becomes the next Microsoft.</em> It won't be anything the founders
do, but Google will do "something evil", and it will be loudly and screechingly
pointed out by all of Google's corporate opponents, and the star will have fallen.</li>
          <li>
... <em>Microsoft finds its way again.</em> Microsoft, as a company, has lost its
way. This is a company that's not used to losing, and like Bill Belichick's Patriots,
they will find ways to adapt and adjust to the changed circumstances of their position
to find a way to win again. What that'll be, I have no idea, but historically, the
last decade notwithstanding, betting against Microsoft has historically been a bad
idea. My gut tells me they'll figure something new to get that mojo back.</li>
          <li>
            <em>... a politician will make himself or herself famous by standing up to the TSA.</em> The
scene will play out like this: during a Congressional hearing on airline security,
after some nut/terrorist tries to blow up another plane through nitroglycerine-soaked
underwear, the TSA director will suggest all passengers should fly naked in order
to preserve safety, the congressman/woman will stare open-mouthed at this suggestion,
proclaim, "Have you no sense of decency, sir?" and immediately get a standing
ovation and never have to worry about re-election again. Folks, if we want to prevent
any chance of loss of life from a terrorist act on an airplane, we have to prevent
passengers from getting on them. Otherwise, just accept that it might happen, do a
reasonable job of preventing it from happening, and let private insurance start offering
flight insurance against the possibility to reassure the paranoid.</li>
        </ul>
        <p>
See you all next year.
</p>
        <img width="0" height="0" src="http://blogs.tedneward.com/aggbug.ashx?id=680b8296-ba07-4230-b067-edceaf04e84b" />
        <br />
        <hr />
Enterprise consulting, mentoring or instruction. Java, C++, .NET or XML services.
1-day or multi-day workshops available. <a href="mailto:ted@tedneward.com">Contact
me for details</a>.</body>
      <title>2010 Predictions, 2009 Predictions Revisited</title>
      <guid isPermaLink="false">http://blogs.tedneward.com/PermaLink,guid,680b8296-ba07-4230-b067-edceaf04e84b.aspx</guid>
      <link>http://blogs.tedneward.com/2010/01/05/2010+Predictions+2009+Predictions+Revisited.aspx</link>
      <pubDate>Tue, 05 Jan 2010 09:45:59 GMT</pubDate>
      <description>&lt;p&gt;
Here we go again—another year, another set of predictions revisited and offered up
for the next 12 months. And maybe, if I'm feeling really ambitious, I'll take that
shot I thought about last year and try predicting for the decade. Without further
ado, I'll go back and revisit, unedited, my predictions for 2009 (&amp;quot;&lt;strong&gt;THEN&lt;/strong&gt;&amp;quot;),
and pontificate on those subjects for 2010 before adding any new material/topics.
Just for convenience, &lt;a href="http://blogs.tedneward.com/2009/01/01/2009+Predictions+2008+Predictions+Revisited.aspx" target="_blank"&gt;here's
a link back to last years' predictions&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
Last year's predictions went something like this (complete with basketball-scoring):
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;THEN: &lt;/strong&gt;&amp;quot;Cloud&amp;quot; will become the next &amp;quot;ESB&amp;quot; or &amp;quot;SOA&amp;quot;,
in that it will be something that everybody will talk about, but few will understand
and even fewer will do anything with. (Considering the widespread disparity in the
definition of the term, this seems like a no-brainer.) &lt;strong&gt;NOW:&lt;/strong&gt; Oh, yeah.
Straight up. I get two points for this one. Does &lt;em&gt;anyone&lt;/em&gt; have a working definition
of &amp;quot;cloud&amp;quot; that applies to all of the major vendors' implementations? &lt;em&gt;Ted,
2; Wrongness, 0&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;THEN: &lt;/strong&gt;Interest in Scala will continue to rise, as will the number
of detractors who point out that Scala is too hard to learn. &lt;strong&gt;NOW:&lt;/strong&gt; Two
points for this one, too. Not a hard one, mind you, but one of those &amp;quot;pass-and-shoot&amp;quot;
jumpers from twelve feet out. James Strachan even tweeted about this earlier today,
pointing out this comparison. As more Java developers who think of themselves as smart
people try to pick up Scala and fail, the numbers of sour grapes responses like &amp;quot;Scala's
too complex, and who needs that functional stuff anyway?&amp;quot; will continue to rise
in 2010. &lt;em&gt;Ted, 4; Wrongness, 0&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;THEN&lt;/strong&gt;: Interest in F# will continue to rise, as will the number of
detractors who point out that F# is too hard to learn. (Hey, the two really are cousins,
and the fortunes of one will serve as a pretty good indication of the fortunes of
the other, and both really seem to be on the same arc right now.) &lt;strong&gt;NOW:&lt;/strong&gt; Interestingly
enough, I haven't heard as many F# detractors as Scala detractors, possibly because
I think F# hasn't really reached the masses of .NET developers the way that Scala
has managed to find its way in front of Java developers. I think that'll change mighty
quickly in 2010, though, once VS 2010 hits the streets. &lt;em&gt;Ted, 4; Wrongness 2&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;THEN&lt;/strong&gt;&lt;em&gt;:&lt;/em&gt; Interest in all kinds of functional languages will
continue to rise, and more than one person will take a hint from Bob &amp;quot;crazybob&amp;quot;
Lee and liken functional programming to AOP, for good and for ill. People who took
classes on Haskell in college will find themselves reaching for their old college
textbooks again. &lt;strong&gt;NOW:&lt;/strong&gt; Yep, I'm claiming two points on this one, if
only because a bunch of Haskell books shipped this year, and they'll be the last to
do so for about five years after this. (By the way, does anybody still remember aspects?)
But I'm going the opposite way with this one now; yes, there's Haskell, and yes, there's
Erlang, and yes, there's a lot of other functional languages out there, but who cares?
They're hard to learn, they don't always translate well to other languages, and developers
want languages that work on the platform they use on a daily basis, and that means
F# and Scala or Clojure, or its simply not an option. &lt;em&gt;Ted 6; Wrongness 2&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;THEN&lt;/strong&gt;&lt;em&gt;:&lt;/em&gt; The iPhone is going to be hailed as &amp;quot;the enterprise
development platform of the future&amp;quot;, and companies will be rolling out apps to
it. Look for Quicken iPhone edition, PowerPoint and/or Keynote iPhone edition, along
with connectors to hook the iPhone up to a presentation device, and (I'll bet) a World
of Warcraft iPhone client (legit or otherwise). iPhone is the new hotness in the mobile
space, and people will flock to it madly. &lt;strong&gt;NOW:&lt;/strong&gt; Two more points, but
let's be honest—this was a fast-break layup, no work required on my part. &lt;em&gt;Ted
8; Wrongness 2.&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;THEN&lt;/strong&gt;: Another Oslo CTP will come out, and it will bear only a superficial
resemblance to the one that came out in October at PDC. Betting on Oslo right now
is a fools' bet, not because of any inherent weakness in the technology, but just
because it's way too early in the cycle to be thinking about for anything vaguely
resembling production code. &lt;strong&gt;NOW:&lt;/strong&gt; If you've worked at all with Oslo,
you might argue with me, but I'm still taking my two points. The two CTPs were pretty
different in a number of ways. &lt;em&gt;Ted 10; Wrongness 2.&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;THEN&lt;/strong&gt;: The IronPython and IronRuby teams will find some serious versioning
issues as they try to manage the DLR versioning story between themselves and the CLR
as a whole. An initial hack will result, which will be codified into a standard practice
when .NET 4.0 ships. Then the next release of IPy or IRb will have to try and slip
around its restrictions in 2010/2011. By 2012, IPy and IRb will have to be shipping
as part of Visual Studio just to put the releases back into lockstep with one another
(and the rest of the .NET universe). &lt;strong&gt;NOW:&lt;/strong&gt; Pressure is still building.
Let's see what happens by the time VS 2010 ships, and then see what the IPy/IRb teams
start to do to adjust to the versioning issues that arise. &lt;em&gt;Ted 8; Wrongness 2.&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;THEN&lt;/strong&gt;: The death of JSR-277 will spark an uprising among the two leading
groups hoping to foist it off on the Java community--OSGi and Maven--while the rest
of the Java world will breathe a huge sigh of relief and look to see what &amp;quot;modularity&amp;quot;
means in Java 7. Some of the alpha geeks in Java will start using--if not building--JDK
7 builds just to get a heads-up on its impact, and be quietly surprised and, I dare
say, perhaps even pleased. &lt;strong&gt;NOW:&lt;/strong&gt; Ah, Ted, you really should never
underestimate the community's willingness to take a bad idea, strip all the goodness
out of it, and then cycle it back into the mix as something completely different yet
somehow just as dangerous and crazy. I give you Project Jigsaw. &lt;em&gt;Ted 10; Wrongness
2;&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;THEN&lt;/strong&gt;: The invokedynamic JSR will leapfrog in importance to the top
of the list. &lt;strong&gt;NOW:&lt;/strong&gt; The invokedynamic JSR begat interest in other languages
on the JVM. The interest in other languages on the JVM begat the need to start thinking
about how to support them in the Java libraries. The need to start thinking about
supporting those languages begat a &amp;quot;Holy sh*t moment&amp;quot; somewhere inside Sun
and led them to (re-)propose closures for JDK 7. And in local sports news, Ted notched
up two more points on the scoreboard. &lt;em&gt;Ted 12; Wrongness 2.&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;THEN&lt;/strong&gt;: Another Windows 7 CTP will come out, and it will spawn huge
media interest that will eventually be remembered as Microsoft promises, that will
eventually be remembered as Microsoft guarantees, that will eventually be remembered
as Microsoft FUD and &amp;quot;promising much, delivering little&amp;quot;. Microsoft ain't
always at fault for the inflated expectations people have--sometimes, yes, perhaps
even a lot of times, but not always. &lt;strong&gt;NOW:&lt;/strong&gt; And then, just when the
game started to turn into a runaway, airballs started to fly. The Windows7 release
shipped, and contrary to what I expected, the general response to it was pretty warm.
Yes, there were a few issues that emerged, but overall the media liked it, the masses
liked it, and Microsoft seemed to have dodged a bullet. &lt;em&gt;Ted 12; Wrongness 5.&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;THEN&lt;/strong&gt;: Apple will begin to legally threaten the clone market again,
except this time somebody's going to get the DOJ involved. (Yes, this is the iPhone/iTunes
prediction from last year, carrying over. I still expect this to happen.) &lt;strong&gt;NOW:&lt;/strong&gt; What
clones? The only people trying to clone Macs are those who are building Hackintosh
machines, and Apple can't sue them so long as they're using licensed copies of Mac
OS X (as far as I know). Which has never stopped them from trying, mind you, and I
still think Steve has some part of his brain whispering to him at night, calculating
all the hardware sales lost to Hackintosh netbooks out there. But in any event, that's
another shot missed. &lt;em&gt;Ted 12; Wrongness 7.&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;THEN&lt;/strong&gt;: Alpha-geek developers will start creating their own languages
(even if they're obscure or bizarre ones like Shakespeare or Ook#) just to have that
listed on their resume as the DSL/custom language buzz continues to build. &lt;strong&gt;NOW:&lt;/strong&gt; I
give you Ioke. If I'd extended this to include outdated CPU interpreters, I'd have
made that three-pointer from half-court instead of just the top of the key. &lt;em&gt;Ted
14; Wrongness 7.&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;THEN&lt;/strong&gt;: Roy Fielding will officially disown most of the &amp;quot;REST&amp;quot;ful
authors and software packages available. Nobody will care--or worse, somebody looking
to make a name for themselves will proclaim that Roy &amp;quot;doesn't really understand
REST&amp;quot;. And they'll be right--Roy doesn't understand what &lt;em&gt;they&lt;/em&gt; consider
to be REST, and the fact that he created the term will be of no importance anymore.
Being &amp;quot;REST&amp;quot;ful will equate to &amp;quot;I did it myself!&amp;quot;, complete with
expectations of a gold star and a lollipop. &lt;strong&gt;NOW:&lt;/strong&gt; Does anybody in
the REST community care what Roy Fielding wrote way back when? I keep seeing &amp;quot;REST&amp;quot;ful
systems that seem to have designers who've never heard of Roy, or his thesis. Roy
hasn't officially disowned them, but damn if he doesn't seem close to it. Still....
No points. &lt;em&gt;Ted 14; Wrongness 9.&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;THEN&lt;/strong&gt;: The Parrot guys will make at least one more minor point release.
Nobody will notice or care, except for a few doggedly stubborn Perl hackers. They
will find themselves having nightmares of previous lives carrying around OS/2 books
and Amiga paraphernalia. Perl 6 will celebrate it's seventh... or is it eighth?...
anniversary of being announced, and nobody will notice. &lt;strong&gt;NOW:&lt;/strong&gt; Does
anybody still follow Perl 6 development? Has the spec even been written yet? Google
on &amp;quot;Perl 6 release&amp;quot;, and you get varying reports: &amp;quot;It'll ship 'when
it's ready'&amp;quot;, &amp;quot;There are no such dates because this isn't a commericially-backed
effort&amp;quot;, and &amp;quot;Spring 2010&amp;quot;. Swish—nothin' but net. &lt;em&gt;Ted 16; Wrongness
9.&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;THEN&lt;/strong&gt;: The debate around &amp;quot;Scrum Certification&amp;quot; will rise
to a fever pitch as short-sighted money-tight companies start looking for reasons
to cut costs and either buy into agile at a superficial level and watch it fail, or
start looking to cut the agilists from their company in order to replace them with
cheaper labor. &lt;strong&gt;NOW:&lt;/strong&gt; Agile has become another adjective meaning &amp;quot;best
practices&amp;quot;, and as such, has essentially lost its meaning. Just ask Scott Bellware. &lt;em&gt;Ted
18; Wrongness 9.&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;THEN&lt;/strong&gt;: Adobe will continue to make Flex and AIR look more like C#
and the CLR even as Microsoft tries to make Silverlight look more like Flash and AIR.
Web designers will now get to experience the same fun that back-end web developers
have enjoyed for near-on a decade, as shops begin to artificially partition themselves
up as either &amp;quot;Flash&amp;quot; shops or &amp;quot;Silverlight&amp;quot; shops. &lt;strong&gt;NOW:&lt;/strong&gt; Not
sure how to score this one—I haven't seen the explicit partitioning happen yet, but
the two environments definitely still seem to be looking to start tromping on each
others' turf, particularly when we look at the rapid releases coming from the Silverlight
team. &lt;em&gt;Ted 16; Wrongness 11.&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;THEN&lt;/strong&gt;: Gartner will still come knocking, looking to hire me for outrageous
sums of money to do nothing but blog and wax prophetic. &lt;strong&gt;NOW:&lt;/strong&gt; Still
no job offers. Damn. Ah, well. &lt;em&gt;Ted 16; Wrongness 13.&lt;/em&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
A close game. Could've gone either way. *shrug* Ah, well. It was silly to try and
score it in basketball metaphor, anyway—that's the last time I watch ESPN before writing
this.
&lt;/p&gt;
&lt;p&gt;
For 2010, I predict....
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;... I will offer 3- and 4-day training classes on F# and Scala, among other things.&lt;/em&gt; OK,
that's not fair—yes, I have the materials, I just need to work out locations and times.
Contact me if you're interested in a private class, by the way.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;... I will publish two books, one on F# and one on Scala.&lt;/em&gt; OK, OK, another
plug. Or, rather, more of a resolution. One will be the &amp;quot;Professional F#&amp;quot;
I'm doing for Wiley/Wrox, the other isn't yet finalized. But it'll either be published
through a publisher, or self-published, by JavaOne 2010.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;... DSLs will either &amp;quot;succeed&amp;quot; this year, or begin the short slide into
the dustbin of obscure programming ideas.&lt;/em&gt; Domain-specific language advocates
have to put up some kind of strawman for developers to learn from and poke at, or
the whole concept will just fade away. Martin's book will help, if it ships this year,
but even that might not be enough to generate interest if it doesn't have some kind
of large-scale applicability in it. Patterns and refactoring and enterprise containers
all had a huge advantage in that developers could see pretty easily what the problem
was they solved; DSLs haven't made that clear yet.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;... functional languages will start to see a backlash.&lt;/em&gt; I hate to say it,
but &amp;quot;getting&amp;quot; the functional mindset is hard, and there's precious few resources
that are making it easy for mainstream (read: O-O) developers make that adjustment,
far fewer than there was during the procedural-to-object shift. If the functional
community doesn't want to become mainstream, then mainstream developers will find
ways to take functional's most compelling gateway use-case (parallel/concurrent programming)
and find a way to &amp;quot;git 'er done&amp;quot; in the traditional O-O approach, probably
through software transactional memory, and functional languages like Haskell and Erlang
will be relegated to the &amp;quot;What Might Have Been&amp;quot; of computer science history.
Not sure what I mean? Try this: walk into a functional language forum, and ask what
a monad is. Nobody yet has been able to produce an answer that doesn't involve math
theory, or that does involve a practical domain-object-based example. In fact, nobody
has really said why (or if) monads are even still useful. Or catamorphisms. Or any
of the other dime-store words that the functional community likes to toss around.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;... Visual Studio 2010 will ship on time, and be one of the buggiest and/or slowest
releases in its history.&lt;/em&gt; I hate to make this prediction, because I really don't
want to be right, but there's just so much happening in the Visual Studio refactoring
effort that it makes me incredibly nervous. Widespread adoption of VS2010 will wait
until SP1 at the earliest. In fact....&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;... Visual Studio 2010 SP 1 will ship within three months of the final product.&lt;/em&gt; Microsoft
knows that people wait until SP 1 to think about upgrading, so they'll just plan for
an eager SP 1 release, and hope that managers will be too hung over from the New Year
(still) to notice that the necessary shakeout time hasn't happened.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;... Apple will ship a tablet with multi-touch on it, and it will flop horribly.&lt;/em&gt; Not
sure why I think this, but I just don't think the multi-touch paradigm that Apple
has cooked up for the iPhone will carry over to a tablet/laptop device. That won't
stop them from shipping it, and it won't stop Apple fan-boiz from buying it, but that's
about where the interest will end.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;... JDK 7 closures will be debated for a few weeks, then become a fait accompli
as the Java community shrugs its collective shoulders.&lt;/em&gt; Frankly, I think the Java
community has exhausted its interest in debating new language features for Java. Recent
college grads and open-source groups with an axe to grind will continue to try and
make an issue out of this, but I think the overall Java community just... doesn't...
care. They just want to see JDK 7 ship someday.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;... Scala either &amp;quot;pops&amp;quot; in 2010, or begins to fall apart.&lt;/em&gt; By &amp;quot;pops&amp;quot;,
I mean reaches a critical mass of developers interested in using it, enough to convince
somebody to create a company around it, a la G2One.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;... Oracle is going to make a serious &amp;quot;cloud&amp;quot; play, probably by offering
an Oracle-hosted version of Azure or AppEngine.&lt;/em&gt; Oracle loves the enterprise space
too much, and derives too much money from it, to not at least appear to have some
kind of offering here. Now that they own Java, they'll marry it up against OpenSolaris,
the Oracle database, and throw the whole thing into a series of server centers all
over the continent, and call it &amp;quot;Oracle 12c&amp;quot; (c for Cloud, of course) or
something.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;... Spring development will slow to a crawl and start to take a left turn toward
cloud ideas.&lt;/em&gt; VMWare bought SpringSource for a reason, and I believe it's entirely
centered around VMWare's movement into the cloud space—they want to be more than &amp;quot;just&amp;quot;
a virtualization tool. Spring + Groovy makes a compelling development stack, particularly
if VMWare does some interesting hooks-n-hacks to make Spring a virtualization environment
in its own right somehow. But from a practical perspective, any community-driven development
against Spring is all but basically dead. The source may be downloadable later, like
the VMWare Player code is, but making contributions back? Fuhgeddabowdit.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;... the explosion of e-book readers brings the Kindle 2009 edition way down to
size.&lt;/em&gt; The era of the e-book reader is here, and honestly, while I'm glad I have
a Kindle, I'm expecting that I'll be dusting it off a shelf in a few years. Kinda
like I do with my iPods from a few years ago.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;... &amp;quot;social networking&amp;quot; becomes the &amp;quot;Web 2.0&amp;quot; of 2010.&lt;/em&gt; In
other words, using the term will basically identify you as a tech wannabe and clearly
out of touch with the bleeding edge.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;... Facebook becomes a developer platform requirement.&lt;/em&gt; I don't pretend to
know anything about Facebook—I'm not even on it, which amazes my family to no end—but
clearly Facebook is one of those mechanisms by which people reach each other, and
before long, it'll start showing up as a developer requirement for companies looking
to hire. If you're looking to build out your resume to make yourself attractive to
companies in 2010, mad Facebook skillz might not be a bad investment.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;... Nintendo releases an open SDK for building games for its next-gen DS-based
device.&lt;/em&gt; With the spectacular success of games on the iPhone, Nintendo clearly
must see that they're missing a huge opportunity every day developers can't write
games for the Nintendo DS that are easily downloadable to the device for playing.
Nintendo is not stupid—if they don't open up the SDK and promote &amp;quot;casual&amp;quot;
games like those on the iPhone and those that can now be downloaded to the Zune or
the XBox, they risk being marginalized out of existence.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
And for the next decade, I predict....
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;... colleges and unversities will begin issuing e-book reader devices to students.&lt;/em&gt; It's
a helluvalot cheaper than issuing laptops or netbooks, and besides....&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;... netbooks and e-book readers will merge before the decade is out.&lt;/em&gt; Let's
be honest—if the e-book reader could do email and browse the web, you have almost
the perfect paperback-sized mobile device. As for the credit-card sized mobile device....&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;... mobile phones will all but disappear as they turn into what PDAs tried to
be.&lt;/em&gt; &amp;quot;The iPhone makes calls? Really? You mean Voice-over-IP, right? No,
wait, over cell signal? It can &lt;em&gt;do &lt;/em&gt;that? Wow, there's really an app for everything,
isn't there?&amp;quot;&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;... wireless formats will skyrocket in importance all around the office and home.&lt;/em&gt; Combine
the iPhone's Bluetooth (or something similar yet lower-power-consuming) with an equally-capable
(Bluetooth or otherwise) projector, and suddenly many executives can leave their netbook
or laptop at home for a business presentation. Throw in the Whispersync-aware e-book
reader/netbook-thing, and now most executives have absolutely zero reason to carry
anything but their e-book/netbook and their phone/PDA. The day somebody figures out
an easy way to combine Bluetooth with PayPal on the iPhone or Android phone, we will
have more or less made pocket change irrelevant. And believe me, that day will happen
before the end of the decade.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;... either Android or Windows Mobile will gain some serious market share against
the iPhone the day they figure out how to support an open and unrestricted AppStore-like
app acquisition model.&lt;/em&gt; Let's be honest, the attraction of iTunes and AppStore
is that I can see an &amp;quot;Oh, cool!&amp;quot; app on a buddy's iPhone, and have it on
mine less than 30 seconds later. If Android or WinMo can figure out how to offer that
same kind of experience without the draconian AppStore policies to go with it, they'll
start making up lost ground on iPhone in a hurry.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;... Apple becomes the DOJ target of the decade.&lt;/em&gt; Microsoft was it in the 2000's,
and Apple's stunning rising success is going to put it squarely in the sights of monopolist
accusations before long. Coupled with the unfortunate health distractions that Steve
Jobs has to deal with, Apple's going to get hammered pretty hard by the end of the
decade, but it will have mastered enough market share and mindshare to weather it
as Microsoft has.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;... Google becomes the next Microsoft.&lt;/em&gt; It won't be anything the founders
do, but Google will do &amp;quot;something evil&amp;quot;, and it will be loudly and screechingly
pointed out by all of Google's corporate opponents, and the star will have fallen.&lt;/li&gt;
&lt;li&gt;
... &lt;em&gt;Microsoft finds its way again.&lt;/em&gt; Microsoft, as a company, has lost its
way. This is a company that's not used to losing, and like Bill Belichick's Patriots,
they will find ways to adapt and adjust to the changed circumstances of their position
to find a way to win again. What that'll be, I have no idea, but historically, the
last decade notwithstanding, betting against Microsoft has historically been a bad
idea. My gut tells me they'll figure something new to get that mojo back.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;... a politician will make himself or herself famous by standing up to the TSA.&lt;/em&gt; The
scene will play out like this: during a Congressional hearing on airline security,
after some nut/terrorist tries to blow up another plane through nitroglycerine-soaked
underwear, the TSA director will suggest all passengers should fly naked in order
to preserve safety, the congressman/woman will stare open-mouthed at this suggestion,
proclaim, &amp;quot;Have you no sense of decency, sir?&amp;quot; and immediately get a standing
ovation and never have to worry about re-election again. Folks, if we want to prevent
any chance of loss of life from a terrorist act on an airplane, we have to prevent
passengers from getting on them. Otherwise, just accept that it might happen, do a
reasonable job of preventing it from happening, and let private insurance start offering
flight insurance against the possibility to reassure the paranoid.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
See you all next year.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blogs.tedneward.com/aggbug.ashx?id=680b8296-ba07-4230-b067-edceaf04e84b" /&gt;
&lt;br /&gt;
&lt;hr /&gt;
Enterprise consulting, mentoring or instruction. Java, C++, .NET or XML services.
1-day or multi-day workshops available. &lt;a href="mailto:ted@tedneward.com"&gt;Contact
me for details&lt;/a&gt;.</description>
      <comments>http://blogs.tedneward.com/CommentView,guid,680b8296-ba07-4230-b067-edceaf04e84b.aspx</comments>
      <category>.NET</category>
      <category>C#</category>
      <category>C++</category>
      <category>Conferences</category>
      <category>Development Processes</category>
      <category>F#</category>
      <category>Flash</category>
      <category>Industry</category>
      <category>Java/J2EE</category>
      <category>Languages</category>
      <category>LLVM</category>
      <category>Mac OS</category>
      <category>Parrot</category>
      <category>Python</category>
      <category>Reading</category>
      <category>Review</category>
      <category>Ruby</category>
      <category>Scala</category>
      <category>Security</category>
      <category>Social</category>
      <category>Solaris</category>
      <category>Visual Basic</category>
      <category>VMWare</category>
      <category>WCF</category>
      <category>Windows</category>
      <category>XML Services</category>
    </item>
    <item>
      <trackback:ping>http://blogs.tedneward.com/Trackback.aspx?guid=bc8ecefa-a434-4688-875c-3da855b8b28c</trackback:ping>
      <pingback:server>http://blogs.tedneward.com/pingback.aspx</pingback:server>
      <pingback:target>http://blogs.tedneward.com/PermaLink,guid,bc8ecefa-a434-4688-875c-3da855b8b28c.aspx</pingback:target>
      <dc:creator>Ted Neward</dc:creator>
      <wfw:comment>http://blogs.tedneward.com/CommentView,guid,bc8ecefa-a434-4688-875c-3da855b8b28c.aspx</wfw:comment>
      <wfw:commentRss>http://blogs.tedneward.com/SyndicationService.asmx/GetEntryCommentsRss?guid=bc8ecefa-a434-4688-875c-3da855b8b28c</wfw:commentRss>
      <slash:comments>4</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Why study new and different programming languages? To change your programming mindset.
Not sure what I mean by that? Check this out.
</p>
        <p>
Ever done one of these?
</p>
        <div style="border-bottom: silver 1px solid; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'Courier New', courier, monospace; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
          <div style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum1"> 1:</span>
              <span style="color: #0000ff">public</span>
              <span style="color: #0000ff">interface</span> IService</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum2"> 2:</span> {</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum3"> 3:</span> DateTime
GetDate();</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum4"> 4:</span>
              <span style="color: #0000ff">int</span> CalculateSomethingInteresting(<span style="color: #0000ff">int</span> lhs, <span style="color: #0000ff">int</span> rhs);</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum5"> 5:</span> }</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum6"> 6:</span>  </pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum7"> 7:</span>
              <span style="color: #0000ff">public</span>
              <span style="color: #0000ff">class</span> OneServiceImpl
: IService</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum8"> 8:</span> {</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum9"> 9:</span>
              <span style="color: #0000ff">public</span> DateTime
GetDate()</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum10"> 10:</span> { <span style="color: #0000ff">return</span> DateTime.Now;
}</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum11"> 11:</span>
              <span style="color: #0000ff">public</span>
              <span style="color: #0000ff">int</span> CalculateSomethingInteresting(<span style="color: #0000ff">int</span> lhs, <span style="color: #0000ff">int</span> rhs)</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum12"> 12:</span> { <span style="color: #0000ff">return</span> lhs
+ rhs; }</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum13"> 13:</span> }</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum14"> 14:</span>  </pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum15"> 15:</span>
              <span style="color: #0000ff">public</span>
              <span style="color: #0000ff">class</span> AnotherServiceImpl
: IService</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum16"> 16:</span> {</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum17"> 17:</span>
              <span style="color: #0000ff">public</span> DateTime
GetDate()</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum18"> 18:</span> { <span style="color: #0000ff">return</span><span style="color: #0000ff">new</span> DateTime();
}</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum19"> 19:</span>
              <span style="color: #0000ff">public</span>
              <span style="color: #0000ff">int</span> CalculateSomethingInteresting(<span style="color: #0000ff">int</span> lhs, <span style="color: #0000ff">int</span> rhs)</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum20"> 20:</span> { <span style="color: #0000ff">return</span> lhs
* rhs; }</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum21"> 21:</span> }</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum22"> 22:</span>  </pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum23"> 23:</span>
              <span style="color: #0000ff">public</span>
              <span style="color: #0000ff">class</span> ServiceFactory</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum24"> 24:</span> {</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum25"> 25:</span>
              <span style="color: #0000ff">public</span>
              <span style="color: #0000ff">static</span> IService
GetInstance(<span style="color: #0000ff">string</span> which)</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum26"> 26:</span> {</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum27"> 27:</span>
              <span style="color: #0000ff">if</span> (which
== <span style="color: #006080">"One"</span>) <span style="color: #0000ff">return</span><span style="color: #0000ff">new</span> OneServiceImpl();</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum28"> 28:</span>
              <span style="color: #0000ff">else</span>
              <span style="color: #0000ff">if</span> (which
== <span style="color: #006080">"Another"</span>) <span style="color: #0000ff">return</span><span style="color: #0000ff">new</span> AnotherServiceImpl();</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum29"> 29:</span>
              <span style="color: #0000ff">else</span>
              <span style="color: #0000ff">throw</span>
              <span style="color: #0000ff">new</span> ArgumentException();</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum30"> 30:</span> }</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum31"> 31:</span> }</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum32"> 32:</span>  </pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum33"> 33:</span>
              <span style="color: #0000ff">public</span>
              <span style="color: #0000ff">class</span> App</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum34"> 34:</span> {</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum35"> 35:</span>
              <span style="color: #0000ff">public</span>
              <span style="color: #0000ff">static</span>
              <span style="color: #0000ff">void</span> Main(<span style="color: #0000ff">string</span>[]
args)</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum36"> 36:</span> {</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum37"> 37:</span>
              <span style="color: #0000ff">foreach</span> (<span style="color: #0000ff">string</span> s <span style="color: #0000ff">in</span> args)</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum38"> 38:</span> {</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum39"> 39:</span> IService
serv = ServiceFactory.GetInstance(s);</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum40"> 40:</span> Console.WriteLine(<span style="color: #006080">"serv
calc = {0}"</span>, serv.CalculateSomethingInteresting(3, 3));</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum41"> 41:</span> }</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum42"> 42:</span> }</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum43"> 43:</span> }</pre>
            <!--CRLF-->
          </div>
        </div>
        <p>
So has my client this week. In fact, it's fair to say that they're infatuated with
them—they've got services all over the place, including at their communication layer,
where they use configuration files to decide which of the two service implementations
to use, either a "native" .NET implementation or the "real" Web
services implementation that they're supposed to be using. (They end up going back
to the native implementation because sometimes—which is to say, apparently a lot of
times—the Web services implementation is broken in some fundamental way. Go figure.)
</p>
        <p>
The problem is, very bluntly, that the interfaces they're defining (the IService definition
above) are ever-so-slightly different from the communications-based proxy interfaces
that they use to communicate outside of this process, so some poor schmuck ends up
having to write the service implementation (OneServiceImpl) that simply takes the
parameters passed in, translates them into a call through the communications-based
interface, then takes the response and hands it back. Tedious, mind-numbing coding,
particularly painful when there are dozens of interfaces with (in some cases) hundreds
of methods per interface. Ouch.
</p>
        <p>
There <em>had</em> to be a better way.
</p>
        <p>
Based on some of the work/research/play I've been doing with both dynamic and functional
programming languages, it occurred to me that what they really wanted was some kind
of "forwarding" or "delegating" behavior that certain languages
have baked in as a feature. In those languages, it's possible to nominate a "delegate"
object to which method calls are automatically forwarded if no such method is implemented
on this object; in this particular case, what I'd do to replace all of the above is
simply create an IService object instance that has either a OneServiceImpl or a AnotherServiceImpl
instance (depending on the value in the configuration file) set up as the "delegate"
object. That way the method calls remain statically type-checked, but none of this
service interface/service implementation/service factory nonsense has to be created
just to switch between the two.
</p>
        <p>
(By the way, all of this pain goes away completely in a language that supports deferred
checking of signatures until runtime. In other words, if the client had been programming
in IronPython or IronRuby or even Visual Basic, we could get away with not having
to do any of the above, and just use Reflection to access the appropriate method on
whichever of the two service implementations they want to use at the time. <a href="http://www.fantom.org" target="_blank">Fan</a> would
let us do it if we used "-&gt;" instead of "." to invoke the method; <a href="http://cobra-language.com/" target="_blank">Cobra</a> would
switch between the two automatically; and so on.)
</p>
        <p>
Now, this is C# 2.0 that they're using, and they're pretty entrenched on that point,
so I can't simply suggest that they use a new language, but if we take the basic idea
and adapt it to C#, we can get pretty much the same behavior without having to force
the poor schmuck on the bottom of the totem pole to write all those service implementations
by hand.
</p>
        <p>
We start by transforming the IService interface into an IService "interface"
(meaning it's not really an interface anymore, but it'll sure look like one to anybody
who's not paying attention):
</p>
        <div style="border-bottom: silver 1px solid; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'Courier New', courier, monospace; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
          <div style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum1"> 1:</span>
              <span style="color: #0000ff">public</span>
              <span style="color: #0000ff">class</span> IService</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum2"> 2:</span> {</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum3"> 3:</span>
              <span style="color: #0000ff">public</span> Func0&lt;DateTime&gt;
GetDate;</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum4"> 4:</span>
              <span style="color: #0000ff">public</span> Func2&lt;<span style="color: #0000ff">int</span>, <span style="color: #0000ff">int</span>, <span style="color: #0000ff">int</span>&gt;
CalculateSomethingInteresting;</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum5"> 5:</span> }</pre>
            <!--CRLF-->
          </div>
        </div>
        <p>
IService is now a class with fields (not properties, though I suppose if you really
wanted them to be properties you could make them such, not that I see much value to
doing so), where each field corresponds in name to the method of the interface it
wants to replace, and the type is a delegate type parameterized to match the return
type and parameter types of that same method of the original interface. Func0 and
Func2 are delegate types I had to create, since nothing like them existed until C#
3.0; their definitions are pretty simple:
</p>
        <div style="border-bottom: silver 1px solid; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'Courier New', courier, monospace; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
          <div style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum1"> 1:</span>
              <span style="color: #0000ff">public</span>
              <span style="color: #0000ff">delegate</span> R
Func0&lt;R&gt;();</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum2"> 2:</span>
              <span style="color: #0000ff">public</span>
              <span style="color: #0000ff">delegate</span> R
Func1&lt;R, P1&gt;(P1 p1);</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum3"> 3:</span>
              <span style="color: #0000ff">public</span>
              <span style="color: #0000ff">delegate</span> R
Func2&lt;R, P1, P2&gt;(P1 p1, P2 p2);</pre>
            <!--CRLF-->
          </div>
        </div>
        <p>
Now, assuming we have the implementation classes from before, we have two choices;
one is to write a by-hand factory that fills out the fields to point to the appropriate
method on the implementation class, like so:
</p>
        <div style="border-bottom: silver 1px solid; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'Courier New', courier, monospace; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
          <div style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum1"> 1:</span>
              <span style="color: #0000ff">if</span> (which
== <span style="color: #006080">"One"</span>)</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum2"> 2:</span> {</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum3"> 3:</span> servInstance.GetDate
= <span style="color: #0000ff">delegate</span>() { <span style="color: #0000ff">return</span> DateTime.Now;
};</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum4"> 4:</span> servInstance.CalculateSomethingInteresting
= <span style="color: #0000ff">delegate</span> (<span style="color: #0000ff">int</span> lhs, <span style="color: #0000ff">int</span> rhs)
{ <span style="color: #0000ff">return</span> lhs + rhs; };</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum5"> 5:</span> }</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum6"> 6:</span>
              <span style="color: #0000ff">else</span>
              <span style="color: #0000ff">if</span> (which
== <span style="color: #006080">"Another"</span>)</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum7"> 7:</span> {</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum8"> 8:</span> servInstance.GetDate
= <span style="color: #0000ff">delegate</span>() { <span style="color: #0000ff">return</span><span style="color: #0000ff">new</span> DateTime();
};</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum9"> 9:</span> servInstance.CalculateSomethingInteresting
= <span style="color: #0000ff">delegate</span> (<span style="color: #0000ff">int</span> lhs, <span style="color: #0000ff">int</span> rhs)
{ <span style="color: #0000ff">return</span> lhs * rhs; };</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum10"> 10:</span> }</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum11"> 11:</span>
              <span style="color: #0000ff">else</span>
            </pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum12"> 12:</span>
              <span style="color: #0000ff">throw</span>
              <span style="color: #0000ff">new</span> ArgumentException();</pre>
            <!--CRLF-->
          </div>
        </div>
        <p>
But, quite frankly, this defeats the point—the point was to <em>avoid</em> writing
all this stuff by hand, not simply repeat it in a different form. So instead, we leverage
Reflection, which depends on the basic assumption that the field name in the IService
"interface" matches the method name on the implementation class we wish
to invoke. Assuming that holds (which it does, in my client's case, anyway), we can
reflect on the IService field, find the matching method name in the implementation,
then construct a delegate instance around that method and assign the delegate instance
to the field. Once complete, we hand back the completed service instance, and the
client literally doesn't know that anything's different:
</p>
        <div style="border-bottom: silver 1px solid; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'Courier New', courier, monospace; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
          <div style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum1"> 1:</span>
              <span style="color: #0000ff">public</span>
              <span style="color: #0000ff">class</span> ServiceFactory</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum2"> 2:</span> {</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum3"> 3:</span>
              <span style="color: #0000ff">public</span>
              <span style="color: #0000ff">static</span> IService
GetInstance(<span style="color: #0000ff">string</span> which)</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum4"> 4:</span> {</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum5"> 5:</span> IService
servInstance = <span style="color: #0000ff">new</span> IService();</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum6"> 6:</span>  </pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum7"> 7:</span> Type
targetType = Assembly.GetExecutingAssembly().GetType(which + <span style="color: #006080">"ServiceImpl"</span>);</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum8"> 8:</span>  </pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum9"> 9:</span>
              <span style="color: #0000ff">foreach</span> (FieldInfo
fi <span style="color: #0000ff">in</span> servInstance.GetType().GetFields())</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum10"> 10:</span> {</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum11"> 11:</span> MethodInfo
targetMethod = targetType.GetMethod(fi.Name);</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum12"> 12:</span>
              <span style="color: #008000">//Console.WriteLine("Wiring
up {0} against {1} with {2}", fi.Name, targetType, targetMethod);</span>
            </pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum13"> 13:</span> Delegate
d = Delegate.CreateDelegate(fi.FieldType, <span style="color: #0000ff">null</span>,
targetMethod);</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum14"> 14:</span>
              <span style="color: #008000">//Console.WriteLine(d);</span>
            </pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum15"> 15:</span> fi.SetValue(servInstance,
d);</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum16"> 16:</span> }</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum17"> 17:</span>  </pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum18"> 18:</span>
              <span style="color: #0000ff">return</span> servInstance;</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum19"> 19:</span> }</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum20"> 20:</span> }</pre>
            <!--CRLF-->
          </div>
        </div>
        <p>
Remember, the client code still looks the same...
</p>
        <div style="border-bottom: silver 1px solid; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'Courier New', courier, monospace; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
          <div style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum1"> 1:</span>
              <span style="color: #0000ff">public</span>
              <span style="color: #0000ff">class</span> App</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum2"> 2:</span> {</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum3"> 3:</span>
              <span style="color: #0000ff">public</span>
              <span style="color: #0000ff">static</span>
              <span style="color: #0000ff">void</span> Main(<span style="color: #0000ff">string</span>[]
args)</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum4"> 4:</span> {</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum5"> 5:</span>
              <span style="color: #0000ff">foreach</span> (<span style="color: #0000ff">string</span> s <span style="color: #0000ff">in</span> args)</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum6"> 6:</span> {</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum7"> 7:</span> IService
serv = ServiceFactory.GetInstance(s);</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum8"> 8:</span> Console.WriteLine(<span style="color: #006080">"serv
calc = {0}"</span>, serv.CalculateSomethingInteresting(3, 3));</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum9"> 9:</span> }</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum10"> 10:</span> }</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #606060" id="lnum11"> 11:</span> }</pre>
            <!--CRLF-->
          </div>
        </div>
        <p>
... because what the client doesn't know is that he's accessing a field, then invoking
the delegate that's being returned from that field dereference.
</p>
        <p>
What this permits, aside from the automated wiring up of the IService "interface",
is a greater degree of flexibility—rather than having to choose which implementation
to use on an interface-by-interface basis, we can now configure to use different implementations
on a method-by-method basis. But considering how many interfaces and implementations
my client was looking at having to write by hand, the real win is in the automated
ServiceFactory wiring.
</p>
        <p>
By the way, the only reason we can get away with this sleight-of-hand is because delegates
are deliberately designed to act like method calls; no explicit .Invoke() call is
required, it's implied with the () after the delegate instance's name. If Java7 closures
and/or method handles end up with support for that kind of syntax, then we can do
the same thing in Java7 (more or less).
</p>
        <p>
Make sense?
</p>
        <img width="0" height="0" src="http://blogs.tedneward.com/aggbug.ashx?id=bc8ecefa-a434-4688-875c-3da855b8b28c" />
        <br />
        <hr />
Enterprise consulting, mentoring or instruction. Java, C++, .NET or XML services.
1-day or multi-day workshops available. <a href="mailto:ted@tedneward.com">Contact
me for details</a>.</body>
      <title>A New Kind of Service</title>
      <guid isPermaLink="false">http://blogs.tedneward.com/PermaLink,guid,bc8ecefa-a434-4688-875c-3da855b8b28c.aspx</guid>
      <link>http://blogs.tedneward.com/2009/12/08/A+New+Kind+Of+Service.aspx</link>
      <pubDate>Tue, 08 Dec 2009 19:25:18 GMT</pubDate>
      <description>&lt;p&gt;
Why study new and different programming languages? To change your programming mindset.
Not sure what I mean by that? Check this out.
&lt;/p&gt;
&lt;p&gt;
Ever done one of these?
&lt;/p&gt;
&lt;div style="border-bottom: silver 1px solid; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
&lt;div style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt; 1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;interface&lt;/span&gt; IService&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt; 2:&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum3"&gt; 3:&lt;/span&gt; DateTime
GetDate();&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum4"&gt; 4:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;int&lt;/span&gt; CalculateSomethingInteresting(&lt;span style="color: #0000ff"&gt;int&lt;/span&gt; lhs, &lt;span style="color: #0000ff"&gt;int&lt;/span&gt; rhs);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum5"&gt; 5:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; 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; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum7"&gt; 7:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; OneServiceImpl
: IService&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum8"&gt; 8:&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum9"&gt; 9:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; DateTime
GetDate()&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum10"&gt; 10:&lt;/span&gt; { &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; DateTime.Now;
}&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum11"&gt; 11:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;int&lt;/span&gt; CalculateSomethingInteresting(&lt;span style="color: #0000ff"&gt;int&lt;/span&gt; lhs, &lt;span style="color: #0000ff"&gt;int&lt;/span&gt; rhs)&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum12"&gt; 12:&lt;/span&gt; { &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; lhs
+ rhs; }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; 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; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum14"&gt; 14:&lt;/span&gt;&amp;#160; &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum15"&gt; 15:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; AnotherServiceImpl
: IService&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum16"&gt; 16:&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum17"&gt; 17:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; DateTime
GetDate()&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum18"&gt; 18:&lt;/span&gt; { &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; DateTime();
}&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum19"&gt; 19:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;int&lt;/span&gt; CalculateSomethingInteresting(&lt;span style="color: #0000ff"&gt;int&lt;/span&gt; lhs, &lt;span style="color: #0000ff"&gt;int&lt;/span&gt; rhs)&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum20"&gt; 20:&lt;/span&gt; { &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; lhs
* rhs; }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum21"&gt; 21:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum22"&gt; 22:&lt;/span&gt;&amp;#160; &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum23"&gt; 23:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; ServiceFactory&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum24"&gt; 24:&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum25"&gt; 25:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;static&lt;/span&gt; IService
GetInstance(&lt;span style="color: #0000ff"&gt;string&lt;/span&gt; which)&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum26"&gt; 26:&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum27"&gt; 27:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (which
== &lt;span style="color: #006080"&gt;&amp;quot;One&amp;quot;&lt;/span&gt;) &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; OneServiceImpl();&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum28"&gt; 28:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;else&lt;/span&gt; &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (which
== &lt;span style="color: #006080"&gt;&amp;quot;Another&amp;quot;&lt;/span&gt;) &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; AnotherServiceImpl();&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum29"&gt; 29:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;else&lt;/span&gt; &lt;span style="color: #0000ff"&gt;throw&lt;/span&gt; &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; ArgumentException();&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum30"&gt; 30:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum31"&gt; 31:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum32"&gt; 32:&lt;/span&gt;&amp;#160; &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum33"&gt; 33:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; App&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum34"&gt; 34:&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum35"&gt; 35:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;static&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; Main(&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;[]
args)&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum36"&gt; 36:&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum37"&gt; 37:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;foreach&lt;/span&gt; (&lt;span style="color: #0000ff"&gt;string&lt;/span&gt; s &lt;span style="color: #0000ff"&gt;in&lt;/span&gt; args)&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum38"&gt; 38:&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum39"&gt; 39:&lt;/span&gt; IService
serv = ServiceFactory.GetInstance(s);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum40"&gt; 40:&lt;/span&gt; Console.WriteLine(&lt;span style="color: #006080"&gt;&amp;quot;serv
calc = {0}&amp;quot;&lt;/span&gt;, serv.CalculateSomethingInteresting(3, 3));&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum41"&gt; 41:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum42"&gt; 42:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum43"&gt; 43:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;
So has my client this week. In fact, it's fair to say that they're infatuated with
them—they've got services all over the place, including at their communication layer,
where they use configuration files to decide which of the two service implementations
to use, either a &amp;quot;native&amp;quot; .NET implementation or the &amp;quot;real&amp;quot; Web
services implementation that they're supposed to be using. (They end up going back
to the native implementation because sometimes—which is to say, apparently a lot of
times—the Web services implementation is broken in some fundamental way. Go figure.)
&lt;/p&gt;
&lt;p&gt;
The problem is, very bluntly, that the interfaces they're defining (the IService definition
above) are ever-so-slightly different from the communications-based proxy interfaces
that they use to communicate outside of this process, so some poor schmuck ends up
having to write the service implementation (OneServiceImpl) that simply takes the
parameters passed in, translates them into a call through the communications-based
interface, then takes the response and hands it back. Tedious, mind-numbing coding,
particularly painful when there are dozens of interfaces with (in some cases) hundreds
of methods per interface. Ouch.
&lt;/p&gt;
&lt;p&gt;
There &lt;em&gt;had&lt;/em&gt; to be a better way.
&lt;/p&gt;
&lt;p&gt;
Based on some of the work/research/play I've been doing with both dynamic and functional
programming languages, it occurred to me that what they really wanted was some kind
of &amp;quot;forwarding&amp;quot; or &amp;quot;delegating&amp;quot; behavior that certain languages
have baked in as a feature. In those languages, it's possible to nominate a &amp;quot;delegate&amp;quot;
object to which method calls are automatically forwarded if no such method is implemented
on this object; in this particular case, what I'd do to replace all of the above is
simply create an IService object instance that has either a OneServiceImpl or a AnotherServiceImpl
instance (depending on the value in the configuration file) set up as the &amp;quot;delegate&amp;quot;
object. That way the method calls remain statically type-checked, but none of this
service interface/service implementation/service factory nonsense has to be created
just to switch between the two.
&lt;/p&gt;
&lt;p&gt;
(By the way, all of this pain goes away completely in a language that supports deferred
checking of signatures until runtime. In other words, if the client had been programming
in IronPython or IronRuby or even Visual Basic, we could get away with not having
to do any of the above, and just use Reflection to access the appropriate method on
whichever of the two service implementations they want to use at the time. &lt;a href="http://www.fantom.org" target="_blank"&gt;Fan&lt;/a&gt; would
let us do it if we used &amp;quot;-&amp;gt;&amp;quot; instead of &amp;quot;.&amp;quot; to invoke the method; &lt;a href="http://cobra-language.com/" target="_blank"&gt;Cobra&lt;/a&gt; would
switch between the two automatically; and so on.)
&lt;/p&gt;
&lt;p&gt;
Now, this is C# 2.0 that they're using, and they're pretty entrenched on that point,
so I can't simply suggest that they use a new language, but if we take the basic idea
and adapt it to C#, we can get pretty much the same behavior without having to force
the poor schmuck on the bottom of the totem pole to write all those service implementations
by hand.
&lt;/p&gt;
&lt;p&gt;
We start by transforming the IService interface into an IService &amp;quot;interface&amp;quot;
(meaning it's not really an interface anymore, but it'll sure look like one to anybody
who's not paying attention):
&lt;/p&gt;
&lt;div style="border-bottom: silver 1px solid; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
&lt;div style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt; 1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; IService&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt; 2:&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum3"&gt; 3:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; Func0&amp;lt;DateTime&amp;gt;
GetDate;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum4"&gt; 4:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; Func2&amp;lt;&lt;span style="color: #0000ff"&gt;int&lt;/span&gt;, &lt;span style="color: #0000ff"&gt;int&lt;/span&gt;, &lt;span style="color: #0000ff"&gt;int&lt;/span&gt;&amp;gt;
CalculateSomethingInteresting;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum5"&gt; 5:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;
IService is now a class with fields (not properties, though I suppose if you really
wanted them to be properties you could make them such, not that I see much value to
doing so), where each field corresponds in name to the method of the interface it
wants to replace, and the type is a delegate type parameterized to match the return
type and parameter types of that same method of the original interface. Func0 and
Func2 are delegate types I had to create, since nothing like them existed until C#
3.0; their definitions are pretty simple:
&lt;/p&gt;
&lt;div style="border-bottom: silver 1px solid; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
&lt;div style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt; 1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;delegate&lt;/span&gt; R
Func0&amp;lt;R&amp;gt;();&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt; 2:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;delegate&lt;/span&gt; R
Func1&amp;lt;R, P1&amp;gt;(P1 p1);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum3"&gt; 3:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;delegate&lt;/span&gt; R
Func2&amp;lt;R, P1, P2&amp;gt;(P1 p1, P2 p2);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;
Now, assuming we have the implementation classes from before, we have two choices;
one is to write a by-hand factory that fills out the fields to point to the appropriate
method on the implementation class, like so:
&lt;/p&gt;
&lt;div style="border-bottom: silver 1px solid; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
&lt;div style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt; 1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (which
== &lt;span style="color: #006080"&gt;&amp;quot;One&amp;quot;&lt;/span&gt;)&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt; 2:&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum3"&gt; 3:&lt;/span&gt; servInstance.GetDate
= &lt;span style="color: #0000ff"&gt;delegate&lt;/span&gt;() { &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; DateTime.Now;
};&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum4"&gt; 4:&lt;/span&gt; servInstance.CalculateSomethingInteresting
= &lt;span style="color: #0000ff"&gt;delegate&lt;/span&gt; (&lt;span style="color: #0000ff"&gt;int&lt;/span&gt; lhs, &lt;span style="color: #0000ff"&gt;int&lt;/span&gt; rhs)
{ &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; lhs + rhs; };&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum5"&gt; 5:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum6"&gt; 6:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;else&lt;/span&gt; &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (which
== &lt;span style="color: #006080"&gt;&amp;quot;Another&amp;quot;&lt;/span&gt;)&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum7"&gt; 7:&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum8"&gt; 8:&lt;/span&gt; servInstance.GetDate
= &lt;span style="color: #0000ff"&gt;delegate&lt;/span&gt;() { &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; DateTime();
};&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum9"&gt; 9:&lt;/span&gt; servInstance.CalculateSomethingInteresting
= &lt;span style="color: #0000ff"&gt;delegate&lt;/span&gt; (&lt;span style="color: #0000ff"&gt;int&lt;/span&gt; lhs, &lt;span style="color: #0000ff"&gt;int&lt;/span&gt; rhs)
{ &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; lhs * rhs; };&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; 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; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum11"&gt; 11:&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; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum12"&gt; 12:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;throw&lt;/span&gt; &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; ArgumentException();&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;
But, quite frankly, this defeats the point—the point was to &lt;em&gt;avoid&lt;/em&gt; writing
all this stuff by hand, not simply repeat it in a different form. So instead, we leverage
Reflection, which depends on the basic assumption that the field name in the IService
&amp;quot;interface&amp;quot; matches the method name on the implementation class we wish
to invoke. Assuming that holds (which it does, in my client's case, anyway), we can
reflect on the IService field, find the matching method name in the implementation,
then construct a delegate instance around that method and assign the delegate instance
to the field. Once complete, we hand back the completed service instance, and the
client literally doesn't know that anything's different:
&lt;/p&gt;
&lt;div style="border-bottom: silver 1px solid; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
&lt;div style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt; 1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; ServiceFactory&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt; 2:&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum3"&gt; 3:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;static&lt;/span&gt; IService
GetInstance(&lt;span style="color: #0000ff"&gt;string&lt;/span&gt; which)&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum4"&gt; 4:&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum5"&gt; 5:&lt;/span&gt; IService
servInstance = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; IService();&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; 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; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum7"&gt; 7:&lt;/span&gt; Type
targetType = Assembly.GetExecutingAssembly().GetType(which + &lt;span style="color: #006080"&gt;&amp;quot;ServiceImpl&amp;quot;&lt;/span&gt;);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; 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; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum9"&gt; 9:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;foreach&lt;/span&gt; (FieldInfo
fi &lt;span style="color: #0000ff"&gt;in&lt;/span&gt; servInstance.GetType().GetFields())&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; 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; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum11"&gt; 11:&lt;/span&gt; MethodInfo
targetMethod = targetType.GetMethod(fi.Name);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum12"&gt; 12:&lt;/span&gt; &lt;span style="color: #008000"&gt;//Console.WriteLine(&amp;quot;Wiring
up {0} against {1} with {2}&amp;quot;, fi.Name, targetType, targetMethod);&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum13"&gt; 13:&lt;/span&gt; Delegate
d = Delegate.CreateDelegate(fi.FieldType, &lt;span style="color: #0000ff"&gt;null&lt;/span&gt;,
targetMethod);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum14"&gt; 14:&lt;/span&gt; &lt;span style="color: #008000"&gt;//Console.WriteLine(d);&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum15"&gt; 15:&lt;/span&gt; fi.SetValue(servInstance,
d);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum16"&gt; 16:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum17"&gt; 17:&lt;/span&gt;&amp;#160; &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum18"&gt; 18:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; servInstance;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum19"&gt; 19:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum20"&gt; 20:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;
Remember, the client code still looks the same...
&lt;/p&gt;
&lt;div style="border-bottom: silver 1px solid; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
&lt;div style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt; 1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; App&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt; 2:&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum3"&gt; 3:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;static&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; Main(&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;[]
args)&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum4"&gt; 4:&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum5"&gt; 5:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;foreach&lt;/span&gt; (&lt;span style="color: #0000ff"&gt;string&lt;/span&gt; s &lt;span style="color: #0000ff"&gt;in&lt;/span&gt; args)&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum6"&gt; 6:&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum7"&gt; 7:&lt;/span&gt; IService
serv = ServiceFactory.GetInstance(s);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum8"&gt; 8:&lt;/span&gt; Console.WriteLine(&lt;span style="color: #006080"&gt;&amp;quot;serv
calc = {0}&amp;quot;&lt;/span&gt;, serv.CalculateSomethingInteresting(3, 3));&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum9"&gt; 9:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; 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; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum11"&gt; 11:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;
... because what the client doesn't know is that he's accessing a field, then invoking
the delegate that's being returned from that field dereference.
&lt;/p&gt;
&lt;p&gt;
What this permits, aside from the automated wiring up of the IService &amp;quot;interface&amp;quot;,
is a greater degree of flexibility—rather than having to choose which implementation
to use on an interface-by-interface basis, we can now configure to use different implementations
on a method-by-method basis. But considering how many interfaces and implementations
my client was looking at having to write by hand, the real win is in the automated
ServiceFactory wiring.
&lt;/p&gt;
&lt;p&gt;
By the way, the only reason we can get away with this sleight-of-hand is because delegates
are deliberately designed to act like method calls; no explicit .Invoke() call is
required, it's implied with the () after the delegate instance's name. If Java7 closures
and/or method handles end up with support for that kind of syntax, then we can do
the same thing in Java7 (more or less).
&lt;/p&gt;
&lt;p&gt;
Make sense?
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blogs.tedneward.com/aggbug.ashx?id=bc8ecefa-a434-4688-875c-3da855b8b28c" /&gt;
&lt;br /&gt;
&lt;hr /&gt;
Enterprise consulting, mentoring or instruction. Java, C++, .NET or XML services.
1-day or multi-day workshops available. &lt;a href="mailto:ted@tedneward.com"&gt;Contact
me for details&lt;/a&gt;.</description>
      <comments>http://blogs.tedneward.com/CommentView,guid,bc8ecefa-a434-4688-875c-3da855b8b28c.aspx</comments>
      <category>.NET</category>
      <category>C#</category>
      <category>F#</category>
      <category>Java/J2EE</category>
      <category>Languages</category>
      <category>Python</category>
      <category>Ruby</category>
      <category>Scala</category>
      <category>Visual Basic</category>
      <category>Windows</category>
    </item>
    <item>
      <trackback:ping>http://blogs.tedneward.com/Trackback.aspx?guid=0c380794-aa34-4b07-afe3-26df9d0079e6</trackback:ping>
      <pingback:server>http://blogs.tedneward.com/pingback.aspx</pingback:server>
      <pingback:target>http://blogs.tedneward.com/PermaLink,guid,0c380794-aa34-4b07-afe3-26df9d0079e6.aspx</pingback:target>
      <dc:creator>Ted Neward</dc:creator>
      <wfw:comment>http://blogs.tedneward.com/CommentView,guid,0c380794-aa34-4b07-afe3-26df9d0079e6.aspx</wfw:comment>
      <wfw:commentRss>http://blogs.tedneward.com/SyndicationService.asmx/GetEntryCommentsRss?guid=0c380794-aa34-4b07-afe3-26df9d0079e6</wfw:commentRss>
      <slash:comments>5</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
These are the things I think as I sit here in my resort hotel on the edge of the Dead
Sea in Israel after the <a href="http://www.javaedge.com" target="_blank">JavaEdge
2009 conference</a> on Thursday:
</p>
        <ul>
          <li>
            <em>The JavaEdge hosts (Alpha CSP) are, without a doubt, the most gracious hosts I
think I've ever had at a conference.</em> And considering the wonderful treatment
I've had at the hands of the 4Developers and JDD hosts in Krakow (Proidea) and the
SDN hosts in Amsterdam, this is saying a lot. But the Alpha CSP folks have simply
floored me, top to bottom, with their generosity and warmth.</li>
          <li>
            <em>The JavaEdge crowd is a great one.</em> I wasn't quite sure what to expect, because
in the US we don't hear much about the tech going on in Israel, so I was a bit concerned
that (a) my English was going to be difficult to grasp or that (b) my humor was going
to sail over their heads due to the language barrier, or worse, (c), the developers
at the conference wouldn't be ready to hear the keynote message ("Why the Next
Five Years Will Be About Languages"). I shouldn't have been concerned on any
of those points—this crowd understood me perfectly, laughed at most of my jokes (hey,
not even my family gets <em>all</em> of them), and more importantly, not only accepted
the thrust of the message but also came up to me afterwards and either sought clarification,
challenged one or more points, or simply said they enjoyed the keynote. It was as
engaged and enthusiastic a crowd as just about any I've had.</li>
          <li>
            <em>
              <a href="http://www.fandev.org" target="_blank">Fan(tom)</a> is something worth
looking into.</em> Some of the speakers at the conference were talking with me about
Fan (recently renamed to <a href="http://fan.googlecode.com" target="_blank">Fantom</a>,
to make it easier to Google/Bing), and I've realized that Fan's too interesting a
language for the amount of press that it gets. I think this is something I'm going
to pursue in the coming calendar year, maybe put together some presentations and/or
workshops on it.</li>
          <li>
            <em>Israel is ready for Groovy, Scala, and closures in Java.</em> These folks were
chomping at the bit at the thought of using one or all of these, at least based on
the comments and questions I got after the keynote.</li>
          <li>
            <em>Swimming in the Dead Sea is a truly bizarre experience.</em> To be honest, one
doesn't really "swim" in the Dead Sea—one just rests on top of the water,
because the salt content in the water is so high that it is (quite literally) impossible
to go under the water. It's like lounging on an inflatable raft in the water, except
without the raft. It borders on the creepy. Still, my skin is much softer now than
it was before. ;-)</li>
          <li>
            <em>Jerusalem is a fascinating city.</em> Alpha CSP set me up with a tour guide (<a href="mailto:ido_notman_at_yahoo_dot_com" target="_blank">Ido
Notman</a>), and we toured Jerusalem yesterday: all four quarters of the Old City
(the Christian quarter, the Jewish quarter, the Moslem quarter and the Armenian quarter),
the "Tomb" of King David, the Holy Sepulchre (where Christ was supposedly
crucified and buried), the Western Wall, and then back to Tel Aviv for the night.
Throughout the entire day, Ido kept up a running commentary about the history of the
city and the three religions that are centered there (Christianity, Judaism and Islam)
and the stories/legends that each holds about the city's place in their religious
beliefs. I came away just flat overwhelmed, and, once we got back, flat on my back—we
walked for most of the day, and Jerusalem is <em>not</em> a flat city like you might
expect—it's nestled in some serious mountains, which makes it a bit rough on the calves.
But it was well worth it, because there's nothing like standing and looking at pillars
right in front of you—excavated from beneath a high-rise apartment building, just
there for anybody to stroll up to and see and touch and take photos with—that were
built back when Rome meant the center of civilization. Wow.</li>
          <li>
            <em>The Palestinian-Israeli and Arab-Israeli conflict(s) are a lot more "real"
when you're in the middle of it (geographically).</em> Seeing armed Israeli guards,
driving through security checkpoints, even just driving past the wall that Israel
is building to keep a physical barrier between them and Hamas/Hezbollah is all a vivid
reminder that the nine-o'clock news is more than just something that's happening "over
there" when you're "over there" too. The highway we took (the road
from Jerusalem to Jericho, the same one mentioned in the parable of the Good Samaritan—and,
yes, we passed the Inn of the Good Samaritan on the way here, which was just a little
creepy and exciting and weird all at the same time) drove right alongside that wall
for a stretch of about five or so kilometers, and I couldn't help but wonder if somebody
in one of those apartment buildings over there, who had a clear line of sight to our
car zipping by on the freeway, was looking at us through the scope of a sniper rifle.
It's a creepy feeling, and even worse knowing that there may well have been an Israeli
sniper looking back across the wall as well, into somebody's apartment. I won't weigh
in on one side or the other here, because that's not my point; my point is that we
in the US take our physical security way too much for granted, compared to some other
parts of the world where it's not such a given.</li>
          <li>
            <em>And no, in case you were wondering, I was never concerned for my safety</em>.
Yes, it's something I thought about. But you have a better chance of dying on a New
York street corner from a runaway ice cream truck than you do from a rocket attack
or a terrorist suicide bomb (or something like that). I'd come back in a heartbeat.</li>
          <li>
            <em>Israelis really know how to party.</em> First the after-conference party on Thursday
night, then a quieter speaker dinner last night, but each time, the company was excellent,
the food was amazing, and the wine/beer/liquor-of-choice was flowing fast. I don't
know if it's just the Alpha CSP folks or Israelis in general, but these people really
have a work-hard-play-hard mentality that I just love.</li>
        </ul>
        <p>
Thanks again to Miya, Ety, Shlomi, Roi, Alex and Ido for a wonderful combination work/vacation
trip.
</p>
        <img width="0" height="0" src="http://blogs.tedneward.com/aggbug.ashx?id=0c380794-aa34-4b07-afe3-26df9d0079e6" />
        <br />
        <hr />
Enterprise consulting, mentoring or instruction. Java, C++, .NET or XML services.
1-day or multi-day workshops available. <a href="mailto:ted@tedneward.com">Contact
me for details</a>.</body>
      <title>Thoughts from the (Java)Edge 2009</title>
      <guid isPermaLink="false">http://blogs.tedneward.com/PermaLink,guid,0c380794-aa34-4b07-afe3-26df9d0079e6.aspx</guid>
      <link>http://blogs.tedneward.com/2009/11/29/Thoughts+From+The+JavaEdge+2009.aspx</link>
      <pubDate>Sun, 29 Nov 2009 17:08:46 GMT</pubDate>
      <description>&lt;p&gt;
These are the things I think as I sit here in my resort hotel on the edge of the Dead
Sea in Israel after the &lt;a href="http://www.javaedge.com" target="_blank"&gt;JavaEdge
2009 conference&lt;/a&gt; on Thursday:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;The JavaEdge hosts (Alpha CSP) are, without a doubt, the most gracious hosts I
think I've ever had at a conference.&lt;/em&gt; And considering the wonderful treatment
I've had at the hands of the 4Developers and JDD hosts in Krakow (Proidea) and the
SDN hosts in Amsterdam, this is saying a lot. But the Alpha CSP folks have simply
floored me, top to bottom, with their generosity and warmth.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;The JavaEdge crowd is a great one.&lt;/em&gt; I wasn't quite sure what to expect, because
in the US we don't hear much about the tech going on in Israel, so I was a bit concerned
that (a) my English was going to be difficult to grasp or that (b) my humor was going
to sail over their heads due to the language barrier, or worse, (c), the developers
at the conference wouldn't be ready to hear the keynote message (&amp;quot;Why the Next
Five Years Will Be About Languages&amp;quot;). I shouldn't have been concerned on any
of those points—this crowd understood me perfectly, laughed at most of my jokes (hey,
not even my family gets &lt;em&gt;all&lt;/em&gt; of them), and more importantly, not only accepted
the thrust of the message but also came up to me afterwards and either sought clarification,
challenged one or more points, or simply said they enjoyed the keynote. It was as
engaged and enthusiastic a crowd as just about any I've had.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;&lt;a href="http://www.fandev.org" target="_blank"&gt;Fan(tom)&lt;/a&gt; is something worth
looking into.&lt;/em&gt; Some of the speakers at the conference were talking with me about
Fan (recently renamed to &lt;a href="http://fan.googlecode.com" target="_blank"&gt;Fantom&lt;/a&gt;,
to make it easier to Google/Bing), and I've realized that Fan's too interesting a
language for the amount of press that it gets. I think this is something I'm going
to pursue in the coming calendar year, maybe put together some presentations and/or
workshops on it.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Israel is ready for Groovy, Scala, and closures in Java.&lt;/em&gt; These folks were
chomping at the bit at the thought of using one or all of these, at least based on
the comments and questions I got after the keynote.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Swimming in the Dead Sea is a truly bizarre experience.&lt;/em&gt; To be honest, one
doesn't really &amp;quot;swim&amp;quot; in the Dead Sea—one just rests on top of the water,
because the salt content in the water is so high that it is (quite literally) impossible
to go under the water. It's like lounging on an inflatable raft in the water, except
without the raft. It borders on the creepy. Still, my skin is much softer now than
it was before. ;-)&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Jerusalem is a fascinating city.&lt;/em&gt; Alpha CSP set me up with a tour guide (&lt;a href="mailto:ido_notman_at_yahoo_dot_com" target="_blank"&gt;Ido
Notman&lt;/a&gt;), and we toured Jerusalem yesterday: all four quarters of the Old City
(the Christian quarter, the Jewish quarter, the Moslem quarter and the Armenian quarter),
the &amp;quot;Tomb&amp;quot; of King David, the Holy Sepulchre (where Christ was supposedly
crucified and buried), the Western Wall, and then back to Tel Aviv for the night.
Throughout the entire day, Ido kept up a running commentary about the history of the
city and the three religions that are centered there (Christianity, Judaism and Islam)
and the stories/legends that each holds about the city's place in their religious
beliefs. I came away just flat overwhelmed, and, once we got back, flat on my back—we
walked for most of the day, and Jerusalem is &lt;em&gt;not&lt;/em&gt; a flat city like you might
expect—it's nestled in some serious mountains, which makes it a bit rough on the calves.
But it was well worth it, because there's nothing like standing and looking at pillars
right in front of you—excavated from beneath a high-rise apartment building, just
there for anybody to stroll up to and see and touch and take photos with—that were
built back when Rome meant the center of civilization. Wow.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;The Palestinian-Israeli and Arab-Israeli conflict(s) are a lot more &amp;quot;real&amp;quot;
when you're in the middle of it (geographically).&lt;/em&gt; Seeing armed Israeli guards,
driving through security checkpoints, even just driving past the wall that Israel
is building to keep a physical barrier between them and Hamas/Hezbollah is all a vivid
reminder that the nine-o'clock news is more than just something that's happening &amp;quot;over
there&amp;quot; when you're &amp;quot;over there&amp;quot; too. The highway we took (the road
from Jerusalem to Jericho, the same one mentioned in the parable of the Good Samaritan—and,
yes, we passed the Inn of the Good Samaritan on the way here, which was just a little
creepy and exciting and weird all at the same time) drove right alongside that wall
for a stretch of about five or so kilometers, and I couldn't help but wonder if somebody
in one of those apartment buildings over there, who had a clear line of sight to our
car zipping by on the freeway, was looking at us through the scope of a sniper rifle.
It's a creepy feeling, and even worse knowing that there may well have been an Israeli
sniper looking back across the wall as well, into somebody's apartment. I won't weigh
in on one side or the other here, because that's not my point; my point is that we
in the US take our physical security way too much for granted, compared to some other
parts of the world where it's not such a given.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;And no, in case you were wondering, I was never concerned for my safety&lt;/em&gt;.
Yes, it's something I thought about. But you have a better chance of dying on a New
York street corner from a runaway ice cream truck than you do from a rocket attack
or a terrorist suicide bomb (or something like that). I'd come back in a heartbeat.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Israelis really know how to party.&lt;/em&gt; First the after-conference party on Thursday
night, then a quieter speaker dinner last night, but each time, the company was excellent,
the food was amazing, and the wine/beer/liquor-of-choice was flowing fast. I don't
know if it's just the Alpha CSP folks or Israelis in general, but these people really
have a work-hard-play-hard mentality that I just love.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
Thanks again to Miya, Ety, Shlomi, Roi, Alex and Ido for a wonderful combination work/vacation
trip.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blogs.tedneward.com/aggbug.ashx?id=0c380794-aa34-4b07-afe3-26df9d0079e6" /&gt;
&lt;br /&gt;
&lt;hr /&gt;
Enterprise consulting, mentoring or instruction. Java, C++, .NET or XML services.
1-day or multi-day workshops available. &lt;a href="mailto:ted@tedneward.com"&gt;Contact
me for details&lt;/a&gt;.</description>
      <comments>http://blogs.tedneward.com/CommentView,guid,0c380794-aa34-4b07-afe3-26df9d0079e6.aspx</comments>
      <category>Conferences</category>
      <category>Java/J2EE</category>
      <category>Languages</category>
      <category>Review</category>
      <category>Social</category>
    </item>
    <item>
      <trackback:ping>http://blogs.tedneward.com/Trackback.aspx?guid=d3b4c5aa-2964-492c-9af3-523cb403b444</trackback:ping>
      <pingback:server>http://blogs.tedneward.com/pingback.aspx</pingback:server>
      <pingback:target>http://blogs.tedneward.com/PermaLink,guid,d3b4c5aa-2964-492c-9af3-523cb403b444.aspx</pingback:target>
      <dc:creator>Ted Neward</dc:creator>
      <wfw:comment>http://blogs.tedneward.com/CommentView,guid,d3b4c5aa-2964-492c-9af3-523cb403b444.aspx</wfw:comment>
      <wfw:commentRss>http://blogs.tedneward.com/SyndicationService.asmx/GetEntryCommentsRss?guid=d3b4c5aa-2964-492c-9af3-523cb403b444</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Paul asked me to review this, his first book, and my comment to him was that he had
a pretty high bar to match; being of the same "series" as <em>Release It!</em>,
Mike Nygard's take on building software ready for production (and, in my repeatedly
stated opinion, the most important-to-read book of the decade), <em>Debug It!</em> had
some pretty impressive shoes to fill. Paul's comment was pretty predictable: "Thanks
for keeping the pressure to a minimum."
</p>
        <p>
My copy arrived in the mail while I was at the NFJS show in Denver this past weekend,
and with a certain amount of dread and excitement, I opened the envelope and sat down
to read for a few minutes. I managed to get halfway through it before deciding I had
to post a review before I get too caught up in my next trip and forget.
</p>
        <h4>
          <em>Short version</em>
        </h4>
        <p>
          <em>Debug It!</em> is a great resource for anyone looking to learn the science of
good debugging. It is entirely language- and platform-agnostic, preferring to focus
entirely on the <em>process</em> and <em>mindset</em> of debugging, rather than on
edge cases or command-line switches in a tool or language. Overall, the writing is
clear and straightforward without being preachy or judgmental, and is liberally annotated
with real-life case stories from both the authors' and the Pragmatic Programmers'
own history, which keeps the tone lighter and yet still proving the point of the text.
Highly recommended for the junior developers on the team; senior developers will likely
find some good tidbits in here as well. 
</p>
        <h4>
          <em>Long version</em>
        </h4>
        <p>
          <em>Debug It!</em> is an excellently-written and to-the-point description of the process
of not only identifying and fixing defects in software, but also of the attitudes
required to keep software from failing. Rather than simply tossing off old maxims
or warming them over with new terminology ("You should always verify the parameters
to your procedure calls" replaced with "You should always verify the parameters
entering a method and ensure the fields follow the invariants established in the specification"),
Paul ensures that when making a point, his prose is clear, the rationale carefully
explained, and the consequences of not following this advice are clearly spelled out.
His advice is pragmatic, and takes into account that developers can't always follow
the absolute rules we'd like to—he talks about some of his experiences with "bug
priorities" and how users pretty quickly figured out to always set the bug's
priority at the highest level in order to get developer attention, for example, and
some ways to try and address that all-too-human failing of bug-tracking systems.
</p>
        <p>
It needs to be said, right from the beginning, that <em>Debug It!</em> will not teach
you how to use the debugging features of your favorite IDE, however. This is because
Paul (deliberately, it seems) takes a platform- and language-agnostic approach to
the book—there are no examples of how to set breakpoints in gdb, or how to attach
the Visual Studio IDE to a running Windows service, for example. This will likely
weed out those readers who are looking for "Google-able" answers to their
common debugging problems, and that's a shame, because those are probably the very
readers that need to read this book. Having said that, however, I like this agnostic
approach, because these ideas and thought processes, the ones that are entirely independent
of the language or platform, are exactly the kinds of things that senior developers
carry over with them from one platform to the next. Still, the junior developer who
picks this book up is going to still need a reference manual or the user manual for
their IDE or toolchain, and will need to practice some with both books in hand if
they want to maximize the effectiveness of what's in here.
</p>
        <p>
One of the things I like most about this book is that it is liberally adorned with
real-life discussions of various scenarios the author team has experienced; the reason
I say "author team" here is because although the stories (for the most part)
remain unattributed, there are obvious references to "Dave" and "Andy",
which I assume pretty obviously refer to Dave Thomas and Andy Hunt, the Pragmatic
Programmers and the owners of Pragmatic Bookshelf. Some of the stories are humorous,
and some of them probably would be humorous if they didn't strike so close to my own
bitterly-remembered experiences. All of them do a good job of reinforcing the point,
however, thus rendering the prose more effective in communicating the idea without
getting to be too preachy or bombastic.
</p>
        <p>
The book obviously intends to target a junior developer audience, because most senior
developers have already intuitively (or experientially) figured out many of the processes
described in here. But, quite frankly, I think it would be a shame for senior developers
to pass on this one; though the temptation will be to simply toss it aside and say,
"I already do all this stuff", senior developers should resist that urge
and read it through cover to cover. If nothing else, it'll help reinforce certain
ideas, bring some of the intuitive process more to light and allow us to analyze what
we do right and what we do wrong, and perhaps most importantly, give us a common backdrop
against which we can mentor junior developers in the science of debugging.
</p>
        <p>
One of the chapters I like in particular, "Chapter 7: Pragmatic Zero Tolerance",
is particularly good reading for those shops that currently suffer from a deficit
of management support for writing good software. In it, Paul talks specifically about
some of the triage process about bugs ("When to fix bugs"), the mental approach
developers should have to fixing bugs ("The debugging mind-set") and how
to get started on creating good software out of bad ("How to dig yourself out
of a quality hole"). These are techniques that a senior developer can bring to
the team and implement at a grass-roots level, in many cases without management even
being aware of what's going on. (It's a sad state of affairs that we sometimes have
to work behind management's back to write good-quality code, but I know that some
developers out there are in exactly that situation, and simply saying, "Quit
and find a new job", although pithy and good for a laugh on a panel, doesn't
really offer much in the way of help. Paul doesn't take that route here, and that
alone makes this book worth reading.)
</p>
        <p>
Another of the chapters that resonates well with me is the first one in Part III ("Debug
Fu"), Chapter 8, entitled "Special Cases", in which he tackles a number
of "advanced" debugging topics, such as "Patching Existing Releases"
and "Hesenbugs" (Concurrency-related bugs). I won't spoil the punchline
for you, but suffice it to say that I wish I'd had that chapter on hand to give out
to teammates on a few projects I've worked on in the past.
</p>
        <p>
Overall, this book is going to be a huge win, and I think it's a worthy successor
to the <em>Release It!</em> reputation. Development managers and team leads should
get a copy for the junior developers on their team as a Christmas gift, but only after
the senior developers have read through it as well. (Senior devs, don't despair—at
190 pages, you can rip through this in a single night, and I can almost guarantee
that you'll learn a few ideas you can put into practice the next morning to boot.)
</p>
        <img width="0" height="0" src="http://blogs.tedneward.com/aggbug.ashx?id=d3b4c5aa-2964-492c-9af3-523cb403b444" />
        <br />
        <hr />
Enterprise consulting, mentoring or instruction. Java, C++, .NET or XML services.
1-day or multi-day workshops available. <a href="mailto:ted@tedneward.com">Contact
me for details</a>.</body>
      <title>Book Review: Debug It! (Paul Butcher, Pragmatic Bookshelf)</title>
      <guid isPermaLink="false">http://blogs.tedneward.com/PermaLink,guid,d3b4c5aa-2964-492c-9af3-523cb403b444.aspx</guid>
      <link>http://blogs.tedneward.com/2009/11/23/Book+Review+Debug+It+Paul+Butcher+Pragmatic+Bookshelf.aspx</link>
      <pubDate>Mon, 23 Nov 2009 07:24:41 GMT</pubDate>
      <description>&lt;p&gt;
Paul asked me to review this, his first book, and my comment to him was that he had
a pretty high bar to match; being of the same &amp;quot;series&amp;quot; as &lt;em&gt;Release It!&lt;/em&gt;,
Mike Nygard's take on building software ready for production (and, in my repeatedly
stated opinion, the most important-to-read book of the decade), &lt;em&gt;Debug It!&lt;/em&gt; had
some pretty impressive shoes to fill. Paul's comment was pretty predictable: &amp;quot;Thanks
for keeping the pressure to a minimum.&amp;quot;
&lt;/p&gt;
&lt;p&gt;
My copy arrived in the mail while I was at the NFJS show in Denver this past weekend,
and with a certain amount of dread and excitement, I opened the envelope and sat down
to read for a few minutes. I managed to get halfway through it before deciding I had
to post a review before I get too caught up in my next trip and forget.
&lt;/p&gt;
&lt;h4&gt;&lt;em&gt;Short version&lt;/em&gt;
&lt;/h4&gt;
&lt;p&gt;
&lt;em&gt;Debug It!&lt;/em&gt; is a great resource for anyone looking to learn the science of
good debugging. It is entirely language- and platform-agnostic, preferring to focus
entirely on the &lt;em&gt;process&lt;/em&gt; and &lt;em&gt;mindset&lt;/em&gt; of debugging, rather than on
edge cases or command-line switches in a tool or language. Overall, the writing is
clear and straightforward without being preachy or judgmental, and is liberally annotated
with real-life case stories from both the authors' and the Pragmatic Programmers'
own history, which keeps the tone lighter and yet still proving the point of the text.
Highly recommended for the junior developers on the team; senior developers will likely
find some good tidbits in here as well. 
&lt;/p&gt;
&lt;h4&gt;&lt;em&gt;Long version&lt;/em&gt;
&lt;/h4&gt;
&lt;p&gt;
&lt;em&gt;Debug It!&lt;/em&gt; is an excellently-written and to-the-point description of the process
of not only identifying and fixing defects in software, but also of the attitudes
required to keep software from failing. Rather than simply tossing off old maxims
or warming them over with new terminology (&amp;quot;You should always verify the parameters
to your procedure calls&amp;quot; replaced with &amp;quot;You should always verify the parameters
entering a method and ensure the fields follow the invariants established in the specification&amp;quot;),
Paul ensures that when making a point, his prose is clear, the rationale carefully
explained, and the consequences of not following this advice are clearly spelled out.
His advice is pragmatic, and takes into account that developers can't always follow
the absolute rules we'd like to—he talks about some of his experiences with &amp;quot;bug
priorities&amp;quot; and how users pretty quickly figured out to always set the bug's
priority at the highest level in order to get developer attention, for example, and
some ways to try and address that all-too-human failing of bug-tracking systems.
&lt;/p&gt;
&lt;p&gt;
It needs to be said, right from the beginning, that &lt;em&gt;Debug It!&lt;/em&gt; will not teach
you how to use the debugging features of your favorite IDE, however. This is because
Paul (deliberately, it seems) takes a platform- and language-agnostic approach to
the book—there are no examples of how to set breakpoints in gdb, or how to attach
the Visual Studio IDE to a running Windows service, for example. This will likely
weed out those readers who are looking for &amp;quot;Google-able&amp;quot; answers to their
common debugging problems, and that's a shame, because those are probably the very
readers that need to read this book. Having said that, however, I like this agnostic
approach, because these ideas and thought processes, the ones that are entirely independent
of the language or platform, are exactly the kinds of things that senior developers
carry over with them from one platform to the next. Still, the junior developer who
picks this book up is going to still need a reference manual or the user manual for
their IDE or toolchain, and will need to practice some with both books in hand if
they want to maximize the effectiveness of what's in here.
&lt;/p&gt;
&lt;p&gt;
One of the things I like most about this book is that it is liberally adorned with
real-life discussions of various scenarios the author team has experienced; the reason
I say &amp;quot;author team&amp;quot; here is because although the stories (for the most part)
remain unattributed, there are obvious references to &amp;quot;Dave&amp;quot; and &amp;quot;Andy&amp;quot;,
which I assume pretty obviously refer to Dave Thomas and Andy Hunt, the Pragmatic
Programmers and the owners of Pragmatic Bookshelf. Some of the stories are humorous,
and some of them probably would be humorous if they didn't strike so close to my own
bitterly-remembered experiences. All of them do a good job of reinforcing the point,
however, thus rendering the prose more effective in communicating the idea without
getting to be too preachy or bombastic.
&lt;/p&gt;
&lt;p&gt;
The book obviously intends to target a junior developer audience, because most senior
developers have already intuitively (or experientially) figured out many of the processes
described in here. But, quite frankly, I think it would be a shame for senior developers
to pass on this one; though the temptation will be to simply toss it aside and say,
&amp;quot;I already do all this stuff&amp;quot;, senior developers should resist that urge
and read it through cover to cover. If nothing else, it'll help reinforce certain
ideas, bring some of the intuitive process more to light and allow us to analyze what
we do right and what we do wrong, and perhaps most importantly, give us a common backdrop
against which we can mentor junior developers in the science of debugging.
&lt;/p&gt;
&lt;p&gt;
One of the chapters I like in particular, &amp;quot;Chapter 7: Pragmatic Zero Tolerance&amp;quot;,
is particularly good reading for those shops that currently suffer from a deficit
of management support for writing good software. In it, Paul talks specifically about
some of the triage process about bugs (&amp;quot;When to fix bugs&amp;quot;), the mental approach
developers should have to fixing bugs (&amp;quot;The debugging mind-set&amp;quot;) and how
to get started on creating good software out of bad (&amp;quot;How to dig yourself out
of a quality hole&amp;quot;). These are techniques that a senior developer can bring to
the team and implement at a grass-roots level, in many cases without management even
being aware of what's going on. (It's a sad state of affairs that we sometimes have
to work behind management's back to write good-quality code, but I know that some
developers out there are in exactly that situation, and simply saying, &amp;quot;Quit
and find a new job&amp;quot;, although pithy and good for a laugh on a panel, doesn't
really offer much in the way of help. Paul doesn't take that route here, and that
alone makes this book worth reading.)
&lt;/p&gt;
&lt;p&gt;
Another of the chapters that resonates well with me is the first one in Part III (&amp;quot;Debug
Fu&amp;quot;), Chapter 8, entitled &amp;quot;Special Cases&amp;quot;, in which he tackles a number
of &amp;quot;advanced&amp;quot; debugging topics, such as &amp;quot;Patching Existing Releases&amp;quot;
and &amp;quot;Hesenbugs&amp;quot; (Concurrency-related bugs). I won't spoil the punchline
for you, but suffice it to say that I wish I'd had that chapter on hand to give out
to teammates on a few projects I've worked on in the past.
&lt;/p&gt;
&lt;p&gt;
Overall, this book is going to be a huge win, and I think it's a worthy successor
to the &lt;em&gt;Release It!&lt;/em&gt; reputation. Development managers and team leads should
get a copy for the junior developers on their team as a Christmas gift, but only after
the senior developers have read through it as well. (Senior devs, don't despair—at
190 pages, you can rip through this in a single night, and I can almost guarantee
that you'll learn a few ideas you can put into practice the next morning to boot.)
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blogs.tedneward.com/aggbug.ashx?id=d3b4c5aa-2964-492c-9af3-523cb403b444" /&gt;
&lt;br /&gt;
&lt;hr /&gt;
Enterprise consulting, mentoring or instruction. Java, C++, .NET or XML services.
1-day or multi-day workshops available. &lt;a href="mailto:ted@tedneward.com"&gt;Contact
me for details&lt;/a&gt;.</description>
      <comments>http://blogs.tedneward.com/CommentView,guid,d3b4c5aa-2964-492c-9af3-523cb403b444.aspx</comments>
      <category>.NET</category>
      <category>C#</category>
      <category>C++</category>
      <category>Development Processes</category>
      <category>F#</category>
      <category>Industry</category>
      <category>Java/J2EE</category>
      <category>Languages</category>
      <category>LLVM</category>
      <category>Mac OS</category>
      <category>Parrot</category>
      <category>Python</category>
      <category>Reading</category>
      <category>Review</category>
      <category>Ruby</category>
      <category>Scala</category>
      <category>Solaris</category>
      <category>Visual Basic</category>
      <category>Windows</category>
      <category>XML Services</category>
    </item>
    <item>
      <trackback:ping>http://blogs.tedneward.com/Trackback.aspx?guid=9eb4738e-4c53-4fbb-bf8e-e8712050c5ec</trackback:ping>
      <pingback:server>http://blogs.tedneward.com/pingback.aspx</pingback:server>
      <pingback:target>http://blogs.tedneward.com/PermaLink,guid,9eb4738e-4c53-4fbb-bf8e-e8712050c5ec.aspx</pingback:target>
      <dc:creator>Ted Neward</dc:creator>
      <wfw:comment>http://blogs.tedneward.com/CommentView,guid,9eb4738e-4c53-4fbb-bf8e-e8712050c5ec.aspx</wfw:comment>
      <wfw:commentRss>http://blogs.tedneward.com/SyndicationService.asmx/GetEntryCommentsRss?guid=9eb4738e-4c53-4fbb-bf8e-e8712050c5ec</wfw:commentRss>
      <slash:comments>5</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Those of you who've seen me speak on Java 7 at various conferences have heard me lament
(in a small way) the fact that Sun decided last year (Dec 2008) to forgo the idea
of including closures in the Java language. Imagine my surprise, then, to check my
Twitter feed and discover that, to everyone's surprise, closures <a href="http://puredanger.com/tech/2009/11/18/closures-after-all/" target="_blank">are
back in as a consideration for the Java7 release</a>.
</p>
        <p>
Several thoughts come to mind:
</p>
        <ul>
          <li>
            <strong>
              <em>"WTF?!?!? This is a community effort?"</em>
            </strong> Originally,
when Sun created the Java Community Process, the tradeoff for a committee-based development
process was against the open and fair inclusion of ideas from outside of Sun. But
with the Java7 release still lacking a JSR (as of a few weeks ago, anyway; I haven't
checked today to see if it was opened), and both the Modules facility and language
extensions deferred to "Projects" (not JSRs), it seems Sun is now abandoning
the JCP in favor of a Sun-dominant process that is certainly solicitous of the community
at large, but not constrained or defined by it. And for the life of me, I can't tell
if this is a good thing or a bad thing. It's good in that now we don't have to garner
a critical mass of community momentum to get something included into the platform
or language, but it's bad in that Sun has historically been the bigger drag on innovation
there, not the community. 
</li>
          <li>
            <strong>
              <em>"Can we please stop calling them closures?"</em>
            </strong> This
is a nit, but technically what we're talking about adding here are either lambda expressions
or anonymous methods, depending on whose glossary you're using when you're talking.
A true closure is one that will compute all referenced variables from the enclosing
scope and automatically include them in the generated code, which (so far as I can
tell) none of the Java anonymous method or lambda expression proposals currently include.
But it's a nit, so I'll say it this once and then drop it. 
</li>
          <li>
            <strong>
              <em>"Will Groovy, Scala, Clojure and all other JVM languages please report
to the refactoring room?"</em>
            </strong> People look at me quizzically when I
say I'd like to see Java have closures in the language, because in general my take
on language features in Java is that the Java language is more or less dead, and I
could care less what happens to it; I'd vastly prefer to code in Groovy or Scala or
Clojure or JRuby before writing something in Java. My rationale for wanting closures
in Java, however, is this: by defining a common <em>implementation</em> for closures
in Java, all of the above languages can refactor their implementations of anonymous
methods/lambda expressions/etc into something that uses Java's closure implementation,
and that'll make calling Groovy anonymous methods from Scala much much easier. 
</li>
          <li>
            <strong>
              <em>"Why there, now?"</em>
            </strong> Devoxx is apparently turning
into JavaOne Winter, because Sun's been making a lot of pretty big announcements at
that show, including last year's "no closures, no built-in XML support, ..."
announcement about Java7, and now this year's "well, we lied, we're thinking
about closures again". Fortunately I think the Devoxx folks have much better
skills at keeping their conference relevant to the Java community than JavaOne's organizers
did. And I say that <em>despite</em> the fact (or perhaps because of the fact) that
I didn't speak there this year. ;-) 
</li>
          <li>
            <strong>
              <em>"When is this all supposed to ship again?"</em>
            </strong> Originally,
my understanding was that JDK7 was slated to ship in the early part of 2010, but now
rumor has it slipping to this time next year (2010). That is a huge postponement,
and gives Microsoft a bit of an edge, since Visual Studio 2010 and .NET 4.0 are (again,
according to rumor) supposed to ship somewhere around the end of 1Q2010. If Sun/Oracle
keeps this up, we could very well be seeing a 2-.NET-releases-to-1-Java-release pattern,
and that's disturbing in its own right. (Anybody else remember the days when Sun withdrew
Java from ECMA, ISO and ANSI standardization consideration because they wanted to
"innovate on the platform faster"?) 
</li>
          <li>
            <strong>
              <em>"We really have no clue what we're talking about."</em>
            </strong> Aside
from rumors and hearsay (including the one that says that Mark Reinhold, who made
the announcement, made up the syntax on the flight from the US to Belgium), we really
don't have much by way of Sun-blessed <em>official</em> discussions of what this will
look like or act like, at least none so far as I've been able to find, so any sort
of supposition on whether it will be good or suck like an inverted hurricane is a
tad premature. Trust me, I want to see where this goes, too, so I'll be keeping an
eye out. 
</li>
        </ul>
        <p>
In the meantime, if you want to keep on top of the Java space, maybe it's time to <a href="http://www.devoxx.com" target="_blank">consider
a trip to Antwerp</a> this time next year, since, if the new ship date rumors are
to be believed,  it looks like Sun (once again) is planning to use Devoxx as
the platform from which to make a large announcement, this time the release Java7
itself.
</p>
        <hr />
        <p>
          <strong>Update:</strong>
          <a href="http://olabini.com" target="_blank">Ola Bini</a> noted
that...
</p>
        <blockquote>
          <p>
Two things:
</p>
          <ul>
            <li>
They are <u>definitely</u> closures. Calling them anonymous functions are incorrect,
since they aren't really functions. Lambda expression is an OK name, but it has connotations
that aren't really correct for a language like Java. A closure is defined as an anonymous
piece of code that closes over at least one free variable, which in the case of this
proposal will definitely happen. In fact, all of these will be closures, since they
will be closing over the this at least. 
</li>
            <li>
This is mostly on the level of compiler, syntax and type checking, and will NOT have
any real implications for runtime. This means there will be no real sharing of implementation
- at most JRuby, Groovy and Scala blocks will implement another interface (but all
of them already implement Runnable and Callable so it's a limited win). 
</li>
          </ul>
        </blockquote>
        <p>
which prompted me to respond thusly:
</p>
        <p>
First off, I actually never used the term "anonymous function"; instead,
I said "anonymous method", which, as I understand it, is how the underlying
implementation of these proposals will work: the syntax "#() return 42"
will create an anonymous inner class instance of an interface defined by the library
(in its "SimpleClosure" example, the BGGA compiler uses the interface "javax.lang.function.I",
which has one method on it, "invoke()"), which, thus, makes this an anonymous
method. We can't call them "anonymous functions" because Java has no function
type, and probably never will. (And yes, it may seem like we're splitting hairs somewhat
to differentiate between functions and methods,but once you've explored ML, Haskell,
Scala, or F#, you really begin to see a huge difference in those terms, so it's important
to be precise with our terminology, or else the conversation becomes almost entirely
meaningless.)
</p>
        <p>
Neal Gafter uses the definition "A closure is a function that captures the bindings
of free variables in its lexical context." (<a href="http://gafter.blogspot.com/2007/01/definition-of-closures.html)">http://gafter.blogspot.com/2007/01/definition-of-closures.html)</a> Given
that said same post also claims that Java has no function type (and therefore, by
his definition, can't really have a closure), I suppose we could split the hairs even
further and suggest that Java will never have closures until it has true function
types. Personally, I'm happy to say that we can swap in "methods" for "functions"
in this particular discussion, but my understanding is that capturing free variables
also implies capturing variables referenced in the enclosing lexical context, which
the current "closures" proposal (as reported by Alex Miller's closures page)
will not do. (Non-final enclosing parameters will not be accessible, only those passed
in formally as parameters. <a href="http://www.jroller.com/scolebourne/entry/closures_in_jdk_7" target="_blank">Stephen
Colebourne</a> reports as much: "[Mark Reinhold] also indicated that access to
non-final variables was unlikely.")
</p>
        <p>
Given that the current proposal suggests the new #() syntax will essentially generate
an anonymous inner class with a method of the appropriate signature (though I do believe
that method handles are targeted for use at some point, based on what I've been hearing
through the rumor mill), to me it feels like the "closures" implementation
is generating an anonymous method of an anonymous class with a few other restrictions
included--hence my commentary above.
</p>
        <p>
(Having said all that, the <a href="http://docs.google.com/View?docid=ddhp95vd_6hg3qhc" target="_blank">FCM
proposal</a> does provide complete capture of all referenced variables in enclosing
scope, but Mark's keynote hasn't officially endorsed either the BGGA proposal or the
FCM proposal, and if Sun keeps to their habits, they won't. They'll build something
that's an amalgamation of all of them. Right now the current consensus seems to be
to adopt the BGGA implementation behind the FCM syntax, which jives with Neal's 0.6a
specification proposal.)
</p>
        <p>
On top of that, the comment "all of these will be closures, since they will be
closing over the this at least" is not, I don't think, entirely true. The details
of the closures proposal aren't clear, but the "outer this" (which I believe
is the "this" Ola refers to above) hasn't been explicitly mentioned in any
of the closures proposals I've seen, nor have I seen any text suggesting that they
will honor it, so I don't know that this is true. Of course, in absence of a specification
or real working bits, all we can do is just speculate. However, having said that,
playing around a bit with the BGGA prototype compiler (which, admittedly, is still
one minor rev back from Neal's revised proposal), I saw no generated "outer this"
in the generated code for the generated inner class implementation of the closure.
If the comment above is meant to refer to the "this" of the inner class
instance, then that would make all methods of an object-oriented language that provided
an implicit "this" a closure, and somehow I doubt that's what Ola means,
though I could, as always, be wrong.
</p>
        <p>
As for the runtime implementation, as I said earlier I believe the plan is to use
method handles (already on the table for JDK 7), which do have some runtime implications
(generally good ones, from what I can tell so far), but not beyond what was already
on the table for 7.
</p>
        <img width="0" height="0" src="http://blogs.tedneward.com/aggbug.ashx?id=9eb4738e-4c53-4fbb-bf8e-e8712050c5ec" />
        <br />
        <hr />
Enterprise consulting, mentoring or instruction. Java, C++, .NET or XML services.
1-day or multi-day workshops available. <a href="mailto:ted@tedneward.com">Contact
me for details</a>.</body>
      <title>Closures are back again!</title>
      <guid isPermaLink="false">http://blogs.tedneward.com/PermaLink,guid,9eb4738e-4c53-4fbb-bf8e-e8712050c5ec.aspx</guid>
      <link>http://blogs.tedneward.com/2009/11/19/Closures+Are+Back+Again.aspx</link>
      <pubDate>Thu, 19 Nov 2009 08:10:11 GMT</pubDate>
      <description>&lt;p&gt;
Those of you who've seen me speak on Java 7 at various conferences have heard me lament
(in a small way) the fact that Sun decided last year (Dec 2008) to forgo the idea
of including closures in the Java language. Imagine my surprise, then, to check my
Twitter feed and discover that, to everyone's surprise, closures &lt;a href="http://puredanger.com/tech/2009/11/18/closures-after-all/" target="_blank"&gt;are
back in as a consideration for the Java7 release&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
Several thoughts come to mind:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;em&gt;&amp;quot;WTF?!?!? This is a community effort?&amp;quot;&lt;/em&gt;&lt;/strong&gt; Originally,
when Sun created the Java Community Process, the tradeoff for a committee-based development
process was against the open and fair inclusion of ideas from outside of Sun. But
with the Java7 release still lacking a JSR (as of a few weeks ago, anyway; I haven't
checked today to see if it was opened), and both the Modules facility and language
extensions deferred to &amp;quot;Projects&amp;quot; (not JSRs), it seems Sun is now abandoning
the JCP in favor of a Sun-dominant process that is certainly solicitous of the community
at large, but not constrained or defined by it. And for the life of me, I can't tell
if this is a good thing or a bad thing. It's good in that now we don't have to garner
a critical mass of community momentum to get something included into the platform
or language, but it's bad in that Sun has historically been the bigger drag on innovation
there, not the community. 
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;em&gt;&amp;quot;Can we please stop calling them closures?&amp;quot;&lt;/em&gt;&lt;/strong&gt; This
is a nit, but technically what we're talking about adding here are either lambda expressions
or anonymous methods, depending on whose glossary you're using when you're talking.
A true closure is one that will compute all referenced variables from the enclosing
scope and automatically include them in the generated code, which (so far as I can
tell) none of the Java anonymous method or lambda expression proposals currently include.
But it's a nit, so I'll say it this once and then drop it. 
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;em&gt;&amp;quot;Will Groovy, Scala, Clojure and all other JVM languages please report
to the refactoring room?&amp;quot;&lt;/em&gt;&lt;/strong&gt; People look at me quizzically when I
say I'd like to see Java have closures in the language, because in general my take
on language features in Java is that the Java language is more or less dead, and I
could care less what happens to it; I'd vastly prefer to code in Groovy or Scala or
Clojure or JRuby before writing something in Java. My rationale for wanting closures
in Java, however, is this: by defining a common &lt;em&gt;implementation&lt;/em&gt; for closures
in Java, all of the above languages can refactor their implementations of anonymous
methods/lambda expressions/etc into something that uses Java's closure implementation,
and that'll make calling Groovy anonymous methods from Scala much much easier. 
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;em&gt;&amp;quot;Why there, now?&amp;quot;&lt;/em&gt;&lt;/strong&gt; Devoxx is apparently turning
into JavaOne Winter, because Sun's been making a lot of pretty big announcements at
that show, including last year's &amp;quot;no closures, no built-in XML support, ...&amp;quot;
announcement about Java7, and now this year's &amp;quot;well, we lied, we're thinking
about closures again&amp;quot;. Fortunately I think the Devoxx folks have much better
skills at keeping their conference relevant to the Java community than JavaOne's organizers
did. And I say that &lt;em&gt;despite&lt;/em&gt; the fact (or perhaps because of the fact) that
I didn't speak there this year. ;-) 
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;em&gt;&amp;quot;When is this all supposed to ship again?&amp;quot;&lt;/em&gt;&lt;/strong&gt; Originally,
my understanding was that JDK7 was slated to ship in the early part of 2010, but now
rumor has it slipping to this time next year (2010). That is a huge postponement,
and gives Microsoft a bit of an edge, since Visual Studio 2010 and .NET 4.0 are (again,
according to rumor) supposed to ship somewhere around the end of 1Q2010. If Sun/Oracle
keeps this up, we could very well be seeing a 2-.NET-releases-to-1-Java-release pattern,
and that's disturbing in its own right. (Anybody else remember the days when Sun withdrew
Java from ECMA, ISO and ANSI standardization consideration because they wanted to
&amp;quot;innovate on the platform faster&amp;quot;?) 
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;em&gt;&amp;quot;We really have no clue what we're talking about.&amp;quot;&lt;/em&gt;&lt;/strong&gt; Aside
from rumors and hearsay (including the one that says that Mark Reinhold, who made
the announcement, made up the syntax on the flight from the US to Belgium), we really
don't have much by way of Sun-blessed &lt;em&gt;official&lt;/em&gt; discussions of what this will
look like or act like, at least none so far as I've been able to find, so any sort
of supposition on whether it will be good or suck like an inverted hurricane is a
tad premature. Trust me, I want to see where this goes, too, so I'll be keeping an
eye out. 
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
In the meantime, if you want to keep on top of the Java space, maybe it's time to &lt;a href="http://www.devoxx.com" target="_blank"&gt;consider
a trip to Antwerp&lt;/a&gt; this time next year, since, if the new ship date rumors are
to be believed,&amp;#160; it looks like Sun (once again) is planning to use Devoxx as
the platform from which to make a large announcement, this time the release Java7
itself.
&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;
&lt;strong&gt;Update:&lt;/strong&gt; &lt;a href="http://olabini.com" target="_blank"&gt;Ola Bini&lt;/a&gt; noted
that...
&lt;/p&gt;
&lt;blockquote&gt; 
&lt;p&gt;
Two things:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
They are &lt;u&gt;definitely&lt;/u&gt; closures. Calling them anonymous functions are incorrect,
since they aren't really functions. Lambda expression is an OK name, but it has connotations
that aren't really correct for a language like Java. A closure is defined as an anonymous
piece of code that closes over at least one free variable, which in the case of this
proposal will definitely happen. In fact, all of these will be closures, since they
will be closing over the this at least. 
&lt;/li&gt;
&lt;li&gt;
This is mostly on the level of compiler, syntax and type checking, and will NOT have
any real implications for runtime. This means there will be no real sharing of implementation
- at most JRuby, Groovy and Scala blocks will implement another interface (but all
of them already implement Runnable and Callable so it's a limited win). 
&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
which prompted me to respond thusly:
&lt;/p&gt;
&lt;p&gt;
First off, I actually never used the term &amp;quot;anonymous function&amp;quot;; instead,
I said &amp;quot;anonymous method&amp;quot;, which, as I understand it, is how the underlying
implementation of these proposals will work: the syntax &amp;quot;#() return 42&amp;quot;
will create an anonymous inner class instance of an interface defined by the library
(in its &amp;quot;SimpleClosure&amp;quot; example, the BGGA compiler uses the interface &amp;quot;javax.lang.function.I&amp;quot;,
which has one method on it, &amp;quot;invoke()&amp;quot;), which, thus, makes this an anonymous
method. We can't call them &amp;quot;anonymous functions&amp;quot; because Java has no function
type, and probably never will. (And yes, it may seem like we're splitting hairs somewhat
to differentiate between functions and methods,but once you've explored ML, Haskell,
Scala, or F#, you really begin to see a huge difference in those terms, so it's important
to be precise with our terminology, or else the conversation becomes almost entirely
meaningless.)
&lt;/p&gt;
&lt;p&gt;
Neal Gafter uses the definition &amp;quot;A closure is a function that captures the bindings
of free variables in its lexical context.&amp;quot; (&lt;a href="http://gafter.blogspot.com/2007/01/definition-of-closures.html)"&gt;http://gafter.blogspot.com/2007/01/definition-of-closures.html)&lt;/a&gt; Given
that said same post also claims that Java has no function type (and therefore, by
his definition, can't really have a closure), I suppose we could split the hairs even
further and suggest that Java will never have closures until it has true function
types. Personally, I'm happy to say that we can swap in &amp;quot;methods&amp;quot; for &amp;quot;functions&amp;quot;
in this particular discussion, but my understanding is that capturing free variables
also implies capturing variables referenced in the enclosing lexical context, which
the current &amp;quot;closures&amp;quot; proposal (as reported by Alex Miller's closures page)
will not do. (Non-final enclosing parameters will not be accessible, only those passed
in formally as parameters. &lt;a href="http://www.jroller.com/scolebourne/entry/closures_in_jdk_7" target="_blank"&gt;Stephen
Colebourne&lt;/a&gt; reports as much: &amp;quot;[Mark Reinhold] also indicated that access to
non-final variables was unlikely.&amp;quot;)
&lt;/p&gt;
&lt;p&gt;
Given that the current proposal suggests the new #() syntax will essentially generate
an anonymous inner class with a method of the appropriate signature (though I do believe
that method handles are targeted for use at some point, based on what I've been hearing
through the rumor mill), to me it feels like the &amp;quot;closures&amp;quot; implementation
is generating an anonymous method of an anonymous class with a few other restrictions
included--hence my commentary above.
&lt;/p&gt;
&lt;p&gt;
(Having said all that, the &lt;a href="http://docs.google.com/View?docid=ddhp95vd_6hg3qhc" target="_blank"&gt;FCM
proposal&lt;/a&gt; does provide complete capture of all referenced variables in enclosing
scope, but Mark's keynote hasn't officially endorsed either the BGGA proposal or the
FCM proposal, and if Sun keeps to their habits, they won't. They'll build something
that's an amalgamation of all of them. Right now the current consensus seems to be
to adopt the BGGA implementation behind the FCM syntax, which jives with Neal's 0.6a
specification proposal.)
&lt;/p&gt;
&lt;p&gt;
On top of that, the comment &amp;quot;all of these will be closures, since they will be
closing over the this at least&amp;quot; is not, I don't think, entirely true. The details
of the closures proposal aren't clear, but the &amp;quot;outer this&amp;quot; (which I believe
is the &amp;quot;this&amp;quot; Ola refers to above) hasn't been explicitly mentioned in any
of the closures proposals I've seen, nor have I seen any text suggesting that they
will honor it, so I don't know that this is true. Of course, in absence of a specification
or real working bits, all we can do is just speculate. However, having said that,
playing around a bit with the BGGA prototype compiler (which, admittedly, is still
one minor rev back from Neal's revised proposal), I saw no generated &amp;quot;outer this&amp;quot;
in the generated code for the generated inner class implementation of the closure.
If the comment above is meant to refer to the &amp;quot;this&amp;quot; of the inner class
instance, then that would make all methods of an object-oriented language that provided
an implicit &amp;quot;this&amp;quot; a closure, and somehow I doubt that's what Ola means,
though I could, as always, be wrong.
&lt;/p&gt;
&lt;p&gt;
As for the runtime implementation, as I said earlier I believe the plan is to use
method handles (already on the table for JDK 7), which do have some runtime implications
(generally good ones, from what I can tell so far), but not beyond what was already
on the table for 7.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blogs.tedneward.com/aggbug.ashx?id=9eb4738e-4c53-4fbb-bf8e-e8712050c5ec" /&gt;
&lt;br /&gt;
&lt;hr /&gt;
Enterprise consulting, mentoring or instruction. Java, C++, .NET or XML services.
1-day or multi-day workshops available. &lt;a href="mailto:ted@tedneward.com"&gt;Contact
me for details&lt;/a&gt;.</description>
      <comments>http://blogs.tedneward.com/CommentView,guid,9eb4738e-4c53-4fbb-bf8e-e8712050c5ec.aspx</comments>
      <category>Conferences</category>
      <category>Java/J2EE</category>
      <category>Languages</category>
      <category>Ruby</category>
      <category>Scala</category>
    </item>
    <item>
      <trackback:ping>http://blogs.tedneward.com/Trackback.aspx?guid=f9d4f3dc-bf96-4f4b-8794-6a053ab2d7da</trackback:ping>
      <pingback:server>http://blogs.tedneward.com/pingback.aspx</pingback:server>
      <pingback:target>http://blogs.tedneward.com/PermaLink,guid,f9d4f3dc-bf96-4f4b-8794-6a053ab2d7da.aspx</pingback:target>
      <dc:creator>Ted Neward</dc:creator>
      <wfw:comment>http://blogs.tedneward.com/CommentView,guid,f9d4f3dc-bf96-4f4b-8794-6a053ab2d7da.aspx</wfw:comment>
      <wfw:commentRss>http://blogs.tedneward.com/SyndicationService.asmx/GetEntryCommentsRss?guid=f9d4f3dc-bf96-4f4b-8794-6a053ab2d7da</wfw:commentRss>
      <slash:comments>12</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Phil Haack wrote <a href="http://haacked.com/archive/2009/10/13/software-externalities.aspx" target="_blank">a
thoughtful, insightful and absolutely correct response</a> to <a href="http://blogs.tedneward.com/2009/10/12/quotAgile+Is+Treating+The+Symptoms+Not+The+Diseasequot.aspx" target="_blank">my
earlier blog post</a>. But he's still missing the point.
</p>
        <p>
The short version: Phil's right when he says, "<strong>Agile is less about managing
the complexity of an application itself and more about managing the complexity of
building an application</strong>." Agile is by far the best approach to take
when building complex software. 
</p>
        <p>
But that's not where I'm going with this. 
</p>
        <p>
As a starting point in the discussion, I'd like to call attention to one of Phil's
sidebars: I find it curious (and indicative of the larger point) his earlier comment
about "<em>I have to wonder, why is that little school district in western Pennsylvania
engaging in custom software development in the first place?</em>" At what point
does standing a small Access database up qualify as "custom software development"?
And I take <em>huge</em> issue with Phil's comment immediately thereafter: ""
That's totally untrue, Phil—you are, in fact, creating custom educational curricula,
for your children at home. Not for popular usage, not for commercial use, but clearly
you're educating your children at home, because you'd be a pretty crappy parent if
you didn't. You also practice an informal form of medicine ("Let me kiss the
boo-boo"), psychology ("Now, come on, share the truck"), culinary arts
("Would you like mac and cheese tonight?"), acting ("Aaar! I'm the
Tickle Monster!") and a vastly larger array of "professional" skills
that any of the "professionals" will do vastly better than you.
</p>
        <p>
In other words, you're not a professional actor/chef/shrink/doctor, you're an amateur
one, and you want tools that let you practice your amateur "professions"
as you wish, without requiring the skills and trappings (and overhead) of a professional
in the same arena.
</p>
        <p>
Consider this, Phil: your child decides it's time to have a puppy. (We all know the
kids are the ones who make these choices, not us, right?) So, being the conscientious
parent that you are, you decide to build a doghouse for the new puppy to use to sleep
outdoors (forgetting, as all parents do, that the puppy will actually end up sleeping
in the bed with your child, but that's another discussion for another day). So immediately
you head on down to Home Depot, grab some lumber, some nails, maybe a hammer and a
screwdriver, some paint, and head on home.
</p>
        <p>
Whoa, there, turbo. Aren't you forgetting a few things? For starters, you need to
get the concrete for the foundation, rebar to support the concrete in the event of
a bad earthquake, drywall, fire extinguishers, sirens for the emergency exit doors...
And of course, you'll need a foreman to coordinate all the work, to make sure the
foundation is poured before the carpenters show up to put up the trusses, which in
turn has to happen before the drywall can go up...
</p>
        <p>
We in this industry have a jealous and irrational attitude towards the amateur software
developer. This was even apparent in the Twitter comments that accompanied the conversation
around my blog post: "@<a href="http://twitter.com/tedneward">tedneward</a> treating
the disease would mean... have the client have all their ideas correct from the start"
(from <a href="http://twitter.com/kelps/statuses/4839762645" target="_blank">@kelps</a>).
In other words, "bad client! No biscuit!"?
</p>
        <p>
Why is it that we, IT professionals, consider anything that involves doing something
other than simply putting content into an application to be "custom software
development"? Why can't end-users create tools of their own to solve their own
problems at a scale appropriate to their local problem?
</p>
        <p>
Phil offers a few examples of why end-users creating their own tools is a Bad Idea:
</p>
        <blockquote>
          <p>
I remember one rescue operation for a company drowning in the complexity of a “simple”
Access application they used to run their business. It was simple until they started
adding new business processes they needed to track. It was simple until they started <em>emailing
copies around </em>and were unsure which was the “master copy”. Not to mention all
the data integrity issues and difficulty in changing the monolithic procedural application
code.
</p>
        </blockquote>
        <blockquote>
          <p>
I also remember helping a teachers union who started off with a simple attendance
tracker style app (to use an example Ted mentions) and just scaled it up to an atrociously
complex Access database with stranded data and manual processes where they printed
excel spreadsheets to paper, then manually entered it into another application.
</p>
        </blockquote>
        <p>
And you know what? 
</p>
        <p>
This is not a bad state of affairs. 
</p>
        <p>
Oh, of course, we, the IT professionals, will immediately pounce on all the things
wrong with their attempts to extend the once-simple application/solution in ways beyond
its capabilities, and we will scoff at their solutions, but you know what? That just
speaks to our insecurities, not the effort expended. You think Wolfgang Puck isn't
going to throw back his head and roar at my lame attempts at culinary experimentation?
You think Frank Lloyd Wright wouldn't cringe in horror at my cobbled-together doghouse?
And I'll bet Maya Angelou will be so shocked at the ugliness of my poetry that she'll
post it somewhere on the "So You Think You're A Poet" website.
</p>
        <p>
Does that mean I need to abandon my efforts to all of these things?
</p>
        <p>
The agilists' community reaction to my post would seem to imply so. "If you aren't
a professional, don't even attempt this?" Really? Is that the message we're preaching
these days?
</p>
        <p>
End users have just as much a desire and right to be amateur software developers as
we do at being amateur cooks, photographers, poets, construction foremen, and musicians.
And what do you do when you want to add an addition to your house instead of just
building a doghouse? Or when you want to cook for several hundred people instead of
just your family?
</p>
        <p>
You hire a professional, and let them do the project professionally.
</p>
        <img width="0" height="0" src="http://blogs.tedneward.com/aggbug.ashx?id=f9d4f3dc-bf96-4f4b-8794-6a053ab2d7da" />
        <br />
        <hr />
Enterprise consulting, mentoring or instruction. Java, C++, .NET or XML services.
1-day or multi-day workshops available. <a href="mailto:ted@tedneward.com">Contact
me for details</a>.</body>
      <title>Haacked, but not content; agile still treats the disease</title>
      <guid isPermaLink="false">http://blogs.tedneward.com/PermaLink,guid,f9d4f3dc-bf96-4f4b-8794-6a053ab2d7da.aspx</guid>
      <link>http://blogs.tedneward.com/2009/10/13/Haacked+But+Not+Content+Agile+Still+Treats+The+Disease.aspx</link>
      <pubDate>Tue, 13 Oct 2009 20:42:22 GMT</pubDate>
      <description>&lt;p&gt;
Phil Haack wrote &lt;a href="http://haacked.com/archive/2009/10/13/software-externalities.aspx" target="_blank"&gt;a
thoughtful, insightful and absolutely correct response&lt;/a&gt; to &lt;a href="http://blogs.tedneward.com/2009/10/12/quotAgile+Is+Treating+The+Symptoms+Not+The+Diseasequot.aspx" target="_blank"&gt;my
earlier blog post&lt;/a&gt;. But he's still missing the point.
&lt;/p&gt;
&lt;p&gt;
The short version: Phil's right when he says, &amp;quot;&lt;strong&gt;Agile is less about managing
the complexity of an application itself and more about managing the complexity of
building an application&lt;/strong&gt;.&amp;quot; Agile is by far the best approach to take
when building complex software. 
&lt;/p&gt;
&lt;p&gt;
But that's not where I'm going with this. 
&lt;/p&gt;
&lt;p&gt;
As a starting point in the discussion, I'd like to call attention to one of Phil's
sidebars: I find it curious (and indicative of the larger point) his earlier comment
about &amp;quot;&lt;em&gt;I have to wonder, why is that little school district in western Pennsylvania
engaging in custom software development in the first place?&lt;/em&gt;&amp;quot; At what point
does standing a small Access database up qualify as &amp;quot;custom software development&amp;quot;?
And I take &lt;em&gt;huge&lt;/em&gt; issue with Phil's comment immediately thereafter: &amp;quot;&amp;quot;
That's totally untrue, Phil—you are, in fact, creating custom educational curricula,
for your children at home. Not for popular usage, not for commercial use, but clearly
you're educating your children at home, because you'd be a pretty crappy parent if
you didn't. You also practice an informal form of medicine (&amp;quot;Let me kiss the
boo-boo&amp;quot;), psychology (&amp;quot;Now, come on, share the truck&amp;quot;), culinary arts
(&amp;quot;Would you like mac and cheese tonight?&amp;quot;), acting (&amp;quot;Aaar! I'm the
Tickle Monster!&amp;quot;) and a vastly larger array of &amp;quot;professional&amp;quot; skills
that any of the &amp;quot;professionals&amp;quot; will do vastly better than you.
&lt;/p&gt;
&lt;p&gt;
In other words, you're not a professional actor/chef/shrink/doctor, you're an amateur
one, and you want tools that let you practice your amateur &amp;quot;professions&amp;quot;
as you wish, without requiring the skills and trappings (and overhead) of a professional
in the same arena.
&lt;/p&gt;
&lt;p&gt;
Consider this, Phil: your child decides it's time to have a puppy. (We all know the
kids are the ones who make these choices, not us, right?) So, being the conscientious
parent that you are, you decide to build a doghouse for the new puppy to use to sleep
outdoors (forgetting, as all parents do, that the puppy will actually end up sleeping
in the bed with your child, but that's another discussion for another day). So immediately
you head on down to Home Depot, grab some lumber, some nails, maybe a hammer and a
screwdriver, some paint, and head on home.
&lt;/p&gt;
&lt;p&gt;
Whoa, there, turbo. Aren't you forgetting a few things? For starters, you need to
get the concrete for the foundation, rebar to support the concrete in the event of
a bad earthquake, drywall, fire extinguishers, sirens for the emergency exit doors...
And of course, you'll need a foreman to coordinate all the work, to make sure the
foundation is poured before the carpenters show up to put up the trusses, which in
turn has to happen before the drywall can go up...
&lt;/p&gt;
&lt;p&gt;
We in this industry have a jealous and irrational attitude towards the amateur software
developer. This was even apparent in the Twitter comments that accompanied the conversation
around my blog post: &amp;quot;@&lt;a href="http://twitter.com/tedneward"&gt;tedneward&lt;/a&gt; treating
the disease would mean... have the client have all their ideas correct from the start&amp;quot;
(from &lt;a href="http://twitter.com/kelps/statuses/4839762645" target="_blank"&gt;@kelps&lt;/a&gt;).
In other words, &amp;quot;bad client! No biscuit!&amp;quot;?
&lt;/p&gt;
&lt;p&gt;
Why is it that we, IT professionals, consider anything that involves doing something
other than simply putting content into an application to be &amp;quot;custom software
development&amp;quot;? Why can't end-users create tools of their own to solve their own
problems at a scale appropriate to their local problem?
&lt;/p&gt;
&lt;p&gt;
Phil offers a few examples of why end-users creating their own tools is a Bad Idea:
&lt;/p&gt;
&lt;blockquote&gt; 
&lt;p&gt;
I remember one rescue operation for a company drowning in the complexity of a “simple”
Access application they used to run their business. It was simple until they started
adding new business processes they needed to track. It was simple until they started &lt;em&gt;emailing
copies around &lt;/em&gt;and were unsure which was the “master copy”. Not to mention all
the data integrity issues and difficulty in changing the monolithic procedural application
code.
&lt;/p&gt;
&lt;/blockquote&gt; &lt;blockquote&gt; 
&lt;p&gt;
I also remember helping a teachers union who started off with a simple attendance
tracker style app (to use an example Ted mentions) and just scaled it up to an atrociously
complex Access database with stranded data and manual processes where they printed
excel spreadsheets to paper, then manually entered it into another application.
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
And you know what? 
&lt;/p&gt;
&lt;p&gt;
This is not a bad state of affairs. 
&lt;/p&gt;
&lt;p&gt;
Oh, of course, we, the IT professionals, will immediately pounce on all the things
wrong with their attempts to extend the once-simple application/solution in ways beyond
its capabilities, and we will scoff at their solutions, but you know what? That just
speaks to our insecurities, not the effort expended. You think Wolfgang Puck isn't
going to throw back his head and roar at my lame attempts at culinary experimentation?
You think Frank Lloyd Wright wouldn't cringe in horror at my cobbled-together doghouse?
And I'll bet Maya Angelou will be so shocked at the ugliness of my poetry that she'll
post it somewhere on the &amp;quot;So You Think You're A Poet&amp;quot; website.
&lt;/p&gt;
&lt;p&gt;
Does that mean I need to abandon my efforts to all of these things?
&lt;/p&gt;
&lt;p&gt;
The agilists' community reaction to my post would seem to imply so. &amp;quot;If you aren't
a professional, don't even attempt this?&amp;quot; Really? Is that the message we're preaching
these days?
&lt;/p&gt;
&lt;p&gt;
End users have just as much a desire and right to be amateur software developers as
we do at being amateur cooks, photographers, poets, construction foremen, and musicians.
And what do you do when you want to add an addition to your house instead of just
building a doghouse? Or when you want to cook for several hundred people instead of
just your family?
&lt;/p&gt;
&lt;p&gt;
You hire a professional, and let them do the project professionally.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blogs.tedneward.com/aggbug.ashx?id=f9d4f3dc-bf96-4f4b-8794-6a053ab2d7da" /&gt;
&lt;br /&gt;
&lt;hr /&gt;
Enterprise consulting, mentoring or instruction. Java, C++, .NET or XML services.
1-day or multi-day workshops available. &lt;a href="mailto:ted@tedneward.com"&gt;Contact
me for details&lt;/a&gt;.</description>
      <comments>http://blogs.tedneward.com/CommentView,guid,f9d4f3dc-bf96-4f4b-8794-6a053ab2d7da.aspx</comments>
      <category>.NET</category>
      <category>C#</category>
      <category>C++</category>
      <category>Conferences</category>
      <category>Development Processes</category>
      <category>F#</category>
      <category>Flash</category>
      <category>Industry</category>
      <category>Java/J2EE</category>
      <category>Languages</category>
      <category>LLVM</category>
      <category>Mac OS</category>
      <category>Parrot</category>
      <category>Python</category>
      <category>Ruby</category>
      <category>Scala</category>
      <category>Social</category>
      <category>Solaris</category>
      <category>Visual Basic</category>
      <category>VMWare</category>
      <category>WCF</category>
      <category>Windows</category>
      <category>XML Services</category>
    </item>
  </channel>
</rss>