Archives

Archives / 2007 / March
  • Dolphins, Humans, and Digital Wristwatches

    Yeah, the titles are getting sillier and sillier but that's a direct result of being locked up in a room with John Bristowe for 3 hours consuming pizza, filtered Calgary water, and podcasts. James has taken over the all important but seldom overlooked duties of splicing together the mess that we call a podcast, Plumbers @ Work and put episode 10 online.

    Lots of great discussion about OR/M tools like NHibernate and the ADO.NET Entity Framework (they really need a cool, catchy, codename) and game development and stuff. JP is MIA but he'll be back.

    You can catch the episode here on our podcasting site Plumbers @ Work and download it directly here to your favorite MP3 device, like an Etch-A-Sketch.

    10 whole episodes of greatly outdated material and bits that nobody will ever listen to again. Maybe someday we'll get big and strong and start wearing the big-boy pants and have some useful to say, in the meantime be sure to kill an hour listening to this.

  • Groking Rhino Mocks

    If you've been in a cave for awhile, there's a uber-cool framework out there call Rhino Mocks. Mocks are tools that allow you to create mock implementations of custom objects, services, and even databases, to enable you to focus on testing what you're really interested in. After all, do you really want to be bogged down while your unit tests open up a communication channel to a web service that might be there, only to test a business entity that happens to need a value from the service?

    Rhino is a very cool framework that Oren Eini (aka Ayende Rahien aka the busiest blogger in the universe next to Hanselman and ScottGu) put together. It recently hit version 3.0 and is still going strong. If you don't know anything about mocks or are interested in Rhino now is your opportunity. Oren has put together an hour long video screencast (his first) that walks through everything you need to know about mocks (using Rhino of course). I strongly recommend any geek worth his or her salt to sit down for an hour, grab some popcorn, and check out the screencast. You won't be disappointed.

    You can download the screencast here (35mb, which includes the video and the source code for the demo). You'll need the Camtasia TSCC codec to watch the video which is available here. More info and a copy of Rhino itself can be found here.

    Enjoy!

  • Introducing... the Scrum Witch!

    My co-worker came by today and dropped off something at my desk. He calls it the Scrum Witch. Here she is:

    The Scrum Witch

    She's a crazy one alright (and loud). We've had some challenges getting everyone to follow the daily Scrums as side discussions start happening, water cooler gossip, etc. and 10 minute standups turn into 30 minute meetings. We're also all about fun and trying to enjoy our jobs.

    So anyone who starts to stray from the Scrum rules (a watered down version from various places like here that we've printed out and put up in the Scrum Room), we unleash the "Scrum Witch" on them. A small button on her back lets out a screaming wail to let the speaker know we're off on a tangent and a reminder to get back to business.

    We'll see how it goes over the next few weeks (or until the entire team gangs up on the Scrum Master and beats him to death with, in which case this might be my last post).

  • The old age home for saved Groove account files

    I was digging Groove, Microsoft's acquisition from Ray Ozzie and co. before he joined the evil empire and now part of Office 2007, way back in 2005 when I got a copy of the latest version. I also took a copy of my license file (the .grv file) and as a good citizen, backed it up. It sat on an external drive and there it stayed for months. The last saved copy was back in October of 2006.

    I finally got around to trying to use the new Groove 2007 (we have a workspace on there for the Plumbers@Work gang) I was rather disappointed with this friendly error message:

    Hmmm. Okay, so my license file is too old. Hate to tell you, but I don't have a newer one so this message is about as useless as it gets. Please import a more recently saved version of this account. Besides perhaps being grammatically wrong, what if you don't have a "more recently saved version", which is the pickle I appear to be in.

    A few questions in the MVP groups yielded only one unflattering and hopeless response.

    "Your screwed"

    So I'm asking any Groovers (Groovers? Groovies?) out there. Am I? Is there a way out of this madness? I can't seem to find any contact info on the Groove site and even with all my ungodly MVP powers (read:none) I can't seem to find a way to get Groovin' again.

  • 3 Team System Goodies

    Stumbled over 3 different goodies for Team System and CodePlex that will be very valuable to me. Hopefully these will be useful to you too.

    CodePlex Source Control Client

    This is a command line tool which allows users to work offline (in the "edit-merge-commit" fashion). It's not as full featured as what you can get from the web experience or Visual Studio, but will help doing quick edits. This is the initial release so expect a few issues and bugs out of the gate but it does give us something that we can't get from Visual Studio, anonymous access. So non-developers on a project can pull down the source code with the command line client. Next up should be a Tortoise-like interface that will make it even easier to use (but I can dream can't I?)

    Team System Prescriptive Guides

    This is a plethora of whitepapers, best practices, videos and standards that you can just use in your organization if you're using Team System. No mess, no fuss. Contains guidance on structuring your solutions, custom check-in policies, branching, and migrating from VSS. Very handy!

    Web Access for Team System

    This is probably the biggest surprise as I didn't see it coming (but then I'm asleep half the time). MS aquired a company that makes a web based client for accessing Team System (TeamPrise) so now they've got a web client for accessing Team Systems (should work with CodePlex but I haven't tried it yet). Best of all, it's free! Great for non-Windows clients accessing Team Systems if that's useful for you.

    And I haven't even got through all my feeds yet!

  • Returning Generic Lists from NHibernate

    This was an "aha" moment for me this morning as I was building a small spike project to figure out how we can incorporate NHibernate as our data access layer and still be a happy loosely coupled Smart Client.

    Beyond the fact that I have to create a class library to hold all my interfaces for my domain (as I need to inject my data provider into the domain repository and can't have circular references to NHibernate, but that's another story) I was finding it frustrating that I was getting ArrayLists back from NHibernate.

    Here's a method that gets me back a list of customer objects from the NHibernate session:

        1 public List<ICustomer> GetCustomers()

        2 {

        3     List<ICustomer> customers = new List<ICustomer>();

        4     ITransaction tx = null;

        5 

        6     try

        7     {

        8         tx = Session.BeginTransaction();

        9         customers = (List<ICustomer>)Session.CreateCriteria(typeof(ICustomer)).List();

       10     }

       11     catch (HibernateException)

       12     {

       13         if (null != tx)

       14         {

       15             tx.Rollback();

       16         }

       17     }

       18 

       19     return customers;

       20 }

    Typical stuff and the example you see everywhere. However I like dealing with a generic List<ICustomer> object rather than an IList (some will argue it's the same thing). The code above compiles fine, but when you run it you get an error as it cannot convert an ArrayList to a List<ICustomer> no matter how hard it tries. A quick check on the Session class in Reflector revealed to me there was a generic List<T> method. One line of code change was all that was needed and voila:

        1 public List<ICustomer> GetCustomers()

        2 {

        3     List<ICustomer> customers = new List<ICustomer>();

        4     ITransaction tx = null;

        5 

        6     try

        7     {

        8         tx = Session.BeginTransaction();

        9         customers = (List<ICustomer>) Session.CreateCriteria(typeof (ICustomer)).List<ICustomer>();

       10     }

       11     catch(HibernateException)

       12     {

       13         if(null != tx)

       14         {

       15             tx.Rollback();

       16         }

       17     }

       18 

       19     return customers;

       20 }

    Subtle but the change in liine 9 from List() to List<ICustomer)() gets me a collection of List<ICustomer> objects coming back from NHibernate. Silly I know, but something to watch out for as all the examples out there say call List() to get an IList back but this way you can get a generic list of whatever objects you want.

    kick it on DotNetKicks.com
  • Fixing Product Backlog items in Scrum for Team System

    For those of us who use Conchango's process guidance package for Visual Studio Team System, Scrum for Team System, life is good. Scrums are easy to track, burndown charts are cool to put up on the wall, and it's a breeze to see immediately where you are anywhere anytime. However there's been some rumblings with the tool for awhile but Conchango has come to the rescue with a fix.

    The problem reared it's ugly head for me a month or two ago. I would look at the reports and whatnot on how much work remaining (in hours) there was on our Product Backlog Items (PBIs) for a given sprint. In our case, we had 600 hours left (which seemed about right). However when I looked at all the Sprint Backlog Items (SBIs) and totalled the hours remaining on the tasks, it only came to about 450 hours. This wasn't right and was really affecting our burndown charts and general feel of how much work was left before the sprint ended. Basically the work remaining in a PBI is inconsitent with the total work remaining for all the linked SBIs.

    It is possible in “normal operation” for this to happen. The following are the most likely causes of this behaviour:

    1. Where a SBI is unlinked from a PBI and the SBI still had work remaining prior to being unlinked. Please reduce the Work Remaining to 0 and save prior to unlinking.
    2. Where an SBI is marked as deleted (v1.0, v1.1). This would not cause resynchronisation, and this can be resolved by installing Scrum for Team System 1.2. 
    3. Where load conditions on the server cause the “eventing service” to timeout, the work remaining in this case would not be updated.
    4. Where a PBI Work Remaining is edited from within Excel (unfortunately using the Excel add-in for TFS has the potential to overwrite a “read only” field).

    After some discussion in the forum and a bit of testing of their tool, my problem is fixed. The command line tool is called the "Scrum Consistency Check" and will identify and resynchronize the work remaining on any project in your Team System that you think might be "out of sync".

    It's a command line tool, but you run it from anywhere. The syntax for the tool is:

    ScrumConsistencyCheck.exe [server] [project] [refresh (true|false)]

    The server is your TFS server name. The project is what project you want to interrogate/update. The refresh is if you want to perform the update or just get a report of what the status is.

    Here's a sample output from one of my projects that was suffering:

    Check.exe myserver "BRMS" false
    Server: myserver
    Project: BRMS
    Refresh out-of-sync PBI's: false

    Number of PBI's in Team Project: 228

     

    Inconsistent backlog items:
    PBI 273, Work Remaining: 8 hours, Children: 13
            Inconsistent work remaining, difference: -8 hours
            SBI: 772, Sprint: 5 State: Done, Work Remaining: 0 hours
            SBI: 756, Sprint: 4 State: Done, Work Remaining: 0 hours
            SBI: 748, Sprint: 0 State: Not Done, Work Remaining: 0 hours
            SBI: 346, Sprint: 2 State: Done, Work Remaining: 0 hours
            SBI: 282, Sprint: 2 State: Done, Work Remaining: 0 hours
            SBI: 281, Sprint: 2 State: Done, Work Remaining: 0 hours
            SBI: 280, Sprint: 2 State: Done, Work Remaining: 0 hours
            SBI: 279, Sprint: 2 State: Done, Work Remaining: 0 hours
            SBI: 278, Sprint: 2 State: Done, Work Remaining: 0 hours
            SBI: 277, Sprint: 2 State: Done, Work Remaining: 0 hours
            SBI: 276, Sprint: 2 State: Done, Work Remaining: 0 hours
            SBI: 275, Sprint: 2 State: Done, Work Remaining: 0 hours
            SBI: 274, Sprint: 2 State: Done, Work Remaining: 0 hours
    PBI 678, Work Remaining: 12 hours, Children: 2
            Inconsistent work remaining, difference: -12 hours
            SBI: 869, Sprint: 4 State: Done, Work Remaining: 0 hours
            SBI: 709, Sprint: 4 State: Done, Work Remaining: 0 hours
    PBI 235, Work Remaining: 2 hours, Children: 6
            Inconsistent work remaining, difference: -2 hours
            SBI: 396, Sprint: 3 State: Done, Work Remaining: 0 hours
            SBI: 321, Sprint: 2 State: Done, Work Remaining: 0 hours
            SBI: 320, Sprint: 2 State: Done, Work Remaining: 0 hours
            SBI: 319, Sprint: 2 State: Done, Work Remaining: 0 hours
            SBI: 318, Sprint: 2 State: Done, Work Remaining: 0 hours
            SBI: 317, Sprint: 2 State: Done, Work Remaining: 0 hours
    PBI 676, Work Remaining: 16 hours, Children: 0
            Inconsistent work remaining, difference: -16 hours
    PBI 998, Work Remaining: 4 hours, Children: 0
            Inconsistent work remaining, difference: -4 hours
    PBI 220, Work Remaining: 59 hours, Children: 0
            Inconsistent work remaining, difference: -59 hours

     

    Hours lost (less in PBI than SBI): 0
    Hours lost (less in SBI than PBI): 106

     

    Finished!  Press <enter> to continue.

    Once you run the tool and pass in "true" to refresh the out-of-sync PBIs you should see this:

    Check.exe myserver "BRMS" false

    Server: myserver
    Project: BRMS
    Refresh out-of-sync PBI's: false

    Number of PBI's in Team Project: 228

    Inconsistent backlog items:

    Hours lost (less in PBI than SBI): 0
    Hours lost (less in SBI than PBI): 0

    Finished!  Press <enter> to continue.

    You can download the tool from here. For support of the tool, please use the forum here. Hope this helps!

  • Return of the Plumbers... finally

    Well, 3 of us anyways. Yes, after 4 months of delays and vacations and concealed lizards of many kinds we're back with episode 9 of Plumbers at Work, our .NET community podcast that I do with John Bristowe, James Kovacs, and Jean Paul Boodhoo. JP is away in Edmonton during this podcast, but James, John and I blast out another episode. You can listen to the episode in your MP3 player directly from here. We're taping episode 10 this Wednesday with the full suite of plumbers that hopefully will be online shortly.

    P.S. I'm generally a loudmouth and barking out my stuff on the podcast, but this episode I seem to have been muted down quite a bit. Need to yell a little louder into the mic next episode.

  • Adding a splash screen to a CAB application

    Been awhile since I blogged as I've been sort of out of it missing the MVP Summit and all. Here's a simple way to add a splash screen to your Composite UI Application Block (CAB) based applications. It's pretty simple to implement a splash screen. This is a basic form that will popup with a logo or whatever of your choosing while the application loads. The code below is based on applications generated with the June 2006 version of the Smart Client Software Factory, but the idea is the same and can be applied to any CAB application.

    First, create the splash screen. This will just be a simple Winform you add to your Shell project. Call it ShellForm and give it a splash image to display. it helps if you change a few properties to make it more "splashy":

    • Change the StartPosition property to CenterScreen
    • Change the ShowInTaskbar property to False
    • Change the FormBorderStyle property to None

    Now drop a picture box on the form and load up your image. Any image will do, but you'll probably want to size the splash screen to match the size of the image (otherwise some shearing might occur).

    Now we need to modify two files. ShellApplication.cs and SmartClientApplication.cs. In ShellApplication.cs all you need to do is change the call to the base class of SmartClientApplication to accept your ShellForm. Change the declaration from this:

       22 class ShellApplication : SmartClientApplication<WorkItem, ShellForm>

    to this:

       22 class ShellApplication : SmartClientApplication<WorkItem, ShellForm, SplashForm>

    SplashForm is the name of the class you created for the new form. Finally we get down to the meat of the splash screen. In SmartClientApplication.cs we need to do two things, recognize the new parameter being passed into the class and get the splash screen going.

    First add a generic to the declaration of the SmartClientApplication class as TSplash:

       25 public abstract class SmartClientApplication<TWorkItem, TShell, TSplash> : FormShellApplication<TWorkItem, TShell>

    Then initialize it like the WorkItem:

       25 public abstract class SmartClientApplication<TWorkItem, TShell, TSplash> : FormShellApplication<TWorkItem, TShell>

       26     where TWorkItem : WorkItem, new()

       27     where TShell : Form

       28     where TSplash : Form, new()

    Add a private member variable to hold the splash screen (using the generic type "TSplash"):

       30 private TSplash _splash;

    Create the object in the constructor:

       35 public SmartClientApplication()

       36 {

       37     _splash = new TSplash();

       38     _splash.Show();

       39     _splash.Update();

       40 }

    After the shell gets created, we want to kill off the splash screen. We'll do this in the AfterShellCreated method of the SmartClientApplication class by adding an event handler when the Shell gets activated. Change your AfterShellCreated method to look like this:

       46 protected override void AfterShellCreated()

       47 {

       48     base.AfterShellCreated();

       49     Shell.Activated += new EventHandler(Shell_Activated);

       50 }

    And create the event handler. The handler will remove the Shell.Activated event and dispose of the Splash form:

       57 private void Shell_Activated(object sender, EventArgs e)

       58 {

       59     Shell.Activated -= new EventHandler(Shell_Activated);

       60     _splash.Hide();

       61     _splash.Dispose();

       62     _splash = null;

       63 }

    That's it! A cool looking splash screen for your CAB application in about 10 minutes.

    Note: There was a long thread here on the GDN forums (moved to CodePlex) on doing this. That technique works as well, and gives you the ability to intercept the "loading" of the application as it goes through it's paces. We're using it for one app, but the technique above is a more simple approach that just gets the job done so you might find it easier to implement.

  • On being a "SharePoint" expert

    Recently Rocky had one of his many pearls of wisdom, that of the software development world becoming a specialization due to the complexity of the industry. Let me tell you that a) I agree with Rocky 100% (and more if anyone could agree more than 100%) and b) this is true especially so for SharePoint developers and 2007 (the version, not the year).

    Actually, let me quantify that. What is a SharePoint developer? Is it a ASP.NET developer who knows a lot about the SharePoint API or is it a SharePoint developer who knows a lot about the ASP.NET API? The answer is yes.

    Take me for example, I really didn't do a lot of ASP.NET development (about a year or so since B1) so other than little apps, the odd web service, etc. I really didn't have an in-depth experience being an ASP.NET developer. When I got the SharePoint itch I scratched it with what little COM+, ASP and structured development techniques I knew (we're talking back in STS and SPS 2001 days, before the .NET version). With v2 and 2003 came .NET and more knowledge of how IIS worked, ASP.NET server controls and all that goodness. Now here's 2007 and we're dealing with ASP.NET 2.0, security and membership providers, master pages, user controls, workflow, and a million other little tips, tricks and gadgets that would drive anyone batty.

    It's just too much for any one brain to handle (except maybe Hanselman, but we all know he's not human anyways). And there's more to come! Upgrading from ASP.NET 1.1 to 2.0 was a huge shift for SharePoint (in fact a complete flip of the architecture, literally) but moving to 3.0/3.5 isn't going to be that much of a big deal. It's just a different version of the API, a set of new dlls, some Atlas thrown in. Basically a service pack, not a full blown release. With that will come all kinds of things. How about LINQ for SharePoint? We already have people writing PowerShell servlets that will treat SharePoint sites as folders you can navigate, so querying a SharePoint list shouldn't be any more difficult than using LINQ to query a list of objects.

    The future is here and moving fast. Being a SharePoint expert isn't just about knowing all the technologies, layers, and tiers that encompasses SharePoint because frankly that's not realistic. SharePoint is just another layer in the stack, another tool in the toolbox, for us "developers" to work with. Whether we choose to weigh more heavily on the SharePoint API or the ASP.NET one, it's just a matter of what we're trying to accomplish. Being a SharePoint expert is about knowing what's available and making use of it, and getting the guys who really know this stuff inside and out to build it for you (or if you're that guy, build that part yourself).

    I think gone are the days where being a SharePoint expert meant you knew every nut and bolt of every piece of the machine. Today, you're lucky if you can get your head wrapped around one part of it.

  • Lies TFS Told Me

    This morning we suffered an air-conditioner failure in one of the server rooms. As our TFS server was deployed to a server with the words "dev" in it, naturally they thought they could just shut it down. After all, dev means development so it's not critical. I don't blame them however it caused a few issues. This one was shared to me by one of my developers so hopefully it'll help some of you out there in TFS land.

    So apparently if the TFS server goes down while you're working on a file Visual Studio will allow you to work on the file locally. Makes sense. However, while editing the file, the server does not know that you have updated the file. Thus, when you reconnect to the server (or in this case the server comes back from the dead) TFS doesn't realize the file has been modified and will not save the changes to the repository when you complete a check-in.

    To get TFS to check-in the modified file you must specifically go to each of the modified files and select Check Out for Edit. Then, select None - Allow shared checkout and click the Check Out button from the Check Out dialog that appears. Finally, check-in (commit) the files back to the source repository. 

    The one other symptom is that your local files are not set to read-only like all other files when you try to update from the repository (Get Latest Version).

    Something to watch out for in case your server goes bye-bye in mid-development.

  • A refactoring that escapes me

    We had a mini-code review on Friday for one of the projects. This is a standard thing that we're doing, code reviews basically every week taking no more than an hour (and hopefully half an hour once we get into the swing of things). Code reviews are something you do to check the sanity of what someone did. Really. You wrote some code 6 months ago and now is the time to have some fresh eyes looking at it and pointing out stupid things you did.

    Like this.

    Here's the method from the review:

       1:  protected virtual bool ValidateStateChangeToActive()
       2:  {
       3:  if ((Job.Key == INVALID_VALUE) ||
       4:  (Category.Key == INVALID_VALUE) ||
       5:  (StartDate == DateTime.MinValue) ||
       6:  (EndDate == DateTime.MinValue) ||
       7:  (Status.Key == INVALID_VALUE) ||
       8:  (Entity.Key == INVALID_VALUE) ||
       9:  (String.IsNullOrEmpty(ProjectManagerId.ToString()) || ProjectManagerId == INVALID_VALUE) ||
      10:  String.IsNullOrEmpty(ClientName) ||
      11:  String.IsNullOrEmpty(Title))
      14:    {
      15:      return false;
      16:    }
      17:    return true;
      18:  }

    It's horrible code. It's smelly code. Unfortunately, it's code that I can't think of a better way to refactor? The business rule is that in order for this object (a Project) to become active (a project can be active or inactive) it needs to meet a set of criteria:

    • It has to have a valid job number
    • It has to have a valid category
    • It has to have a valid start and end date (valid being non-null and in DateTime terms this means not DateTime.MinValue)
    • It has to have a valid status
    • It has to have a valid entity
    • It has to have a valid non-empty project manager
    • It has to have a client name
    • It has to have a title

    That's a lot of "has to have" but hey, I don't make up business rules. So now the dilemma is how to refactor this to not be ugly. Or is it really ugly?

    The only thing that was I was tossing around in my brain was to use a State pattern to implement active and inactive state, but even with that I still have these validations to deal with when the state transition happens and I'm back at a big if statement. Sure, it could be broken up into smaller if statements, but that's really not doing anything except formatting (and perhaps readability?).

    Anyone out there got a better suggestion?

  • Well, that was a short trip

    Unfortunately, due an emergency I have to cancel my trip to the MVP Summit. Bummer. A week of frolicking with other MVPs, missing out (again) on Jeff's party (220+ people so you know it just has to be good, or at least crowded), a week of in-depth sessions with Microsoft product teams, and generally having a grand old time. Ah well. There's always 2009.

    To my fellow MVPs and plumbers that are having a good time right about now, and the softies I was going to mame with some up close and personal paintball damage, have a great time and feel free to make fun of me or talk about me behind my back. I know you wanna.

    In the meantime I guess I'll just blog about SharePoint and whatnot this week seeing that everyone else will be talking about parties and things they can't blog about. Guess I'll be the odd man out. More audience for me, and you know, it is all about me!

  • MVP Summit - Day 0 - Lift off!

    And so it begins. Another conference, another series of wordy photo blog entries from my twisted sense of humor over the next week. This week 1700 MVPs are gathering in Seattle/Redmond for our kindof-annual Summit (happens every 18 months or so). This time round big Bill Gates is giving the keynote on Tuesday and there's going to be plenty of fun, networking, and surprises this week so stay tuned.

    With that I have all I need. My laptop, a moose, and my passport to prove that I'm not a terrorist.

    P1010056

    It's a few hours before I leave for the airport. Stupid me, I decided to go cheap with the flight and pick a stop-over in Vancouver. So a short flight to Vancouver (90 minutes) then a 3 hour lay over, then an hour flight to Seattle. What was I thinking?

    For those of you hunting me down, I'll be at Jeff's party tonight as soon as I drop my bags off at the hotel (I touch down at 7 and the party kicks off at the same time). I'll be snapping shots of all your favorite MVPs in various state of debauchery (Rory, this means you!) and posting later tonight. I'm staying at the Grand Hyatt Seattle and will post info about what room you can charge your mini-bar too, etc. later when I can catch a breath.

    The week is all NDA content so us MVPs won't be posting much info however last summit we were allowed to talk about something in Office 2007 (the save to PDF) which got nixed anyways. Maybe they'll be something we can post this time round, but I doubt it since the next version of Office/SharePoint is too far off.

    My Flickr site will contain all the goodies I snap over the week. We've also created a tag for the SharePoint MVPs to swap photos so Flickr pics should be tagged with mvp07 for the summit. I also have a Flickr set for the summit here which will grow through the week. Expect at least one blog entry a day, but I'll try to squeeze in maybe 2 or 3 with pics as the conference is near our hotels so we can head back to recharge during the day (or night).

    So feel free to live vicariously though my blog entries and pics and we'll talk to you later!

  • 2007 time zone update, will it be worth it?

    March 11 is almost here and the crazy time zone updates are upon us. If you're looking for info on Windows operating system updates, check out the KB article here. Personally I can't follow it. At this point I'm not sure if my XP SP2 box is updated or not? Or if it will update? I'm a pretty techy guy but some things I just don't give a rats ass about, and this is one of them. Normally it just updates but tonight I don't know if it will so I would have to do it manually. Then in 4 weeks when the automatic DST adjustment kicks in, I'll have to manually adjust the time again? (and twice more in October/November). What bothers me is that if Microsoft has the time zone adjustment already in the operating system, why can't they issue an update to handle the new one (or maybe they did, again, not paying attention here).

    I've seen so much hype about this and have to wonder is this going to be worth it? I mean, the 3 week adjustment now and 1 week adjustment in October is apparently going to save gobs of cash. Is it? Is there someone going to measure this? Is this even measurable? 6 months from now I'm sure someone will come out and say it is, but how true will it really be. Give me a bunch of stats and I can spin them any way to appear to be value-added. That's what statistics and numbers do. They're the truth but as Obi-wan said, from a certain point of view.

    Personally I don't think it's going to save the billions of dollars anyone thinks it will but maybe that's just one geeks opinion.

  • Expand your horizons, get introduced to C# 3.0

    Scott Guthrie has an excellent summary post of some key features in .NET 3.0 that's coming in the next release of Visual Studio (codename Orcas). His post is short, sweet, and shows how you do something today and how it can change in the future.

    This covers automatic properties, object and collection initializers (all of which I've been really digging in my test environment). Even with mocks, writing test code is that much easier in 3.0 (or is it 3.5 now? I always loose track) and the syntax isn't as cryptic as LINQ (which I'm still wrapping my noggin' around).

    Check out Scott's post here to get introduced to the new C# features.

  • Communities need care and feeding

    A long time ago in an office far, far, away I started up the SharePointKicks site. It was a bright idea spurned on by the popularity of DotNetKicks. Community driven content like Digg, etc. but focused on SharePoint. The early days I was submitting a lot of entries (mostly my own) and hunting down the choice ones out there written by you. As with any community site it needed something. A community. One that could contribute and nurture and make it grow.

    That really hasn't happened.

    SharePointKicks is a great site, or can be. Lately it's been pretty barren of new content and it hasn't shared the popularity of it's sister site DotNetKicks. Sure people still post, but I know there are tons of new SharePoint 2007 blog entries that are gems. That's what the kicks site is there for. Pulling those gems out of the quagmire called the net and letting them bubble up to the surface through your "kick" votes. The more popular something is, the higher up the charts it is and there it stays.

    It's sad to see a community wither and fade away like this. I'll admit I haven't spent a lot of time lately seeding it myself as I felt the SharePoint community would pick up on the concept and run with it. That's not happening and I'm not sure why. Maybe I'm wrong in my premise that SharePointKicks was a good idea, or maybe everyone is too busy (like I've been) to contribute.

    In any case, SharePointKicks will live as long as it's host keeps it alive. Like I said there are people contributing, but it's a trickle compared to the SharePoint content I read each day. If you can, please keep it in mind to contribute somthing (content people, not money). Either your own blog entries or someone elses. Hopefully with your input the site can continue to grow instead of stagnate which it's been doing for a few months now.

    Thanks.

  • What's in your OSS box?

    Following on the heels of Jeremy Miller and JP, here's a list of my open source tools in my tool chest. My list may be surprising to some.

    • Enterprise Libraries. Some people hate 'em and there's people that blast them for being "too big" but it works. Free logging, exception handling (via policies I dictate through an XML file), and other goodies. Version 3.0 adds some business validation framework and even more stuff.
    • Composite Application UI Block (CAB). A library that provides a framework for building composite applications. It lets me modularize things and not worry about the plumbing to make things talk to each other (thanks to an easy to use event broker system). It also includes ObjectBuilder to boot which is a framework to build dependency injection systems.
    • Smart Client Software Factory. Another framework (and collection of guidance packages) that jumpstarts building Smart Client applications. Basically provides a hunk of code I would normally have to write to locate services, load modules, and generally be a good Smart Client citizen.
    • NAnt. Can't stand MSBuild and wouldn't give it the time of day. NAnt is my savior when I need to automate a quick task.
    • NUnit. Again, MSTest just dosen't measure up when it comes to integration with my other tools and most everything is written these days with NUnit examples. Okay, so NUnit isn't as powerful as say MbUnit but I just love the classics.
    • CruiseControl.NET. The ThoughtWorkers are awesome dudes of power and CC.NET is just plain simple (see my struggle with Team City recently).
    • TestDriven.NET. A great tool that I can't live without.
    • NCover/NCoverExplorer. I just love firing up TestDriven.NET with covage and seeing 100% in all my code. Where I'm lacking, it points it out easily and I just write  a new test to get my coverage up.
    • Subversion. I have a local copy of Subversion running so I can just do quick little spikes and maybe file the code away for a rainy day on an external drive.
    • TortoiseSVN. And CVS I guess when I have to access CVS repositories out there in internet land. I'm still waiting for a TortoiseTFS.
    • RhinoMocks. I started writing mocks last year and haven't looked back since. While it does take some going to set things up, if you start writing mocks and doing TDD with them you'll end up with a better looking system (rather than trying to mock things out after the fact). Rhino is the way to go for mocking IMHO.
    • Notepad++. Lots of people have various notepad replacements, but I prefer this puppy.
    • WinMerge. Great tool for doing diffs of source code or entire directories.

    This is what's in my toolbox today and I use on a daily basis (and there's probably more but I haven't had enough Jolt tonight to bring them out from the depths of my grey matter). I've glossed over and checked out various other tools like NHibernate, Windsor, iBatis, and even Boo but they're not something I use all the time.

    While I don't have as many as the boys, I think I have what I need right now. What's surprising looking at the list is that some of my stuff is Microsoft which just flys in the face of any comments from people that "We only use Microsoft" means you *can* use OSS tools even if they're from the evil empire. Even with the MS list of items I use, I'm covered with things like dependency injection and separation of concern although the MS tools don't fare nearly as well as say Windsor or StructureMap, they still do what I need them to.

  • Tuesday Night Downloads

    Two downloads I thought I would toss out there for your feed readers to consume.

    Visual Studio 2005 Service Pack 1 Update for Windows Vista

    During the development of Windows Vista, several key investments were made to vastly improve overall quality, security, and reliability from previous versions of Windows. While we have made tremendous investments in Windows Vista to ensure backwards compatibility, some of the system enhancements, such as User Account Control, changes to the networking stack, and the new graphics model, make Windows Vista behave differently from previous versions of Windows. These investments impact Visual Studio 2005. The Visual Studio 2005 Service Pack 1 Update for Windows Vista addresses areas of Visual Studio impacted by Vista enhancements.

    Sandcastle - March 2007 Community Technology Preview (CTP)

    Sandcastle produces accurate, MSDN style, comprehensive documentation by reflecting over the source assemblies and optionally integrating XML Documentation Comments. No idea what's changed in this CTP but now that NDoc is dead and buried, like Obi-Wan, this is our only hope.

  • NetTiers gets a Wiki (a real one)

    One of my more favorite tools is NetTiers. Calling a template a tool might be a stretch but it's my primary reason for using CodeSmith. NetTiers is basically a set of CodeSmith templates that, when pointed at a database, gives you a nicely separated layered set of .NET projects for accessing your data. Basically an auto-generated data access layer. One class for each table in your schema, one property for each column, methods for stored procs, wrappers for accessing aggregates like getting all records (by primary or foreign keys) and other good stuff. I've used it for my data access layer in a few projects and even used the autogenerated website either as a starter for sites or entire sites where all I needed was a set of pages for data maintenance.

    Documentation is always a bear for any tool (free or otherwise) and NetTiers is no different. The templates generate 10,000 lines of code, hundreds of classes (depending on how many tables you have) and it's a lot to take in. The forums they have are good but it's hard to find information (even with search) and information quickly becomes out of date without any care and feeding. Wikis can help (but not solve) that by turning to the community for contributions. I'm a firm believer that it's easier to have 10 monkeys write 10 pages than 1 person writing 100 pages of documentation (and we all know who the monkey is here).

    So now the NetTiers team has setup real wiki here just for that purpose. Signup for an account and start contributing if that's your thing. This is an improvement over the previous "wiki" they had setup but that effort wasn't quite optimal. The wiki was closed to the public and only contained a handful of canned pages. In any case, the new one is out in the open and ready to go. So if you're a consumer or contributor (or both like me) check it out!

  • The "need" for Scrum Tools

    I got an email from Mike Vizdos about a blog post he was writing up. Mike is the author of a blog called Implementing Scrum. It's a great blog where he posts a cartoon to describe a Scrum concept in a very acceptable way (see below for an example). It's an excellent communication mechanism. I find myself printing out Mike cartoons all the time and putting them up around my office (aka the Scrum room) to hit home the Scrum concepts to people.

    Mike recently blogged about Scrum tools and mentioned my own Scrum Tools Roundup post (thanks Mike!). His post talks about the value (or lack of) Scrum tools and I partially agree with him. There are times I've said exactly "Please make sure you update tool X so that we can report our burndown to [someone who is not even in the room]."

    I personally just print out the burndowns (we use the Conchango Scrum Plugin for VSTS) and put them on the wall along with a splash screen for the project and the post-it notes that represent the tasks (our task board). We still use VSTS for tracking, but the wall is the conversation piece. Each morning (currently 2 Scrums soon to be 3) we get together and do our daily standup with everyone sort of huddled around the "wall" (a giant 14 foot wall I have in my office that holds all the post-its). People talk about what they did and what they're working on, move stickies around, and all is well.

    I agree with Mike in that if you're burning 50% of your time in a project on maintaining a tool, a backlog in a tool (VSTS, spreadsheet, or otherwise) then you're spending about 49% too much time. However as the Scrum Master I keep the tool up to date, the PM uses it (constantly) to report progress to a heavenly body, and I personally try to get the team to not get hit too much with any administrivia tasks. The most any team member should do is to a) change the state of a task to In Progress or Done and b) knock down the work remaining on tasks as they're doing them say from 8 hours to 4 (or 0).

    That shouldn't take more than a few minutes a day before the daily standup. Really.

    If you're donig more than for sure you're spending too much time and you should read Implementing Scrum on a more frequent basis (and maybe change how you work).

  • A Plugin for a Plugin

    Isn't life amazing? These days you can download a plugin (ReSharper) and write a plugin for it (VstsUnit). That's what my fellow plumber James Kovacs did. He was using VSTS for his unit testing but unfortunately the built-in Test Runner for ReSharper didn't support VSTS unit tests, only csUnit/NUnit. So armed with the ReSharper SDK and a few brain cells to kill, he went off to build a plugin for a plugin. Basically it allows you, with ReSharper installed, to run Visual Studio Team System based tests via the test runner. I personally use TestDriven.NET which supports anything you throw at but if you're a ReSharper guy and are stuck with VSTS rather than NUnit for your testing tools, take a look at this freebie. You can download it here.

  • What a craptastic day

    And here I was going to blow away a few holes in some drug lords in Crackdown this morning but was faced with this:

    Guess it's a call to 1-800-4MY-XBOX and an exchange (or buy a new one which I might have to do). The catch? I think I'm about 1 month over my warranty. I swear to god they must have a timer chip in the XBox as it's been a little flakey the last few weeks and now this.

    Sucks to be me.

  • Team City and Windows, no documentation and not a happy combination

    Nothing like Friday morning to inflict more pain and suffering from our continuous integration process. Recently we purchased a gaggle of ReSharper licenses from JetBrains. For whatever reason, the person making the deal decided to buy the bundle that included Team City (apparently it's cheaper to buy the bundle with TC than to buy individual ReSharper licenses, but the logic behind that move escapes me). I've seen Team City in the past and it looked interesting but without a demo you can get your hands on, I didn't give it much thought.

    Since it's touted as the "Most Intelligent Integrated Team Environment" I went to try this out as a potential replacement for our CruiseControl.NET setup. Boy, was that a mistake.

    The install went pretty smoothly and I tried it out on my laptop with a local setup to start. I have to admit that TC has a nice setup. Install software, open site in browser, start configuring projects. That was kind of the first problem. After the install the system just sat there. I wasn't sure if it was done or not or what I was supposed to do next. I took a look in my Start menu for perhaps a Team City menu with at least a README or something but that was a barren sea of nothingness. Finally I just launched my browser and pointed it to the port I installed TC on and was presented with a screen to enter license information. Aha.

    Next was setting up a test project. I didn't want to get into a full blown, download source code task just yet so created a new project that I had a solution file for and found that Team City supported MSBuild. So I just pointed it at the .SLN file hoping it would work. Nope. It complained about some node that it didn't support or some such silly thing. I know .SLN files can be launched with MSBuild (we do that now with CC.NET) but looking at the errors, it appears that TC has some kind of wrapper around MSBuild so I guess it can only support specific types of MSBuild files.

    This is where the next problem came up. Documentation. There was no documentation shipped with the product and going online there's only a FAQ with a few gems of wisdom available. There is a forum, but you know what's thats like. Post a message, wait a few days, etc. There are places to submit bugs and questions and the response can be pretty good, but again why isn't there any documentation to get setup? The only documentation there is seems very primitive, as in, it replicates what you see on the screens but really doesn't do a good job on what to do when something goes wrong.

    Giving up on the MSBuild configuration to launch a solution file, I changed my test project to something that uses NAnt. That seemed okay but then the agent didn't understand what NAnt was and again I went digging to find out what was needed (besides picking it in the list of build configurations). I stumbled across (on another FAQ pages) that you need to create an environmental variable (in TC) called NAntHome and point it to the root where NAnt is installed. Fair enough. Once I figured out where to put this information (in a config file, hey I thought we don't have to setup config files with TC?) it was able to recognize where NAnt was and could launch my project. Looked good but I didn't set it up to run any tests so it was just doing the build for me.

    Next was to get rid of the userid/passwords. Again on the FAQ it says you can change over to NT Authentication and sure enough, on the TC install there's an option to flip it over. You do it and it tells you that you're about to be logged off. No problem. When the page reloads, it's now telling me to create a new Administrator account (which I had already done when it was first setup). However I can't seem to create an account using DOMAIN/USER now using any kind of combination of entries.

    I submitted a "HELP ME" message to try to revert back to non-NT authentication and got the response but now I'm stuck. Maybe my concept of "using NT authentication" is flawed (at least for this product). I assume that I can turn it on and users won't have to enter their usernames or password to access the system. If I try to add a user to the system while I have it up in non-NT mode, I could try to enter DOMAIN/USER for the name but password is a mandatory field and I'm certainly not going to enter my password here nor ask other people to give me theirs (or get them to create users for themselves which seems like a silly thing). If I flip it over to NT authentication I'll be at the same place again.

    Support wasn't very helpful here. The first response was:

    "NT auth enables authentication using users registered on the machine where TeamCity is installed (system users)."

    Reading between the lines means I have to add a user manually to the machine from my domain? I tried to clarify what I was looking to accomplish, namely creating new users in TC with NT names. The next response was even less than useful:

    "Users are created in the user management on your machine, please refer to your OS documentation for details."

    Yeah, right. Of course that's what I'm asking. I like totally asked you how to create users in Windows. Again, no documentation on how this mechanism works or what to do here.

    Finally I decided to hook it up to source control and pull down a copy of the system. Another problem is that the current release (1.2) only supports CVS, Subversion, Perforce and VSS. No support for TFS. More Googling and I found a EAP release with TFS support and downloaded it. Now I'm one to go in and just run an installer, but if there's a README file or something (especially telling me about upgrades) I read it in case I need to do anything special. Nope. Not in this case so I just ran the installer.

    Now I'm currently looking at a Tomcat screen (their web server for TC) producing an error and lots of Java gobbly-gook in the log file saying a bean can't be created or something. Not a happy camper with the "upgrade". I'm sure I could just blow away the previous version with a full uninstall and install the TFS build, but what if I had real projects configured here? I've submitted a message to the guys with my details and hoping they'll get back to me but it doesn't look very good for this product. Here's the initial response to my submission:

    "Passed on to the developers, support team doesn't deal with the EAP versions."

    Okay, I can understand that. EAP versions are new(er) and maybe not supported by the main people. Still the response is basically useless to me along with the tool at this point. I'm not even going to both submitting a question about how do I use MSBuild with a solution file. I'm sure the answer will be something like "Configure MSBuild on your server" or some other nonsense.

    Team City looks like a great product and I'm sure in the Java world and on a Linux or Mac setup it might be the cats meow. I personally just found it painful to get things to work on Windows and .NET projects. CC.NET isn't a picnic for setting up and adding new projects (compared to Team City) but at least it always works and there is documentation out there and a pattern to doing things. Once you setup one project you can practically setup any other.

    Basically someday I would hope to see CC.NET implement some of the things TC does, although I'm sure that's not doable from a competition perspective (free vs $$$). Setting up CC.NET and it's projects can be a pain. I have the process down to a few hours for a new CC.NET setup from scratch (that includes setting up all the tools, downloading, etc.) and new projects can be added in under an hour (less if there's a smart build file in the project). Pulling from Subversion, VSS, and TFS is a no-brainer in CC.NET these days and works flawlessly. There are some GUI tools out there that will edit the CC.NET config file for you, but they're in the embryonic stage and it's easier to just edit the files with Notepad++.

    Maybe someone will come up with modification to the CC.NET web dashboard to make it a little smarter like TC and allow you to at least create projects, etc. from it but until that happens we're regimented to editing XML files and such (which isn't a horrible thing).

  • Is there a cloning machine in the house?

    What a crazy month it's been and I'm just still trying to catch up here. Work is insane as I'm playing lead architect on 3 projects, ScrumMaster on those 3 projects, planning for 2 new projects (including putting on my infrastructure hat to do a 2000 user Vista upgrade). All this while trying to juggle the MOSS 2007 release of my SharePoint Forums, the first release of the Knowledgebase, SharePoint Builder, a SharePoint community site, and get ready for the MVP Summit coming up in a couple of weeks (plus a couple of other projects in the wings that are just starting). I seem to have burnt my candle on both ends, went to the cupboard and used up all the other candles there and still haven't finished. Not sure when I'm going to sleep this weekend but it'll be an interesting few days.