<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>esmithy.net &#187; Software Development</title>
	<atom:link href="http://esmithy.net/category/software-development/feed/" rel="self" type="application/rss+xml" />
	<link>http://esmithy.net</link>
	<description>Stuff Hammered Out by Eric Smith</description>
	<lastBuildDate>Tue, 17 Apr 2012 03:06:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>UI Horror: No-Paste Password Fields</title>
		<link>http://esmithy.net/2012/03/17/ui-horror-no-paste-password-fields/</link>
		<comments>http://esmithy.net/2012/03/17/ui-horror-no-paste-password-fields/#comments</comments>
		<pubDate>Sat, 17 Mar 2012 22:09:35 +0000</pubDate>
		<dc:creator>Eric</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[User Interface]]></category>

		<guid isPermaLink="false">http://esmithy.net/?p=543</guid>
		<description><![CDATA[Sure, it makes sense to disallow copying passwords from a password field, but disabling pasting is just being annoying. News flash for developers doing this (such as Intuit, in TurboTax): I&#8217;m not thrilled about manually typing my 20 character random password. Just let me copy it from my password vault and paste it into your [...]]]></description>
			<content:encoded><![CDATA[<p>Sure, it makes sense to disallow <strong>copying</strong> passwords from a password field, but disabling <strong>pasting</strong> is just being annoying.</p>
<p>News flash for developers doing this (such as Intuit, in TurboTax): I&#8217;m not thrilled about manually typing my 20 character random password. Just let me copy it from my password vault and paste it into your field.</p>
<p>In the case of TurboTax, it diminishes the value of data import if I have to type more characters for my password than there are numbers on the form to input.</p>
<div id="attachment_544" class="wp-caption aligncenter" style="width: 191px"><img class="size-full wp-image-544" title="no-paste-password" src="http://esmithy.net/content/no-paste-password.png" alt="" width="181" height="58" /><p class="wp-caption-text">TurboTax&#39;s castrated password field</p></div>
]]></content:encoded>
			<wfw:commentRss>http://esmithy.net/2012/03/17/ui-horror-no-paste-password-fields/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I want my webOS</title>
		<link>http://esmithy.net/2011/10/15/i-want-my-webos/</link>
		<comments>http://esmithy.net/2011/10/15/i-want-my-webos/#comments</comments>
		<pubDate>Sat, 15 Oct 2011 22:02:56 +0000</pubDate>
		<dc:creator>Eric</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Mobile]]></category>

		<guid isPermaLink="false">http://esmithy.net/?p=482</guid>
		<description><![CDATA[It&#8217;s become fairly clear that HP is not webOS&#8217; savior. It&#8217;s also unlikely that webOS can come back from the dead for the second time. But it makes me sad, since webOS and its devices hit a sweet spot that no one managed to exploit. The currently winning smartphone platforms are the gated and guarded [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s become fairly clear that HP is not webOS&#8217; savior. It&#8217;s also unlikely that webOS can come back from the dead for the second time. But it makes me sad, since webOS and its devices hit a sweet spot that no one managed to exploit.</p>
<p><span id="more-482"></span></p>
<p>The currently winning smartphone platforms are the gated and guarded community of iOS, and the wild-west of Android. Palm/HP had the vertical integration of Apple with the openness of Google. Maybe in today&#8217;s polarized society, the middle has no appeal. But don&#8217;t think that when I say &#8220;middle&#8221; I mean not as good as either extreme &#8212; it&#8217;s more like the best of both worlds.</p>
<p>Here are some of my favorite features of webOS:</p>
<ol>
<li>Fantastic muti-tasking that no one else has yet matched.</li>
<li>A UI that is is richer than iOS and more beautiful than Android.</li>
<li>Over-the-air activation/updates/etc. Attaching it to a PC is never required.</li>
<li>Unobtrusive notifications that can be ignored without being lost.</li>
<li>Merging all of your contacts/calendars from wherever they happen to live.</li>
<li>Acceptance that Flash is still a significant web technology.</li>
<li>No jailbreaking required &#8211; but rather a completely sanctioned developer mode that gives you root access to the device.</li>
<li>HTML 5 application development as a first class citizen.</li>
<li>C++ application development for gaming, etc.</li>
<li>A cloud-based IDE allowing app development in a browser.</li>
<li>It is Linux, so skills are transferable.</li>
<li>Inductive charging, so you don&#8217;t have to plug in cords &#8212; just drop it on the charger (OK, technically a hardware feature rather than webOS per se, but still awesome).</li>
</ol>
<p>I have applications that I wrote myself or with co-workers in both the HP App Catalog and the Apple App Store. I definitely prefer coding in JavaScript as opposed to Objective-C, but the thing that makes my blood boil in comparing the experience is Apple&#8217;s provisioning profile system. It&#8217;s as if Apple said, &#8220;Please poke yourself in the eye at regular intervals so that we can be sure you&#8217;ve paid us your developer program fees.&#8221; Having developed and submitted for webOS, it becomes obvious how pointless the Apple system is. I wouldn&#8217;t go to the trouble for a personal project &#8212; but what does Apple care about that?</p>
<p>I haven&#8217;t developed for Android, but I like Java, so it could be a good experience. But the Android ecosystem <a href="http://news.cnet.com/8301-31322_3-20120623-256/dear-android-this-is-your-last-chance/?tag=rtcol">seems like total chaos</a>.</p>
<p>I did do some preliminary investigation into developing a video-centric application for Android, but got stuck when trying to figure out what video decoder support exists for the platform. Sure, there&#8217;s something that says H.264 is supported, but at what level and profile? Those are kind of critical to know, but the information just isn&#8217;t available. I guess Google just left it up to the device manufacturers to do what they wanted, which means trying to figure it out for every device. Compare that to the <a href="https://developer.palm.com/content/api/reference/services/video.html#supported-video-formats">webOS information on video formats</a>.</p>
<p>So I find myself in an unfortunate situation, hanging on to an aging phone and not sure what I&#8217;d do if I accidentally dropped it on the sidewalk tomorrow. Maybe, like I did the last time Palm imploded (with Palm OS), I&#8217;d have to give Windows a try, and hope that it isn&#8217;t the soul-less experience it was last time.</p>
]]></content:encoded>
			<wfw:commentRss>http://esmithy.net/2011/10/15/i-want-my-webos/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Migrating from TFS to SVN</title>
		<link>http://esmithy.net/2011/02/01/migrating-from-tfs-to-svn/</link>
		<comments>http://esmithy.net/2011/02/01/migrating-from-tfs-to-svn/#comments</comments>
		<pubDate>Wed, 02 Feb 2011 03:14:43 +0000</pubDate>
		<dc:creator>Eric</dc:creator>
				<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://esmithy.net/?p=424</guid>
		<description><![CDATA[I&#8217;ve just spent the past few days migrating a Team Foundation Server source repository to Subversion. It took longer and was more difficult than I expected it to be. Of course, the easy way is to just get the latest from the TFS repository and add all of the files to the new SVN repository, [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just spent the past few days migrating a Team Foundation Server source repository to Subversion. It took longer and was more difficult than I expected it to be.</p>
<p><span id="more-424"></span></p>
<p>Of course, the easy way is to just get the latest from the TFS repository and add all of the files to the new SVN repository, but change history is valuable and I didn&#8217;t want to:</p>
<ol>
<li>lose it</li>
<li>be required to go back to TFS to get it</li>
</ol>
<p>I found <a href="http://sourceforge.net/projects/tfs2svn/">tfs2svn</a>, a tool written by Kevin Colyar expressly for the purpose of migrating while preserving the change history. If you&#8217;re going to run this on a big, mature TFS repository, there are a couple of things you should know:</p>
<ol>
<li>It&#8217;s going to take a long time.</li>
<li>Stuff is going to go wrong.</li>
</ol>
<p>This is no disrespect to Kevin &#8212; that the tool is available at all is a great help. I also have to confess that I hacked the source code a bit, so there&#8217;s a possibility that some of what went wrong was my own fault.</p>
<h3>My Scenario</h3>
<p>The repository I migrated has about five and a half years of history, comprised of nearly 21,000 changesets. It also had code from several projects, and I really only wanted to migrate a subset of the tree. We already have a Subversion repository with some source in it, so I wanted to get the TFS source into there.</p>
<h3>Strategy</h3>
<p>My plan was to create a local, temporary Subversion repository into which I could do the conversion. This would let me mess up in various spectacular ways without risk to the real SVN repository that would be the code&#8217;s ultimate home. It also seemed like it would be faster than running all of the SVN commands across the network to the Subversion server. Once the migration was done locally, I&#8217;d use <strong>svnadmin dump</strong> to generate a version of the repository that could be imported into the &#8220;real&#8221; repository with <strong>svnadmin load</strong>.</p>
<p>I hoped that I&#8217;d be able to use tfs2svn to limit the migration to only the parts of the tree that I wanted, but the tool resisted my attempts to do so. I was thinking that I&#8217;d run it multiple times, changing the paths to get one relevant top-level  folder at a time. It&#8217;s not clear which path to change, though. You&#8217;ve got the TFS repository path (which would be a must), the SVN repository path and the SVN working copy path. It turns out that all of those paths are used in different situations by the tool, and I eventually thought it might be best to just migrate the whole thing.</p>
<p>It would be tragic to actually include everything in the final SVN repository, though, given that Subversion doesn&#8217;t have a permanent delete feature (that is, &#8220;obliterate&#8221;). All the stuff I didn&#8217;t want to migrate would be forever in the repository. But since I was going to do a dump anyway, I could run <strong>dumpfilter</strong> to remove the stuff I didn&#8217;t want.</p>
<p>The trouble then becomes time. It takes so long to migrate all those TFS changesets into SVN that I very quickly decided I needed to push the filtering forward in the process. This is where the hacking began.</p>
<p>I added a &#8220;IncludeChange&#8221; check into TfsClientProvider&#8217;s ProcessChange method:</p>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF; font-weight: bold;">private</span> <span style="color: #6666cc; font-weight: bold;">bool</span> ProcessChange<span style="color: #008000;">&#40;</span>Changeset changeset, Change change<span style="color: #008000;">&#41;</span>
      <span style="color: #008000;">&#123;</span>
          <span style="color: #0600FF; font-weight: bold;">if</span> <span style="color: #008000;">&#40;</span>IncludeChange<span style="color: #008000;">&#40;</span>change<span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span>
          <span style="color: #008000;">&#123;</span>
              <span style="color: #008080; font-style: italic;">// Process file change.</span>
              <span style="color: #0600FF; font-weight: bold;">if</span> <span style="color: #008000;">&#40;</span>change<span style="color: #008000;">.</span><span style="color: #0000FF;">Item</span><span style="color: #008000;">.</span><span style="color: #0000FF;">ItemType</span> <span style="color: #008000;">==</span> ItemType<span style="color: #008000;">.</span><span style="color: #0000FF;">File</span><span style="color: #008000;">&#41;</span>
                  ProcessFileChange<span style="color: #008000;">&#40;</span>changeset, change<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
              <span style="color: #008080; font-style: italic;">// Process folder change.</span>
              <span style="color: #0600FF; font-weight: bold;">else</span> <span style="color: #0600FF; font-weight: bold;">if</span> <span style="color: #008000;">&#40;</span>change<span style="color: #008000;">.</span><span style="color: #0000FF;">Item</span><span style="color: #008000;">.</span><span style="color: #0000FF;">ItemType</span> <span style="color: #008000;">==</span> ItemType<span style="color: #008000;">.</span><span style="color: #0000FF;">Folder</span><span style="color: #008000;">&#41;</span>
                  ProcessFolderChange<span style="color: #008000;">&#40;</span>changeset, change<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
              <span style="color: #0600FF; font-weight: bold;">return</span> <span style="color: #0600FF; font-weight: bold;">true</span><span style="color: #008000;">;</span>
          <span style="color: #008000;">&#125;</span>
          <span style="color: #0600FF; font-weight: bold;">return</span> <span style="color: #0600FF; font-weight: bold;">false</span><span style="color: #008000;">;</span>
      <span style="color: #008000;">&#125;</span></pre></div></div>

<p>IncludeChange has a bunch of lines that look like this:</p>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF; font-weight: bold;">if</span> <span style="color: #008000;">&#40;</span>change<span style="color: #008000;">.</span><span style="color: #0000FF;">Item</span><span style="color: #008000;">.</span><span style="color: #0000FF;">ServerItem</span><span style="color: #008000;">.</span><span style="color: #0000FF;">StartsWith</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;$/Projects/Main/Applications&quot;</span>, StringComparison<span style="color: #008000;">.</span><span style="color: #0000FF;">OrdinalIgnoreCase</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span> <span style="color: #0600FF; font-weight: bold;">return</span> <span style="color: #0600FF; font-weight: bold;">false</span><span style="color: #008000;">;</span></pre></div></div>

<p>This combination skips any changes that were in areas that I didn&#8217;t care about. ProcessChange also now returns a boolean to indicate whether anything from the changeset needs to be committed in Subversion, saving additional time by skipping an unneeded operation.</p>
<h3>Problems</h3>
<p>One of the really good things about tfs2svn is the Start at Changeset# field. When something goes wrong, you can always start back up where you left off &#8212; even if you have to exit the program. Sometimes tfs2svn will even offer to fill in the Start at Changeset# field for you when it&#8217;s about to report an error.</p>
<p>These are some of the things that went wrong.</p>
<p>At first I was getting an obscure <em>Error resolving case of</em> [some path]. Hard to figure out, but easy to fix: I just needed to take the trailing backslash off the Working copy folder.</p>
<p>I also ran into a problem when a changeset moved some files from a place that I was excluding to a place that I wasn&#8217;t excluding. That didn&#8217;t turn out so well since the source files didn&#8217;t exist, having been skipped by my IncludeChange method. This was fairly early on, so I just decided to start over and not exclude the source path. I might have been able to get a copy of the files and add them to SVN in the appropriate place and retry, though.</p>
<p>Directory deletes in TFS frequently caused trouble in the conversion. They would result in an unresolved conflict on the directory and the commit would fail. In these cases, I just marked the conflict resolved, committed manually and skipped to the next changeset. You lose some of the history in these cases by doing that, though.</p>
<p>Directory adds also caused troubles at times. The tool would try to add a file to a directory that hadn&#8217;t been created yet. To fix those, I just created the directory by hand and added it to SVN and retried the problematic changeset.</p>
<p>There was one situation where some file renames weren&#8217;t working at all. The original files didn&#8217;t exist and the destination files did. I kind of mangled that changeset, but fortunately I knew that those files were obsolete and would all be deleted in a later changeset, so I didn&#8217;t care much about them anyway. I think this was probably caused by a situation where part of a changeset had been processed, but then there was an error. Retrying the changeset meant it tried to redo some moves that were already done.</p>
<p>Finally, there were some times when the network would timeout, or Subversion would report that a file or directory was corrupt or unreadable. In those cases, I just tried again and was always successful the next time.</p>
<p>With these errors popping up, tfs2svn required a lot of babysitting to notice the error, make a fix and get it going again. That unfortunately added to the total time span since it would invariably stop when you were busy with something else, or when you hoped to make good progress letting it run overnight.</p>
<h3>Finish</h3>
<p>Once the migration was done, <strong>svnadmin dump</strong> was relatively quick and completely painless. Once I could get some of IT&#8217;s time (someone with direct access to the Subversion server), the load also was quick and easy.</p>
<h3>Update (4 Feb 2011)</h3>
<p>I&#8217;ve noticed another problem in the migrated history. Sometimes the author of a change seems to be incorrect. According to the history, a developer from another team did some work that would be extremely unlikely if it were true. I haven&#8217;t figured this one out yet&#8230;</p>
<h3>Update (22 Mar 2011)</h3>
<p>A possible explanation for the &#8220;The file or directory is corrupted and unreadable&#8221; errors is a <a href="http://social.technet.microsoft.com/Forums/en/w7itprogeneral/thread/df935a52-a0a9-4f67-ac82-bc39e0585148">bug in Windows 7</a>. The bug fix is included in Windows 7 SP1, which you can get through Windows Update.</p>
]]></content:encoded>
			<wfw:commentRss>http://esmithy.net/2011/02/01/migrating-from-tfs-to-svn/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>IIS Configuration with WiX and Appcmd</title>
		<link>http://esmithy.net/2010/07/02/iis-configuration-with-wix-and-appcmd/</link>
		<comments>http://esmithy.net/2010/07/02/iis-configuration-with-wix-and-appcmd/#comments</comments>
		<pubDate>Fri, 02 Jul 2010 20:35:17 +0000</pubDate>
		<dc:creator>Eric</dc:creator>
				<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://esmithy.net/?p=389</guid>
		<description><![CDATA[I recently spent some time building an install package for a web application using WiX. There are some nice IIS extensions for WiX to help with that, but they&#8217;re missing the ability to set some advanced properties, like an Application Pool&#8217;s &#8220;Enable 32 Bit Applications&#8221; property. Matt Honeycutt has a helpful posting on his blog [...]]]></description>
			<content:encoded><![CDATA[<p>I recently spent some time building an install package for a web application using WiX. There are some nice IIS extensions for WiX to help with that, but they&#8217;re missing the ability to set some advanced properties, like an Application Pool&#8217;s &#8220;Enable 32 Bit Applications&#8221; property.<br />
<span id="more-389"></span><br />
Matt Honeycutt has a <a href="http://trycatchfail.com/blog/post/WiX-Snippet-change-enable32BitAppOnWin64.aspx">helpful posting</a> on his blog about this. The basic idea is that you use a custom action to invoke Appcmd.exe and do whatever you need, and that can be done entirely with WiX markup &#8212; no separate coding required.</p>
<p>I did need to alter Matt&#8217;s approach a little, though, because it didn&#8217;t work for me as it was. I would have just commented about this on his blog, but comments are closed.</p>
<p>When I ran my installer, I got a vague error saying that the custom action had failed. Running the MSI from the command line with the logging switch, and looking at the MSI log file didn&#8217;t help. There was output saying that it was going to run the custom action, but no indication that it had failed, no result code from the Appcmd process, and nothing from stderr. It <em>did</em> show the complete command line for the action, however, so I copied it out into a command prompt and ran it. That failed saying I needed administrator privileges. Running in a command prompt started with &#8220;Run as Administrator&#8221; worked just fine.</p>
<p>It turns out that by default, custom actions impersonate the user that started the install, without the administrator elevation that the installer itself runs under. This can be changed by setting the CustomAction&#8217;s Impersonate attribute to &#8220;no&#8221;. That also required adding Execute=&#8221;deferred&#8221;, and as a result, having the custom action run before InstallFinalize rather than after.</p>
<p>Here&#8217;s what it looks like:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;InstallExecuteSequence<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Custom</span> <span style="color: #000066;">Action</span>=<span style="color: #ff0000;">&quot;ConfigureAppPools&quot;</span> <span style="color: #000066;">Before</span>=<span style="color: #ff0000;">&quot;InstallFinalize&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #339933;">&lt;![CDATA[NOT Installed AND VersionNT64 &gt;= 600]]&gt;</span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Custom<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/InstallExecuteSequence<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
<span style="color: #808080; font-style: italic;">&lt;!-- Snip --&gt;</span>
&nbsp;
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;CustomAction</span> <span style="color: #000066;">Id</span>=<span style="color: #ff0000;">&quot;ConfigureAppPools&quot;</span> <span style="color: #000066;">Execute</span>=<span style="color: #ff0000;">&quot;deferred&quot;</span> <span style="color: #000066;">Impersonate</span>=<span style="color: #ff0000;">&quot;no&quot;</span> <span style="color: #000066;">Return</span>=<span style="color: #ff0000;">&quot;check&quot;</span> <span style="color: #000066;">Directory</span>=<span style="color: #ff0000;">&quot;TARGETDIR&quot;</span> <span style="color: #000066;">ExeCommand</span>=<span style="color: #ff0000;">&quot;[SystemFolder]inetsrv\appcmd set apppool /apppool.name:&amp;quot;[APPPOOLNAME]&amp;quot; /enable32BitAppOnWin64:true&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://esmithy.net/2010/07/02/iis-configuration-with-wix-and-appcmd/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The Best of PDC 2008</title>
		<link>http://esmithy.net/2009/01/17/the-best-of-pdc-2008/</link>
		<comments>http://esmithy.net/2009/01/17/the-best-of-pdc-2008/#comments</comments>
		<pubDate>Sun, 18 Jan 2009 04:45:22 +0000</pubDate>
		<dc:creator>Eric</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[.NET]]></category>

		<guid isPermaLink="false">http://esmithy.net/?p=218</guid>
		<description><![CDATA[For those of us poor folk who didn&#8217;t make it to PDC this past fall, Microsoft has been taking the show to us in the form of its MSDN Unleashed series. Rob Bagby, developer evangelist, came to Salt Lake City to present and give updates about new and upcoming technologies for developers. The Future of [...]]]></description>
			<content:encoded><![CDATA[<p>For those of us poor folk who didn&#8217;t make it to PDC this past fall, Microsoft has been taking the show to us in the form of its MSDN Unleashed series. <a href="http://blogs.msdn.com/bags/">Rob Bagby</a>, developer evangelist, came to Salt Lake City to present and give updates about new and upcoming technologies for developers.</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-219" title="Microsoft\'s Salt Lake City Office" src="http://esmithy.net/content/microsoft-slc.jpg" alt="" width="400" height="231" /></p>
<p><span id="more-218"></span></p>
<p><strong>The Future of C# (AKA C# 4)</strong></p>
<p>Rob&#8217;s first presentation introduced what the C# team is working on for the next release of the language. A lot of the focus is around exposing support for dynamic programming and interoperability with dynamic languages like Python and Ruby. This is done by deferring the evaluation of method and property calls on some objects until runtime. At compile time, the normally strict static type checking of the C# compiler is relaxed when a method call doesn&#8217;t seem to exist in order to allow for the possibility that such a method will be added dynamically sometime during program execution. To indicate that this behavior is wanted, you use the <strong>dynamic</strong> keyword like this:</p>

<div class="wp_syntax"><div class="code"><pre class="cs" style="font-family:monospace;">dynamic customer = GetCustomer();
Console.WriteLine(customer.FirstName);</pre></div></div>

<p>At run time, whatever actual object is stored in &#8220;customer&#8221; needs to have a property &#8220;FirstName&#8221; or an exception is thrown. Otherwise, the actual type is unimportant. This is also known as &#8220;duck typing&#8221; where capabilities of objects are more important than actual types &#8212; if it looks like a duck and acts like a duck, it might as well be a duck.</p>
<p>Some people in attendance were confused about how the <strong>dynamic</strong> keyword differs from <strong>var</strong>. The <strong>var</strong> keyword really just saves keystrokes &#8212; the type is still static but figured out by the compiler. Objects that are <strong>dynamic</strong> however, have their method calls bound at run time.</p>
<p>The ability of C# to handle dynamic types also makes it easier to interoperate with Javascript. Rob showed a Silverlight application that called out to Javascript functions pretty much identically to calling regular C# methods.</p>
<p>The next version of C# will also have default and named parameters, which have been supported in other .NET languages, and will make COM interop a bit nicer. I&#8217;ve written a bunch of calls to Office where it seems like you&#8217;re passing in ten-thousand Type.Missing parameters to some of the methods, and that will no longer be required.</p>
<p><strong>Silverlight Toolkit</strong></p>
<p>Shawn Burke, one of the guys behind the AJAX Control Toolkit, is now <a href="http://blogs.msdn.com/sburke/archive/2008/09/17/control-freak.aspx">heading a team to create Silverlight controls</a>. This presentation showed the controls that they are working on, and described the distribution model.</p>
<p>The controls are things like AutoComplete, NumericUpDown, TreeView, DockPanel, WrapPanel, and others that would be really useful in building a typical modern GUI application. There is also charting support, which Rob said comes fairly mature by virtue of Microsoft&#8217;s assimilation of Dundas code and engineers. There is also support for theming applications.</p>
<p>The controls are to be released on CodePlex frequently, with some controls eventually making it into the official Silverlight SDK or even the Silverlight Core. The <a href="http://www.codeplex.com/Silverlight">Silverlight Toolkit</a>, not to be confused with a CodePlex project called the <a href="http://www.codeplex.com/SilverlightToolkit">Silverlight Control Toolkit</a>, has a nice sample application that shows off all the new components.</p>
<p><strong>REST with WCF</strong></p>
<p>My coworker, <a href="http://www.zombiecuisine.com/">Ryan Jameson</a>, went to a Microsoft event last year where the <a href="http://msdn.microsoft.com/en-us/netframework/cc950529.aspx">REST Starter Kit for WCF</a> was one of the topics. He came back saying with a smirk that Microsoft had apparently <em>invented</em> REST, the way they had presented it. Rob implied no such thing, even joking that in every presentation about REST, there are people ranging from those who have never heard of it, to those that know <a href="http://en.wikipedia.org/wiki/Roy_Fielding">Roy Fielding&#8217;s</a> middle initial (which would be T, by the way).</p>
<p>REST is a philosophy for providing web services in a way that embraces the &#8220;way of the web&#8221;, such as:</p>
<ul>
<li>Most everything is addressable through a URI</li>
<li>There are standard representation formats</li>
<li>Interactions are stateless</li>
<li>The HTTP protocol</li>
</ul>
<p>Rob asked rhetorically if these principles might work OK given the success of the web, and summed up the philosophy by saying, &#8220;If you use GET for something other than <em>getting</em> a resource, you&#8217;re Part of the Problem.&#8221; And don&#8217;t even think about using POST to <em>get</em> something.</p>
<p>I haven&#8217;t done more than play around with web services, but it seemed to me that by using URI templates, WebGet and WebInvoke attributes, and WebProtocolException, you could suffuse a high degree of RESTiness into your WCF web service.</p>
<p>Things got pretty loose in this presentation, with Rob dodging pot shots about IE and standards conformance, switching to a Mexican accent for a bit of the delivery, and demonstrating that Notepad is a REST client. Kind of fun.</p>
<p><strong>Azure</strong></p>
<p>The last presentation was a lot to grasp, as Rob warned it would be. The denotation of &#8220;azure&#8221; is the blue of a clear or unclouded sky. But Microsoft&#8217;s Azure is about cloud computing. What does that mean?</p>
<p>Azure comprises a huge pile of stuff, which makes it pretty hard to talk about in a meaningful way. Hearing the presentation reminded me of when .NET was first announced. Everything at Microsoft was .NET then: Visual Studio .NET, Windows .NET, Clippy .NET, etc. The short version is that Azure combines typical operating system facilities with utility computing. In one sense it sounds like outsourced IT, where you let Microsoft worry about the data center, dynamically scaling resources as needed. But it is also more than that &#8212; an umbrella of networked stuff covering the &#8220;Live&#8221; services, SQL, raw data storage, and much more.</p>
<p>Rob says that Azure is Microsoft&#8217;s big bet right now. I wonder if things will settle down a bit when Microsoft gets a more fully-formed vision, much like they did with .NET.</p>
]]></content:encoded>
			<wfw:commentRss>http://esmithy.net/2009/01/17/the-best-of-pdc-2008/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>QCon SF 2008 Day 3</title>
		<link>http://esmithy.net/2008/11/22/qcon-sf-2008-day-3/</link>
		<comments>http://esmithy.net/2008/11/22/qcon-sf-2008-day-3/#comments</comments>
		<pubDate>Sat, 22 Nov 2008 21:04:16 +0000</pubDate>
		<dc:creator>Eric</dc:creator>
				<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://esmithy.net/?p=181</guid>
		<description><![CDATA[Friday was the third and final day of the QCon conference. Frameworks and DDD (Tim McCarthy) On Friday, I spent most of the day in the Domain Driven Design track, hosted by Eric Evans. The first speaker was Tim McCarthy, who has recently written a book on using DDD with.NET and C#. Tim raised an interesting question [...]]]></description>
			<content:encoded><![CDATA[<p>Friday was the third and final day of the QCon conference.</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-195" title="QCon 11" src="http://esmithy.net/content/qcon-11.jpg" alt="" width="449" height="315" /></p>
<p><span id="more-181"></span></p>
<p><strong>Frameworks and DDD (Tim McCarthy)</strong></p>
<p>On Friday, I spent most of the day in the Domain Driven Design track, hosted by Eric Evans. The first speaker was Tim McCarthy, who has recently written a book on using DDD with.NET and C#. Tim raised an interesting question with his talk: How do you keep your domain code clean when working with frameworks? By frameworks, Tim meant broad frameworks like ASP.NET as well as more narrow, application frameworks like SharePoint. The challenge is that with frameworks, and especially the wizard/designer approaches to coding sometimes advocated by Microsoft, it can be really easy to become inappropriately coupled to persistence, specific APIs, etc.</p>
<p>Unfortunately, Tim had a couple of problems in his presentation that made it less valuable to me than it might have been. The first problem was being sort of backward in terms of audience (for me at least). He worried about whether people knew what SharePoint was, but breezed over DDD terminology. The second problem was getting bogged down in details of code from a real-world system. I&#8217;m sure that there were good ideas in there, but they were hard to see because of the context that needed to explained. There&#8217;s always something nice about real code for demonstrating a point, but in a presentation, maybe simple examples would be better.</p>
<p>Ultimately the point was that DDD provided strategies for a decoupled system.</p>
<p><strong>Rebuilding guardian.co.uk with DDD (Phil Wills)</strong></p>
<p>I met Phil on Tuesday over lunch, so I was looking forward to hearing his presentation. It got off to a rocky start due to technical difficulties. The number of Macbooks at this conference really drove home the point that this wasn&#8217;t a Microsoft conference, but after a couple of failed attempts to get the presentation going with different Macs, Martin Fowler (whose machine was one of them) quipped that Macs being so superior is bullox.</p>
<p>Once the presentation got underway, Phil gave a little background about the Guardian. The newspaper has its roots in the 18th century, and is now the largest online newspaper in Europe. They put their first web site up in 1996, but over the years the system became problematic:</p>
<ul>
<li>Editors had to do a bunch of tedious manual work</li>
<li>There were multiple URLs for the same resource</li>
<li>New developers were hard to recruit because of the outdated technologies in use</li>
<li>There was a lot of technical debt preventing big new features</li>
</ul>
<p>To rebuild the site such that it would be &#8220;of the web, not just on the web&#8221; and ready for the future, they took an ambitious strategy of going agile, using new technologies and different design approaches (DDD). They got some help from ThoughtWorks to make it up the steep learning curve involved in such radical change.</p>
<p>Phil shared a few things they learned along the way. One thing was the importance of using the language of the problem domain everywhere, which allowed even the non-technical people on the team to contribute in unexpected ways. An example of this was a big breakthrough in terms of object composition. Phil showed an original object hierarchy and a much cleaner one. He said that of course, big breakthroughs always seem obvious and trivial in hindsight, but it was a non-engineer that came up with it. Another example he cited was a time when one of the users came over to a developer&#8217;s machine for a feature demo. While the develper was getting things set up, the user looked over his shoulder at the code and commented, &#8220;Does this do what I think it&#8217;s doing? If so, that&#8217;s not right.&#8221; Because the code used the domain language for object names and methods, he was able to understand it well enough to spot a bug.</p>
<p>Another thing Phil and his team learned is that the database schema is <strong>not</strong> the model. The model is the code &#8212; even though sometimes people get a false sense that if something isn&#8217;t in the database, it isn&#8217;t <em>really</em> the model.</p>
<p>He also talked about the utility of &#8220;value&#8221; objects. In Domain Driven Design, &#8220;entities&#8221; are the big stars, representing the main business objects. But it can be really valuable to have small, simple objects as helpers to the entities. These are objects that might just be represented as a string or an int, but if you discover some logic associated with that particular kind of string or int, encapsulating that logic into a slightly more specialized object can result in simpler entities.</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-184" title="QCon 9" src="http://esmithy.net/content/qcon-9.jpg" alt="" width="493" height="405" /></p>
<p><strong>Facebook Architecture (Aditya Agarwal)</strong></p>
<p>I took a break from the DDD track to hear a little about the architecture of Facebook. Aditya is the director of engineering at Facebook, and after hearing his presentation, I came to a couple of conclusions:</p>
<ol>
<li>I haven&#8217;t ever had to worry about scalability anywhere near this, and</li>
<li>I&#8217;m kind of glad about that.</li>
</ol>
<p>Facebook is built on the LAMP stack, but pretty much every component has been customized and optimized for their particular application. They also use memcached, which Aditya said was a huge factor in the performance of the site. This agreed nicely with Tim Bray&#8217;s talk from the other day: databases are too slow for this kind of scalability. Aditya said their memcache distributed hash table consumes 25 <em>terabytes</em> of RAM.</p>
<p>When asked if they intend to submit their changes to LAMP components back into the main projects, Aditya said, &#8220;I don&#8217;t think they&#8217;d accept our hacks,&#8221; which got a chuckle from the audience. The slightly cynical part of me thought, that&#8217;d be an interesting way to keep from having to share GPL changes: saying, &#8220;Naw, you wouldn&#8217;t really want this hacked up stuff&#8230;&#8221;</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-183" title="QCon 8" src="http://esmithy.net/content/qcon-8.jpg" alt="" width="480" height="360" /></p>
<p><strong>Strategic Design (Eric Evans)</strong></p>
<p>Back to the DDD track, to hear &#8220;Mr. Domain Driven Design&#8221; himself. His premise for this talk was:</p>
<blockquote><p>Not all of a large system will be well-designed.</p></blockquote>
<p>We wish it isn&#8217;t so, but it just seems to be a fact of life. He then talked about the oh so common situation that a development team finds itself in. We&#8217;ve got this legacy system, and it has all the problems that typically make us unhappy with legacy systems: poor design, old technologies, accidental complexity, etc. So what do we do?</p>
<p><strong>Plan A</strong>: Scrap it and start over. Eric had a diagram showing the big ball of mud becoming this beautiful pyramid of a system. What ends up really happening? Everything seems fabulous at first as a solid base gets built up. Then, at the point where parity with the legacy system is supposed to appear, panic sets in. The is the classic case <a href="http://www.joelonsoftware.com/articles/fog0000000069.html">documented by Joel Spolsky</a> where you suddenly realize that all that seemingly pointless cruft was actually important. So you finally end up with a system, two years later, that does exactly what the original system did, and that final phase of &#8220;add cool new features&#8221; never seems to happen.</p>
<p><strong>Plan B</strong>: Refactor. Eric argued that this approach doesn&#8217;t really work either. There aren&#8217;t enough tests to really work something over, and while you&#8217;re trying, other people are continuing to hack the code base and mess up your perfect plans. He joked that the hackers are irresistibly drawn to the code that you just cleaned up.</p>
<p><strong>Plan C</strong>: Plan to hack, since that seems like what will happen anyway.</p>
<p>Leaving behind the plans for a while, Eric talked about the different parts of the domain. He said that this is covered in chapter 15 of his book, but I&#8217;ll try to summarize as I understood it from the talk.</p>
<p>The biggest part is the generic subdomain. This is all the framework and code that is pretty generic and applicable across the whole software development practise. Next is the supporting subdomain, which is code that starts to be more specific to the problem domain you&#8217;re working in, but could still be applied somewhat generically in a specific industry. Finally, the smallest bit, is the core domain. This is what makes your system worth building in the first place. This is what gives you your competitive advantage. This is why people will buy your stuff. Another perspective of the three levels is stuff you buy, stuff you outsource, and stuff you build, respectively.</p>
<p>Next, a question: Why do irresponsible programmers become heroes? It&#8217;s largely due to mistakes that <strong>responsible</strong> programmers make. What do responsible programmers do? They build frameworks because they don&#8217;t trust that the hackers can build something without some kind of scaffolding. They go around cleaning up other people&#8217;s messes. As a result of these, they don&#8217;t produce the sexy new features, and shield the hackers from the consequences of their poor practices. The key, though, is that the heroes are working in the core domain.</p>
<p><strong>Plan D</strong>: Distill the core domain from the ball of mud. Instead of considering the legacy system a liability, look for the assets. Build what Eric calls an Anti-Corruption Layer, which sounded kind of like the façade pattern to me. Instead of transforming the ball of mud into a beautiful pyramid, focus on building the very cap of the pyramid (the core domain) and making that beautiful, while connecting to the ball of mud as necessary, but with a clear insulating layer.</p>
<p>This topic is really intriguing to me, but I can&#8217;t say that I understand how to apply it. Eric remarked that all of this stuff is in his book, but being toward the end, some people don&#8217;t, uh, quite make it that far. Guilty as charged. Well, although I&#8217;ve got the book, I haven&#8217;t really made a serious effort to read it yet. Maybe it&#8217;s time to fix that.</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-185" title="QCon 10" src="http://esmithy.net/content/qcon-10.jpg" alt="" width="360" height="480" /></p>
<p><strong>Publishing and Protecting the Model (David Laribee)</strong></p>
<p>Since Eric Evans&#8217; talk was so good, I thought I&#8217;d finish out the day with the last talk in the DDD track. This was by David Laribee, who is billed as the <a href="http://altdotnet.org/">ALT.NET</a> ring leader. ALT.NET is a community that I&#8217;ll unfairly and over simply summarize as &#8220;I can write C# on a Mac&#8221;.</p>
<p>Dave&#8217;s talk was about keeping the model clean, given that it has to be exposed to the unwashed masses to be useful. Or something like that. Maybe after three full days of presentations I was just full, or maybe Dave wanted a cool presentation more than a pragmatic one, but I had a hard time following this one. It started out at a high philosophical level, and by philosophical I mean classically so: Plato and Aristotle. It ended with C# 3.0 extension methods. I&#8217;m sure I&#8217;m not doing it justice.</p>
]]></content:encoded>
			<wfw:commentRss>http://esmithy.net/2008/11/22/qcon-sf-2008-day-3/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>QCon SF 2008 Day 2</title>
		<link>http://esmithy.net/2008/11/20/qcon-sf-2008-day-2/</link>
		<comments>http://esmithy.net/2008/11/20/qcon-sf-2008-day-2/#comments</comments>
		<pubDate>Fri, 21 Nov 2008 05:04:13 +0000</pubDate>
		<dc:creator>Eric</dc:creator>
				<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://esmithy.net/?p=166</guid>
		<description><![CDATA[It&#8217;s another day of industry stand-outs at QCon. Shifting Storage (Tim Bray) The day started with a keynote from Tim Bray, of XML fame. Tim spoke about the application stack from this perspective: Application code Object-relational mapping SQL engine Operating system/file system Cache/disks He mainly focused on the O/R mapping layer and the SQL engine, where [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s another day of industry stand-outs at QCon.</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-171" title="QCon 4" src="http://esmithy.net/content/qcon-41.jpg" alt="" width="420" height="560" /></p>
<p><span id="more-166"></span></p>
<p><strong>Shifting Storage (Tim Bray)</strong></p>
<p>The day started with a keynote from Tim Bray, of XML fame. Tim spoke about the application stack from this perspective:</p>
<ul>
<li>Application code</li>
<li>Object-relational mapping</li>
<li>SQL engine</li>
<li>Operating system/file system</li>
<li>Cache/disks</li>
</ul>
<p>He mainly focused on the O/R mapping layer and the SQL engine, where technology, to quote Tim, &#8220;sucks&#8221;. O/R mapping is really hard, and it&#8217;s too bad that object databases never really got commercial success (Martin Fowler in the front row nods in agreement). SQL engines are too slow, driving people to distributed hash tables like <a href="http://en.wikipedia.org/wiki/Memcached">memcached</a> instead, or even skipping the database engine entirely to go to the file system. SQL engines are also complex and laden with features that never get used. This is inspiring projects like <a href="https://launchpad.net/drizzle">Drizzle</a>, a database forked from MySQL in an attempt to slim things down.</p>
<p>Tim also had good things to say about <a href="http://incubator.apache.org/couchdb/">CouchDB</a>, a document-oriented database that is accessible only via HTTP. I don&#8217;t know anything about this project, but Tim&#8217;s exact words were, &#8220;I&#8217;m infatuated with this&#8221; and &#8220;frighteningly elegant&#8221;.</p>
<p>Another topic was comparing the relative speeds of the storage stack, from CPU registers down to hard drives. The interesting technology coming into this area is solid state drives. His benchmarks show that write speeds are about that of a middling hard drive, but read speeds are really, really good.</p>
<p>Given that most web applications are I/O limited, it can really pay off to keep your eyes on up and coming technologies like alternate data strategies and solid state drives.</p>
<p><strong>HTTP Status Report (Mark Nottingham)</strong></p>
<p>I went over to the REST track for a little bit, chaired by Jim Webber, a <a href="http://www.infoq.com/presentations/soa-without-esb">noted expert on man boobs</a>. The speaker for this session, though, was Mark Nottingham, the chair of the HTTPbis working group. They are essentially rewriting the HTTP 1.1 spec, but not trying to add any new features. Why bother? Mark explained that the existing spec is ambiguous, not well organized, not very approachable, and occasionally requires consultation with one of the authors to understand. As a result, everybody pretty much gets the main parts right, but there are a bunch of other things that are not very interoperable between implementations. HTTPbis, targeted for completion in about six months, will hopefully clarify the spec enough to eliminate incompatibilities.</p>
<p>Mark also spoke briefly about what might be expected for the future of HTTP, like a standard set of conformance tests, better authentication, transport over SCTP instead of TCP, and others.</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-172" title="QCon 5" src="http://esmithy.net/content/qcon-5.jpg" alt="" width="480" height="360" /></p>
<p><strong>Joys and Pains of Long-Lived Code (Jeremy Miller)</strong></p>
<p>I had just read Jeremy&#8217;s <a href="http://msdn.microsoft.com/en-us/magazine/cc947917.aspx">Cohesion and Coupling</a> article in MSDN last week, so it was nice to put a name to the face. Jeremy gave a retrospective of StructureMap, an IoC container he has been writing and maintaining over the past five years. He talked about the changes that have happened over the life of the project, both in the .NET community and the .NET platform itself, and how things he had done with StructureMap made adapting to those changes easy or hard.</p>
<p>These are some of the lessons he learned.</p>
<ul>
<li>Good design at the class level is crucial.</li>
<li>Bad tests make it harder to change the code rather than easier.</li>
<li>TDD as refined to <a href="http://behaviour-driven.org/">BDD</a> is best (I need to learn more about this).</li>
<li>Getting abstractions right not only improves the code, it opens up new possibilities.</li>
<li>DRY &#8211; even a little duplication is bad.</li>
</ul>
<p>I also appreciated a comment he made when answering a question: don&#8217;t use an IoC container when writing tests. I&#8217;ve seen people do that in the past: they have a constructor injected set of dependencies and try to reconfigure the container to inject mocks. Just pass the mocks in the constructor!</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-173" title="QCon 6" src="http://esmithy.net/content/qcon-6.jpg" alt="" width="480" height="360" /></p>
<p><strong>F# (Don Syme)</strong></p>
<p>While I have heard a bit about F#, I&#8217;ve not really spent much time trying to understand it. What better opportunity could you have than to get the designer to provide an introduction? Of course learning a language is best done by writing code, not hearing a presentation. Still it was interesting to get a high-level overview and to see a few examples. One of Don&#8217;s favorite things was to show the difference in lines of code between functionally equivalent bits of C# and F#. An asynchronous I/O example had three pages of C# code to a dozen lines of F#.</p>
<p>Don said that F# is well-suited to problems dealing with data transformation, but not so great for building user interfaces (even though all the .NET UI libraries are accessible from F#).</p>
<p><strong>TDD and DbC (Greg Young)</strong></p>
<p>I&#8217;ve posted about design by contract in the past (<a href="http://esmithy.net/2005/09/27/design-by-contract/">part 1</a>, <a href="http://esmithy.net/2006/01/29/design-by-contract-part-2/">part 2</a>), and sort of intended to talk about unit testing and DbC at some point, but never got around to it. So I was interested to hear what Greg had to say. The first part of his talk was an overview of DbC, showing some spec# code to demonstrate the concepts and letting the code verifier find the problems. I noticed that Microsoft had announced a contracts library at PDC, so the exploratory work of spec# will be incorporated into the framework instead of as language extensions.</p>
<p>The main point of Greg&#8217;s presentation is that tests and contracts are complimentary. Tests should focus on the behavior (another reference to BDD) while contracts focus on constraints. Having contracts means fewer tests to write because you don&#8217;t have to write all the dumb tests that check that an argument exception is thrown when parameter x is null. In fact, not only do you not <em>need</em> to write those tests, if you try anyway the code verifier will complain. So you almost <em>can&#8217;t</em> write those tests, and therefore contracts push you toward testing the meaningful behavior of the code.</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-174" title="QCon 7" src="http://esmithy.net/content/qcon-7.jpg" alt="" width="253" height="444" /></p>
<p><strong>Democratizing the Cloud &#8211; MS Volta (Erik Meijer)</strong></p>
<p>I&#8217;m again impressed with the caliber of speakers here. Eric Meijer is the guy who designed LINQ, among other things. Currently he is working on Volta, which put bluntly, is GWT for .NET. Volta allows translation of MSIL to Javascript so that you can build client apps writing .NET code. If you happen to have Silverlight on the client, you can also target that as the runtime environment instead of going to Javascript.</p>
<p>There is also a development work flow in which you write a single tiered .NET application, then split it into client and server tiers by simply annotating the code &#8212; saying which bits should execute on the server and which on the client. Greg Young, from the previous presentation, immediately started pushing back citing the <a href="http://michael.toren.net/mirrors/eight-fallacies-of-distributed-computing/">8 fallacies of distributed computing</a>. Erik simply skipped ahead a little to a slide showing the 8 fallacies, and assured the audience that programmers would still be in control enough to avoid the pain.</p>
<p>Erik&#8217;s description of the translation of IL to Javascript was interesting. They are not making any attempt to produce Javascript that follows typical Javascript style. Instead they use it like an assembly language, and focus on preserving the precise semantics of the .NET code. This gets a little tricky in some cases, such as jumps. Javascript has no goto, but IL, being very low-level, uses them extensively. Erik showed how they used switch statements to get the same behavior. It&#8217;s not pretty Javascript, but that&#8217;s not really the point.</p>
<p>The presentation went down a little bit of a rat-hole when Erik talked about some security issues. There was quite a bit of debate from some folks the audience about whether they were doing it right. While it&#8217;s neat to see that kind of interaction, I&#8217;m not sure it is a good use of time for people seeing this for the first time to try to give informed design criticism.</p>
<p>Volta is still a work-in-progress. It will be interesting to see if it can mature into something that will give as great a development experience as Alex Moffat <a href="http://esmithy.net/2008/11/19/qcon-sf-2008-day-1/">described yesterday</a> with GWT.</p>
]]></content:encoded>
			<wfw:commentRss>http://esmithy.net/2008/11/20/qcon-sf-2008-day-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>QCon SF 2008 Day 1</title>
		<link>http://esmithy.net/2008/11/19/qcon-sf-2008-day-1/</link>
		<comments>http://esmithy.net/2008/11/19/qcon-sf-2008-day-1/#comments</comments>
		<pubDate>Thu, 20 Nov 2008 05:22:17 +0000</pubDate>
		<dc:creator>Eric</dc:creator>
				<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://esmithy.net/?p=153</guid>
		<description><![CDATA[QCon is a software development conference sponsored by the InfoQ site and software consultancy Trifork. I am in San Francisco attending it, and here is a summary and some thoughts on the first day&#8217;s sessions I was able to attend. Agilists and Architects (Martin Fowler &#38; Rebecca Parsons) As much of Martin Fowler&#8217;s stuff as I&#8217;ve read, [...]]]></description>
			<content:encoded><![CDATA[<p>QCon is a software development conference sponsored by the <a href="http://www.infoq.com/">InfoQ</a> site and software consultancy <a href="http://www.trifork.com/">Trifork</a>. I am in San Francisco attending it, and here is a summary and some thoughts on the first day&#8217;s sessions I was able to attend.</p>
<p style="text-align: center;"><img class="size-full wp-image-158 aligncenter" title="QCon SF" src="http://esmithy.net/content/qcon-3.jpg" alt="" width="500" height="375" /></p>
<p><span id="more-153"></span></p>
<p><strong>Agilists and Architects (Martin Fowler &amp; Rebecca Parsons)</strong></p>
<p>As much of Martin Fowler&#8217;s stuff as I&#8217;ve read, I hadn&#8217;t ever heard him speak in person. He and Rebecca talked about software architects, including some of the stereotypical ivory tower thinkers that come up with beautiful, elegant systems that have no possibility of actually working in the real world. A video clip from <em>The Matrix Reloaded </em>set the tone: the architect of the matrix considers Neo to be an aberration in his otherwise mathematically perfect construct.</p>
<p>Part of the problem with architecture is that it is hard to define. It may be simply design when we want to make it sound more important. I remember a guy I used to work with for whom everything was architecture. &#8220;If you think about the architecture of these two classes&#8230;&#8221; Martin liked Ralph Johnson&#8217;s definition of an architect as the person who thinks about the hard stuff &#8212; whatever that happens to be for a particular organization.</p>
<p>Another problem is that architects have a hard time defining success for their role, and an even harder time attaining it. Sometimes that&#8217;s because of organizational dysfunction, like companies that insist that architects not write any code. Other times it is through poor practices, like inventing frameworks in anticipation of a yet unproven need.</p>
<p>The speakers emphasized, however, that architecture has a useful role in spite of some of the difficulties with having it filled effectively. The architect is the one who worries about supportability, rampant proliferation of tools, and keeps in mind the grand vision of the product. They are also responsible for the quality of the code, which is <em>not</em> just an abstract, academic thing once the code works. The quality of the code has a real cost that is realized when new features need to be added. It can be hard to make that cost visible to people, but one approach suggested might be to give two estimates: one for the new feature built into the mess we&#8217;ve currently got and one for the imaginary clean system we wish we had. I don&#8217;t know, that still sounds kind of hard.</p>
<p><strong>Web as Platform (John Musser)</strong></p>
<p>John is the founder of <a href="http://www.programmableweb.com">Programmableweb.com</a>, a sort of catalog site for various APIs available over the Internet. In his presentation, he talked about trends in web APIs. Some trends are technical such as the rising use of REST vs. SOAP (though since REST is more a philosophy than a standard, it can be hard to classify something as REST as opposed to REST-ish). Other trends are around the ubiquity of APIs &#8212; it is now expected that if you put useful functionality on the web that it will have an API, and not just a user interface. Even media producers like <a href="http://blog.programmableweb.com/2008/06/10/the-new-york-times-api-all-the-news-thats-fit-to-mix/">The New York Times</a> and <a href="http://www.npr.org/blogs/inside/2008/07/npr_api_is_live_on_nprorg.html">NPR</a> have APIs.</p>
<p>What makes a good web API? First and foremost, the underlying service has to be valuable. Beyond that, the API should support the business model of the provider (eBay wants to optimize adding listings since that&#8217;s how they make money) and should be easy to access both in terms of openness and the developer support provided.</p>
<p style="text-align: center;"><img class="size-full wp-image-159 aligncenter" title="QCon 2" src="http://esmithy.net/content/qcon-1.jpg" alt="" width="308" height="384" /></p>
<p><strong>Hard Rock: Silverlight 2 (Scott Stanfield)</strong></p>
<p>Scott is the CEO of <a href="http://vertigo.com">Vertigo</a>, a consulting firm that was named Microsoft partner of the year for 2008. It was nice to have some Microsoft technical representation since the conference so far seems heavier on the Java side. Scott spoke about building the <a href="http://memorabilia.hardrock.com/">Hard Rock Memorabilia</a> site working with marketing firm Duncan/Channon. Duncan/Channon originally intended that the site be done using Flash, but Deep Zoom turned out to be the killer feature that made Silverlight the clear choice.</p>
<p>Scott said that the Silverlight story of independent graphic design and programming is completely playing out as advertised. He showed a little demo of an Etch-A-Sketch app that Vertigo programmer Michael Moser quickly coded up, but was then beautifully skinned by a graphic artist.</p>
<p>Scott also asserted that the adaptive streaming of video in Silverlight gives the best video on the web.</p>
<p>One interesting tidbit on the Hard Rock site is that Vertigo spent some significant effort getting a set of different sized pictures to line up in such a way that the final arrangement creates a nice rectangle. This looks like possibly a variation of the <a href="http://en.wikipedia.org/wiki/Packing_problem">packing problem</a> to me.</p>
<p>Also interesting was that Scott was using a Mac with Vista running in a VM. Come to think of it, all the presenters in the RIA track seemed to have Macs.</p>
<p><strong>Flex and AIR in the Trenches (Scott Delap)</strong></p>
<p>Scott Delap gave a presentation about using Adobe tools to build some online components of a video game, <a href="http://www.leagueoflegends.com/">League of Legends</a>. His perspective was comparing Flash/Flex to doing Java UI development with Swing. He seemed reasonably happy with the platform and development tools, but thought that things felt sort of like Java year 2000. That is, not quite up to state-of-the art. He is, however, a convert to declarative UI specification. Like the Java UI developers I&#8217;ve known, he never really trusted visual designers for Swing, but says the designer experience with Flash is great.</p>
<p>Scott talked about evaluating a lot of frameworks for various things (dependency injection, remoting, unit testing, functional testing, etc.) which is a typical exercise for open source development stacks.</p>
<p><strong>10 Ways to Improve Your Code (Neal Ford)</strong></p>
<p>This talk covers some of the same material that is in Neal&#8217;s book <em><a href="http://www.amazon.com/Productive-Programmer-Theory-Practice-OReilly/dp/0596519788">The Productive Programmer</a></em>. I sort of got the impression that maybe after writing a book and giving this presentation who knows how many times that Neal might have lost some of the passion associated with this topic. That&#8217;s not to say that the presentation was dull, it just seemed a little like, &#8220;OK, here we go again&#8230;&#8221;</p>
<p>Neal&#8217;s 10 points were mostly things I know (and even <em>do </em>successfully at times) such as TDD, using static analysis, YAGNI, etc. There was an interesting point on polyglot programming. He said that polyglot programming ideally doesn&#8217;t mean multiple platforms, but multiple languages on a single platform. Java and .NET are both multilingual platforms, so take advantage of that to use the best language for the problem at hand while still keeping the benefits of a common runtime environment.</p>
<p>As an intermission, Neal talked about 10 bad smells, my favorite of which was &#8220;Our lawyers say we can&#8217;t use any open source software&#8221;, which led to Neal having to buy a &#8220;license&#8221; for CruiseControl (written by Neal&#8217;s employer, ThoughtWorks) so he could use it with a client.</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-160" title="QCon 3" src="http://esmithy.net/content/qcon-2.jpg" alt="" width="384" height="308" /></p>
<p><strong>Real World GWT (Alex Moffat</strong>)</p>
<p>In short, Alex and his team <em>love</em> GWT. And I have to say that seeing <a href="http://blueprint.lombardi.com/index.html">Blueprint</a> in action was pretty spectacular. It really looked like a desktop application, but done entirely with HTML and Javascript. GWT is the magic behind it all, which is Google&#8217;s toolkit for compiling Java to Javascript.</p>
<p>If you work in a Java shop, it seems like a great development story: use all your familiar tools and write Java code and you get a great web app.</p>
<p><strong>Just You Wait (Kent Beck)</strong></p>
<p>Kent Beck, like Martin Fowler, is another industry heavyweight that I first heard speak today. He got started a little late because his talk came right after the break in which beer was served, and I guess it&#8217;s hard to compete with that. Being a non-drinker, I had a seat right up front.</p>
<p>His talk was as an amateur futurist, looking at trends and imagining where they might go, and unintended consequnces. For example, what happens if you extend the trend of releasing software more frequently? Maybe releasing software with every keystroke? Well, OK, editing a live web site would almost be that (if your editor saved continuously).</p>
<p>Some other trends he expects are the end of &#8220;free&#8221; stuff on the web, and a decrease in status for programmers as other people begin to understand technology more and programming seems less mystical. Even if that latter point proves true, he says that we can still make a difference in the world with what we build, and how we build it.</p>
<p>Thinking of the Brazilians that were recognized in attendance, I flinched a little during the talk when Kent digressed slightly about how his son says &#8220;cool&#8221;, but to be really cool leaves off the &#8216;L&#8217;. There&#8217;s another unintended consequence for you, riffing on a word that is vulgar in Portuguese.</p>
]]></content:encoded>
			<wfw:commentRss>http://esmithy.net/2008/11/19/qcon-sf-2008-day-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>User Stories Are Not Narratives</title>
		<link>http://esmithy.net/2008/09/27/user-stories-are-not-narratives/</link>
		<comments>http://esmithy.net/2008/09/27/user-stories-are-not-narratives/#comments</comments>
		<pubDate>Sat, 27 Sep 2008 14:40:18 +0000</pubDate>
		<dc:creator>Eric</dc:creator>
				<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://esmithy.net/?p=139</guid>
		<description><![CDATA[The &#8220;story&#8221; in agile development&#8217;s &#8220;user story&#8221; is not a narrative in the traditional sense of the word. Many are short on verbs, which is a big hint that something non-narrative is going on. &#8220;User story&#8221; is shorthand for a set of concepts and principles. The danger with taking a simple word like &#8220;story&#8221; and assigning it [...]]]></description>
			<content:encoded><![CDATA[<p>The &#8220;story&#8221; in agile development&#8217;s &#8220;user story&#8221; is not a narrative in the traditional sense of the word. Many are short on verbs, which is a big hint that something non-narrative is going on. &#8220;User story&#8221; is shorthand for a set of concepts and principles. The danger with taking a simple word like &#8220;story&#8221; and assigning it a new meaning is that novices, and occasionally even experts, confuse the jargon with the traditional definition.</p>
<p><span id="more-139"></span></p>
<p>An example of an expert forgetting the jargon of &#8220;user story&#8221; is in a small section of Mike Cohn&#8217;s otherwise great book <a href="http://www.amazon.com/gp/redirect.html?ie=UTF8&amp;location=http%3A%2F%2Fwww.amazon.com%2Fgp%2Fproduct%2F0321205685%3Fpf%5Frd%5Fm%3DATVPDKIKX0DER%26pf%5Frd%5Fs%3Dcenter-2%26pf%5Frd%5Fr%3D05E56236CH4HNWJ1H02P%26pf%5Frd%5Ft%3D101%26pf%5Frd%5Fp%3D436518401%26pf%5Frd%5Fi%3D507846&amp;tag=sparksfromthesmi&amp;linkCode=ur2&amp;camp=1789&amp;creative=9325"><em>User Stories Applied</em></a><img style="border:none !important; margin:0px !important;" src="http://www.assoc-amazon.com/e/ir?t=sparksfromthesmi&amp;l=ur2&amp;o=1" border="0" alt="" width="1" height="1" />. Here, the author is talking about the benefits of user stories over other ways of specifying requirements:</p>
<blockquote><p>Additionally, a study in the late 1970s found that people are better able to remember events if they are organized into stories (Bower, Black and Turner 1979). Even better, study participants had better recall of both stated actions as well as inferred actions. That is, not only do stories facilitate recall of stated actions, they facilitate recall of the unstated actions. The stories we write can be more terse than traditional requirement specifications or even use cases, and because they are written and discussed as stories, recall will be greater. </p></blockquote>
<p>While I haven&#8217;t read the study mentioned (maybe <a href="http://psycnet.apa.org/?fa=main.doiLanding&amp;fuseaction=showUIDAbstract&amp;uid=1979-27802-001">this is the abstract</a>?) I doubt they were studying agile &#8220;user stories&#8221; back in 1979. From what I&#8217;ve been able to gather from secondary sources, they were studying how stories (in the narrative sense) have a more abstract representation than the actual words that are said, and that memory relies more on that abstract representation such that it&#8217;s hard to remember if something was explicitly said in the story or just implied.</p>
<p>In short, applying the results of this study to user stories is pretty bogus.</p>
]]></content:encoded>
			<wfw:commentRss>http://esmithy.net/2008/09/27/user-stories-are-not-narratives/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Culture Shock</title>
		<link>http://esmithy.net/2007/07/20/culture-shock/</link>
		<comments>http://esmithy.net/2007/07/20/culture-shock/#comments</comments>
		<pubDate>Fri, 20 Jul 2007 21:31:28 +0000</pubDate>
		<dc:creator>Eric</dc:creator>
				<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://esmithy.net/2007/07/20/culture-shock/</guid>
		<description><![CDATA[Over twenty years ago, I moved from Oregon to Utah to start going to school at BYU. As we were driving to Provo from the north, my mom, who had been born in Utah, commented, &#8220;This place right here is called the point of the mountain.&#8221; &#8220;That&#8217;s stupid, there&#8217;s nothing here!&#8221; I remember saying, a [...]]]></description>
			<content:encoded><![CDATA[<p>Over twenty years ago, I moved from Oregon to Utah to start going to school at BYU. As we were driving to Provo from the north, my mom, who had been born in Utah, commented, &#8220;This place right here is called the point of the mountain.&#8221;</p>
<p>&#8220;That&#8217;s stupid, there&#8217;s nothing here!&#8221; I remember saying, a bit more harshly than was appropriate. I think my mom was a little taken aback, and didn&#8217;t bother to try to justify why the place deserved to have a name: It separates Utah valley from the Salt Lake Valley, and the counties with corresponding names; it&#8217;s the highest point on I-15 through the Wasatch Front and the place you&#8217;ll most likely hit snowy roads.</p>
<p>I realized later that I was just experiencing culture shock. After an email discussion with a coworker today, I realized that culture shock is possible between programming environments.</p>
<p><span id="more-107"></span></p>
<p>My coworker was announcing that he was going to create a new class for working with file paths, because the .NET classes FileInfo andÂ DirectoryInfo were unintuitive, awkward and poorly conceived. Among his concerns was that it seemed stupid that FileInfo.Exists on a pathÂ returns false evenÂ if there is a directory there. You have to use DirectoryInfo.Exists to know if there is a directory at a particular location. He had a couple of other complaints as well, but I want to focus on this one.</p>
<p>My coworker is a proficient Java programmer, and if you look at the .NET Framework design decision toÂ have both FileInfo and DirectoryInfo from the perspective of someone coming from java.io.File, you can understand his discomfort.</p>
<p>At the same time, I can imagine a .NET programmer deciding that java.io.File is messed up. Where&#8217;s the logic behind File.isAFile()? That&#8217;s like Apple.isAnApple(). And isn&#8217;t it really awkward that in order to know if a file (and not a directory) exists, I have to use both File.exists()Â and File.isAFile()? Ah for the simplicity of FileInfo.Exists!</p>
<p>I began to think that his complaints in this respect were more a matter of Java to .NET culture shock &#8212; it&#8217;s not what he expects, so .NET is wrong. That&#8217;s not to say that I&#8217;m dismissing his concern by giving it a label, but I&#8217;m noticing that it is an important thing to be aware of as you become familiar with a new environment. It&#8217;s really easy to flip the bozo bit when you see something new that you don&#8217;t immediately understand. And I think it is a mistake to reject the idioms and patterns of a programming environment because they&#8217;re not like back home.</p>
<p>For a sort of ridiculous example, consider an English speaker learning German. Compared to German, English is a fairly genderless language. Don&#8217;t the Germans understand, though, that getting rid of gender would be so much more efficient? Instead of having to remember nouns <em>and</em>their gender, I can just remember the noun itself. Therefore, when I speak german, I&#8217;m just going to say &#8220;the&#8221; instead of the pointlessly complex &#8220;der&#8221;, &#8220;die&#8221; and &#8220;das&#8221;.</p>
<p>I also realize that I&#8217;m currently suffering from reverse culture shock. I used to write a lot of Java code myself, and absolutely loved JetBrains IntelliJ. I was thrilled with the discovery of each well-crafted feature. It was agonizing to have to go back to Visual Studio in order to write some native code.</p>
<p>But then I had to spend more and more of my time doing native development. Visual Studio 2005 came out and life started getting better (hallelujah! I can do a &#8220;rename&#8221; refactoring!). If I ever had occasion to get back into the Java code to look at something, I&#8217;d double-click the IntelliJ icon and then get out a magazine. Five minutes later the application and project would finally be loaded and ready to work with. And good grief, look at the memory footprint of that thing.</p>
<p>Java? IntelliJ? Eh.</p>
<p>But I doÂ think &#8220;point of the mountain&#8221; is just as natural as can be now.</p>
]]></content:encoded>
			<wfw:commentRss>http://esmithy.net/2007/07/20/culture-shock/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

