Performance Tuning in Visual Studio Team System

12 08 2006

Darren Neimke has posted up a good post on how to use the performance analysis features of Visual Studio Team System. Darren walks us through how to setup the performance session and drill down on performance problems in a simple example.

Perhaps the key take away is that before you should even attempt to optimise your code you should take some measurements so that you can determine whether you have been successful or not after the optimisation has been made.

I’ve seen a lot of people “optimise” their code only for them to discover that they have made it slower.





No laptops on planes?

12 08 2006

Michael Kleef, who lives in Perth, is probably no stranger to 4+ hour plane flights across Australia. He probably uses that time to process the thousands of e-mails that are sitting in his Inbox, its productive time, and if you do it on a regular basis it becomes part of your routine – you expect to have that time. If you take two flights a week thats essentiall a whole day that you gain.

So – when Michael suggests that the new cabin baggage policies being enforced and proposed are an overreaction, I’m inclined to listen. The new policies are a reaction to the discovery that terrorists plan to use new weapons on commercial flights – in this case – liquid explosives.

The problem with laptops and any electronic device is that they could be used to trigger explosives. Of course, anyone knows that two bits of wood could be used for the same purpose – but lets not let logic get in the way of a good scare campaign.

Unfortunately the “war on terror” is not a war, its an arms race, and everytime you invent a complex rule to cover another possible attack vector the attacker is just going to find another weakness to exploit – of course, they will have to modify every seat on the aircraft in the following ways . . .

  • remove electronic headset jacks,
  • remove overhead lights,

. . . and all the time the economic impact of this “war” gets worse and worse.

Lets look at the scenario:

  1. I’m not allowed to take my laptop on the plane as cabin baggage (2+ hours lost productivity per week).
  2. Having to check my laptop and entrust it to these people (one $3,000 laptop every six months).
  3. Paying increased insurance premiums because we had to entrust out laptop to these people (some % increase per year, increasing annually as these people rationalise their acts by saying that “its insured anyway”).

On the bright side this might encourage businesses to increase spending in the telecommuniting space which may reduce the stress we are placing on our oil reserves – there has to be a silver lining here somewhere right?





Tech.Ed: Having trouble accessing the Australian CommNet site with Vista?

12 08 2006

Ever since the CommNet site for Tech.Ed Australia went live I’ve had trouble logging in – fetching pages seemed to take an unusually long time to happen. I pinged Michael Kleef and he came back with this helpful suggestion, open up a command prompt and type the following:

netsh in tcp set global autotuninglevel=disable

Apparently the routers between you and the CommNet servers have a bit of trouble with Vista’s automatic tuning features and the command above turns them off. Very useful tip!





MGT304: PowerShell: Next Generation Command Line Scripting

12 08 2006

Back when I was in high school I ran an after-hours bulletin board (you know, back when e-mail = FidoNet). Originally I ran the system on top of MS-DOS using the Maximus BBS package – it completely cracks me up that this software is still under active development and hosted up on SourceForge.

Eventually I migrated over to OS/2 which enabled me to run one line full time and an additional line after hours. Operating systems like OS/2 and DESQview were frequently used by BBS sysops because they were better at handling serial comms.

Of course, running a bulletin board involved more than just installing and configuring an operating system. Most bulletin board platforms like Maximus were really a framework upon which the sysop could build custom user interface and it was the process of taking groups of ASCII files and transforming them into the proprietary Maximus screen format (Mecca files). I would keep all of my ASCII files in a sub-directory and then after each change and do a batch conversion - the command that I issued looked something like the following:

for %f in (*.*) do build.bat %f

This would loop through each of the files that matched the filespec (*.*), and for each one call build.bat (a little batch file that I had strung together to do a couple of different things, including taking backups of existing files) – %f would contain the name of the file which is the subject of each loop.

Simple commands and scripts like this made my life a lot easier, and once I graduated from running a bulletin board to performing systems administration functions on computer networks I took my scripting skills with me.

Over the years I’ve used shells like bash, csh and ksh. I’ve also used Perl quite a bit. These shells give us quite bit of functionality and their use is considered a core skill for many UNIX system administrators. As dynamic languages like Python and Ruby get more popular in sysadmin circles, the boundaries of what is possible are being expanded – but where does this leave Windows system administrators?

The good news is that Microsoft has not been sitting idle and has been building a new command line and scripting environment for windows called PowerShell. In this session at Tech.Ed I’ll introduce PowerShell, look at what role it will plays in the future of platform administration on Windows.

What is the equivalent of the script above?

get-childitem | build

Of course, that assumes that I’ve got a function or cmdlet defined called “build”, but lets just pretend I do for now eh? See you in the session!





DEV303: Concurrent Development with Branching in Team Foundation Server

12 08 2006

In my previous post I outlined the list of sessions that I would be presenting at Tech.Ed this year. The first cab off the rank is DEV303, Concurrent Development with Branching in Team Foundation Server (CommNet VCal). The talk itself is actually derived from a talk that I gave at Code Camp Oz earlier this year.

The talk didn’t go that well at Code Camp Oz because the machine I was using didn’t really have the grunt to run TFS quickly enough for demonstrations. At Tech.Ed this shouldn’t be a problem because I’ll have access to the Dev’Garten to perform my branching operations on, as well as a couple of other backup options.

Most of the theorhetical content for the talk actually comes from the following blog posts as well as a good number of years being responsible for the build master/configuration management role within development teams.

  1. TFVC: Why use branching?
  2. TFVC: The Terminology of Branching
  3. TFVC: Concurrent Development with Branching
  4. TFVC: Reducing Source File Contention with Branching

In addition to covering the theorhetical content I’ll look at the practical/mechanical aspects of how to do branching and merging in Team Foundation Version Control.





Four Tech.Ed Presentations

12 08 2006

This year at Tech.Ed I will be doing four presentations in addition to my duties down in the Dev’Garten. The four sessions in order are:

  1. Concurrent Development with Branching in Team Foundation Server (Wednesday 23rd, 11:45AM).
  2. PowerShell: Next Generation Command Line Scripting (Wednesday 23rd, 2:00PM)
  3. Visual Studio 2005 Team Foundation Server – Applying Version Control, Work Item Tracking and Team Build to Your Server Development Project (Thursday 24th, 11:45AM)
  4. Extending Team Foundation Server (Friday 25th, 11:45PM)

Obviously there is a pretty heavy emphasis on Team Foundation Server in my schedule with the odd one out being the PowerShell session which really sits in the infrastructure space, but because it is based on .NET technology – is really something that I am in to (Monad Mitch?).