<?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>Aaron Lerch &#187; tools</title>
	<atom:link href="http://www.aaronlerch.com/blog/category/tools/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.aaronlerch.com/blog</link>
	<description></description>
	<lastBuildDate>Sun, 04 Apr 2010 03:04:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Analyzing Code with NDepend</title>
		<link>http://www.aaronlerch.com/blog/2010/04/03/analyzing-code-with-ndepend/</link>
		<comments>http://www.aaronlerch.com/blog/2010/04/03/analyzing-code-with-ndepend/#comments</comments>
		<pubDate>Sat, 03 Apr 2010 19:38:09 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[tools]]></category>
		<category><![CDATA[visualization]]></category>

		<guid isPermaLink="false">http://www.aaronlerch.com/blog/2010/04/03/analyzing-code-with-ndepend/</guid>
		<description><![CDATA[Disclaimer: A long time ago, in a galaxy far away, I helped coordinate the Indy Code Camp. We gave away a few donated copies of NDepend as prizes, and while setting that up, Patrick Smacchia offered me a license if I’d be willing to write about my NDepend experiences on my blog. Having heard about [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p><strong>Disclaimer:</strong> A long time ago, in a galaxy far away, I helped coordinate the <a title="Indy Code Camp" href="http://www.aaronlerch.com/blog/2008/03/05/indy-code-camp-door-prizes/">Indy Code Camp</a>. We gave away a few donated copies of <a title="NDepend" href="http://www.ndepend.com/">NDepend</a> as prizes, and while setting that up, <a href="http://codebetter.com/blogs/patricksmacchia/">Patrick Smacchia</a> offered me a license if I’d be willing to write about my NDepend experiences on my blog. Having <a href="http://www.hanselman.com/blog/ExitingTheZoneOfPainStaticAnalysisWithNDepend.aspx">heard about NDepend</a> in the past, I happily took him up on it – making sure it was clear that I would write about my experience regardless of whether they were positive or negative. So this is a “sponsored” post, in that I received an NDepend license, but the license donation did not purchase any of the content of this post.</p>
</blockquote>
<p>An astute reader will probably look at the date that I helped with the Indy Code Camp and compare it to the date of this post, and figure out that it was about <em>two years ago</em> that Patrick asked me to evaluate NDepend. And I’m not so happy to say that in those two years, I really didn’t use it. But recently <a href="http://www.aaronlerch.com/blog/2010/04/03/staying-sane-as-a-technical-manager-part-2/">I have more time available to me</a> for doing specifically this sort of thing.</p>
<p>I think Scott Hanselman <a href="http://www.hanselman.com/blog/ExitingTheZoneOfPainStaticAnalysisWithNDepend.aspx">summed up the initial NDepend experience quite well</a>.</p>
<blockquote><p>Like PowerShell, the first 10 minutes of NDepend is the hardest. It has to click first. There&#8217;s the whole &quot;what the hell am I looking at&quot; process, often followed by the &quot;screw this&quot; declaration, followed by a quick uninstallation and a sense of &quot;what happened.&quot;</p>
</blockquote>
<p>I’m not going to do a comprehensive overview like Scott or others have done – at this point I just <em>can’t</em> do that as I’m still in kind of the “what the hell is this” phase. But it’s slowly beginning to click. For me, two things that click and help me continue on and work to understand this application.</p>
<p><strong>One</strong>, I know I need the information NDepend can give me. I may not understand it all immediately, but I’ve been deep in the code of some applications long enough to see <em>(and write)</em> the good, the bad, and the ugly. I need ways to root out the bad and ugly, without having to dive into all the code in-depth. I also need metrics to help show that the good really is good. Especially when you’re working on a team of several people, each with varying opinions and each who writes their own flavor of code. Just because I don’t like someone else’s code doesn’t mean it’s <em>bad code</em>. Metrics can help me separate my aesthetic or organizational concerns from real problems or smells. And then I can make them write it my way anyway. <img src='http://www.aaronlerch.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p><strong>Two</strong>, and more fun than the first is NDepend’s Code Query Language or CQL. In my opinion, this is an easy “hook” to get someone to look closer at NDepend and get past that 10-minute hump. I have seen a developer’s face literally light up when they hear what CQL can do, especially if they’ve done any work with a database and SQL in the past.</p>
<p>NDepend’s website has the best <a href="http://ndepend.com/CQL.htm">documentation of CQL</a>, even if the docs feel overwhelming at first. There’s also some information about <a href="http://ndepend.com/ConstraintsExtractedFromCode.aspx">embedding CQL into your code</a> as in-line constraints that NDepend can enforce during your build, though as <a href="http://plaureano.blogspot.com/2009/07/ndepend-review.html">others have mentioned</a> it’s not a practical solution.</p>
<p>Of immediate interest to me, due to something I’m doing at <a href="http://www.inin.com/">work</a>, is catching breaking API changes that might accidentally happen during a maintenance release. Patrick covers how to do this <a href="http://codebetter.com/blogs/patricksmacchia/archive/2008/01/20/avoid-api-breaking-changes.aspx">here</a>. But as an example, let’s analyze the breaking API changes in <a href="http://github.com/structuremap/structuremap">StructureMap</a> between version 2.5.4 and 2.6.1.</p>
<blockquote><p><em>Note:</em> I got confused at first, because I put both versions of StructureMap into the same directory and renamed the files to include the version number. NDepend didn’t like this and flagged every single method as removed and added. I’m not sure what I did wrong, but it took a bit to figure out, and it sucks for situations where a version number (or a name change) might cause an assembly name not to match, even though it’s functionally the same.</p>
</blockquote>
<p>The first thing to do is select the two assemblies to compare – here I’m choosing StructureMap 2.5.4 on the left, and 2.6.1 on the right.</p>
<p><img src="http://s3.amazonaws.com:80/aaronlerch.com/images/ndepend/build-comparison.png" width="608" height="346" /></p>
<p>After the NDepend project has been created, I can press ALT+Q to bring up the CQL editor, and enter the following query:</p>
<blockquote><p>WARN IF Count &gt; 0 IN SELECT METHODS WHERE      <br />IsInOlderBuild AND IsPublic AND (VisibilityWasChanged OR WasRemoved)</p>
</blockquote>
<p>It reads pretty well, especially if you’re familiar with SQL. Literally it’s “warn me if methods exist that were in the older build, were public, and the visibility has changed or the method was removed.”</p>
<p>You can see below, 5 methods were “removed” from StructureMap’s public API – in this case, they are literally removed (and not just made internal or private). That means that upgrading from 2.5.4 to 2.6.1 could mean you have to change or recompile your code.</p>
<p><img src="http://s3.amazonaws.com:80/aaronlerch.com/images/ndepend/method-query-results.png" /></p>
<p>Likewise you can see that no public types were removed, thus no breaking change exists and the CQL query isn’t flagged as a warning.</p>
<p><img src="http://s3.amazonaws.com:80/aaronlerch.com/images/ndepend/type-query-results.png" /></p>
<p>This is some powerful stuff, and as I begin to incorporate it more and more into my daily workflow I’ll post about how I’m using it.</p>
</p>
<p>The newest version supports a console runner, a stand-alone GUI, and full integration into Visual Studio 2005, 2008, and 2010. For small projects that can exist within a single Visual Studio solution, it’s perfect. For larger projects that span multiple solutions, NDepend still allows you to analyze a set of assemblies, the UI is just embedded inside Visual Studio – and the integration is pretty usable for me so far.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.aaronlerch.com/blog/2010/04/03/analyzing-code-with-ndepend/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>S3 Browser for Windows Live Writer</title>
		<link>http://www.aaronlerch.com/blog/2008/03/10/s3-browser-for-windows-live-writer/</link>
		<comments>http://www.aaronlerch.com/blog/2008/03/10/s3-browser-for-windows-live-writer/#comments</comments>
		<pubDate>Tue, 11 Mar 2008 01:25:00 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[.net]]></category>
		<category><![CDATA[blogging]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://www.aaronlerch.com/blog/2008/03/10/s3-browser-for-windows-live-writer/</guid>
		<description><![CDATA[Tim Heuer announced today the release of &#8220;S3 Browser&#8221;, a plug-in for Windows Live Writer that enables easy inserting of links or images from your S3 storage. See his announcement on his blog, and on the Code Trip&#8217;s blog. Like Tim, I&#8217;ve been using S3 to host my images for the blog, and I wholeheartedly [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://s3.amazonaws.com/aaronlerch.com/images/s34writer.png" align="right" /><a href="http://timheuer.com/">Tim Heuer</a> announced today the release of &#8220;S3 Browser&#8221;, a plug-in for Windows Live Writer that enables easy inserting of links or images from your S3 storage. See his <a href="http://timheuer.com/blog/archive/2008/03/10/amazon-s3-plugin-for-windows-live-writer.aspx">announcement on his blog</a>, and on <a href="http://thecodetrip.com/1/s3browser-for-live-writer">the Code Trip&#8217;s blog</a>.</p>
<p>Like Tim, I&#8217;ve been using S3 to host my images for the blog, and I wholeheartedly agree with him &#8211; the workflow for writing a post sucked <em>big time</em>. This plug-in had been on my <font color="#008000">//TODO</font> list for a long while now. Somehow I mentioned that fact to Tim on <a href="http://twitter.com/aaronlerch">Twitter</a> and he sent me a link to a screenshot of his initial version. My response? Sign me up!</p>
<p>He uploaded his source to <a href="http://www.codeplex.com/s3browser">CodePlex</a> and I immediately started implementing the remaining features. The result is the 0.9 beta release of the S3 Browser Windows Live Writer plug-in. <a href="https://www.codeplex.com/Release/ProjectReleases.aspx?ProjectName=s3browser&amp;ReleaseId=11530">Give it a download</a> and try it out! Please submit any feature ideas or bugs on the codeplex site, or you can leave a comment here as well.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.aaronlerch.com/blog/2008/03/10/s3-browser-for-windows-live-writer/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Unifying Web &quot;Sites&quot; and Web Services with the ASP.NET MVC Framework</title>
		<link>http://www.aaronlerch.com/blog/2008/01/01/unifying-web-sites-and-web-services-with-the-aspnet-mvc-framework/</link>
		<comments>http://www.aaronlerch.com/blog/2008/01/01/unifying-web-sites-and-web-services-with-the-aspnet-mvc-framework/#comments</comments>
		<pubDate>Wed, 02 Jan 2008 03:10:53 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[asp.net]]></category>
		<category><![CDATA[tools]]></category>
		<category><![CDATA[web services]]></category>

		<guid isPermaLink="false">http://www.aaronlerch.com/blog/2008/01/01/unifying-web-sites-and-web-services-with-the-aspnet-mvc-framework/</guid>
		<description><![CDATA[(For those who&#8217;d rather just download the code, the link is at the end.) Lately I&#8217;ve been delving into the ASP.NET MVC framework, the timing of which has been interesting as I am about to finish reading RESTful Web Services by Leonard Richardson and Sam Ruby. It&#8217;s an excellent book that I&#8217;d highly recommend to [...]]]></description>
			<content:encoded><![CDATA[<p>(For those who&#8217;d rather just download the code, the link is at the end.)</p>
<p>Lately I&#8217;ve been delving into the <a href="http://weblogs.asp.net/scottgu/archive/2007/10/14/asp-net-mvc-framework.aspx">ASP.NET MVC framework</a>, the timing of which has been interesting as I am about to finish reading <a href="http://www.amazon.com/RESTful-Web-Services-Leonard-Richardson/dp/0596529260">RESTful Web Services</a> by Leonard Richardson and Sam Ruby. It&#8217;s an excellent book that I&#8217;d highly recommend to anybody designing and creating services for the web, or just interested in it.</p>
<p>This quote from the book description on Amazon.com succinctly describes what&#8217;s been floating around in my head for a while:</p>
<blockquote><p><em>You&#8217;ve built web sites that can be used by humans. But can you also build web sites that are usable by machines?</em> That&#8217;s where the future lies, and that&#8217;s what RESTful Web Services shows you how to do.       <br />[Emphasis mine]</p>
</blockquote>
<p>Why do we have to build web &quot;sites&quot; for humans and <em>different</em> web services for machines? I can create an ASP.NET site, a SOAP-based ASMX web service, or a SOAP or <a href="http://www.aaronlerch.com/blog/2007/08/21/creating-restful-web-services-with-wcf-35/">REST (with .NET 3.5)</a> WCF service and while they can share business logic, there&#8217;s still a lot of &quot;endpoint code&quot; (for lack of a better term) that has to be implemented, and if I want a human friendly front end + a web API, I have to build a site that essentially wraps <em>another</em> service, since the site itself really is a service.</p>
<p>With the ASP.NET MVC Framework, though, I see the opportunity to unify services and &quot;sites&quot; (human-readable services). Imagine visiting http://www.example.com/books/ and being able to receive back HTML, POX, or JSON, depending on what you asked for&#8211;with no additional code required outside of following a convention or two. Web browsers ask for HTML, returning a human consumable page that gets rendered. AJAX or custom clients can request JSON or XML, whatever they know how to interpret best.</p>
<p>The separation of concerns and extensibility that the ASP.NET MVC framework exposes lets us accomplish this with surprisingly little code. At least for read-only services (which is as far as I took it for now.) If you&#8217;re not familiar with how the ASP.NET MVC framework works, check out <a href="http://weblogs.asp.net/leftslipper/archive/2007/12/10/asp-net-mvc-design-philosophy.aspx">Eilon&#8217;s excellent ASP.NET MVC design philosophy post</a> (he also includes many good reference links).</p>
<h3>Approach</h3>
<p>Outside of the ASP.NET MVC framework itself, from an HTTP perspective I simply want to alter my response format depending on what the incoming request asked for. I decided to keep it simple and only support the &quot;<a href="http://www.rfc-editor.org/rfc/rfc2854.txt">text/html</a>&quot;, &quot;<a href="http://www.rfc-editor.org/rfc/rfc3023.txt">application/xml</a>&quot;, and &quot;<a href="http://www.ietf.org/rfc/rfc4627.txt">application/json</a>&quot; media types.</p>
<p>I started off trying to use the &quot;<a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html">Accept</a>&quot; HTTP header as an indicator for what response format the client preferred. After all, that&#8217;s what the Accept header is for: &quot;The Accept request-header field can be used to specify certain media types which are acceptable for the response.&quot; But I quickly ran into a snafu when I found that Firefox prefers XML over HTML.</p>
<p><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="167" alt="image" src="http://www.aaronlerch.com/files/blog/WebServiceswithASP.NETMVC_31B2/image.png" width="311" border="0" /> </p>
<p>That means that every request Firefox makes would result in the uber-friendly XML view.</p>
<p><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="179" alt="image" src="http://www.aaronlerch.com/files/blog/WebServiceswithASP.NETMVC_31B2/image_3.png" width="438" border="0" /> </p>
<p>And because of that snafu, I read up some more on the Accept header &#8211; namely what they had to say about it in an appendix of <u>RESTful Web Services</u>:</p>
<blockquote><p>Hiding this information inside the HTTP headers is a good idea for web browsers, but it shouldn&#8217;t be the only solution for web service clients. I recommend exposing different representations using different URIs. &#8230; If you want to support Accept on top of this, that&#8217;s great (Rails does this too).</p>
</blockquote>
<p>There was also some pragmatic advice in the chapter on Representations.</p>
<blockquote><p>It&#8217;s RESTful to keep this information [file format types] in the HTTP headers, and it&#8217;s RESTful to put it in the URI. I recommend keeping as much of this information as possible in the URI, and as little as possible in request metadata. I think URIs are more useful than metadata. URIs get passed around from person to person, and from program to program. The request metadata almost always gets lost in translation.</p>
</blockquote>
<p>I tend to agree with that. To make it easy and somewhat intuitive, I chose to base the response format on the existence of a querystring parameter named &quot;format&quot;. It can specify &quot;xml&quot; or &quot;json&quot;, for example http://www.example.com/books/?format=json. But really, you can use any method you want to allow format specification.</p>
<h3>Implementation</h3>
<p>Formatting the response is the responsibility of the View in the MVC architecture. Since processing requests for HTML content didn&#8217;t need to change from the default ASP.NET MVC behavior, all I need to do is override the default WebFormViewFactory functionality and return my own &quot;SerializedView&quot; if the URI indicated xml or json formatting. SerializedView is an abstract base class that encapsulates common functionality and allows sub-classes to perform the serialization, or handle custom error reporting.</p>
<p><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="300" alt="image" src="http://aaronlerch.com.s3.amazonaws.com/images/aspnetmvc_service_classdiagram.png" width="380" border="0" /> </p>
<p>When a Controller passes control to a View, it calls the &quot;RenderView&quot; method on the Controller base class, passing in the view name and some optional data &#8211; including something called &quot;ViewData&quot; &#8211; an object that represents the content the view should render.</p>
<p><strong>Here&#8217;s the best part:</strong> creating an ASP.NET MVC site+service using my approach means passing a serializable object as ViewData. <em>It&#8217;s as simple as that</em>, nothing else needs to change (ok, you need one additional line of code in your Application_Start handler &#8211; more on that later). In your ASPX view, you can access the object via ViewData and use all the HTML helpers, UserControls, etc. that you want to build out your HTML, javascript, and who-knows-what.</p>
<p>Unfortunately, the current CTP of the ASP.NET MVC framework does not expose a way to &quot;inject&quot; a different IViewFactory (my subclassed version) into the default Controller created by the ControllerBuilder class. So, that means implementing the IControllerFactory interface and duplicating (ouch!) the code that ControllerBuilder executes, with one somewhat nasty addition.</p>
<p><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="200" alt="image" src="http://www.aaronlerch.com/files/blog/WebServiceswithASP.NETMVC_31B2/image_5.png" width="680" border="0" /> </p>
<p>Yuck! The ViewFactory property is specific to the Controller class, not the IController interface, hence the specific processing &#8212; and that also means my approach won&#8217;t work for other IController implementations. Not without some extra work, anyway.</p>
<p>This is where the only change you need to make comes in. My IControllerFact<br />
ory implementation needs to be registered as the default controller factory, which is done in the Application_Start handler &#8211; the same place your routes are configured.</p>
<p><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="100" alt="image" src="http://www.aaronlerch.com/files/blog/WebServiceswithASP.NETMVC_31B2/image_6.png" width="910" border="0" /></p>
<h3>Serializable Types</h3>
<p>For various reasons, you should use the WCF [DataContract] and [DataMember] attributes to tag your objects as serializable. For one, you gain all the serialization benefits these attributes offer, plus you can use the same contract types across multiple endpoints if you need to. And for another, serializing to JSON via the <a title="DataContractJsonSerializer Class" href="http://msdn2.microsoft.com/bb908432.aspx">System.Runtime.Serialization.Json.DataContractJsonSerializer</a> requires the DataContract attribute. If you use the older [Serializable] attribute, you get some interesting results.</p>
<p><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="265" alt="image" src="http://aaronlerch.com.s3.amazonaws.com/images/aspnetmvc_service_serializedjson.png" width="390" border="0" /> </p>
<p>The deprecated <a title="JavaScriptSerializer Class" href="http://msdn2.microsoft.com/bb337495.aspx">System.Web.Script.Serialization.JavaScriptSerializer</a> works correctly for objects tagged with [Serializable] but it&#8217;s, well, deprecated.</p>
<h3>Example</h3>
<p>Using the default ASP.NET MVC Application templates, I registered the default ControllerFactory in my Application_Start handler, defined a Books controller with a default action, and a &quot;List&quot; view that prints out some Author and Title information. I also created the following definition of a book.</p>
<p><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="265" alt="image" src="http://www.aaronlerch.com/files/blog/WebServiceswithASP.NETMVC_31B2/image_8.png" width="365" border="0" /> </p>
<p>My controller implementation is no different than it normally would be. I get a list of books and render the &quot;List&quot; view, explicitly specifying the book list as the ViewData. You might notice that I pass the ControllerContext into the GetBooks method. I am experimenting with returning URIs to related resources as part of the data. I&#8217;m still playing around, but for now you get my latest attempt. <img src='http://www.aaronlerch.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="210" alt="image" src="http://www.aaronlerch.com/files/blog/WebServiceswithASP.NETMVC_31B2/image_9.png" width="510" border="0" /> </p>
<p>Requesting the appropriate URI in Firefox yields the expected result from my List view:</p>
<p><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="355" alt="image" src="http://www.aaronlerch.com/files/blog/WebServiceswithASP.NETMVC_31B2/image_10.png" width="385" border="0" /></p>
<p>And altering the URI returns the appropriate response types, xml or json.</p>
<p><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="355" alt="image" src="http://aaronlerch.com.s3.amazonaws.com/images/aspnetmvc_service_xmlformat.png" width="385" border="0" /></p>
<p><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="80" alt="image" src="http://www.aaronlerch.com/files/blog/WebServiceswithASP.NETMVC_31B2/image_12.png" width="620" border="0" /> </p>
<h3>Summary</h3>
<p>This ended up being a longer post than I intended, but I hope it was worth it. I&#8217;ve put the full source for the &quot;MvcServiceLibrary&quot; and an example up on my <a href="http://www.aaronlerch.com/blog/tools/">Tools page</a> &#8211; but <a href="http://www.aaronlerch.com/files/blog/MvcServiceLibrary.zip">here&#8217;s the direct download link</a>. I&#8217;ll also be checking if this is worth putting into the <a href="http://mvccontrib.org/">MvcContrib</a> open source project.</p>
<p>I think that the ASP.NET MVC framework is a huge step forward in creating RESTful web sites, and hopefully now also RESTful web services! Let me know what you think, I love getting feedback.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.aaronlerch.com/blog/2008/01/01/unifying-web-sites-and-web-services-with-the-aspnet-mvc-framework/feed/</wfw:commentRss>
		<slash:comments>29</slash:comments>
		</item>
		<item>
		<title>DotNetKicks &quot;Kick It&quot; Counter Plugin for Windows Live Writer</title>
		<link>http://www.aaronlerch.com/blog/2007/10/21/dotnetkicks-kick-it-counter-plugin-for-windows-live-writer/</link>
		<comments>http://www.aaronlerch.com/blog/2007/10/21/dotnetkicks-kick-it-counter-plugin-for-windows-live-writer/#comments</comments>
		<pubDate>Sun, 21 Oct 2007 23:53:22 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[blogging]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://www.aaronlerch.com/blog/2007/10/21/dotnetkicks-kick-it-counter-plugin-for-windows-live-writer/</guid>
		<description><![CDATA[Some people write pretty quality .NET-related blog posts every time. You know, stuff worth posting and kicking on DotNetKicks. Then there&#8217;s people, like me, who obscure the occasional &#8220;good&#8221; post with a mountain of crap. If you don&#8217;t know what DotNetKicks is, I encourage you to check it out. It&#8217;s a great community-edited feed of [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://weblogs.asp.net/scottgu/">Some people</a> write pretty quality .NET-related blog posts every time. You know, stuff worth posting and kicking on <a href="http://www.dotnetkicks.com/">DotNetKicks</a>. Then there&#8217;s people, like me, who obscure the occasional &#8220;good&#8221; post with a mountain of crap. If you don&#8217;t know what DotNetKicks is, I encourage you to check it out. It&#8217;s a great community-edited feed of .NET-related posts, with minimal &#8220;noise&#8221;.</p>
<p>I found myself wanting to add a &#8220;kick it&#8221; counter on <em>some</em> of my posts to enable people to easily kick them (via their blog reader, for example), but not on every post. I mean, who wants to kick a post about <a href="http://www.aaronlerch.com/blog/2007/10/18/contact-me/">contacting me</a>? Not even I do!</p>
<p>Here would be the process with what I&#8217;ve currently got:</p>
<ol>
<li>Write a kick-worthy post.
<li>Publish the post.
<li>Get the permalink for the post in question.
<li>Submit the post on DotNetKicks.com, and copy the HTML for the &#8220;kick it&#8221; counter.
<li>Add the HTML to my just-posted post, and re-publish the updated version.</li>
</ol>
<p><em>Way</em> too manual. So after a little research and a little coding today, here&#8217;s my new process:</p>
<ol>
<li>Write a kick-worthy post.
<li>Click <img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="18" alt="Insert Kick It Counter..." src="http://www.aaronlerch.com/files/blog/DotNetKicksKickItCounterPluginforWindows_FB0E/image.png" width="138" align="absMiddle" border="0"> from Windows Live Writer.
<li>Publish.</li>
</ol>
<h4>The Problem</h4>
<p>It&#8217;s simple, really: adding the &#8220;kick it&#8221; counter requires knowing the permalink of a particular post. That prevents me from inserting it <em>for real</em> at creation time, because the permalink isn&#8217;t known until the post is published. I could just add the &#8220;kick it&#8221; code to my wordpress template, but as I originally mentioned, I don&#8217;t want it on every post &#8211; just some. (Yes, I realize I&#8217;m overcomplicating things &#8211; it&#8217;s my blog though. <img src='http://www.aaronlerch.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  )</p>
<h4>The Solution</h4>
<p>Unfortunately any solution, including mine, will require some cooperation between Windows Live Writer and the blogging platform. Mine includes a Windows Live Writer plugin and a WordPress plugin. The Windows Live Writer plugin adds a placeholder (&#8220;&lt;!&#8211;dotnetkickit&#8211;&gt;&#8221;) to the post, and the WordPress plugin transforms the placeholder into the &#8220;kick it&#8221; image/link HTML at render time.</p>
<h6>Windows Live Writer Plugin</h6>
<p>The Windows Live Writer plugin adds an &#8220;Insert Kick It Counter&#8230;&#8221; link in the list of &#8220;insertable items.<br /><a href="http://www.aaronlerch.com/files/blog/DotNetKicksKickItCounterPluginforWindows_FB0E/image_3.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="93" alt="image" src="http://www.aaronlerch.com/files/blog/DotNetKicksKickItCounterPluginforWindows_FB0E/image_thumb.png" width="145" border="0"></a></p>
<p>Click it and, like any other inserted item, a default &#8220;kick it&#8221; image is added.<br /><a href="http://www.aaronlerch.com/files/blog/DotNetKicksKickItCounterPluginforWindows_FB0E/image_4.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="60" alt="image" src="http://www.aaronlerch.com/files/blog/DotNetKicksKickItCounterPluginforWindows_FB0E/image_thumb_3.png" width="114" border="0"></a> <br />This image is static, and is just for layout purposes only &#8211; Windows Live Writer allows plugins to insert different &#8220;editor&#8221; versus &#8220;published&#8221; HTML. When editing, I insert a static image so you can get the look-and-feel, and when published, only the &#8220;&lt;!&#8211;dotnetkickit&#8211;&gt;&#8221; placeholder gets inserted. Pretty nice on the part of Windows Live Writer to expose that functionality.</p>
<p>When you select the image, you&#8217;ll see the &#8220;Kick It Counter&#8221; properties on the right, of which there are none:<br /><a href="http://www.aaronlerch.com/files/blog/DotNetKicksKickItCounterPluginforWindows_FB0E/image_5.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="223" alt="image" src="http://www.aaronlerch.com/files/blog/DotNetKicksKickItCounterPluginforWindows_FB0E/image_thumb_4.png" width="206" border="0"></a> </p>
<p>That&#8217;s really all there is to the plugin, it&#8217;s pretty basic. It doesn&#8217;t (currently) allow you to change any of the colors, but that&#8217;s something you could manually update in the WordPress plugin itself, if you want.</p>
<p>To install the plugin, download and run the MSI available on my <a href="http://www.aaronlerch.com/blog/tools/">garage sale code page</a> listed under &#8220;DotNetKicks Windows Live Writer Plugin&#8221;.</p>
<h6>WordPress Plugin</h6>
<p>The WordPress plugin is beyond simple, partly thanks to the extensibility support the WordPress developers have built in. The plugin adds a filter that modifies the post content before it gets displayed in the browser. Note that I don&#8217;t actually modify the stored post content itself &#8211; I want to be able to turn this off and have the &#8220;kick it&#8221; counters go away.</p>
<p>To install, download and unzip the dotnetkicks.php file from my <a href="http://www.aaronlerch.com/blog/tools/">garage sale code page</a> (listed under &#8220;DotNetKicks WordPress Plugin&#8221;). Just upload it to your wp-content\plugins subfolder, and activate it from your admin page:</p>
<p><a href="http://www.aaronlerch.com/files/blog/DotNetKicksKickItCounterPluginforWindows_FB0E/image_6.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="87" alt="image" src="http://www.aaronlerch.com/files/blog/DotNetKicksKickItCounterPluginforWindows_FB0E/image_thumb_5.png" width="504" border="0"></a> </p>
<p>After activating, you&#8217;ll see the &#8220;kick it&#8221; image on the appropriate posts.</p>
<p><a href="http://www.aaronlerch.com/files/blog/DotNetKicksKickItCounterPluginforWindows_FB0E/image_7.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="141" alt="kick it example" src="http://www.aaronlerch.com/files/blog/DotNetKicksKickItCounterPluginforWindows_FB0E/image_thumb_6.png" width="311" border="0"></a> </p>
<p>If anybody wants to create plugins or whatever for other blogging platforms that will interpret this placeholder, post a comment here with a link to your implementation!</p>
<h4>Finally</h4>
<p>The moment we&#8217;ve all been waiting for &#8211; I&#8217;m going to make use of the barely useful tools I created! Feel free to kick this post. <img src='http://www.aaronlerch.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<div class="wlWriterSmartContent" id="scid:C16BAC14-9A3D-4c50-9394-FBFEF7A93539:daca5765-0fbe-44ed-848d-1d1bc8325c39" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px"><a href="http://www.dotnetkicks.com/kick/?url=http://www.aaronlerch.com/blog/2007/10/21/dotnetkicks-kick-it-counter-plugin-for-windows-live-writer/"><img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http://www.aaronlerch.com/blog/2007/10/21/dotnetkicks-kick-it-counter-plugin-for-windows-live-writer/" border="0" alt="kick it on DotNetKicks.com" /></a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.aaronlerch.com/blog/2007/10/21/dotnetkicks-kick-it-counter-plugin-for-windows-live-writer/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>Symbol Server Transaction Manager</title>
		<link>http://www.aaronlerch.com/blog/2007/09/01/symbol-server-transaction-manager/</link>
		<comments>http://www.aaronlerch.com/blog/2007/09/01/symbol-server-transaction-manager/#comments</comments>
		<pubDate>Sat, 01 Sep 2007 04:43:32 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[debugging]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://www.aaronlerch.com/blog/2007/09/01/symbol-server-transaction-manager/</guid>
		<description><![CDATA[Part of the recent Mastering .NET Debugging course I took covered setting up and using Microsoft&#8217;s Symbol Server technology &#8211; something that&#8217;s been around for a while, but yet many people don&#8217;t do it. While it&#8217;s incredibly useful to have a symbol server set up to contain operating system symbols (the LAN is faster than [...]]]></description>
			<content:encoded><![CDATA[<p>Part of the recent <a href="http://www.aaronlerch.com/blog/2007/08/31/mastering-net-debugging-with-john-robbins/">Mastering .NET Debugging course I took</a> covered setting up and using Microsoft&#8217;s <a href="http://msdn2.microsoft.com/en-us/library/ms680693.aspx">Symbol Server</a> technology &#8211; something that&#8217;s been around for a while, but yet many people don&#8217;t do it. While it&#8217;s incredibly useful to have a symbol server set up to contain operating system symbols (the LAN is faster than the web), it can also be useful to place your own builds on the symbol server, especially for larger or distributed teams. And, it&#8217;s trivially easy to set one up, since it&#8217;s just a file-based database all you need is an available shared directory with plenty of space. Microsoft includes the &#8220;symstore&#8221; utility which allows you to add your own symbols &#8211; it&#8217;s included with the Debugging Tools for Windows download&#8211;the same download that includes Windbg.</p>
<p>It&#8217;s easy to upload your builds to the symbol server using the command line. You execute a command like:</p>
<p><code>symstore add /r /f d:\builds\*.* /s \\symbol\ProductSymbols /t "Product Name" /v "Version string" /c "Comment"</code></p>
<p>(For full usage information run &#8220;symstore&#8221; with no arguments.)</p>
<p>The not-so-easy part of this process comes when managing previously uploaded versions of your symbols. <a href="http://www.wintellect.com/cs/blogs/jrobbins/default.aspx">John Robbins</a> suggested (and who am I to resist a challenge) that it would be great if somebody wrote a tool with some sort of UI that allowed users to select previous &#8220;transactions&#8221; and delete them. The only way to do that right now is by manually scanning the &#8220;history.txt&#8221; file located on the server&#8217;s share (in an &#8220;000admin&#8221; subdirectory) and pulling out the transaction id to delete by using in a &#8220;symstore del&#8221; command.</p>
<p>Way, way too manual.</p>
<p>So, dear reader, I give you my response to John&#8217;s challenge: <strong>Symbol Server Transaction Manager</strong>!</p>
<p><strong>UPDATE 1/4/2008:</strong> I&#8217;ve done a huge overhaul of the app, and released it as open source on CodePlex as the <a href="http://www.codeplex.com/PSSymbolStore">PSSymbolStore project. </a>Download the latest release there.</p>
<p>It makes the process much easier, I hope. Simply start the app, and press CTRL+O to open a symbol store. Note that in all my examples I&#8217;m using a local symbol store, &#8220;C:\symbols&#8221; &#8212; but in most cases you&#8217;ll be specifying a network path such as &#8220;\\symbols\ProductSymbols&#8221;.<br />
<a href="http://www.aaronlerch.com/files/blog/SymbolServerTransactionManager_249C/CropperCapture6.png" atomicselection="true"><img src="http://www.aaronlerch.com/files/blog/SymbolServerTransactionManager_249C/CropperCapture6_thumb.png" style="border-width: 0px" alt="CropperCapture[6]" border="0" height="312" width="500" /></a></p>
<p>Once you&#8217;ve opened a symbol store, you&#8217;ll see a list of existing transactions. Any transactions that have previously been deleted will not be shown. You can sort by any of the columns to help find the transactions you are looking for, such as all transactions older than 2 weeks.<br />
<a href="http://www.aaronlerch.com/files/blog/SymbolServerTransactionManager_249C/SymbolServerTransactionManager2.png" atomicselection="true"><img src="http://www.aaronlerch.com/files/blog/SymbolServerTransactionManager_249C/SymbolServerTransactionManager2_thumb.png" style="border-width: 0px" alt="Symbol Server Transaction Manager (2)" border="0" height="318" width="500" /></a></p>
<p>At this point, it&#8217;s as easy as highlighting the transactions you want and pressing &#8220;Delete&#8221;. Or you can right-click one or more items and use the context menu. If you haven&#8217;t refreshed your view (I didn&#8217;t code it to auto-refresh because of how long the operation might take), and try to re-delete a transaction, you&#8217;ll see an error message in <font color="#ff0000"><strong>red</strong></font>. In fact, any error will be shown in red. If you come across an error condition that shows up in <font color="#0000ff"><strong>blue</strong></font> (which indicates success), let me know.</p>
<p>Here&#8217;s an example of successfully deleting two transactions:<br />
<a href="http://www.aaronlerch.com/files/blog/SymbolServerTransactionManager_249C/SymbolServerTransactionManager3.png" atomicselection="true"><img src="http://www.aaronlerch.com/files/blog/SymbolServerTransactionManager_249C/SymbolServerTransactionManager3_thumb.png" style="border-width: 0px" alt="Symbol Server Transaction Manager (3)" border="0" height="322" width="500" /></a></p>
<p>And here&#8217;s an example of trying to immediately re-delete those same transactions (bad):<br />
<a href="http://www.aaronlerch.com/files/blog/SymbolServerTransactionManager_249C/SymbolServerTransactionManager4.png" atomicselection="true"><img src="http://www.aaronlerch.com/files/blog/SymbolServerTransactionManager_249C/SymbolServerTransactionManager4_thumb.png" style="border-width: 0px" alt="Symbol Server Transaction Manager (4)" border="0" height="322" width="500" /></a></p>
<p>You can press the &#8220;Refresh&#8221; button to update the view to match the server:<br />
<a href="http://www.aaronlerch.com/files/blog/SymbolServerTransactionManager_249C/SymbolServerTransactionManager5.png" atomicselection="true"><img src="http://www.aaronlerch.com/files/blog/SymbolServerTransactionManager_249C/SymbolServerTransactionManager5_thumb.png" style="border-width: 0px" alt="Symbol Server Transaction Manager (5)" border="0" height="318" width="500" /></a></p>
<p>That&#8217;s about it, pretty simple stuff, eh? There is one thing worthy of a special note. Because deleting transactions can be a fairly long-running operation, you can cancel it. The &#8220;Delete&#8221; button changes to &#8220;Cancel&#8221; if an operation is running. If you click &#8220;Cancel&#8221;, <strong>it will kill the currently executing instance of SYMSTORE, orphaning any remaining files in the transaction</strong>, and it won&#8217;t process any more transactions, if you had selected more than one. That&#8217;s just something to be aware of. Eventually maybe I&#8217;ll be smarter about cleaning up the files, but for now, cancel at your own risk. <img src='http://www.aaronlerch.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I welcome any feedback, if you find this tool useful, let me know! I&#8217;m happy to add any enhancements you can think of, too.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.aaronlerch.com/blog/2007/09/01/symbol-server-transaction-manager/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>Has Scott Hanselman &quot;Jumped the Shark&quot;?</title>
		<link>http://www.aaronlerch.com/blog/2007/08/26/has-scott-hanselman-jumped-the-shark/</link>
		<comments>http://www.aaronlerch.com/blog/2007/08/26/has-scott-hanselman-jumped-the-shark/#comments</comments>
		<pubDate>Sun, 26 Aug 2007 19:48:25 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[blogging]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://www.aaronlerch.com/blog/2007/08/26/has-scott-hanselman-jumped-the-shark/</guid>
		<description><![CDATA[Scott Hanselman has posted his annual &#8220;Ultimate Developer and Power Users Tool List for Windows&#8220;. This list consistently rocks every year! I can honestly say that incorporating much of what&#8217;s on the list has changed my development life for the better. Go check it out right now. If you read Scott&#8217;s blog via Google Reader, [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.hanselman.com/blog/">Scott Hanselman</a> has posted his annual &#8220;<a href="http://www.hanselman.com/blog/ScottHanselmans2007UltimateDeveloperAndPowerUsersToolListForWindows.aspx">Ultimate Developer and Power Users Tool List for Windows</a>&#8220;. This list consistently rocks every year! I can honestly say that incorporating much of what&#8217;s on the list has changed my development life for the better. Go check it out right now.</p>
<p>If you read Scott&#8217;s blog via <a href="http://www.google.com/reader/">Google Reader</a>, like I do, you&#8217;ll notice his feed is broken. In his recent <a href="http://www.hanselminutes.com/default.aspx?showID=96">Hanselminutes podcast</a> he talks about his list, and how it broke <a href="http://www.feedburner.com/">Feedburner</a> last year due to the size of his feed. Apparently Feedburner handles it now (you can see that his feed is up to date if you view the raw feed) but no matter what you do, Google Reader won&#8217;t show any updates to it. So check it out on his site.</p>
<p>With me having nothing but good things to say, you&#8217;re probably wondering why I&#8217;m asking if he&#8217;s <a href="http://en.wikipedia.org/wiki/Jumping_the_shark">Jumped the Shark</a>? I&#8217;ll tell you why: somehow this year I ended up on his list. (More specifically, my <a href="http://www.aaronlerch.com/blog/tools/">garage sale code page</a>.) Now, I have nothing but respect for Mr. Hanselman, but when I saw my name on the list I had to step back and seriously question his sanity&#8230; and the only thing I can come up with is that he&#8217;s losing his mind. Did you know he recently just up and quit his job? Yep, it&#8217;s true! Does a sane person quit a job they enjoy? No, they don&#8217;t. He&#8217;s also &#8220;taking a month off&#8221; between jobs&#8230; can you say &#8220;mental institution&#8221; or &#8220;rehab&#8221;?&nbsp;I can!</p>
<p>I rest my case.</p>
<p>Okay, I&#8217;m obviously joking, I actually consider it quite an honor to be on that list. Cheers, Scott, keep up the great work!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.aaronlerch.com/blog/2007/08/26/has-scott-hanselman-jumped-the-shark/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Using Synergy to Link Computers</title>
		<link>http://www.aaronlerch.com/blog/2007/08/16/using-synergy-to-link-computers/</link>
		<comments>http://www.aaronlerch.com/blog/2007/08/16/using-synergy-to-link-computers/#comments</comments>
		<pubDate>Thu, 16 Aug 2007 17:02:00 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[mac]]></category>
		<category><![CDATA[tools]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://www.aaronlerch.com/blog/2007/08/16/using-synergy-to-link-computers/</guid>
		<description><![CDATA[If you haven&#8217;t heard of the open-source project called Synergy, and use more than one computer side-by-side, you need to check it out. In a nutshell, it unifies individual (and often disparate) computers; connecting monitors, keyboards, mice, and &#8220;clipboards&#8221; via the network. It claims to support practically any version of Windows (from 95 to XP, [...]]]></description>
			<content:encoded><![CDATA[<p>If you haven&#8217;t heard of the open-source project called <a href="http://synergy2.sourceforge.net/">Synergy</a>, and use more than one computer side-by-side, you need to check it out.  In a nutshell, it unifies individual (and often disparate) computers; connecting monitors, keyboards, mice, and &#8220;clipboards&#8221; via the network.</p>
<p>It claims to support practically any version of Windows (from 95 to XP, and I&#8217;m personally running it on Vista), as well as Mac OS X 10.2+ and *nix (primarily tested on Linux).</p>
<p><a href="http://www.flickr.com/photos/31828990@N00/1140197942/" title="View on Flickr (has notes with hotspots)" atomicselection="true"><img src="http://www.aaronlerch.com/files/blog/UsingSynergytoLinkComputers_EF9D/MyOfficeRig.jpg" style="border: 0px none " alt="My Office Rig" align="right" border="0" height="143" width="190" /></a>When I <a href="http://www.aaronlerch.com/blog/2007/08/office.html">posted about my office setup</a>, I included a picture of my 3 monitor setup, plus my MacBook Pro.  Thanks to Synergy, I essentially have <em>four</em> monitors.  Moving my mouse off the left edge of my Windows desktop instantly transfers it to the right edge of my Mac&#8217;s desktop, along with my keyboard focus and clipboard.  It only supports plain-text clipboard contents for Windows &lt;-&gt; Mac, but 9 times out of 10 that&#8217;s sufficient. (Submit a patch with the fix, if you feel brave!)</p>
<p>One thing is that configuring Synergy <a href="http://www.aaronlerch.com/blog/2007/08/decision-making-and-ui-design.html">sucks</a>.  On the Mac (and *nix) you have to know how to edit a .conf text file.  In Windows, it&#8217;s hardly better.  You have to reference your computers by hostname, which causes me grief when I connect my Mac via VPN and sometimes get an arbitrary hostname assigned to me.  Also, in Vista, you must always run the application as an administrator, or else no dice.</p>
<p>Here&#8217;s a handy guide to configuring Synergy 1.3.1&#8211;focused on my particular setup, and assuming you keep most of the defaults. We won&#8217;t get too &#8220;fancy&#8221; here. If you want more advanced information, check out the links under the Documentation section on <a href="http://synergy2.sourceforge.net/">the SourceForge page</a>.</p>
<h5>Windows (Running Synergy as a server)</h5>
<p>Start Synergy, and select &#8220;Share this computer&#8217;s keyboard and mouse (server)&#8221;, then click &#8220;Configure&#8221;<br />
<img src="http://www.aaronlerch.com/files/blog/UsingSynergytoLinkComputers_EF9D/image.png" style="border: 0px none " alt="Synergy server" border="0" height="70" width="444" /></p>
<p>The first step is to define your &#8220;screens&#8221;. A screen is really just &#8220;a computer&#8221;. In my case, a single PC has 3 monitors &#8211; that&#8217;s one &#8220;screen&#8221;. Click the super-fancy-awesome plus sign button (&#8220;+&#8221;) under the &#8220;Screens:&#8221; list box to add a new screen. Synergy recommends you use the computer name as the screen name, unless you&#8217;ve got a good reason not to, I agree with them&#8211;but for the server setup it doesn&#8217;t really matter. As far as I can tell, though, it&#8217;s purely cosmetic since you can use the &#8220;aliases&#8221; to map hostnames to a friendly name. Enter the screen name (your computer&#8217;s hostname) and optionally any aliases. It&#8217;s important to reiterate that both &#8220;screen name&#8221; and &#8220;aliases&#8221; are used to identify remote computers via the incoming/outgoing network connection.<br />
<img src="http://www.aaronlerch.com/files/blog/UsingSynergytoLinkComputers_EF9D/image_3.png" style="border: 0px none " alt="image" border="0" height="113" width="298" /><br />
I left all the other options as default (just to get something going). But essentially you can control which modifier keys are also sent over the network (or not), as well as &#8220;dead zones&#8221; on the screen that shouldn&#8217;t swap the mouse out.</p>
<p>Each computer needs to know about every other computer, so you&#8217;ll have to add a new &#8220;screen&#8221; for every box you want to hook up. Go ahead and do that, I&#8217;ll wait. Ready? Wishing they had some sort of &#8220;auto-discovery&#8221;? Me too. The next step is to &#8220;link up&#8221; your screens. You basically have to tell Synergy how they are positioned/connected. In my case, my laptop is directly to the left (and a little below) my main PC &#8220;screen&#8221; (remember, all 3 count as one to Synergy&#8211;it&#8217;s about &#8220;desktops&#8221; really).</p>
<p>Click &#8220;[New Link]&#8221; in the &#8220;Links&#8221; listbox and enter your information (explained in a sec) &#8212; then click the &#8220;+&#8221; button (genius!) to add it. Wash, rinse, and repeat until you&#8217;ve got it all set up.</p>
<p><img src="http://www.aaronlerch.com/files/blog/UsingSynergytoLinkComputers_EF9D/image_4.png" style="border: 0px none " alt="image" border="0" width="500" /></p>
<p>The reason this is so complex is that you can configure portions of screens that link to portions of other screens. In the above example, I&#8217;m configuring the entire left side of my work PC (0-100%) to map to the entire edge of my Mac (0-100%) &#8212; on the Mac I configure which edge (left/right/etc) lines up with my work PC. Why would I want anything different? Consider the following extreme configuration:</p>
<p><img src="http://www.aaronlerch.com/files/blog/UsingSynergytoLinkComputers_EF9D/screenlayout_thumb.gif" alt="screen layout" border="0" /></p>
<p>In this &#8220;screen&#8221; layout, I would map:</p>
<ul>
<li>0-50% of the left of Screen 3 to 0-100% of Screen 1</li>
<li>50-100% of the left of Screen 3 to 0-100% of Screen 2</li>
<li>0-100% of the bottom of Screen 2 to 0-60% of Screen 4</li>
<li>etc.</li>
</ul>
<p>Make sense? I hope so, because it&#8217;s a real pain to configure. And each &#8220;screen&#8221; has to be configured to match &#8212; so on Screen 1&#8242;s configuration, 0-100% of the left side goes to 0-50% of Screen 3. So much can be done here in terms of auto-config, it&#8217;s not even funny.</p>
<p>The good news is that you&#8217;re basically done. You can test your configuration by clicking &#8220;Test&#8221; in the main dialog, which simply starts the server allowing you to cancel it. I recommend using the &#8220;Test&#8221; mode until you&#8217;ve got it all set up, because otherwise it runs in the background and there&#8217;s no way to change the configuration without restarting the application. (Fun.) You can also configure some advanced options (like network port numbers, and auto-start options).</p>
<h5>Mac (Running Synergy as a client)</h5>
<p>This is the fun part. The UI on Windows at least abstracts out the configuration file describing the screens&#8211;no such luck on a Mac. And on a Mac, of all places! Synergy on the Mac includes a sample .conf file, which really helps. Here&#8217;s an example .conf file &#8211; it gets more advanced than this, but for basic stuff you don&#8217;t need anything more. Notice that I&#8217;m not specifying any percentages because they&#8217;re all 0-100%. If you want to get more complicated, I recommend reading the documentation. <img src='http://www.aaronlerch.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>section: screens<br />
LERCHWORKPC:<br />
maclerch.local:<br />
end</p>
<p>section: links<br />
# lerchworkpc is to the right of maclerch.local<br />
maclerch.local:<br />
right = LERCHWORKPC<br />
LERCHWORKPC:<br />
left = maclerch.local<br />
end</p>
<p>Basically I&#8217;m identifying all the screens involved: LERCHWORKPC and maclerch.local. Then I&#8217;m associating them: to the right of maclerch.local is LERCHWORKPC, and to the left of LERCHWORKPC is maclerch.local. Nuff said.</p>
<p>To run Synergy in client mode, bring up Terminal (the Mac&#8217;s saving grace: a command-prompt), and drag-and-drop &#8220;synergyc&#8221; from the install location (by install I mean &#8220;where you unpackaged the files&#8221;) onto Terminal. Add &#8220;-f&#8221; and the name of the computer running the Synergy server, and press Return.</p>
<p>Drag &#8220;synergyc&#8221; from here&#8230; (assuming you installed it here)<br />
<a href="http://www.aaronlerch.com/files/blog/UsingSynergytoLinkComputers_EF9D/Picture2.png" atomicselection="true"><img src="http://www.aaronlerch.com/files/blog/UsingSynergytoLinkComputers_EF9D/Picture2_thumb.png" style="border: 0px none " alt="Applications (Mac)" border="0" width="500" /></a></p>
<p>&#8230; to here.  So your command looks something like this:<a href="http://www.aaronlerch.com/files/blog/UsingSynergytoLinkComputers_EF9D/Picture1.png" atomicselection="true"><br />
<img src="http://www.aaronlerch.com/files/blog/UsingSynergytoLinkComputers_EF9D/Picture1_thumb.png" style="border: 0px none " alt="Terminal (Mac)" border="0" width="500" /></a></p>
<p>The -f option tells Synergy not to run as a daemon. I prefer it because I can minimize Terminal and forget about it &#8211; but bring it back up to view the output or kill the app with CTRL+C easily if I want to. You can leave off &#8220;-f&#8221; to run it as a daemon and stop the process later, if you like.</p>
<p>That&#8217;s it, run the synergy client app and you&#8217;re all set up. Well I should rephrase. <em>I&#8217;m</em> all set up. Everybody has different configurations, so hopefully this will be a good stepping stone for you to get yours working.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.aaronlerch.com/blog/2007/08/16/using-synergy-to-link-computers/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Hawkeye</title>
		<link>http://www.aaronlerch.com/blog/2006/08/31/hawkeye/</link>
		<comments>http://www.aaronlerch.com/blog/2006/08/31/hawkeye/#comments</comments>
		<pubDate>Thu, 31 Aug 2006 12:24:00 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[tools]]></category>
		<category><![CDATA[windows forms]]></category>

		<guid isPermaLink="false">http://www.aaronlerch.com/blog/2006/08/31/hawkeye/</guid>
		<description><![CDATA[I just installed Hawkeye, and I&#8217;m pretty impressed! What is Hawkeye? From the website: &#8220;Hawkeye is the only .Net tool that allows you to view, edit, analyze and invoke (almost) any object from a .Net application. Whenever you try to debug, test, change or understand an application, Hawkeye can help.&#8221; I haven&#8217;t put it through [...]]]></description>
			<content:encoded><![CDATA[<p>I just installed <a href="http://acorns.com.au/hawkeye/">Hawkeye</a>, and I&#8217;m pretty impressed!</p>
<p>What is Hawkeye? From the website:</p>
<blockquote><p>&#8220;Hawkeye is the only .Net tool that allows you to view, edit, analyze and invoke (almost) any object from a .Net application. Whenever you try to debug, test, change or understand an application, Hawkeye can help.&#8221;</p></blockquote>
<p>I haven&#8217;t put it through any sort of paces yet, but I was blown away that I was able to attach to my .NET Outlook add-in and change properties in real-time.  I think this will quickly become a valued debugging tool.  Download it and give it a whirl!</p>
<p>(via <a href="http://www.larkware.com/dg6/TheDailyGrind960.aspx">Mike Gunderloy&#8217;s Daily Grind</a>)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.aaronlerch.com/blog/2006/08/31/hawkeye/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IDesign</title>
		<link>http://www.aaronlerch.com/blog/2006/08/22/idesign/</link>
		<comments>http://www.aaronlerch.com/blog/2006/08/22/idesign/#comments</comments>
		<pubDate>Tue, 22 Aug 2006 16:32:00 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://www.aaronlerch.com/blog/2006/08/22/idesign/</guid>
		<description><![CDATA[I&#8217;m sure that this is a well known resource to all by now, but in case someone out there doesn&#8217;t know, IDesign has some fantastic free downloads of code/design samples for C#/WCF.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m sure that this is a well known resource to all by now, but in case someone out there doesn&#8217;t know, <a href="http://www.idesign.net/">IDesign</a> has some fantastic <a href="http://www.idesign.net/idesign/DesktopDefault.aspx?tabindex=5&amp;tabid=11">free downloads of code/design samples for C#/WCF</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.aaronlerch.com/blog/2006/08/22/idesign/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Format your source!</title>
		<link>http://www.aaronlerch.com/blog/2005/09/26/format-your-source/</link>
		<comments>http://www.aaronlerch.com/blog/2005/09/26/format-your-source/#comments</comments>
		<pubDate>Mon, 26 Sep 2005 14:27:00 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://www.aaronlerch.com/blog/2005/09/26/format-your-source/</guid>
		<description><![CDATA[http://www.manoli.net/csharpformat/ I&#8217;ll be using this in the (near) future to post source code! Thanks for putting this out there!]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.manoli.net/csharpformat/">http://www.manoli.net/csharpformat/</a></p>
<p>I&#8217;ll be using this in the (near) future to post source code!<br />
Thanks for putting this out there!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.aaronlerch.com/blog/2005/09/26/format-your-source/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
