Tuesday, March 04, 2008

Last night kicked out the Fort Smith .NET User Group's first meeting. It went great! I would guess that we had at least 20 or 30 people show up.

Raymond Lewallen spoke to us about Behavior Driven Design (BDD). I thought I'd share links to a few of the resources that he brought up last night.

All in all, a great presentation. Considering the breadth of information that BDD covers, I think Raymond did a great job. I hope that FSDNUG can continue to bring topics like this to the area.

posted on Tuesday, March 04, 2008 7:31:09 AM (Central Standard Time, UTC-06:00)  #    Comments [2]
 Tuesday, February 19, 2008

I was just setting at a command prompt in Vista on my laptop and I typed 'cd /' out of habit and, to my surprise, it worked! Not only that, but tab completion still behaved as expected!

I actually have been using the '/' character in PowerShell because it is easier to type than '\' (not as far to reach) and it is the default in *NIX systems as well (i.e. my Ubuntu installation).

Now granted, I probably shouldn't get used to this in the event that I inadvertently code a '/' character in one of my programs, but then again, I should technically be using the System.IO.Path.PathSeparator anyway.

I get excited about the little things.

NOTE - this might be the result of Service Pack 1 on Vista also...

UPDATE - I lied. You can type 'cd /' and get to the root, but tab completion still completes only for the current directory. In other words, if you're current directory is c:\windows\ and you type 'cd /[tab]', you'll get directories that are in c:\windows. Sorry. My excitement just dropped a little.

posted on Tuesday, February 19, 2008 5:30:08 PM (Central Standard Time, UTC-06:00)  #    Comments [0]
 Monday, February 11, 2008

Last week, a small group of us traveled up to hear Jean-Paul Boodhoo present to the Northwest Arkansas .NET User Group. JP presented on advanced uses of generics in .NET (i.e. more than just strongly typed collections) though we also had a great look at Test Driven Development as well as some of the new features in C# 3.0.

The presentation was great and it got me really excited about user groups in general, which is why I'm also excited to announce that Fort Smith will be getting its own user group! Many thanks to Michael Paladino for doing a lot of the work in getting this started. FSDNUG went live last week. I'm hoping to add a feed to the site at some point so that news can easily be pushed out without continually checking the site, but for now, it is just static HTML.

Raymond Lewallen will be kicking off the group with a presentation on Behavior Driven Development. I've read about BDD and am attempting to practice TDD, so I'm excited to hear Raymond's talk. If you live in the area, be sure to come out for the meeting!

posted on Monday, February 11, 2008 12:43:38 PM (Central Standard Time, UTC-06:00)  #    Comments [4]
 Tuesday, February 05, 2008

I've found myself wishing that I could pass in more than two arguments to Path.Combine. That is, something like this:

Path.Combine(rootPath, someCalculatedPath, someKnownFileName);

As it is, Path.Combine only accepts two arguments, so I end up with calls that look like this:

Path.Combine(Path.Combine(rootPath, comeCalculatedPath), someKnownFileName);

It seems like a hassle to me. Here is a simple wrapper function (with accompanying test) that will accomplish this:

public static class FileUtils
{
    public static string CombinePaths(params string[] paths)
    {
        if (paths.Length == 0) return string.Empty; 

        return Path.Combine(paths.First(), CombinePaths(paths.Skip(1).ToArray()));
    }
} 

[TestFixture]
public class FileUtilsTests
{
    [Test]
    public void Should_combine_paths_correctly()
    {
        string expected = @"c:\some\path\to\file.txt"; 

        Assert.AreEqual(expected, FileUtils.CombinePaths("c:\\some", "path\\to", "file.txt"));
    }
}
posted on Tuesday, February 05, 2008 7:29:02 AM (Central Standard Time, UTC-06:00)  #    Comments [2]
 Wednesday, January 30, 2008

In my post looking forward to 2008, I mentioned that I wanted to take more time this year to learn new technologies, particularly outside of the Microsoft communities. With all of the push in .NET towards dynamic languages right now, why not look to some of the dynamic languages that have been out there being used for years?

I know what you're thinking - looks like David here decided to learn Ruby. I mean, that's what everyone is using, right? Ruby and Ruby on Rails? Nahhh, I'm actually learning Python! Probably the key factor for me was the Python Challenge. I follow MoW's Powershell blog and he's started up a series on working through the Python Challenge using Powershell. I had heard about the challenge before, but hadn't really looked into it much, but this was enough to prompt me to get over there and try it out. (I am planning on still learning Ruby, though - I'll just go through the challenges with Ruby later)

I resisted the urge to try to find an IDE for Python and just code it up in a text editor. It has forced me to get more familiar with the syntax as a result. The Python site has a great tutorial for starters as well as some good documentation on the available modules. The hardest part for me is to not write the code like I write C# or VB. For one of the challenges, you have to take a given string, a given mapping, and then translate the string to get the instructions to move to the next challenge. I wrote a basic loop over the characters in the string, converted them to their ordinal values, performed the translation, and then converted them back to characters. It worked, but it wasn't the best way to do it in Python. Python provides this great function called string.maketrans. Also, the map function is amazing. It is sort of like the List<T>.ForEach method except that it reads a lot better (though lambda expressions in C# make it a little better). I'm starting to understand the power behind the whole map/reduce idea that Google is so big on. List comprehensions are really cool, too.

Anyway, so far, I'm to the 5th challenge (with some help from Google, the Python tutorials, and the challenge forums at times) and it is pretty cool. One of the most enlightening things about going through the challenge is that, as you complete one, you can go look at submitted solutions on the wiki. It is a great way to evaluate if you solved the challenge the "right" way or not. It is a great learning experience. One way I'm trying to apply this knowledge is that I'm running the challenges in both CPython (Python that runs on C, the standard I think) and IronPython.

Another thing I've done to try to see how other development communities work is that I've installed Ubuntu 8.04 (the alpha) on my laptop. I'm now dual booting Vista x64 and Ubuntu and it is pretty nice. I have two favorite things about Ubuntu so far - the ridiculous customization that you can do with it (compiz is amazing) and the package manager. Seriously, the fact that you don't have to pull up a browser to download apps and install them is a massive plus over Windows. In fact, you can just run a simple apt-get command if you want. Don't worry, though, I'm not planning on switching from Vista anytime, soon. Ubuntu is great and I'll be keeping it on the laptop, but I still like Vista, too. Right, right, blasphemy, I know. They're both great operating systems as far as I'm concerned. One takes an entire DVD and seems like a resource hog (not as bad anymore) and the other fits on a CD and requires editing conf files, downloading "restricted" drivers, and sitting at the command line to get video and wireless working :-) Seriously, neither are perfect. It has been nice seeing both sides of the fence, though.

posted on Wednesday, January 30, 2008 8:11:42 AM (Central Standard Time, UTC-06:00)  #    Comments [1]
 Thursday, January 24, 2008

In much the same way that Colin welcomed me to the blogosphere a few years back, I now get to welcome Brian Sullivan. Check out his inaugural post and leave a comment.

posted on Thursday, January 24, 2008 12:01:46 PM (Central Standard Time, UTC-06:00)  #    Comments [1]
 Thursday, January 17, 2008

I couldn't find this information anywhere (yet), so I thought I'd share this. If you're already using the _NT_SYMBOL_PATH setting to download symbols from Microsoft and you want to download the symbols and source for the .NET Framework, you can set the environment variable up like so:

Variable name:
_NT_SYMBOL_PATH

Variable value:
srv*c:\symbols*http://referencesource.microsoft.com/symbols*http://msdl.microsoft.com/download/symbols

Replace "c:\symbols" with whatever path you want your symbols to be downloaded to. The key here is that the reference source path exists first. Otherwise, the PDBs will be downloaded with the source information stripped.

The rest of the settings should match what Shawn Burke shared in his post on the reference source release.

Hope this helps.

posted on Thursday, January 17, 2008 9:33:17 AM (Central Standard Time, UTC-06:00)  #    Comments [0]
 Friday, January 11, 2008

I absolutely love trying out different Visual Studio color schemes. I've used John Lam's port of Vibrant for a while as well as some of Tomas Restrapo's VS themes and they're all great. After watching this VIM screencast from the Eleutian guys, I decided to give VIM another try. I'm not able to fly with it yet, but I am picking it up a lot better.

One of the things that I absolutely love about VIM as well as E-TextEditor is how it comes preloaded with some great color schemes. Not only that, but both editors are ridiculously easy to pull down new schemes from the internet. I've never really cared for editing the colors in Visual Studio, but I decided that I had to try to port Wombat over to Visual Studio. It is the theme that Aaron is using in the video and it looks great.

Here is what it looks like in VIM:

gvimwombat

Here is what my port looks like:

vswombat

As you can tell, some of the colors don't exactly match up; however, I think it keeps the overall feel and I like it. Try it out and let me know what you think. If you'd like to make some improvements, make them and then send me a copy!

Download my attempt at a Visual Studio Wombat theme (VS2005).
Download my attempt at a Visual Studio Wombat theme (VS2008).

posted on Friday, January 11, 2008 11:36:35 AM (Central Standard Time, UTC-06:00)  #    Comments [3]