<?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; Uncategorized</title>
	<atom:link href="http://www.aaronlerch.com/blog/category/uncategorized/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.aaronlerch.com/blog</link>
	<description></description>
	<lastBuildDate>Wed, 10 Mar 2010 12:45:13 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>10 Things You Need to Know About PowerShell at Codemash</title>
		<link>http://www.aaronlerch.com/blog/2010/01/15/10-things-you-need-to-know-about-powershell-at-codemash/</link>
		<comments>http://www.aaronlerch.com/blog/2010/01/15/10-things-you-need-to-know-about-powershell-at-codemash/#comments</comments>
		<pubDate>Fri, 15 Jan 2010 16:41:30 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.aaronlerch.com/blog/2010/01/15/10-things-you-need-to-know-about-powershell-at-codemash/</guid>
		<description><![CDATA[
Thanks to everybody who came to the PowerShell talk that Matt Hester and I did at Codemash! If you haven’t heard of Codemash or attended it, it’s an extremely well-done conference in Sandusky, Ohio at a huge indoor waterpark. I brought my whole family (including in-laws) along with to enjoy a vacation. The conference itself [...]]]></description>
			<content:encoded><![CDATA[<p><img style="display: inline; margin-left: 0px; margin-right: 0px" align="left" src="http://s3.amazonaws.com:80/aaronlerch.com/images/speaking-at-codemash.png" /></p>
<p>Thanks to everybody who came to the PowerShell talk that <a href="http://blogs.technet.com/matthewms/">Matt Hester</a> and I did at <a href="http://codemash.org/">Codemash</a>! If you haven’t heard of Codemash or attended it, it’s an extremely well-done conference in Sandusky, Ohio at a huge indoor waterpark. I brought my whole family (including in-laws) along with to enjoy a vacation. The conference itself draws in all sorts of smart people with all sorts of backgrounds, and there have been many interesting sessions, open space sessions, and conversations already. It’s worth way more than the price of admission. (WAY more.)</p>
<p>We tried to tailor our talk to people who have only heard of PowerShell, and people who have limited experience with it. And that worked great because I think that described the majority of people there. We got a lot of great questions, and of course we went well over our 1-hour timeslot. There’s so much to talk about! I wish we could’ve gotten into more advanced topics like the type system, etc.</p>
<p>For my part of the talk, I presented a few demos. You can download them and the slides below. Briefly, the demos were the following:</p>
<p><strong>Using PowerShell from within applications.</strong> I extended the <a href="http://familyshow.codeplex.com/">Family.Show</a> example application that Vertigo Software wrote by adding “scripting support” using PowerShell. You can see a screenshot I <a href="http://twitpic.com/xkmwf">posted here</a>. I also wrote a simple WPF application that gets a list of processes running on the computer, only including those who have a handle count less than 200.</p>
<p><strong>Simple Cmdlet.</strong> I wrote a simple Cmdlet as an example. It’s completely non-functional but I included it here for completeness. <img src='http://www.aaronlerch.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong>Build Scripts with PSake.</strong> I have a simple build script with <a href="http://code.google.com/p/psake/">PSake</a> that doesn’t actually build anything, but shows how to define dependencies, prerequisites, etc.</p>
<p><strong>Windows Troubleshooting Platform + Reference Application.</strong> Not included in the download (because you can get the source as-is from codeplex), I briefly covered the <a href="http://pssymbolstore.codeplex.com/">PSSymbolStore application</a>. It demos using the Windows Troubleshooting Platform, defining more advanced Cmdlets, and building an application on top of PowerShell at the core. You can browse (and/or download) the code <a href="http://pssymbolstore.codeplex.com/sourcecontrol/changeset/view/33254?projectName=PSSymbolStore">here</a>.    <br /><em>As a note</em>, because of the signing requirements of the Windows Troubleshooting Framework, I will leave the code in the application but will remove any UI that invokes the Troubleshooter. It won’t work on any machine but mine unless I have a trusted certificate, which I don’t. <img src='http://www.aaronlerch.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><a title="Code and Slides from our PowerShell talk" href="http://s3.amazonaws.com:80/aaronlerch.com/files/CodeMash-2010-Powershell.zip">Download the code and slides from our presentation.</a></p>
<p>See you next year (hopefully)!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.aaronlerch.com/blog/2010/01/15/10-things-you-need-to-know-about-powershell-at-codemash/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Two Components for your Toolbox</title>
		<link>http://www.aaronlerch.com/blog/2009/09/25/two-components-for-your-toolbox/</link>
		<comments>http://www.aaronlerch.com/blog/2009/09/25/two-components-for-your-toolbox/#comments</comments>
		<pubDate>Fri, 25 Sep 2009 06:36:11 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[.net]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.aaronlerch.com/blog/2009/09/25/two-components-for-your-toolbox/</guid>
		<description><![CDATA[Any desktop application I write from now on will contain these two interfaces. They’re useful enough I thought I should share. Also note, with upcoming improvements in .NET 4.0 (or higher) they might be rendered moot. So far, I don’t think they are, as it’s still difficult to test the code itself that performs asynchronous [...]]]></description>
			<content:encoded><![CDATA[<p>Any desktop application I write from now on will contain these two interfaces. They’re useful enough I thought I should share. Also note, with upcoming improvements in .NET 4.0 (or higher) they might be rendered moot. So far, I don’t think they are, as it’s still difficult to test the code itself that performs asynchronous operations.</p>
<p>First, is an abstraction around the User Interface thread, IUserInterfaceContext. This exists today in the form of <a href="http://msdn.microsoft.com/en-us/library/system.threading.synchronizationcontext.aspx">SynchronizationContext</a>, but I favor this specific interface because</p>
<ol>
<li>It’s more explicit (the SynchronizationContext applies to more than just the main UI thread) whereas this is very clear what its purpose is.</li>
<li>The API is cleaner – passing a “state” is unnecessary with nested closures.</li>
<li>It’s easier to grab out of an IoC container. Because a SynchronizationContext is only specific to the context it was created in (which could be a background thread) it’s not meaningful to put a SynchronizationContext argument in your constructor. Which one do you want?</li>
</ol>
<pre class="brush: csharp;">public interface IUserInterfaceContext
{
    void Execute(Action action);
    void ExecuteAndBlock(Action action);
}</pre>
<p>Now, any component in my application can execute code on the UI thread extremely easily. I just register the implementation of IUserInterfaceContext (which does use a SynchronizationContext) when my application is started, which is on the UI thread.</p>
<p>The implementation could look something like this:</p>
<pre class="brush: csharp;">public class UserInterfaceContext : IUserInterfaceContext
{
    private readonly SynchronizationContext _syncContext;

    public UserInterfaceContext(SynchronizationContext syncContext)
    {</pre>
<pre class="brush: csharp;">        /* Ensure the SynchronizationContext passed in is the main UI thread context */
        _syncContext = syncContext;
    }

    public void ExecuteAndBlock(Action action)
    {
        if (_syncContext != null)
        {
            _syncContext.Send(s =&gt; action(), null);
        }
        else
        {
            action();
        }
    }

    /// &lt;inheritdoc /&gt;
    public void Execute(Action action)
    {
        if (_syncContext != null)
        {
            _syncContext.Post(s =&gt; action(), null);
        }
        else
        {
            ThreadPool.QueueUserWorkItem(s =&gt; action(), null);
        }
    }
}</pre>
<p>Secondly, is a more generalized example of Jeremy Miller’s <a href="http://codebetter.com/blogs/jeremy.miller/archive/2008/02/15/build-your-own-cab-18-the-command-executor.aspx">ICommandExecutor</a>, which is even more generalized as the <a href="http://blog.gurock.com/postings/active-objects-and-futures-a-concurrency-abstraction-implemented-for-c-and-net/290/">Active Object pattern</a>. I named mine “IAsyncExecutor” because it executes any code asynchronously. The advantage with this approach is that it drastically simplifies test activities to be able abstract multithreading (to a point) and allow a test to run single threaded. That is nothing but pure win. We’ve also found that using the interface makes the code read better than using a bunch of BeginInvoke/EndInvoke’s or the ThreadPool, or an async pattern such as &#8220;void FooAsync(AsyncCallback callback, object state);</p>
<pre class="brush: csharp;">public interface IAsyncExecutor
{
    void Execute(Action action);
    void Execute(Action action, Action after, bool callbacksOnUIThread);
    void Execute(Action action, Action after, Action&lt;Exception&gt; error, bool callbacksOnUIThread);
}</pre>
<p>You’ll notice that IAsyncExecutor looks a lot like IUserInterfaceContext, and in fact, it can use it under the covers if the callbacksOnUIThread is true.</p>
<p>Both of these are simple interfaces, with trivial implementations, but you’d be surprised how often I’ve wished I’ve had them in the past. What are some “core” interfaces/services/etc that you <strong>*must have*</strong> in your toolbox?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.aaronlerch.com/blog/2009/09/25/two-components-for-your-toolbox/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>#3!</title>
		<link>http://www.aaronlerch.com/blog/2009/04/02/3/</link>
		<comments>http://www.aaronlerch.com/blog/2009/04/02/3/#comments</comments>
		<pubDate>Fri, 03 Apr 2009 00:58:58 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.aaronlerch.com/blog/2009/04/02/3/</guid>
		<description><![CDATA[No, that’s not a bash command or a regular expression.  

#3 will be joining #2 and #1, and we are pumped.    Well, I’m pumped, my wife is just trying not to feel too sick. She’ll be pumped later, like in 5 years.  
]]></description>
			<content:encoded><![CDATA[<p>No, that’s not a bash command or a regular expression. <img src='http://www.aaronlerch.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><img src="http://s3.amazonaws.com:80/aaronlerch.com/images/ultrasound-3.jpg" /></p>
<p>#3 will be joining <a href="http://picasaweb.google.com/aaronlerch/FromHalloweenToThanksgiving#5275445275518695186">#2 and #1</a>, and we are pumped.    <br />Well, I’m pumped, my wife is just trying not to feel too sick. She’ll be pumped later, like in 5 years. <img src='http://www.aaronlerch.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.aaronlerch.com/blog/2009/04/02/3/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Windows Forms Globalization</title>
		<link>http://www.aaronlerch.com/blog/2008/01/08/windows-forms-globalization/</link>
		<comments>http://www.aaronlerch.com/blog/2008/01/08/windows-forms-globalization/#comments</comments>
		<pubDate>Tue, 08 Jan 2008 22:21:00 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[windows forms]]></category>

		<guid isPermaLink="false">http://www.aaronlerch.com/blog/2008/01/08/windows-forms-globalization/</guid>
		<description><![CDATA[It&#8217;s amazing how the process of making an application localizable can be both simple and confusing at the same time. At a basic level, the Visual Studio designer makes it very easy. Set the &#34;Localizable&#34; property on your form to True and you&#8217;re good to go. It&#8217;s very convenient.
On the other hand, there are a [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s amazing how the process of making an application localizable can be both simple and confusing at the same time. At a basic level, the Visual Studio designer makes it very easy. Set the &quot;Localizable&quot; property on your form to True and you&#8217;re good to go. It&#8217;s very convenient.</p>
<p>On the other hand, there are a lot of challenges like <a href="http://blogs.msdn.com/michkap/archive/2007/01/11/1449754.aspx" mce_href="http://blogs.msdn.com/michkap/archive/2007/01/11/1449754.aspx">poorly named properties</a>, confusing defaults, and possibly unexpected behavior. You really need to understand what&#8217;s going on under the covers.</p>
<p>For instance, if you&#8217;ve looked into .NET <a href="http://blogs.msdn.com/larryosterman/archive/2005/01/26/361015.aspx" mce_href="http://blogs.msdn.com/larryosterman/archive/2005/01/26/361015.aspx">localizability</a> at all, you probably know that by default resources are loaded using the <a href="http://msdn2.microsoft.com/en-us/library/system.globalization.cultureinfo.aspx" mce_href="http://msdn2.microsoft.com/en-us/library/system.globalization.cultureinfo.aspx">CultureInfo</a> retrieved from the <a href="http://msdn2.microsoft.com/en-us/library/system.threading.thread.currentuiculture.aspx" mce_href="http://msdn2.microsoft.com/en-us/library/system.threading.thread.currentuiculture.aspx">System.Threading.Thread.CurrentThread.CurrentUICulture</a> property. That&#8217;s why most <a href="http://msdn2.microsoft.com/en-us/library/b28bx3bh%28VS.71%29.aspx" mce_href="http://msdn2.microsoft.com/en-us/library/b28bx3bh(VS.71).aspx">guidance</a> for manually changing the default application UI language says to set that property to a value of your choice. And well you should &#8211; it&#8217;s the only way to override the default language settings for your Windows Forms.</p>
<p>See, the Windows Forms designer automatically generates all sorts of useful code that you can&#8217;t (and shouldn&#8217;t) touch. Here&#8217;s an example.</p>
<p><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="262" alt="image" src="http://aaronlerch.com.s3.amazonaws.com/images/localizing_windows_forms_code.png" width="520" border="0" mce_src="http://aaronlerch.com.s3.amazonaws.com/images/localizing_windows_forms_code.png" /> </p>
<p>Notice the ComponentResourceManager? It&#8217;s a local variable in the InitializeComponent method. The only way to alter it&#8217;s behavior is to alter the current thread&#8217;s UI culture information.</p>
<p>So that&#8217;s great, and even better it&#8217;s easy. When your application starts, you can load culture/language information from whatever persistence mechanism you prefer, and essentially &quot;set it and forget it&quot;, since all Controls should be created on the <a href="http://www.aaronlerch.com/blog/2007/05/19/net-20-winforms-multithreading-and-a-few-long-days/" mce_href="http://www.aaronlerch.com/blog/2007/05/19/net-20-winforms-multithreading-and-a-few-long-days/">same</a> <a href="http://www.aaronlerch.com/blog/2006/12/15/controltrifecta-invokerequired-ishandlecreated-and-isdisposed/" mce_href="http://www.aaronlerch.com/blog/2006/12/15/controltrifecta-invokerequired-ishandlecreated-and-isdisposed/">thread</a>.</p>
<p><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="160" alt="image" src="http://www.aaronlerch.com/files/blog/Localizingwindowsformsapplications_1D07/image_3.png" width="510" border="0" mce_src="http://www.aaronlerch.com/files/blog/Localizingwindowsformsapplications_1D07/image_3.png" /> </p>
<p>But there&#8217;s one problem with this: <b>it only applies to UI elements (Controls).</b></p>
<p>It&#8217;s also common to load objects outside the context of the UI, perhaps with the intention of later presenting them to the user, or persisting to a file, or something else &quot;user visible&quot;. For this, you can add an arbitrary number of resx files that contain images, strings, serialized objects, etc.</p>
<p><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="165" alt="image" src="http://www.aaronlerch.com/files/blog/Localizingwindowsformsapplications_1D07/image_4.png" width="370" border="0" mce_src="http://www.aaronlerch.com/files/blog/Localizingwindowsformsapplications_1D07/image_4.png" /> </p>
<p>With Visual Studio 2005 and higher, these resources are available as strongly-typed properties, giving you compile-time checking and ease of use.</p>
<p><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="40" alt="image" src="http://www.aaronlerch.com/files/blog/Localizingwindowsformsapplications_1D07/image_5.png" width="430" border="0" mce_src="http://www.aaronlerch.com/files/blog/Localizingwindowsformsapplications_1D07/image_5.png" /> </p>
<p>But here&#8217;s where our problem comes in. Overriding the default UI culture on the main thread applies <i>only to that thread</i>. If you load any resources from a background thread of any kind, they will be the resources for the default windows UI language.</p>
<p>The strongly-typed class (&quot;Resources&quot;, in my example) offers us some relief, however, in the form of a static &quot;Culture&quot; property on the auto generated class. If you never touch the property, resources will be loaded using the current thread value. But if you assign your own value, you can explicitly control which resources are loaded.</p>
<p>Consider this debugging example where I&#8217;m stopped in the execution of a background thread. I&#8217;ve created a global static &quot;Localization&quot; class with a &quot;CurrentCulture&quot; property that I use to maintain the current UI language for my application. You can compare and contrast the values set for the current thread and the auto generated Resource static class, which my application has initialized. (I&#8217;m running the English UI for Windows, by the way.)</p>
<p><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="106" alt="image" src="http://www.aaronlerch.com/files/blog/Localizingwindowsformsapplications_1D07/image_6.png" width="520" border="0" mce_src="http://www.aaronlerch.com/files/blog/Localizingwindowsformsapplications_1D07/image_6.png" /> </p>
<p>So, why am I posting this? Because I myself was unsure about how to correctly accomplish the goal of enabling users to select their own UI language until I noticed the auto generated &quot;Culture&quot; property on the Resources class. And <a href="http://www.aaronlerch.com/blog/2008/01/08/on-blogging/" mce_href="http://www.aaronlerch.com/blog/2008/01/08/on-blogging/">it took me embarrassingly long to find it</a>. Hopefully this post keeps somebody else from wasting an evening, or more.</p>
<p>In summary, it&#8217;s actually simple once you understand all the details. To enable a specific &quot;non-default&quot; language in your application:</p>
<ul>
<li>Set the System.Threading.Thread.CurrentThread.CurrentUICulture property to the appropriate culture, and </li>
<li>Initialize all auto generated resource classes (or any custom uses of the ResourceManager class) to the appropriate culture, before loading any resources.      </li>
</ul>
<div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:fd4651f7-d1cf-405f-ad83-99df1c936466" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px">Technorati Tags: <a href="http://technorati.com/tags/Windows%20Forms" rel="tag" mce_href="http://technorati.com/tags/Windows%20Forms">Windows Forms</a>, <a href="http://technorati.com/tags/Localization" rel="tag" mce_href="http://technorati.com/tags/Localization">Localization</a>, <a href="http://technorati.com/tags/Localizable" rel="tag" mce_href="http://technorati.com/tags/Localizable">Localizable</a>, <a href="http://technorati.com/tags/Globalization" rel="tag" mce_href="http://technorati.com/tags/Globalization">Globalization</a>, <a href="http://technorati.com/tags/Internationalization" rel="tag" mce_href<br />
="http://technorati.com/tags/Internationalization">Internationalization</a>, <a href="http://technorati.com/tags/CurrentUICulture" rel="tag" mce_href="http://technorati.com/tags/CurrentUICulture">CurrentUICulture</a>, <a href="http://technorati.com/tags/CultureInfo" rel="tag" mce_href="http://technorati.com/tags/CultureInfo">CultureInfo</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.aaronlerch.com/blog/2008/01/08/windows-forms-globalization/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Physics Books Next To Things</title>
		<link>http://www.aaronlerch.com/blog/2007/10/25/physics-books-next-to-things/</link>
		<comments>http://www.aaronlerch.com/blog/2007/10/25/physics-books-next-to-things/#comments</comments>
		<pubDate>Thu, 25 Oct 2007 19:41:52 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.aaronlerch.com/blog/2007/10/25/physics-books-next-to-things/</guid>
		<description><![CDATA[This is a guest post brought to you by Physics Books Next to Things.
Some Books and Stuff to be Donated


]]></description>
			<content:encoded><![CDATA[<p>This is a guest post brought to you by <a href="http://physicsbooksnexttothings.blogspot.com/">Physics Books Next to Things</a>.</p>
<h4>Some Books and Stuff to be Donated</h4>
<h1></h1>
<p><a href="http://www.aaronlerch.com/files/blog/PhysicsBooksNextToThings_DCBC/image.png"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="409" alt="image" src="http://www.aaronlerch.com/files/blog/PhysicsBooksNextToThings_DCBC/image_thumb.png" width="449" border="0"></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.aaronlerch.com/blog/2007/10/25/physics-books-next-to-things/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Visual Studio 2005 Debugging Tips</title>
		<link>http://www.aaronlerch.com/blog/2007/09/11/visual-studio-2005-debugging-tips/</link>
		<comments>http://www.aaronlerch.com/blog/2007/09/11/visual-studio-2005-debugging-tips/#comments</comments>
		<pubDate>Tue, 11 Sep 2007 21:34:16 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.aaronlerch.com/blog/2007/09/11/visual-studio-2005-debugging-tips/</guid>
		<description><![CDATA[I was going to post more on some neat tips that John Robbins showed us in a Mastering .NET Debugging class, but when I did some searching to see what was out there I came across Jim Gries&#8217; helpful blog. He&#8217;s posted about pretty much every item I had on my list, so just subscribe [...]]]></description>
			<content:encoded><![CDATA[<p>I was going to post more on some neat tips that <a href="http://www.wintellect.com/cs/blogs/jrobbins/default.aspx">John Robbins</a> showed us in a <a href="http://www.aaronlerch.com/blog/2007/08/31/mastering-net-debugging-with-john-robbins/">Mastering .NET Debugging class</a>, but when I did some searching to see what was out there I came across <a href="http://blogs.msdn.com/jimgries/default.aspx">Jim Gries&#8217; helpful blog</a>. He&#8217;s posted about pretty much every item I had on my list, so just subscribe to his blog and enjoy all the debugging goodness, even if his posts are really far and few between. Better that he&#8217;s busy working on the VS debugging UI instead of blogging all the time! <img src='http://www.aaronlerch.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.aaronlerch.com/blog/2007/09/11/visual-studio-2005-debugging-tips/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Talented Mr. Edit.GoToFindCombo</title>
		<link>http://www.aaronlerch.com/blog/2007/09/11/the-talented-mr-editgotofindcombo/</link>
		<comments>http://www.aaronlerch.com/blog/2007/09/11/the-talented-mr-editgotofindcombo/#comments</comments>
		<pubDate>Tue, 11 Sep 2007 21:30:43 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.aaronlerch.com/blog/2007/09/11/the-talented-mr-editgotofindcombo/</guid>
		<description><![CDATA[In the movie The Talented Mr. Ripley, Matt Damon plays Tom Ripley, &#8220;a young underachiever&#8221;. Ripley is gifted at improvisation and impersonation, but he takes an obsession too far.
Apparently our Visual Studio friend the &#8220;Go To Find Combo&#8221; (weird name, I know&#8211;from this point on I&#8217;m just going to call the dang thing the &#8220;Find&#8221; [...]]]></description>
			<content:encoded><![CDATA[<p>In the movie <a title="The Talented Mr. Ripley" href="http://www.imdb.com/title/tt0134119/">The Talented Mr. Ripley</a>, Matt Damon plays Tom Ripley, &#8220;a young underachiever&#8221;. Ripley is gifted at improvisation and impersonation, but he takes an obsession too far.</p>
<p>Apparently our Visual Studio friend the &#8220;Go To Find Combo&#8221; (weird name, I know&#8211;from this point on I&#8217;m just going to call the dang thing the &#8220;Find&#8221; combo) is like Mr. Ripley&#8211;adaptive, talented, and full of secrets. If you don&#8217;t recognize it by name, the &#8220;Go To Find Combo&#8221; is the &#8220;Find&#8221; combo box in the Standard toolbar. (Shortcut: CTRL+/ or CTRL+D, depending on who you believe.)<br /><a href="http://www.aaronlerch.com/files/blog/TheTalentedMr.GoToFindCombo_F0A5/VisualStudioGoToFindCombo.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="30" alt="Visual Studio Go To Find Combo" src="http://www.aaronlerch.com/files/blog/TheTalentedMr.GoToFindCombo_F0A5/VisualStudioGoToFindCombo_thumb.png" width="389" border="0"></a> </p>
<p>In the recent <a href="http://www.aaronlerch.com/blog/2007/08/31/mastering-net-debugging-with-john-robbins/">Mastering .NET Debugging</a> class I took, John Robbins clued us in to some of the crazy stuff this combo can do. I&#8217;m sure under the covers in the key processing code for this dialog there&#8217;s a huge &#8220;if/else if/else&#8221; statement. Just kidding.</p>
<h4>Find</h4>
<p>Okay, this is what we all know it does. Type in a search term, press enter, and it searches within the current document. Or press the &#8220;Find in Files&#8221; button (<img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; vertical-align: middle; border-right-width: 0px" height="22" alt="image" src="http://www.aaronlerch.com/files/blog/TheTalentedMr.GoToFindCombo_F0A5/image.png" width="22" border="0">) and it will display the Find in Files dialog with your search term pre-populated. It probably does so much more relating to searching, but that&#8217;s primarily how I use it.</p>
<h4>Open A File By Name</h4>
<p>Type the name of a file into the &#8220;Find&#8221; combo, then press CTRL+SHIFT+G (&#8220;Open File&#8221;), it will find and open the file you specified.<br /><a href="http://www.aaronlerch.com/files/blog/TheTalentedMr.GoToFindCombo_F0A5/image_3.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="55" alt="image" src="http://www.aaronlerch.com/files/blog/TheTalentedMr.GoToFindCombo_F0A5/image_thumb.png" width="225" border="0"></a> <br /><font size="1">(Imagine me pressing CTRL+SHIFT+G in the screen shot above)</font></p>
<h4>Create a New File By Name</h4>
<p>Similar to opening a file, create a new file by typing a file name into the &#8220;Find&#8221; combo and pressing CTRL+N (&#8220;New File&#8221;). A new file with the specified name will be opened, but it&#8217;ll be up to you to save it to the correct place.</p>
<h4>Set Breakpoints Instantly</h4>
<p>Probably the coolest &#8220;hidden feature&#8221;, type the name of a Method into the &#8220;Find&#8221; combo and press F9. Notice that a breakpoint was automatically set on the opening brace of the method! And, if you&#8217;ve got overloads, notice that a breakpoint was set on every overload. For example, let&#8217;s say I have a &#8220;Show&#8221; method that has 3 overloads. Typing &#8220;Show&#8221; and pressing F9 sets these breakpoints:</p>
<p><a href="http://www.aaronlerch.com/files/blog/TheTalentedMr.GoToFindCombo_F0A5/image_4.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="302" alt="image" src="http://www.aaronlerch.com/files/blog/TheTalentedMr.GoToFindCombo_F0A5/image_thumb_3.png" width="452" border="0"></a> </p>
<p>But check out just how talented Edit.GoToFindCombo really is&#8230; using my example above, I&#8217;m going to type in &#8220;Show(Control)&#8221; and press F9 to set a breakpoint specifically on the <code>Show(Control control)</code> method. What happens?</p>
<p>&nbsp;<a href="http://www.aaronlerch.com/files/blog/TheTalentedMr.GoToFindCombo_F0A5/image_5.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="302" alt="image" src="http://www.aaronlerch.com/files/blog/TheTalentedMr.GoToFindCombo_F0A5/image_thumb_4.png" width="452" border="0"></a> </p>
<p>It sets a breakpoint on both the Show(IWin32Window) and Show(Control) overloads. Why? Because the Control class implements the IWin32Window interface! So my &#8220;search term&#8221; for the breakpoint matched two possible overloads, and it was smart enough to know that. Great stuff.</p>
<h4>Commands</h4>
<p>Anything you can type into the command window you can also type into the Find combo. Just prefix it with &#8220;&gt;&#8221; and intellisense will guide you. For example, to open a file, type &#8220;&gt;open &#8221; plus the first letter of a file. Or you can execute macros, etc. The sky is the limit!</p>
<p><a href="http://www.aaronlerch.com/files/blog/TheTalentedMr.GoToFindCombo_F0A5/image_6.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="243" alt="image" src="http://www.aaronlerch.com/files/blog/TheTalentedMr.GoToFindCombo_F0A5/image_thumb_5.png" width="270" border="0"></a><br /><font size="1">Execute a command window command</font></p>
<p><a href="http://www.aaronlerch.com/files/blog/TheTalentedMr.GoToFindCombo_F0A5/image_7.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="79" alt="image" src="http://www.aaronlerch.com/files/blog/TheTalentedMr.GoToFindCombo_F0A5/image_thumb_6.png" width="429" border="0"></a>&nbsp;<br /><font size="1">Execute a macro, custom or otherwise</font></p>
<p><strong>Update:</strong> <a href="http://blogs.msdn.com/saraford/archive/2007/09/18/did-you-know-how-to-do-a-ctrl-g-without-the-go-to-line-dialog-box-popping-up.aspx">Sara Ford shows us one more useful feature.</a> Type in a line number and press CTRL+G to jump to the line. Is there no end to the madness?? <img src='http://www.aaronlerch.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.aaronlerch.com/blog/2007/09/11/the-talented-mr-editgotofindcombo/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>New Google Reader Features</title>
		<link>http://www.aaronlerch.com/blog/2007/09/06/new-google-reader-features/</link>
		<comments>http://www.aaronlerch.com/blog/2007/09/06/new-google-reader-features/#comments</comments>
		<pubDate>Thu, 06 Sep 2007 16:57:55 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.aaronlerch.com/blog/2007/09/06/new-google-reader-features/</guid>
		<description><![CDATA[Recently Roy Osherove mentioned that regardless of how much people love Google Reader he won&#8217;t use it, citing the lack of search functionality. Which is funny, really, because I mean it&#8217;s Google, for crying out loud. Why can&#8217;t I search my feeds?? I feel you, Roy. Of course, I still use it anyway, and here&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>Recently Roy Osherove <a href="http://communityhacker.com/why-i-dont-use-google-reader/">mentioned</a> that regardless of how much people love Google Reader he won&#8217;t use it, citing the lack of search functionality. Which is funny, really, because I mean it&#8217;s <em>Google</em>, for crying out loud. Why can&#8217;t I search my feeds?? I feel you, Roy. Of course, I still use it anyway, and here&#8217;s why:</p>
<ul>
<li><em>Online</em> &#8211; I demand a reader that is available everywhere. I want to install as little software as I can.</li>
<li><em>Keyboard support</em> &#8211; if I want to quickly skim through my feeds, I don&#8217;t want to click around. I use the j/k keys to jump between posts, and the space bar (pages down) to read a particular post further.</li>
<li><em>Online</em> &#8211; did I already mention this? This is huge.</li>
</ul>
<p>Well, yesterday Google released some new Google Reader features, including Search. You can read about them on the official <a href="http://googlereader.blogspot.com/2007/09/we-found-it.html">Google Reader blog</a>.</p>
<ul>
<li><strong>Search</strong> &#8211; you can search within All Items, Starred Items, Shared Items, folders, or individual subscriptions. One word: nice! I like the type-ahead feature to let you quickly find a folder or subscription you want to search in.</li>
<li><strong>Collapsible splitter</strong> &#8211; hide your folders for maximum reading real estate.</li>
<li><strong>Unread counts to 1000</strong> &#8211; previously it only showed a maximum of 100 unread items in the subscription/folder name.</li>
<li><strong>Forward and Back browser buttons work as intended</strong> &#8211; this was a pain for me, I&#8217;m glad they&#8217;ve &#8220;fixed&#8221; it. I am trained (less so these days, thanks to AJAX) to click &#8220;Back&#8221; to go back. Go figure!</li>
</ul>
<p><a href="http://www.aaronlerch.com/files/blog/NewGoogleReaderFeatures_A19D/GoogleReader.png"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="260" alt="Google Reader Screenshot" src="http://www.aaronlerch.com/files/blog/NewGoogleReaderFeatures_A19D/GoogleReader_thumb.png" width="504" border="0"></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.aaronlerch.com/blog/2007/09/06/new-google-reader-features/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
