Monthly Archives: February 2006

Code complexity greater than ten raises my eyebrows.

I was reading this post about managed code analysis and code complexity over at the Vertigo Software Team System blog. Down the bottom of the post they picked up on an issue which frustraites me as well. That is the hard coding of trigger points for code analysis warnings and errors against the cyclomatic complexity count.

Personally I want anything over ten to trigger a warning and anything over twenty to throw an error. My opinion is that with the frameworks we have today and the refactoring tools available to us there should be no excuse for writing a piece of code that is too hard to get a handle on, and that _starts_ happening once you get over a CCC of ten.

The solution is that in the next version of VSTS needs to make rules configurable (in the same way check-in policies are). Basically – if the rule implements a specific interface we should be able to right mouse click on it in the configuration screen and bring up a custom configuration dialog.


In this case the UI could have a couple of trackbars which map to a fragment of XML which is stored in the MSBuild file and passed to the rule when it is invoked. The exclusion system could be tweaked a bit as well to allow complexity up to a certain point but not beyond that.

The scenario that I am thinking of is when you do a code review after the above has triggered a warning and you decide that the code really can’t be improved by rather than just putting in a blanket exclusion you say that you will accept complexity up to its current level, but if it goes beyond that you want to be warned again. To make this possible an XML fragment would need to passed into the constructor of the exclusion attribute.

At any rate – the current defaults are WAY WAY WAY too high.

Mission Accomplished

At the beginning of this month I started a bit of an experiement (and at the same time set myself a challenge). The goal of the experiment was to find out of content really is king.

If you read the posts on the blogosphere most people will tell you content is really important, right before the repeat that thing that the last blogger posted up about. Basically its really hard to get objective advice about how you grow the amount of traffic that comes to your blog.

The method that I used was simple. I would focus on posting the most interesting and mostly unique content that I could and each day I would check to see how the traffic was increased (if at all) and whether people liked the content. To make it interesting I set myself a challenge to see if I could quite literally double the amount of traffic I was getting.


As you can see from the graph above I accomplished my goal, I pulled these stats tonight (11:23PM) and as you can see the number of unique visitors in January is less than half the number of unique visitors in February. The number of hits that I got to my blog was 223055, although Grant redminds me that hits are How Idiots Track Statistics.

What will be interesting to see is whether the grow continues into next method if I keep up the effort and at what point does it plateau.

Readify adopts Windows Mobile 5.0 and I do some development.

Today everyone at Readify (well, mostly everyone) moved their mobile phone numbers over to Vodafone and onto a corporate phone plan. Up until today we pretty much a free reign to choose our own mobile phone plan (within reason) and by extension our own phone.

Because everyone had selected their own phone we had a huge variety of not only form factors but also underlying operating systems. Unfortunately this meant that while we had a huge amount of processing capacity on our phones we couldn’t harness it because it was too difficult to produce custom software that would run across all of them.

So – with our new corporate phone plan pretty much everyone in the company is getting a new mobile device from i-mate from a subset of their product range based on their own personal preferences. For example, a few of us opted for the JasJar device (myself included) whereas others went for smaller form factors such as the JAMin, SP5, and K-JAM.


Which mobile device you use is such a personal choice which is why we standardised on i-mate as the make – they basically provide the widest selection of form factors. I’ve actually had an opportunity to play with all the devices over the last couple of months and I pretty much arrived at the JasJar by process of elimination, hopefully it will arrive next week.

The K-JAM would have been my second choice because it also has a keyboard but the size wasn’t right for me. Both the JAMin and the SP5 didn’t even qualify because they either only allowed input via the t9 dictionary or via the input panel on the screen. The JasJar also has cool factor for the following reasons:

  • It folds up like a Tablet PC convertable.
  • 640×480 screen resolution.
  • Large keys on the keyboard.
  • Supports GSM, GPRS and 3G including fallback.
  • Two cameras, including support for video phone (to another JasJar).
  • Did I tell you it folds up like a Tablet PC convertable?
  • Windows Mobile 5.0

Whats interesting is that everything on that list was important to me for personal reasons – except one. The last time was really important for Readify. If you look at all the devices I mentioned, all of them are running the new(ish) Windows Mobile 5.0 operating system.

The reason this is important is that it allows us to develop applications that everyone in the company can hook into internal systems like the time keeping system (custom in-house job) and the relationship management system (Microsoft CRM) directly from their mobile device. The new device has also inspired me to get into mobile development again. In fact, tonight I downloaded the Windows Mobile 5.0 SDK and got to work on a pet project.

I’ll post more about my pet project in the future but one of the things that I needed to do was hook into the new State and Notifications Broker API. I was trying to see what kind of information I could get into via this API and rather than manually coding up a whole bunch of routines to get at all the information or worst manually modifying and running the code each time I decided to write a little tool to get at that information. What I came up with was the System State Diagnostics tool.


When I load up the tool it uses reflection to enumerate all the static properties of the SystemState class in the Microsoft.WindowsMobile.Status namespace and place them into a listbox. Then, when I tap on the screen and select a property it goes and fetches the current value of that property.

If you need to do the same sort of thing and would like to use this tool you can download it directly to your device (assuming you have the .NET Compact Framework 2.0 installed already), or you can grab the source.

P.S. I hate the fact that the compact framework doesn’t have a GetNames method on the Enum type.

The Most Fantastic BizTalk Utility Ever Invented – Seriously!

This utility is the product of one of the Microsoft SDC’s, in this case the one located in the UK. It is a tool that can be pointed at a BizTalk configuration database and extract a help or word document that contains all the information you could ever want to know about a BizTalk deployment.

I’m doing some work with BizTalk at the moment and this is going to be a breeze now to document the various ports and custom pipelines that we have. It even embeds that various chunks of schema information that we are working with which is really nice.

Rules of Engagement: Tools and Equipment

This is the final post in my series of posts on the rules of engagement in the consulting business. In this post I focus on the tools that you need as a consultant to get the job done. Its actually an interesting time for me to look at this because the tools that I use are changing.

If I think about what I work with on a daily basis:

  • The Laptop
  • The Mobile Phone
  • The Wireless Broadband Card
  • The Headphones

Everything else is really an optional extra, but lets zoom in on the list above and discover why they are so important.

The Laptop

Having a laptop in the consulting business is absolutely critical. When I took up my first consulting role I was issued with a Dell and have pretty much been using them ever since. Most of the laptops I have worked with tend to be a bit on the expensive side because what I really need is a desktop computer that I can carry around with me, use on the bus, in the taxi and in the airport lounge.

Your laptop is what keeps you sane. With a laptop you are connected to your e-mail archives and you have a stable development/test environment on which to try things out – it can take some people months to organise development kit and you don’t want to waste a clients money by not getting started prototyping straight away.

The Mobile Phone

If you are an independent consultant your mobile phone is a valuable sales tool, it keeps you in touch with your clients and helps you line up new engagements, basically, if you are an independent you can’t be without your phone for long.

For consultants that work with a consulting firm your mobile phone is your lifeline. If we look at the modes of communication that we used to reach people they can usually be put into one of two buckets, asynchronous and synchronous.

E-mail is a synchronous tool, and in general you have no QoS (Quality of Service) guarantee, although you can use history as a guide. The mobile phone is a synchronous device so when you dial it and someone answers you have that resource locked into a conversation.

When I get stuck on something I like to enlist other resources to help me, it allows me to solve the problem faster and provide the client with more value.

P.S. When you get voicemail – thats a Denial of Service

The Wireless Broadband Card

Given that a laptop and a mobile phone are essentially standard issue for most consultants these days I wanted to add to the list one more really important item. The wireless broadband card. I predict that ever since I got issued my iBurst card that my productivity has shot through the roof.

The ability for me to reach out and connect via e-mail to all the geeks in the company via e-mail during the middle of the day means that when I fire a question out I am going to get a diverse set of answers.

It also enables me to get to parts of the Internet that corporate firewalls often block out (not because of the material, just because the firewall is managed by network nazis).

I’ve also noticed that my iBurst card is faster than most internal networks because they tend try and push all Internet bound traffic to the core of the network and then out onto a backbone rather than having links out from the leaf nodes of the corporate network – if you ask me this is poor network design.

The Headphones

I like to make selective use of my headphones and try to limit their use for when I don’t want to be disturbed or when I am trying to get into the zone (usually occur at the same time). Headphones allow you to block out general cube farm noise and focus on your work and if you pick the right choose you will be dancing in your chair while you bash out that piece of complex code.

From personal experience I don’t recommend listening to podcasts while coding (I’ve tried several times), I just find that too many brain cycles get stolen trying to process that information where as music tends to be processed subliminally.

Team Foundation Server vNext

Brian Harry has posted up to his blog soliciting feedback about what features would everyone like to see in the next version of Team Foundation Server vNext now that Team Foundation Server 2005 is almost out the door.

The features that I would like to see in Team Foundation Server vNext are:

  • Better support for occasionally connected developers.
  • Better ad-hoc collaboration tools.
  • Better integration tools.
  • Better query tools.
  • More Process Templates

Better Support for Occasionally Connected Developers

One of the features that I would like to see improved is the support for offline development. As a roving consultant I tend to need to work away from TFS quite regularly, but I still want to be able to work on my code. I’d like to see some work done around making Workspaces a management unit for disconnected access, not only for source code but also for work items.

I see it working something like this. I start out in the office (or atleast connected to the TFS server) and I am preparing to go onsite at a client where I will not have high speed Internet access but where I need to be able to edit code. I bring up the Workspaces configuration screen and select Offline. When I click OK it asks me whether I want to select individual work items (or a query for work items) that I want to take offline with me. I select some and click OK.

What happens next is it flags all the items in my workspace and the work items as being offline in the repository. In the offline state other machines which are connected to TFS will be warned when they try to change them.

With work items that are in offline mode, I can edit them while I am disconnected from TFS, and even associate them with check-ins (which just run locally, really just a change log).

When I finally get connected again I just go back into the workspace tool and select Online and it goes through a merge process, calling out any conflicts that I need to deal with.

Better Ad-Hoc Collaboration Tools

One thing that Visual Studio Team System with Team Foundation Server really rocks at is what I would call structured collaboration. That is – collaboration which is guided by the process template through work item workflows.

For teams adopting a particular process, especially when there might be an ocean between team members. But it doesn’t really do anything for teams that might be trying to use extreme programming practices when they are geographically distributed.

There are two features that I would love to see:

  1. Collaborative text editing.
  2. Collaborative debugging.

The scenario is that I might be working on a piece of code and one of my co-workers interstate sends me an instant message saying that they are having a problem with a piece of code I wrote. Rather than me wasting about 10–15 minutes setting up my environment to help them they can simply “host” a collaborative session and share out the source files they are working with.

I then connect to them (wouldn’t it be cool if this was an Office Communicator invite option) and I can see the source file in my window. Both of us can edit the document at the same time (their document is the source of truth but when I type into my document the update is routed to their text service).

We can annotate the code and even start debugging. When they run the program and hit a breakpoint I can see the code that gets hit and I can inspect things like the callstack and locals window collaboratively.

I don’t have a really good example of an application that does collaborative debugging at the moment, but here is a Mac application that does collaborative text editing.

Better Integration Tools

I think that there could possibly be another SKU that ships with TFS, probably a free one which is part of the bundle targetted at configuration managers. Here are some ideas for the kinds of things I would like to see in it.

With MSBuild we now have some extensibility in the Visual Studio build system, and Team Build gives us the ability to do builds on a build server at the click of a button but the experience of editing MSBuild files isn’t really all it could be.

I’m mostly referring to the lack of a graphical editor, and while this is probably in the domain of the MSBuild team I think that VSTS has room for another SKU for configuration managers which includes DSLs to deal with things like Build Scripts.

Other things that this SKU could enable (easily) are:

  • Building TFS event listening services (wizard driven type stuff).
  • Building check-in policies.
  • Building and editing Process Templates (basically an integrated version of PTE).

Better Query Tools

The work item query tool that comes with TFS is really functional, but I would like support for parameterised queries. For example, lets say as a team leader I want to query what work a particular team member has outstanding. At the moment I have to create a query for each team member, but if my team has a bit of churn its a pain to maintain these. When I pop up a dynamic query like this it should prduce a little UI up the top (just like in reporting services).

I’d also like to see user affiliated queries. At the moment all queries are tied ultimately to a particular project. But if I am working across multiple projects and I have a set of queries that I like to use on all of them I should be able to just add them to my own personal set of queries, independent of a project.

More Process Templates

This is a bit of a no-brainer. But you should be able to install Process Template packs. For example – you should be able to install a medical industry vertical for building medical software which includes process steps for HIPAA compliance.

One that I would find useful in the consulting business is a utility process template, and even a process template for ISVs which includes things like marketing guidance (I think that there is a vast untapped market here).

Sub Work Items

One of the things that I find frustraiting about the way work items currently work is that all work items are created equal. There is no support for sub-work items.

What is a sub-work item? Well a sub work item is a work item that is created under the auspices of another work item and affects the accounting of time for that work item. For example, if I have a high level task for which I have allocated four days. As a team leader I might like to keep track of the allocation of time at a finer level. So I might split that task out into say four smaller tasks.

When I do this that smaller task should have a special relationship with the parent task such that the time allocated to the sub task is deducted from the parent tasks total alotment of time.

I’m not exactly sure how this would work but it would definately allow more natural representation of work breakdown structures which are used in some methodologies.

While you are at it the process template could also define what types of sub-work items can be created from other work items. For example, from a scenario task I should be able to create a sub-scenario, or a sub-task, but not a bug (necessarily). I’m sure you get the idea.

Thats about all I’ve got for now, given enough time I could probably come up with some more.

MSSCCI Provider for Team Foundation Server

I’m a bit late on repeating this news on the blogosphere (but I figure it has been reported widely anyway). Microsoft has released a MSSCCI provider for Team Foundation Server.

What is a MSSCCI provider I hear you ask? Well its the piece of code you need that allows you to plug into Visual Studio.NET 2003 development teams into Team Foundation Server for things like version control. It also supports the ability to associate work items, changesets and write check-in notes.

The interesting this is that this may also support other tools (but I definately haven’t tried it out). For example PowerBuilder users might be able to play as well.

I don’t know why I’ve got this facination with PowerBuilder at the moment, its kinda like those people that like looking at pictures of roadkill.

BizTalk 2006 and Microsoft Command Shell Demo

Four days ago Joseph Cooney posted up this little snippet about how to stop the various BizTalk application services which may be running on your machine. His muse was BizTalk Server 2004.

I decided I would post up how to do this using BizTalk 2006 with the upcoming Microsoft Command Shell since there doesn’t seem to be that many people championing it down under.

The following command will look at all the services on your machine and issue a stop command for any of them that have a name beginning with BTSSvc$.

get-service | where { $_.Name -like “BTSSvc$*” } | stop-service

I’m really starting to like MSH, the composability of the Cmdlets is really quite good, certainly a lot more powerful then the legacy command-prompt.

The Great Bus Experiment

My wife is down in Melbourne for about three weeks and she took our car down with her. That means that I have effectively been forced to catch the bus to work. Now this isn’t too much of a hardship because I normally catch the bus to and from work (and between client sites).

I’ve found that catching the bus all comes down to preparation, know when you need to be somewhere and count backwards until you determine what is the latest bus you can catch (allow a little padding).

Of course, living in Canberra makes it easier because the public transport system is pretty good in terms of the routes buses take through the suburbs.

Today (Sunday) I am in the bus on the way into the city. My goal is to pick up some meat from the supermarket and then head out to the BBQ grounds at Lennox Park with a few of the Readify guys here in Canberra (Darren, Grant and Rocky).

My co-workers have kindy offered to give me a lift, I may take them up on the offer depending on where I am and how much notice I can give, but its a pretty short Taxi ride from London circuit to Lennox Park so its not too much of a problem.

More Thoughts on Tech Talk Blogs

I’m thinking about Tech Talk Blogs some more. This is going to be a great resource for team leaders to share with their team members to help them get connected to the community and keep across what is going on out there in technology land.

What I would do is get staff to use Squeet to subscribe, that way they don’t even need to set up their own RSS aggregator and the content just comes to them in the form of an e-mail (which they can delete if they are not interested).