Archives / 2007 / December
  • Lost in a sea of consciousness

    The ALT.NET mailing list is pretty overwhelming. A week or so ago David Laribee proposed splitting it into various groups but that thread seems to have gone by the wayside. The list is the proverbial firehose of babble around ALT.NET (and everything else you can think of). Even longer ago was the notion of summing up the threads and pulling out the choice information into a digestable form. Of course this would mean work and well, it's much better to yap about it then do it.

    Whilst doing my weekly ego surf, I came across a fairly new site, Alt.Net Pursefight! Of course it's anonymous, but it's a brilliant no-nonsense wrap-up on the goings on in the list. No thread is left unturned and no person is left without exposure. So hey, if you're looking for an unbiased opinion of what's going on check it out. It's like the Mini-Microsoft of the ALT.NET world.


  • File and File Container Wrapper Library on CodePlex

    Sometime ago we were talking about file wrappers and testing these things on the ALT.NET mailing list. It's a rather boring task to test say a file system without actually writing files (which you might not want to do). Wouldn't it be nice to have a wrapper around a file system so a) you could forget about writing one yourself and b) you could throw something at Rhino mocks because you really don't want to test writing files.

    I've put together a project implementing this and it's now released on CodePlex. It's composed of interfaces (IFile and IFileContainer) that provide abstractions over whatever kind of file or file container you want. This allows you to wrap up a file system (indivdual files or containers of files like folders) and test them accordingly. Concrete implementations can be injected via a Dependency Injection tool and you can sit back and forget about the rigors of testing file access.

    There are 3 concrete implementations (found in FileStrategyLib.dll) that implement a file system (IFile), folders (IFileContainer), and zip files (IFileContainer using SharpZipLib). There's also a test project with a whopping 10 unit tests (providing 97% coverage, darn) included. More documentation and sample code is available on the CodePlex site.

    You can check out the project here on CodePlex:

    1.0 is available and released under the MIT License. It contains the binary and source distributions. I'll check the code into the source repository later tonight.

    Note that this is a very simple library concisting of 2 interfaces and about 50 lines of code. Of course being an open source project I encourage you to check it out and enhance it if you want. It's not the be-all system to get all kinds of information out but should get you started. It was originally written just for a simple system to create and add files to a folder and zip file but can be extended. Otherwise, consider it an example of having to wrap and test a system like a file system which you may run into from time to time.


    Update: Source code tree is checked in and posted now.

  • Big Visible Cruise WPF Enhancement

    Having some fun with Ben Carey's Big Visible Cruise app. BVC is a WPF app that looks at CruiseControl (.NET, Ruby, and Java versions) and displays a radiator dashboard of the status of projects. As each project is building, the indicator will turn yellow then green if it suceeds or red if it fails. It's all very cool and I jumped all over this so we could have a visible display of our projects in the office.

    Here's the default look that Ben provided:

    I submitted a request to be able to control the layout and he reciprocated with a layout option (using skins in WPF). Here's the updated layout he provided:

    I had a problem because with only a few (8 in my case) projects, the text was all goofy. The layout was all cool but I wanted something a little flashier and better to read, so some XAML magic later I came up with this:

    Here's a single button with some funky reflection:

    Okay, here's how you do it. You need to modify two files. First here's the stock LiveStatusBase.xaml file. This file is the base for displaying the bound output from the CruiseStatus for a single entry:

      <DataTemplate x:Key="SimpleStatusDataTemplate">
        <Border BorderBrush="Black" BorderThickness="1">
          <TextBlock TextAlignment="Center"
                     Background="{Binding Path=CurrentBuildStatus, Converter={StaticResource BuildStatusToColorConverter}}"
                     Text="{Binding Path=Name, Converter={StaticResource BuildNameToHumanizedNameConverter}}" />

    It's just a TextBlock bound to the data source displaying the name of the project and using the background color for the status of the build. Here's the modifications I made to make it a little more sexy:

        <DataTemplate x:Key="SimpleStatusDataTemplate">
        &lt;Grid Margin="3"&gt;
                &lt;DropShadowBitmapEffect /&gt;
            &lt;Rectangle Opacity="1" RadiusX="9" RadiusY="9" Fill="{Binding Path=CurrentBuildStatus, Converter={StaticResource BuildStatusToColorConverter}}" StrokeThickness="0.35"&gt;
                    &lt;LinearGradientBrush StartPoint="0,0" EndPoint="0,1"&gt;
                        &lt;GradientStop Color="White" Offset="0" /&gt;
                        &lt;GradientStop Color="#666666" Offset="1" /&gt;
            &lt;Rectangle Margin="2,2,2,0"
                    &lt;LinearGradientBrush StartPoint="0,0" EndPoint="0,1"&gt;
                        &lt;GradientStop Color="#ccffffff" Offset="0" /&gt;
                        &lt;GradientStop Color="transparent" Offset="1" /&gt;
            &lt;Grid Margin="5"&gt;
                &lt;TextBlock TextWrapping="Wrap" TextAlignment="Center"
                           HorizontalAlignment="Center" VerticalAlignment="Center"
                           FontSize="32" FontWeight="Bold" Padding="10,10,10,10"
                           Foreground="Black" FontFamily="Segoe Script, Verdana"
                           Background="{Binding Path=CurrentBuildStatus, Converter={StaticResource BuildStatusToColorConverter}}"
                           Text="{Binding Path=Name, Converter={StaticResource BuildNameToHumanizedNameConverter}}"&gt;

    I added a grid. The top rectangle is to define the entire area for each project (filling it in with the build status color) and the next one is the highlight (using a LinearGradientBrush) on the button. Then the TextBlock with the name of the project and it's build status gets filled in.

    Now here's the stock BigVisibleCruiseWindow.xaml (the main window):

    &lt;Border DockPanel.Dock="Bottom"&gt;
      &lt;DockPanel LastChildFill="False"&gt;
        &lt;TextBlock DockPanel.Dock="Left"  Text="Big Visible Cruise" FontSize="16" FontWeight="Bold"  Padding="10,10,10,10"  Foreground="White" FontFamily="Segoe Script, Verdana" /&gt;
        &lt;Button DockPanel.Dock="Right" Content="Options..." FontSize="9" Margin="10" IsEnabled="False" /&gt;
    &lt;Viewbox DockPanel.Dock="Top" Stretch="Fill"&gt;
      &lt;ItemsControl ItemsSource="{Binding}" Style="{DynamicResource LiveStatusStyle}" /&gt;


    The main window used a DockPanel and displayed some addition things (there's a button there for choosing options but it's non-functional). Here's my changes:

            <ItemsControl ItemsSource="{Binding}" Style="{DynamicResource LiveStatusStyle}" />

    I just simply replaced the DockPanel with a Grid.

    That's it! Feel free to experiment with different looks and feels and maybe submit them to Ben as he could include them in maybe a set of skins to use.

    Note: You need to download the code from the repository as the 0.5 release Ben put out doesn't include the skins.

  • TreeSurgeon Updates - 2005/2008 support

    Just a quick update to TreeSurgeon as we've been working on some plans on updating the tool to have a more flexible framework for adding new tools and updating the output for newer versions of the .NET framework.

    Donn Felker added VS2005 support so that's in right now. If you grab the latest from source control or download the latest ChangeSet from CodePlex here, you can get TreeSurgeon spitting out VS2005 and .NET 2.0 solutions. I'm just finishing up VS2008 support now and that'll be in the planned 1.2 release that we're coming out with shortly (probably by the end of the week). In addition, based on votes from the Issue Tracker (which we use as a Product Backlog) I'm looking to add MbUnit support so that will probably get into this release.


    The UI is pretty ugly and could use some graphical loving. I'm not going to get all stoked about the UI right now but it does need something. I've been meaning to talk to Jay Flowers as he pinged me awhile back about hooking up and seeing if there's some crossover between CI Factory and TreeSurgeon. I'm not so sure as I still have yet to get my head wrapped around CI Factory (nothing against Jay but if I can't grok an install in 5 minutes I usually move on until I can come back and kill some time figuring out how it works). To me a CI Factory and TreeSurgeon is like Marvel vs. DC (or Mac vs. PC) as I'm not sure I see the synergies but we'll see where that goes.

    We're also looking at doing some kind of plugin pattern for creating different type of tree structures. The original structure Mike Roberts came up with is great, but as with anything evolution happens and we move on. I personally use a modified structure that's based on Mikes, but accomodates different features. JP Boodhoo has a blog entry here on his structure, again, slightly different. In addition to the updates on the tree structure, we're looking at adding better support in the generated build file (and options for it in the ugly UI) for choosing what unit testing framework and how to compile using it (straight, through NCover, or NCoverExplorer). Again, some stuff is solid; others are up in the air but feel free to hook up on the forums here with your thoughts and ideas as we're always open to drive this the way you, the community, want it to go.

    Like I said, you can grab the 2005 support right now from here and the 2008 support will be up on the server when we do the 1.2 release later this week.

    Back to the grind.

  • Game Studio 2.0, Visual Studio 2005, VisualSVN, and me

    If you're like me and dabble in everything, then you might have Visual Studio 2005 installed along with VisualSVN (a plug-in to integrate Subversion source control access with Visual Studio). The latest version of XNA Game Studio (2.0) now allows you to build XNA projects inside of any flavor of Visual Studio. Previously you could only use C# Express Edition, which meant you couldn't use any add-ins (the license for C# Express forbids 3rd party addons) which meant I couldn't use ReSharper. Anyone who's watched my XNA demos knows this peeves me to no end as I stumble pressing Alt+Enter to try to resolve namespaces or Ctrl+N to find some class.

    Oh yeah, getting back to the point. If you've installed the latest Game Studio 2.0 you can now use it with Visual Studio 2005 (not 2008 yet). And if you've got the combo I mentioned installed (VS2005, GS2.0, and VisualSVN) you might see this when you create a new XNA project:


    It's a crazy bug but I tracked it down via the XNA forums. Apparently there's a conflict if you're running the combination I mentioned. Don't ask me why a source control plugin would affect a project creation template. I just use this stuff.

    Anyways, you can fix it with the latest version of VisualSVN (1.3.2). I was running 1.3.1 and having the problem, you may be in the same boat. Here's the conversation on the problem in the XNA forums; here's the bug listed on the connect site; and here's the link to VisualSVN 1.3.2 to correct the problem. All is well in developer land again as we enter the world of ReSharper goodness sprinkled with a topping of XNA.

    Happy gaming!

  • Another Kick at the Can

    image Look like a new development community is forming, this time around XNA and Game Development. uses the DotNetKicks code and has launched a new site for game development content. There's only 5 articles submitted, but looks like it's off to a good start. A good set of categories to start, a bit of a redesign from the typical DotNetKicks look and feel (something like a cross between Digg and DNK) but it's just starting off.

    So if you're into the game development scene feel free to help out and see if this kicks community can grow and prosper. Check out GameDevKicks here and give a whirl.

    More game development news to come shortly from your friendly neighborhood SharePoint-Man.

  • Soaking up the ASP.NET MVC Framework

    The ASP.NET MVC framework is out and I'm sure people will be messing around with it. I'm still not sure how much AJAX is possible right now with this so we should see some samples hopefully (I'm trying to build one right now but not getting very far).

    If this is all new to you and you're trying to get your head around the framework, here are the links to Scott Guthrie's mini-series on this epic. Recommended Required reading to get used to the framework and now that it's out you can build the samples yourself.

    There are more entries coming from the big guy, including information about the HtmlHelpers and AjaxHelpers (and how to build your own) but this will get you off the ground and flying in no time.

    If you missed the link, you can grab the framework here.

  • ASP.NET MVC now available

    You've read about it on the Internet, you've seen us talking about it, and if you were at DevTeach last week you soaked up Justice's inhuman presentation (and Jeffrey's more than human one) on the tool you'll know what the buzz this week is. Now you can see what the hype is all about.

    The ASP.NET MVC addition is now available here. It's part of the ASP.NET 3.5 extensions which not only includes the MVC framework, but also includes some new stuff for AJAX (like back button support), the ASP.NET Entity Framework, and there are two new ASP.NET server controls for Silverlight.

    Grab it, try it out, watch the skies for demos and tutorials and all that jazz (or read ScottGu's 20 page post on the subject which is more than anyone will ever need) and start building .NET web apps the smart way! The framework is available here for download and there are some QuickStarts that will help you get up and running here.

  • Terrarium Anyone?

    Anyone out there got a copy of the Terrarium client and server they can flip me? I'm working on something new and need to find a copy of it. It seems to all but vanished from any Microsoft site I can find. For example, the download page is here on the WindowsClient.NET site but doesn't work. It continues to be listed as a Starter Kit for Windows Form (it hasn't been updated since .NET 1.1) but I can't seem to track it down anywhere. If you have a copy let me know via email and if you can send it that would be great, or I can provide a place for you to upload it to. Thanks in advance.

  • ALT.NET keeps on ticking

    I can't say I've seen a community with more spirit, enthusiasm, opinion, views, experience, concealed lizards, logging chains, and gumption than the ALT.NET community.

    Stats for the Yahoo! Groups mailing list, which only started 2 months ago on October 7th:

    • Almost 2000 posts on October (remember it was about 23 days of posting)
    • Over 3200 posts in November
    • Already 1300+ posts in December (and we're only 7 days in)

    Prediction (based on velocity) for December: 6250+ (yes, I actually used my Scrum Velocity tool [a spreadsheet] to calculate this). That's insane (the number of posts, not the fact that I used a spreadsheet for this blog entry).

    Anyways, keep the firehose going. We're all still trying to figure out how to consume this information without blowing our heads off. Just waiting to see if we'll get a special community away, "Most Active Yahoo! Groups List... Ever"

    PS we've been doing some updates on the Wiki site as well so feel free to drop by and be a reader or writer there too!


  • Learning the Model View Presenter Pattern

    The guys over at Patterns and Practices got it right. They've put together a package (available via a CodePlex project here) on learning and understanding the Model View Presenter Pattern (MVP). It's kind of a "mini-guidance" package and not the big behemoth you normally see from these guys that:

    • Provides guidance on how MVP to promotes testability and separation of concerns within the UI
    • Illustrates how to implement MVP with standard ASP.NET
    • Illustrates how to implement MVP with ASP.NET and the Composite Web Application Block

    The package contains full documentation on the pattern, unit tests, and source code (for both WinForms and CAB) demonstrating it. Very nice and very easy to digest! Check it out here if you're just getting started and want to see what MVP is about.

  • TRUE, True, true, and FALSE, False, false

    I'm just in rant mode the last few days, trying to get my head wrapped about 3000 posts by Oren (who just happens to be an android and takes his orders from his dog) and 3000 posts on the altnetconf mailing list in the last 30 days (yes, 100 new messages a day and so many blog entries to come, somehow...)

    However this is just plain rude:


    This is the XML "Intellisense" in Visual Studio 2005/2008.

    Yeah, 6 definitions of True and False.

    Let me qualify this post which I should have done in the first place. This screenshot was for an XML file in SharePoint and the options presented in Intellisense are completely driven by your XSD. So really my brain wasn't working yesterday when I blamed the IDE for this as it's only as dumb as it can be told.

    However, I guess if I was building the tool and the attribute was a boolean value I would only present two options "True" and "False" so maybe it is a deficiency of the IDE.

    Or the XSD.

    Or SharePoint.

    Or me.

    All of the above? Yeah, probably.

  • I love Sony, I hate Sony

    image You know. It's a love/hate thing. This Christmas the family decided we would get each other consoles. Hey, what's a house with 3 XBox 360s without some more console love? So I would buy the PS3 (and a couple of choice games) for Jenn, she would get me a Wii (plus the proverbial look-like-an-idiot games). I came through on my end, but unfortunately there is no Wii anywhere in Calgary. Anyways, so change of plan and we've bought the PS3 as our "family" present and we'll just fill each others stockings and whatnot with other goodies.

    Now here's the kicker (and where my <rant/> begins). I own a Harmony 880. Best damn remote on the planet (well, at the time, the 1000 kicks it's butt). Controls everything. If I want to watch TV, it shuts other devices off; turns on the TV; selects the correct input; and turns on the digital receiver. Switch over to the 360 and it shuts down the digital receiver; turns on the 360; and changes the input on the TV to HDMI. Brilliant.

    Then I tried to get it to work with the newly acquired PS3. That was a farce. Guess what Sony decided to do with their console (and I'm only finding this out now). It's a proprietary Bluetooth device (okay, not sure about the "proprietary" part or if it's standard Bluetooth). No Harmony remote (mine or anything else on the market) handles Bluetooth. I mean, why would they? That's a silly technology to support. Everything (and I do mean *everything*) is IR these days.

    Sheesh. So basically my "universal" remote handles everything in the house *except* that crazy Sony device. There are some crazy hacks like buying a USB->IR thingy which requires the Sony remote so I would probably end up dropping *another* $200 bucks or something on top of the $400 I paid for the remote in the first place. Not something I'm going to entertain so I guess it's get off my lazy butt and walk across the room to turn the freakin' console on. Sigh.

    Thanks Sony.