Brownsblogging

kelly brownsberger's blog
posts - 33, comments - 0, trackbacks - 0

Tuesday, December 30, 2008

Quest for a simplified dev stack - ReSharper and MbUnit

Our dev stack at my company is a home brew of…

  • Visual Studio 2008 Professional - core IDE
  • ReSharper - our third party refactoring tool of choice
  • TortoiseSVN – our Subversion control client of choice
  • MbUnit – Our unit testing framework of choice
  • TestDriven.NET - Visual Studio add-in for filling in the integration gaps between the IDE and MbUnit (or any other testing framework)
  • .NET Memory Profiler and dotTrace – only a few folks have these currently, but I’d like to make profiling for performance and memory management a first class aspect of our dev cycle – so everyone’s going to need a profiler of some kind for that to work.
  • VisualSVN - Some folks have sprung out of their own pocket to buy licenses for to have an fully integrated SVN client experience directly in Visual Studio (I’m one of those people).

I was one of the folks driving the adoption of most of these “additional” (“additional” has come to mean anything that’s not Visual Studio) things like ReSharper and TD.NET as they were tools that I came to see as invaluable in my prior jobs.  Most around me have came to realize the value of these tools.  As we scale out our development processes to a wider and wider scope of developers in our organization (beyond our Chicago walls), more and more people are coming into the fold that just aren’t as interested in this stuff as others.  They don’t want to (or can’t) see the value that tools like TestDriven.NET provide and see these as additional friction and noise.  Alpha geeks of course don’t see it that way, but Mort isn’t an Alpha geek.  I’m happy with our stack personally, but I would agree that there’s some noise there.

I remember when Microsoft release Team System they were pushing hard the seamless integration value-add story.  I remember reading a lot of blog posts from folks arguing that the current open source and third party tool stack was low-friction and the value-add of seamless integration that Team System provided was a farce.  I’ve seen both sides of that argument over the years, but now that I’m in a shop working with over 50 developers, I see our current dev stack as more and more of a problem.   Versioning issues between these tools can’t be a real pain in the neck to deal with.  And each time we upgrade to the latest version of Visual Studio, it seems like the procurement process of these other commercial tools has to be restarted.  My company, like a lot of companies out there, bought MSDN subscriptions for everyone and they see that as the development tools budget each year.  Anything additional that must be legal-reviewed/purchased/mass-deployed/adopted, is friction and noise.

With all this in mind, I’ve been thinking more and more about Team System.  I like the idea of having the unit test framework and runner application(s) packaged with the IDE.  While I’ve never used the profiling tools and static analysis tools in Team System, having those packaged into the IDE as well is very appealing.  Even if these tools included in Team System weren’t necessarily best of bread – if they were compelling (and low friction) then I’m interested.  I don’t think Team System is approachable for us right now, but I’ve been thinking a lot about the friction:value ratio of a Team System dev stack.  After reading a few posts like Mike Hadlow’s MSTest is sapping my will to live post, I remember what I didn’t like about MSTest when I first looked at it, and my interest levels dropped.

In quest for a most tactical simplification of our dev stack, I was curious to see if I could remove TestDriven.NET from the mix.  To be clear, I love TestDriven.NET, and I’ll probably continue to use it no matter what we prescribe to our organization.  However, I don’t like having TestDriven.NET as our primary test runner in Visual Studio – I think it should be an optional component in our stack.  There’s already a native test runner inside Visual Studio 2008 – it’s for MSTest of course, but it’s there none the less.  ReSharper also has it’s own test runner living within Visual Studio.  That’s never been useful to us because it doesn’t support MbUnit (only NUnit).  Today I decided to invest a little time in trying to get ReSharper’s test runner to run my MbUnit tests.  I knew this problem had already been solved with an open source project, but because this capability doesn’t come out of the box with ReSharper, it made me nervous (I want less plugins – not more).  I pulled down the source to the mbunit-resharper project on Google Code, updated the references to the latest 4.1 version of ReSharper and the latest 2.4.2 version of MbUnit.  To my surprise it just worked.

 

image

My initial fears we ungrounded.  This doesn’t require a new VS plugin.  It’s just an additional assembly that ReSharper will load should you choose to put it in it’s AppData folder.  Doing so makes MbUnit available in the unit test providers setting in ReSharper –> Options –> Unit Testing.

 

image

I don’t know how much this solves, but removing TestDriven.NET out of the mix (as much as I love it) does feel like it removes significant friction.  MbUnit is low friction by itself, but it can have versioning issues with TestDriven.NET resulting in friction.  Without TestDriven.NET, MbUnit’s friction count becomes 0.  I think I’m going to use ReSharper’s test runner as my primary runner for a few days and see how I feel.  I’m pretty happy with this at first glance.  Sadly, this should be supported right out of the box IMO.

posted @ Tuesday, December 30, 2008 10:02 PM | Feedback (0) |

Thursday, December 18, 2008

Windows Home Server and New Router Issues - Cont'd

I was able to restore my connectivity to the home server with the step described here.  I was then able to connect to all the file shares and perform backups.  However, I was still not able to connect to WHS via the Console:

image

Additional tools exist for troubleshooting these problems.  Go download the Windows Home Server Toolkit and install it.  Then launch ConnectorTroubleshooter.exe at C:\Program Files\Windows Home Server\Toolkit\

image

It will give you a nice (ugly) report of issues it detects, with links to MS help documentation:

image

In my case, when I setup my new router, I did not configure the local domain name on my LAN properly.  I learned this lesson a long time ago, but forgot about it.  Without a domain name on my router's LAN, DNS requests will be fulfilled by my ISP.  Obviously, name resolution performed by my ISP is not going to work for resolving machines on my local LAN.  The first link on this problem report reminded me of this:

IP address mismatch

UPnP protocols and name resolution produced different IP addresses for your server.

If your broadband router is configured to use a dynamic DNS (DDNS) service, you may experience name resolution problems with Windows Home Server. To work around this problem, disable DDNS on your router while you install the Windows Home Server Connector software. After you finish installing the Connector, you can enable DDNS again

This may also happen if you use DNS for name resolution on your network and your name query request was resolved by your Internet service provider's (ISP's) DNS server. Your ISP may have a computer with the same name as your home server. If you use a local DNS server for name resolution on your home network, ensure that you have a local domain for your home network and that there is an appropriate address record for your home server. Your home computers should be configured to use this DNS server for name resolution.

http://download.microsoft.com/download/2/7/2/272d0c12-bed8-41bc-a2a5-f55682a63f34/95508.htm

 

Providing a local domain name on my new router brought my WHS Connector back to life.  What's strange about this is I was able to successfully connect to my WHS file shares (by name!), but the Connector wouldn't connect.  Odd...  In the past when I didn't have this configured correctly, I had no connectivity at all (as logic would suggest)

On the D-Link A3, here's where you do that:

image

posted @ Thursday, December 18, 2008 8:09 AM | Feedback (0) | Filed Under [ windows home server ]

Wednesday, December 17, 2008

Moved to SubText

After months of not blogging, this morning I decided to migrate my blog from dasBlog to SubText.  SubText is a fork of .Text the original ASP.NET blog engine from Scott WatermasyskPhil Haack brought the code base back to life as SubText a few years ago, and it's seems to be at the top of the popularity list.  I clearly remember him making the announcement (and promising a simplified install) and assuming I'd move one day... today was that day, and yes... that install was much improved over .Text.

I ended up moving over all of my content manually... well, not all of my content because there was a fair amount I wanted to disappear.  Maybe this fresh new home will get me writing again...

posted @ Wednesday, December 17, 2008 11:42 PM | Feedback (0) | Filed Under [ blogging ]

Windows Home Server and New Router Issues

I recently scraped this Linksys for this D-Link. That Linksys was one of the early Draft N models, and it was flakey from day one and I should have returned it. I finally had enough, booted it for the D-Link. I’m much happier now. Not sure I’ll ever go back to Linksys.

As soon as I was up and running with my new router I discovered that none of the machines on my network were connected to the WHS even though it appeared to be online and running fine. IP information about the location is baked into each of the client computers that are connecting to the WHS. Obviously with the router switch, the IP to my WHS on my network changed. Hence, the client being unable to connect.

Luckily, MS was smart enough to include a utility for this. One of the client machine on your network (with the WHS Connector installed), navigate to C:\Program Files\Windows Home Server\Discovery.exe and run it.

image

Discover.exe will scan your network looking for your home server. Here is the flow you’ll go through:

image

image

image

image

This is repair the client machine to the server and you should be back in business

posted @ Wednesday, December 17, 2008 10:27 AM | Feedback (0) | Filed Under [ windows home server ]

CruiseControl out, JetBrains TeamCity in

I have a lot of software projects at home that I'm working on for personal or professional reasons. Continuous Integration is a well known and love tool for developers. I've rolled my own CI solutions in the past and moved to CrusieControl.NET several years ago. CCNET is great, but it's not fun to setup and configure - lots and lots of xml and xslt.

I've been playing with JetBrains TeamCity for the last several works and I'm very impressed. Not only is it's much easier to use (no XML), but it to is free (for me) to use (more on that below). I was looking for a better home solution, but I was also researching for a better solution for my employer. We have a very large codebase that takes more than 30 minutes to build. We have more than 30 developers in 3 states making frequent commits. Our current CCNET server is queued up with builds all day. As soon as one finishes (even if it's a failed build) another is waiting in the queue and it immediately triggers the build again. The quick feedback loop for an automated build is drastically reduced. It's not uncommon for a build to be broken at the beginning of the day, but the build to not go red until well have the majority of developers have left for the day.

TeamCity also has a "Build Grid" concept that allows you to scale builds out to many physical machines (Build Agents). I believe this feature can be easily be used to scaled the different modules of the build out to multiple physical machines asynchronously. TeamCity also has a "Pre-tested commit" feature, I'm very excited about this one. This allows you to execute a build on the change set being committed before the commit is actually finalized. This feature will definitely keep developers vested in the build's health.

TeamCity has a nice web console - here are a few screenshots...

Projects View:

image

Projects and Build Configurations Administration:

image

Version Control System Roots:

image

It supports most major version control systems, build tools (Ant, NAnt, MSBuild, Visual Build Pro, FinalBuilder, etc.)

Possibly the best feature is TeamCity's licensing, which is OpenSource and home-use friendly. The professional server ships with 3 free build agents, 20 user accounts, and 20 build configurations. For me, that means I can have TeamCity use the Dell PowerEdge I have as a build agent, I can have up to 20 users in the system, and I can have it manage up to 20 builds for me. That's extremely generous in my opinion. I'm able to use TeamCity at home for free.

That's smart business because I'm going to be pushing my employer to give them a good chunk of money. If they wouldn't have provided this product to me in this manner, I probably never would have taken the time to fall in love with it.

posted @ Saturday, September 06, 2008 12:00 AM | Feedback (0) |

ASP.NET States DropDownList

I've had to build one of these a few times over the years. If you want a very quick and dirty dropdown of US states in an ASP.NET app, here is the code

   1: <asp:DropDownList runat="server" ID="StatesList">
   2:     <asp:ListItem Value="AL" Text="Alabama"></asp:ListItem>
   3:     <asp:ListItem Value="AK" Text="Alaska"></asp:ListItem>
   4:     <asp:ListItem Value="AZ" Text="Arizona"></asp:ListItem>
   5:     <asp:ListItem Value="AR" Text="Arkansas"></asp:ListItem>
   6:     <asp:ListItem Value="CA" Text="California"></asp:ListItem>
   7:     <asp:ListItem Value="CO" Text="Colorado"></asp:ListItem>
   8:     <asp:ListItem Value="CT" Text="Connecticut"></asp:ListItem>
   9:     <asp:ListItem Value="DE" Text="Delaware"></asp:ListItem>
  10:     <asp:ListItem Value="DC" Text="Dist of Columbia"></asp:ListItem>
  11:     <asp:ListItem Value="FL" Text="Florida"></asp:ListItem>
  12:     <asp:ListItem Value="GA" Text="Georgia"></asp:ListItem>
  13:     <asp:ListItem Value="HI" Text="Hawaii"></asp:ListItem>
  14:     <asp:ListItem Value="ID" Text="Idaho"></asp:ListItem>
  15:     <asp:ListItem Value="IL" Text="Illinois"></asp:ListItem>
  16:     <asp:ListItem Value="IN" Text="Indiana"></asp:ListItem>
  17:     <asp:ListItem Value="IA" Text="Iowa"></asp:ListItem>
  18:     <asp:ListItem Value="KS" Text="Kansas"></asp:ListItem>
  19:     <asp:ListItem Value="KY" Text="Kentucky"></asp:ListItem>
  20:     <asp:ListItem Value="LA" Text="Louisiana"></asp:ListItem>
  21:     <asp:ListItem Value="ME" Text="Maine"></asp:ListItem>
  22:     <asp:ListItem Value="MD" Text="Maryland"></asp:ListItem>
  23:     <asp:ListItem Value="MA" Text="Massachusetts"></asp:ListItem>
  24:     <asp:ListItem Value="MI" Text="Michigan"></asp:ListItem>
  25:     <asp:ListItem Value="MN" Text="Minnesota"></asp:ListItem>
  26:     <asp:ListItem Value="MS" Text="Mississippi"></asp:ListItem>
  27:     <asp:ListItem Value="MO" Text="Missouri"></asp:ListItem>
  28:     <asp:ListItem Value="MT" Text="Montana"></asp:ListItem>
  29:     <asp:ListItem Value="NE" Text="Nebraska"></asp:ListItem>
  30:     <asp:ListItem Value="NV" Text="Nevada"></asp:ListItem>
  31:     <asp:ListItem Value="NH" Text="New Hampshire"></asp:ListItem>
  32:     <asp:ListItem Value="NJ" Text="New Jersey"></asp:ListItem>
  33:     <asp:ListItem Value="NM" Text="New Mexico"></asp:ListItem>
  34:     <asp:ListItem Value="NY" Text="New York"></asp:ListItem>
  35:     <asp:ListItem Value="NC" Text="North Carolina"></asp:ListItem>
  36:     <asp:ListItem Value="ND" Text="North Dakota"></asp:ListItem>
  37:     <asp:ListItem Value="OH" Text="Ohio"></asp:ListItem>
  38:     <asp:ListItem Value="OK" Text="Oklahoma"></asp:ListItem>
  39:     <asp:ListItem Value="OR" Text="Oregon"></asp:ListItem>
  40:     <asp:ListItem Value="PA" Text="Pennsylvania"></asp:ListItem>
  41:     <asp:ListItem Value="RI" Text="Rhode Island"></asp:ListItem>
  42:     <asp:ListItem Value="SC" Text="South Carolina"></asp:ListItem>
  43:     <asp:ListItem Value="SD" Text="South Dakota"></asp:ListItem>
  44:     <asp:ListItem Value="TN" Text="Tennessee"></asp:ListItem>
  45:     <asp:ListItem Value="TX" Text="Texas"></asp:ListItem>
  46:     <asp:ListItem Value="UT" Text="Utah"></asp:ListItem>
  47:     <asp:ListItem Value="VT" Text="Vermont"></asp:ListItem>
  48:     <asp:ListItem Value="VA" Text="Virginia"></asp:ListItem>
  49:     <asp:ListItem Value="WA" Text="Washington"></asp:ListItem>
  50:     <asp:ListItem Value="WV" Text="West Virginia"></asp:ListItem>
  51:     <asp:ListItem Value="WI" Text="Wisconsin"></asp:ListItem>
  52:     <asp:ListItem Value="WY" Text="Wyoming"></asp:ListItem>
  53: </asp:DropDownList>

posted @ Tuesday, September 02, 2008 12:00 AM | Feedback (0) | Filed Under [ .net cheatsheet ]

DOS and VBS Syntax Reminders

From time to time I have to break out skills from my past.  I needed to solve a few problems today that required a VBS script and a couple of batch scripts.  It took me longer than I care to admit to remember how to do this.

So, this post is a reminder for my future self.

Here's how to set a local variable in DOS and use them, as well as how to use a system environment variable (WinDir):

   1: SET INTERNAL_ROOT_PATH=D:\foo\trunk
   2:  
   3: svn.exe update %INTERNAL_ROOT_PATH%
   4: %WinDir%\Microsoft.NET\Framework\v2.0.50727\msbuild.exe %INTERNAL_ROOT_PATH%\Internal.sln /Property:Config=Release

Here is how to load an XML file into XML DOM and parse it using MSXML2 and VBScript.  This is also an example of how to Echo messages to the shell and process arguments

   1:  
   2:     path = WScript.Arguments(0)
   3:     root = WScript.Arguments(1)
   4:     
   5:     gacpath = "D:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\gacutil.exe"
   6:  
   7:     If WScript.Arguments.Count = 3 Then
   8:         gacpath = WScript.Arguments(2)
   9:     End If
  10:     
  11:     WScript.Echo WScript.Arguments.Count
  12:     WScript.Echo "Parsing LibraryManifest: " & path
  13:  
  14:     Set xml = CreateObject("MSXML2.DOMDocument")
  15:     With xml
  16:         .async = False 
  17:         .validateOnParse = False 
  18:         .preserveWhiteSpace = True
  19:         .resolveExternals = False 
  20:     End With
  21:     result = xml.load(path)
  22:  
  23:     Set moduleNodes = xml.selectNodes("//LibraryManifest/Module")
  24:  
  25:     If Not moduleNodes Is Nothing Then
  26:  
  27:         For Each moduleNode in moduleNodes
  28:             
  29:             Set assemblyNodes = moduleNode.selectNodes("Assembly")
  30:             
  31:             For Each assemblyNode in assemblyNodes
  32:             
  33:                 For Each attribute in assemblyNode.Attributes
  34:                     
  35:                     If attribute.Name = "Name" Then
  36:  
  37:                         file = root & "\" & attribute.Text
  38:  
  39:                         'WScript.Echo "file: " & file
  40:  
  41:                         Set shell = CreateObject("WScript.Shell")
  42:                         gacutil = gacpath & " -uf " & attribute.Text
  43:                         Set out = shell.Exec(gacutil)
  44:  
  45:                         Do While Not out.StdOut.AtEndOfStream
  46:                             WScript.Echo out.StdOut.ReadLine()
  47:                         Loop    
  48:  
  49:                         Set shell = CreateObject("WScript.Shell")
  50:                         gacutil = gacpath & " -if " & file
  51:  
  52:                         Set out = shell.Exec(gacutil)
  53:  
  54:                         Do While Not out.StdOut.AtEndOfStream
  55:                             WScript.Echo out.StdOut.ReadLine()
  56:                         Loop    
  57:  
  58:                         Set shell = Nothing
  59:                         Set out = Nothing
  60:  
  61:                     End If
  62:                 Next
  63:             Next
  64:         Next
  65:     End If
  66:     

posted @ Friday, August 22, 2008 12:00 AM | Feedback (0) | Filed Under [ cheatsheet development ]

The Entity Framework team should talk to the MVC team

Two product efforts at Microsoft have spun up this year and both are new implementations of very old ideas:

  1. ASP.NET MVC Framework - Microsoft's upcoming implementation of a Model View Controller architecture for their web application platform. MVC has been around for a long time on other development platforms, but only recently has there been a push in the .NET community demanding for this.
  2. ADO.NET Entity Framework - Microsoft's next rev of data access technology (ADO.NET) contains a lot of new ways to work with data. EF is their implementation of an Object-Relational Mapping framework. Again, OR Mapping has been around for a very long time on other development platforms such as Java, but only recently has there been a push in the .NET community asking for this.

My personal opinion is the recent increase in the popularity of Agile development methods has had a large part in driving out these products from Microsoft. Agile development tends to accentuates everything in a development ecosystem - the good and the bad. Agile teams using the .NET platform have been feeling a lot of pain in certain areas - namely, data access and web app development. Writing automated-test-friendly code using these parts of the framework has been a nightmare for me personally, and I know there's scores of people that feel the same way.

To be fair, there's a large part of the .NET community that just doesn't care about any of this. By and large, they don't care about Agile and they don't care about automated test friendliness and they think the current implementations of ASP.NET and ADO.NET are just fine. I'm not going to argue with any of that because those people are in the best position to know what's best for them. However, there are people out there that loudly crying for change, and I'm one of them (though most of my crying is done in my own head).

What's really interesting I think is to watch how the MVC team has went about this charge in comparison to the EF team. I pay a lot more attention to the MVC stuff just because I've been a long time reader of Scott Hanselman, Phil Haack, and Rob Conery (the 3 main guys Microsoft hired to make lead the MVC effort). If you read through these guy's blog's and the content they're producing to support this product, their "this is for a certain set of people with a certain set of concerns that doesn't apply to everyone and we want this product to delight those people" attitude is obvious, which is very refreshing. Scott posted some very cool video's of his talks on MVC at Mix this year. This refreshing attitude shines thoroughly repeatedly in these talks.

Dan Simmons from the Entity Framework team posted a break down of the data access technologies in ADO.NET and compares and contrasts them for different types of jobs. As expected, the Agile/TDD zealots are pounding on him (i.e. Jeremy Miller and the CodeBetter crew). The zealots don't like the EF team's model and they take every opportunity to remind them of that. The EF team seems view these folks and their viewpoints as a small subset of the community. They seem to be applying the 80/20 rule, and they seem to think that if only 20% of the community is pissed, then that's pretty good.

What I think Dan is missing here, unlike the MVC team, this 20% of people that are displeased with their model, is the majority of people that care about this stuff. The other 80% are the people that don't care about Agile and don't care about automated-test-friendliness. They are the people that are more than happy cranking out dataset based app after dataset based app. I would argue, they are the definitely NOT the people that are creating conceptual data models for reuse across their domain (the EF's big selling point). I think the EF team needs to watch the MVC team and start listening to the zealots. Those zealots are your customer.

My prediction:

  1. ASP.NET MVC Framework: Huge Success
  2. ADO.NET Entity Framework: Huge Failure

I would love to be wrong about #2. #1 seems to already be in the bag :)

posted @ Wednesday, May 21, 2008 12:00 AM | Feedback (0) | Filed Under [ microsoft .net development ]

Customizing the Windows XP File Open Dialog with Direct Folders

Ya know the class Windows XP open file dialog?  This thing...

That left hand nav bar looks so interesting, but it's not.  Well, it might be interesting for people who frequently open files from the Desktop without double-clicking them from there.  I rarely, if ever, do that.  However, I would love to be able to create my own entries in that left hand nav area.  There's a short list of about 5 locations that I FREQUENTLY open files from that need to be located deep in some folder structure of my own creation.

I wrote about TeraCopy and Direct Folders from Code Sector a few days ago, and today I was able to explore Direct Folders a bit more and I stumbled upon quite a gem.  Direct Folders lets you customize the open file dialog in exactly this manner.

This...

Produces this...

I couldn't be more thrilled about this freature.  Why Microsoft doesn't delivery native features like this with Windows, I don't know.

posted @ Friday, May 09, 2008 12:00 AM | Feedback (0) | Filed Under [ tools ]

TeraCopy and DirectFolders

I love utility software. I love software vendors like Moon Software, that produce targeted utility software like Password Agent and Backup Magic. I was reading Jon Galloway's blog the other day and found his write up about TeraCopy from Code Sector. TeraCopy has some nice features beyond what Windows gives you, such as restartable copies, but it also make Vista tolerable when copying files. It's a must have for Vista users or anyone that like RoboCopy.

While snooping around Code Sector's site, I found DirectFolders. I'm downloading it now, so I can't speak to it personally, but it like a very handy Windows Shell extensions that gives you a lot of nice quick-find capabilities for commonly used directories on your file system. Here's a short screencast that shows off what it does. This looks enormously useful.

These two utilities look like they might make my short list of utility software along with SlickRun and ClipPath.

posted @ Tuesday, May 06, 2008 12:00 AM | Feedback (0) | Filed Under [ tools ]

Powered by: