<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" xml:lang="en-US">
    <title>lightMind.NET</title>
    
    <subtitle type="html" />
    <id>http://lightmind.net/blog/Default.aspx</id>
    <author>
        <name>Ted Milker</name>
        <uri>http://lightmind.net/blog/Default.aspx</uri>
    </author>
    <generator uri="http://subtextproject.com" version="Subtext Version 1.9.5.176">Subtext</generator>
    <updated>2008-03-01T01:35:58Z</updated>
    <link rel="self" href="http://feeds.feedburner.com/lightMind" type="application/atom+xml" /><entry>
        <title>Context Sensitive Run *All* Tests with TestDriven.NET</title>
        <link rel="self" type="text/html" href="http://feedproxy.google.com/~r/lightMind/~3/c0VYE-hlghI/context-sensitive-run-all-tests-with-testdriven.net.aspx" />
        <id>http://lightmind.net/blog/archive/2008/03/01/context-sensitive-run-all-tests-with-testdriven.net.aspx</id>
        <published>2008-03-01T01:18:51-06:00:00</published>
        <updated>2008-03-01T01:35:58Z</updated>
        <content type="html">&lt;p&gt;I just tweaked my previous entry's macro to be more context sensitive if you have a lot of test fixtures and do not want to run all of them in your solution.  If you are in a code window with a project, the macro will select that project and run the tests for it.  If you are in any other window, it will just run all the tests.  This could be useful if you have a number of projects in the same solution, all with test fixtures but only need to run a single test fixture instead of them all.&lt;/p&gt;
&lt;pre class="code"&gt;&lt;span style="color: blue;"&gt;Sub &lt;/span&gt;RunProjectTests()&lt;br /&gt;    &lt;span style="color: blue;"&gt;Dim &lt;/span&gt;LastWindow &lt;span style="color: blue;"&gt;As &lt;/span&gt;Window&lt;br /&gt;    LastWindow = DTE.ActiveWindow&lt;br /&gt;    DTE.Windows.Item(Constants.vsWindowKindSolutionExplorer).Activate()&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: blue;"&gt;Dim &lt;/span&gt;SolutionName &lt;span style="color: blue;"&gt;As String&lt;br /&gt;    &lt;/span&gt;SolutionName = System.IO.Path.GetFileNameWithoutExtension( _&lt;br /&gt;        DTE.Solution.FullName)&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: blue;"&gt;Try&lt;br /&gt;        Dim &lt;/span&gt;ProjectName &lt;span style="color: blue;"&gt;As String&lt;br /&gt;        &lt;/span&gt;ProjectName = System.IO.Path.GetFileNameWithoutExtension( _&lt;br /&gt;            LastWindow.Project.FullName)&lt;br /&gt;        DTE.ActiveWindow.Object.GetItem(SolutionName + &lt;span style="color: rgb(163, 21, 21);"&gt;"\" &lt;/span&gt;+ ProjectName).Select( _&lt;br /&gt;            vsUISelectionType.vsUISelectionTypeSelect)&lt;br /&gt;    &lt;span style="color: blue;"&gt;Catch &lt;/span&gt;ex &lt;span style="color: blue;"&gt;As &lt;/span&gt;Exception&lt;br /&gt;        &lt;span style="color: green;"&gt;'Fall back and just run all the test fixtures in the solution&lt;br /&gt;        &lt;/span&gt;DTE.ActiveWindow.Object.GetItem(SolutionName).Select( _&lt;br /&gt;            vsUISelectionType.vsUISelectionTypeSelect)&lt;br /&gt;    &lt;span style="color: blue;"&gt;End Try&lt;br /&gt;&lt;br /&gt;    &lt;/span&gt;DTE.ExecuteCommand(&lt;span style="color: rgb(163, 21, 21);"&gt;"TestDriven.NET.Client"&lt;/span&gt;)&lt;br /&gt;    System.Threading.Thread.Sleep(150)&lt;br /&gt;    LastWindow.Activate()&lt;br /&gt;&lt;span style="color: blue;"&gt;End Sub&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;I'm not a Visual Basic programmer so these macros could blow up in weird ways if you use them in certain situations like opening a single file in Visual Studio without a solution.&lt;/p&gt;
&lt;p&gt;It's getting late, so time for bed.&lt;/p&gt;
Tags: &lt;a rel="tag" href="http://technorati.com/tags/TDD"&gt;TDD&lt;/a&gt;, &lt;a rel="tag" href="http://technorati.com/tags/Visual%20Studio"&gt;Visual Studio&lt;/a&gt;&lt;img src="http://lightmind.net/blog/aggbug/11.aspx" width="1" height="1" /&gt;</content>
    <feedburner:origLink>http://lightmind.net/blog/archive/2008/03/01/context-sensitive-run-all-tests-with-testdriven.net.aspx</feedburner:origLink></entry>
    <entry>
        <title>Run *All* Tests with TestDriven.NET</title>
        <link rel="self" type="text/html" href="http://feedproxy.google.com/~r/lightMind/~3/xrBVj7BVU6M/run-all-tests-with-testdriven.net.aspx" />
        <id>http://lightmind.net/blog/archive/2008/03/01/run-all-tests-with-testdriven.net.aspx</id>
        <published>2008-03-01T00:25:41-06:00:00</published>
        <updated>2008-03-01T01:35:40Z</updated>
        <content type="html">&lt;p&gt;One thing that has always bugged me about &lt;a href="http://testdriven.net"&gt;TestDriven.NET&lt;/a&gt; is that there does not seem to be a way to run all the tests in your entire solution.  Nor is there one to run all the tests in the project of the current file you are in.  The Visual Studio commands TestDriven.NET.Client and TestDriven.NET.RunTests commands are always context sensitive.  If you are in a specific test method, then TestDriven.NET only runs that single test.  If you are in a TestFixture but outside any method, then it runs the whole fixture.  You can always right click in the Solution Explorer and pick Run Tests but I like to keep my hands on the keyboard as much as possible.&lt;/p&gt;
&lt;p&gt;Tonight, I had had enough and went searching.  &lt;a href="http://www.hanselman.com/blog/TestDrivenNETKeyboardBindingsForVisualStudioNET.aspx"&gt;According to Scott Hanselman&lt;/a&gt;, at one time, there was a TestDriven.NET.Solution command which sounds like it would do what I wanted but it appears to be long gone.  I found a &lt;a href="http://blog.excastle.com/2006/06/06/running-all-the-unit-tests-from-visual-studio/"&gt;blog entry&lt;/a&gt; from 2006 by Joe White that uses a Visual Studio macro to make TestDriven.NET behave.  I had never used the Macro Explorer before but it is pretty simple.  Using Joe's macro as a base, I came up with:&lt;/p&gt;
&lt;pre class="code"&gt;&lt;span style="color: blue;"&gt;Sub &lt;/span&gt;RunAllTests()&lt;br /&gt;    &lt;span style="color: blue;"&gt;Dim &lt;/span&gt;LastWindow &lt;span style="color: blue;"&gt;As &lt;/span&gt;Window&lt;br /&gt;    LastWindow = DTE.ActiveWindow&lt;br /&gt;    DTE.Windows.Item(Constants.vsWindowKindSolutionExplorer).Activate()&lt;br /&gt;    &lt;span style="color: blue;"&gt;Dim &lt;/span&gt;SolutionName &lt;span style="color: blue;"&gt;As String&lt;br /&gt;    &lt;/span&gt;SolutionName = System.IO.Path.GetFileNameWithoutExtension( _&lt;br /&gt;        DTE.Solution.FullName)&lt;br /&gt;    DTE.ActiveWindow.Object.GetItem(SolutionName).Select( _&lt;br /&gt;        vsUISelectionType.vsUISelectionTypeSelect)&lt;br /&gt;    DTE.ExecuteCommand(&lt;span style="color: rgb(163, 21, 21);"&gt;"TestDriven.NET.Client"&lt;/span&gt;)&lt;br /&gt;    System.Threading.Thread.Sleep(150)&lt;br /&gt;    LastWindow.Activate()&lt;br /&gt;&lt;span style="color: blue;"&gt;End Sub&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;Joe automatically switched to the output window at the start of the macro, I removed this because TestDriven.NET already does this.  Which brings up another annoying feature of TestDriven.NET, I wish I could turn it off and just have it post to the status line.  I store the last window for later because the macro has to switch the focus to the Solution Explorer to run the command.  The Sleep call is so that TestDriven.NET has enough time to think the context is set to the root of the Solution Explorer instead of wherever you happen to be.  Without it, it switches back and forth too quickly on my computer and TestDriven.NET just runs the command in whatever context it determines.  You may need to tweak the number if your computer is faster or slower.  I found it would still work at 100 but not at 50, so I just set it to 150 to be sure.  It switches fast enough that it is not troublesome to my workflow.&lt;/p&gt;
&lt;div style="margin: 0px; padding: 0px; display: inline;" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:92438c87-d16a-43af-9d17-56bacc4bfe68" class="wlWriterSmartContent"&gt;Tags: &lt;a rel="tag" href="http://technorati.com/tags/TDD"&gt;TDD&lt;/a&gt;, &lt;a rel="tag" href="http://technorati.com/tags/Visual%20Studio"&gt;Visual Studio&lt;/a&gt;&lt;/div&gt;&lt;img src="http://lightmind.net/blog/aggbug/10.aspx" width="1" height="1" /&gt;</content>
    <feedburner:origLink>http://lightmind.net/blog/archive/2008/03/01/run-all-tests-with-testdriven.net.aspx</feedburner:origLink></entry>
    <entry>
        <title>Refactoring My Wetware</title>
        <link rel="self" type="text/html" href="http://feedproxy.google.com/~r/lightMind/~3/7sukUiMcFNw/refactoring-my-wetware.aspx" />
        <id>http://lightmind.net/blog/archive/2008/02/25/refactoring-my-wetware.aspx</id>
        <published>2008-02-25T09:12:24-06:00:00</published>
        <updated>2008-02-25T09:14:10Z</updated>
        <content type="html">&lt;p&gt;I am finding switching to Test Driven Development to be pretty tough after years and years of just "roughing it."  I read &lt;em&gt;&lt;a href="http://pragprog.com/the-pragmatic-programmer"&gt;The Pragmatic Programmer: From Journeyman to Master&lt;/a&gt;&lt;/em&gt; years ago(and need to re-read) and enjoyed it very much.  I do not know how much I actually took away from it but I know it helped.  I have also read a couple other books from The Pragmatic Programmers and decided to pick up a beta book titled &lt;a href="http://pragprog.com/titles/ahptl"&gt;&lt;em&gt;Refactor Your Wetware: Pragmatic Thinking and Learning&lt;/em&gt;&lt;/a&gt;.  Review to come once I finish.&lt;/p&gt;
&lt;div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:1af64f18-2b88-4bd6-b881-42b9cc679160" style="margin: 0px; padding: 0px; display: inline;"&gt;Tags: &lt;a href="http://technorati.com/tags/TDD" rel="tag"&gt;TDD&lt;/a&gt;, &lt;a href="http://technorati.com/tags/Pragmatic" rel="tag"&gt;Pragmatic&lt;/a&gt;&lt;/div&gt;&lt;img src="http://lightmind.net/blog/aggbug/9.aspx" width="1" height="1" /&gt;</content>
    <feedburner:origLink>http://lightmind.net/blog/archive/2008/02/25/refactoring-my-wetware.aspx</feedburner:origLink></entry>
    <entry>
        <title>Test-Driven Development</title>
        <link rel="self" type="text/html" href="http://feedproxy.google.com/~r/lightMind/~3/GD1OnQ9omLM/test-driven-development.aspx" />
        <id>http://lightmind.net/blog/archive/2008/02/21/test-driven-development.aspx</id>
        <published>2008-02-21T07:08:02-06:00:00</published>
        <updated>2008-02-21T07:08:02Z</updated>
        <content type="html">&lt;p&gt;I have been programming for a long time.  I would have to say that it became more "serious" when I was 16 in high school.  I went to an ACM programming competition with a good friend at his high school(the "rich kids" high school).  We ended up winning.  Since that time, programming has always been a part of my life.  Whether it was tinkering with the Linux kernel to get a rough driver working for NaturalPoint's TrackIR, playing with game development or just ripping out a quick script or utility app, it was something I was always doing.  Programming became my profession in 2000 when I started developing the website for the company I work for.  Through it all, following the conventional method of writing code I think would work and then testing and trying to break it.&lt;/p&gt;  &lt;p&gt;So it feels like I have been programming for ages(really, about 14 years) and I get quite a bit done the way I do it.  Last year, I decided that I wanted to formalize the testing process and Test Driven-Development(TDD) felt like it was what I had been doing for years but instead of keeping the tests, throwing them out.  I did a lot of reading about it but never had the time or the right environment to actually implement it in my daily process.  Things have improved and I now have the chance.  However, I am finding it extremely difficult.&lt;/p&gt;  &lt;p&gt;I think most of my trouble is just coming from a new way of looking at things and the way I am supposed to develop under TDD.  It is difficult to think in terms of tests and writing them first when it is so easy to just type up the code and get something running immediately.  I am forcing myself to follow the process, however, because I want to develop the correct habit.  TDD has already given me insight into how to get something done, simply by forcing me to think more about what I am doing rather than banging out code the way I may have solved a similar situation in the past.&lt;/p&gt;  &lt;div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:fe0ff8b3-6871-477f-bafc-60808d768dc2" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;Tags: &lt;a href="http://technorati.com/tags/TDD" rel="tag"&gt;TDD&lt;/a&gt;&lt;/div&gt;&lt;img src="http://lightmind.net/blog/aggbug/8.aspx" width="1" height="1" /&gt;</content>
    <feedburner:origLink>http://lightmind.net/blog/archive/2008/02/21/test-driven-development.aspx</feedburner:origLink></entry>
    <entry>
        <title>Blog 2.0</title>
        <link rel="self" type="text/html" href="http://feedproxy.google.com/~r/lightMind/~3/HQwkA2ZK_8E/blog-2.0.aspx" />
        <id>http://lightmind.net/blog/archive/2008/02/20/blog-2.0.aspx</id>
        <published>2008-02-20T08:13:21-06:00:00</published>
        <updated>2008-02-20T08:18:42Z</updated>
        <content type="html">&lt;p&gt;Well, &lt;strong&gt;that&lt;/strong&gt; went well.  A total of three posts the first couple days after I set up the blog and then nothing.  However, after some changes at work and keeping a diary there about things I get done, I think I might be able to keep up on this, this time around.&lt;/p&gt;
&lt;p&gt;Things are pretty much the same.  I have been learning a lot about .NET, mostly WPF.  Since Silverlight 2.0 is not available yet, WPF is a good way to get experience that can be used once it is.&lt;/p&gt;
&lt;h2&gt;Japanese&lt;/h2&gt;
&lt;p&gt;I have also been spending a lot of my personal time learning Japanese.  It is going really well in my opinion.  I am currently using the Pimsleur audio series and transcribing each lesson to text before each daily lesson.  This helps reinforce the previous lesson and also helps with pronunciation.  Audio alone, however, is not enough.  I have also been studying a number of books whenever I have a question about what the audio lesson is teaching me.  Some good references that I have found:&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;&lt;span style="font-style: italic;"&gt;Japanese The Manga Way: An Illustrated Guide to Grammar and Structure&lt;/span&gt; by Wayne P. Lammers&lt;/li&gt;
    &lt;li&gt;&lt;span style="font-style: italic;"&gt;Remembering the Kana&lt;/span&gt; by James W. Heisig&lt;/li&gt;
    &lt;li&gt;&lt;a href="http://timwerx.net/language/"&gt;Companion site&lt;/a&gt; to &lt;span style="font-style: italic;"&gt;Japanese Verbs: Saying What You Mean&lt;/span&gt; by Tim R. Matheson&lt;/li&gt;
&lt;/ul&gt;&lt;img src="http://lightmind.net/blog/aggbug/7.aspx" width="1" height="1" /&gt;</content>
    <feedburner:origLink>http://lightmind.net/blog/archive/2008/02/20/blog-2.0.aspx</feedburner:origLink></entry>
    <entry>
        <title>My First Blog</title>
        <link rel="self" type="text/html" href="http://feedproxy.google.com/~r/lightMind/~3/qFMs2MbQ5-U/my-first-blog.aspx" />
        <id>http://lightmind.net/blog/archive/2007/06/08/my-first-blog.aspx</id>
        <published>2007-06-08T21:08:09-05:00:00</published>
        <updated>2007-06-08T21:36:34Z</updated>
        <content type="html">&lt;p&gt; Well, this is my first real blog.  Not really much to say at the moment.  I have a great idea for lightMind.NET and I will post more details about it soon.  This is going to be mostly a technical blog, leaning towards my new found love of all things .NET especially ASP.NET and related technologies. &lt;/p&gt;
&lt;p&gt; A little about myself:  I am coming from a PHP/Flash background and jumping feet first into ASP.NET and Silverlight.  I have been developing websites and web-based applications for my employer for over 7 years now.  I finished a pretty big application a couple months ago which manages all of our customer information(a CRM app).  I learned a lot developing that application but I learned a lot more about how much I need to formalize my development habits and start using some of the great tools that are available.  I have been putting together a .NET toolbox to help me start off on the right foot:  &lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;&lt;a href="http://msdn2.microsoft.com/en-us/vstudio/" target="_blank"&gt;Visual Studio 2005 Professional&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="http://www.nunit.org" target="_blank"&gt;NUnit&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="http://www.testdriven.net" target="_blank"&gt;TestDriven.NET&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="http://www.devexpress.com/Products/NET/IDETools/CodeRush/" target="_blank"&gt;CodeRush&lt;/a&gt; and &lt;a href="http://www.devexpress.com/Products/NET/IDETools/Refactor/" target="_blank"&gt;Refactor! Pro&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt; I am also extremely interested in &lt;a href="http://msdn2.microsoft.com/en-us/xna/" target="_blank"&gt;XNA&lt;/a&gt; and development for the Xbox 360, so I am sure I will have various ramblings about that as well.&lt;/p&gt;&lt;img src="http://lightmind.net/blog/aggbug/1.aspx" width="1" height="1" /&gt;</content>
    <feedburner:origLink>http://lightmind.net/blog/archive/2007/06/08/my-first-blog.aspx</feedburner:origLink></entry>
</feed>
