February 2006 Archives

Jeff Atwood has posted a sample to allow you to implement what has got to be the single most requested check-in policy for Team System, forcing a user to comment their change. Based on some earlier posts by James Manning, Jeff's download also contains some good example check-in policies. To be honest, if James and Jeff's examples where included in the standard TFS install then most customers I have worked with wouldn't need to go near implementing their own policies.

If you are writing your own check-in policies then I encourage you to keep an eye on James Manning's blog. He frequently offers tidbits of advice above that of the official guidance.

Teamprise at SD West

| 1 Comment

Just to let folks know I’ll be popping over to attend SD West.  I’ll be doing a technical session on Thursday morning and I’ll be at the Teamprise booth in the Microsoft Pavilion the rest of the time.  If you are attending SD West then pop along to my session (I’ll need the moral support at that time in the morning) or drop by the booth for a chat.  Otherwise if you are in the Santa Clara / San Jose area between 13th – 16th March then let me know if you fancy meeting up for a beer or two.

Connecting to Team System Across the Enterprise

Presented by Martin Woodward,Teamprise
Thursday, March 16, 8:30am - 10:00am
Drawing on real world scenarios, this session will explain how to deploy Visual Studio 2005 Team Foundation Server across your enterprise. It will focus in on a realistic adoption route and demonstrate the alternative methods available to connect into your Team System Environment. Particular focus will be given to the Teamprise suite of products which allows Team Foundation access from non-Windows platforms and from inside Eclipse.

VSTS Community Bloggers Start Page

VSTS Community Blog Posts I have just added Richard Hundhausen’s excellent blog into the list of blogs that I slurp for the VSTS Community Bloggers Google Toolbar button.  While I was there I made the blog a bit more reader friendly.  While not overly useful, it means that you can now customise your Visual Studio 2005 start page to show news from around the VSTS blogosphere. 

To customise the Visual Studio 2005 start page, go to Tools, Options…  In the dialog select Environment, Start Page and enter the feed address there.  My feed is available at http://feeds.feedburner.com/VstsBloggers

Screen shot showing how to customize the news displayed in the Visual Studio 2005 Start Page.

If you have a favourite feed that you want adding to the list of feeds then drop me a line or post a comment.  For information, the following feeds are all ready included (in no particular order):-

 

Deadlock

| 5 Comments

I’ve been coding for around 25 years, since my parents bought me a VIC-20. I think it was probably a similar advert to this one by William Shatner that convinced them to buy it after seeing how much time my borther and I spent playing with our Atari 2600.  It was a sizable investment in new technology for them at the time, but one that has helped me to earn my living for over 10 years now. In that time I’ve written many multi-threaded applications and considered myself reasonably “thread-savvy”.  Most of the stuff has been web based applications but I’ve done my fair share of client side work before and I’m currently doing a lot of it.

This morning I encountered a Deadlocking problem for the very first time outside of a question in a technical interview, in fact if it had not been preparing for technical interviews then I may never have even come across the term before.  As I did my degree in Physics and not Computer Science, I’ve always had a bit of a weak spot around my use of formal computing terms – sadly my knowledge of Physics isn’t much better as I spent most of my time in the college bar and the JCR.  The reason I’ve probably only come across a real deadlock now is that most of my professional life has been spent inside J2EE application servers or on the server side of .NET where you tend to be deliberately insulated from such things.

Anyway, thought it was worth a post to commemorate this day – it took me a while to track down (would have been longer if it wasn’t for the debugger in Eclipse).  Had I not spent the odd day here and there preparing for technical interviews it probably would have took me longer.  You never know – one of these days I might actually write a real binary search algorithm or use some of the other interview favourites… 

TFS Source Control for VS 2003

Via Rob, Microsoft have now released a MSSCCI Provider that works in Visual Studio 2003 and Visual Studio 6.  According to the overview on the download site, “The Visual Studio Team Foundation Server MSSCCI Provider enables users of Visual Studio 6.0 and Visual Studio .NET 2003 to use Visual Studio 2005 Team Foundation Server Version Control with integrated source control features. This release includes support for work item integration to associate work items with changesets, and check-in notes.”  

This is fantastic news for Team System adoption, reducing the barriers for folks wanting to exploit the power of the Team Foundation Server now.  This was one of the biggest pain points that people were pointing out to Microsoft during the beta programme and it is really nice to see that the feedback was (once again) listened to.  The plugin is for RC builds of Team Foundation Server and should hopefully work on the RTM version when it is shipped (not long now!).

Teamprise Preview 6

TeamprisePreview 6 of Teamprise is now available for registered users to download (registration is free). This release is compatible with the RC version of Team Foundation Server only - Beta 3 and Beta 3 refresh users should stick with Preview 5 or upgrade TFS now to claim your free T-shirt.

Apart from the move from Beta 3 to RC, we've been busy adding some more Work Item Tracking features to the product to avoid you having to leave the IDE. We've also fixed a ton of bugs and added loads of functionality around the edge cases.

Now we are heads down concentrating on improving quality ready for the V1 build.  It’s really getting exciting!  I use our plugin for my day to day development and I really love it. The Pending Changes View rocks.  Anyway, I encourage you to take a look at the preview version, and maybe even try it out on Linux or one of those shiny Macs – that is guaranteed to make you say what Soma did when he saw Teamprise on Ubuntu during the VSLive keynote… “Wow!”.

 

VSTS Bloggers Google Toolbar

Screen shot of toolbar button in actionWell, having tried new new beta of Google Toolbar I just had to try implementing my own toolbar button.  Here is one that will give you the top previous posts from folks around the VSTS blogosphere.  Clicking on the button will take you to the excellent Team System Rocks website.

Once you have installed Google Toolbar, you can click here to get the VSTS Community Button.

If you are interested, I pulled together a quick php script to slurp the RSS feed together and host them via Feedburner (because my slurping code was not written very efficiently).  The Feedburner version of the feed that the toolbar button uses can be found here. This should be working a bit better now then when I first posted the this entry as I've improved the speed of the script so Feedburner doesn't time-out when reading the feed. If you have a feed that you want me to add to the slurp list then feel free to post it as a comment here. The feed items must to have a pubDate as part of the feed because my dodgy script uses that to sort on to get the last 25 posts.

I’m currently writing a diagnostics tool to perform all the same connectivity diagnostic checks that I do manually when I am having trouble connecting to something.  The following code snippet is how I am checking to see if a web or proxy server is listening on a particular port.  I thought I’d post a similar example here in case it was useful to you.

    public String pingHttp(String host, int port) throws Exception
    {
        PrintWriter output;
        InputStream input;
        StringBuffer response = new StringBuffer();
        try
        {
            Socket httpSocket = new Socket(host, port);
            // Timeout after 5 seconds of trying to talk over socket.
            httpSocket.setSoTimeout(5000);
            output = new PrintWriter(httpSocket.getOutputStream(), false);
            input = httpSocket.getInputStream();
            output.print("OPTIONS * HTTP/1.1\nHost: " + host + "\nUser-Agent: Woodwardweb.com Diagnostics\r\n\r\n");
            output.flush();
            
            // Read maximum of 1k of data as we don't really care what this says.
            byte[] b = new byte[1024];
            int n = input.read(b);
            response.append(new String(b, 0, n));
            output.close();
            input.close();
            httpSocket.close();
            
        }
        catch (UnknownHostException e)
        {
            throw new Exception("Could not resolve the host \"" + host + "\"",e);
        }
        catch (SocketTimeoutException e)
        {
            throw new Exception("The host \"" + host + "\" did not respond in a timely manner");
        }
        catch (IOException e)
        {
            throw new Exception("Could not connect to port " + port +" on \"" + host + "\"",e);
        }
        return response.toString();
    }

Note that the OPTIONS http method is very useful as a ping or noop type call on a web server.  Some web server administrators (such as Google) deny the OPTIONS request as it isn’t something that you’ll see a browser doing and they want to minimise their attack surface for the naughty folks out there in internet land.  Even if they do, you will still get some http response back (i.e. a String beginning with “HTTP”) which you can test for to tell if a web server exists on that port.

Sky+ Brings Marital Strife

| 1 Comment

Sky+ has been the saviour of our television viewing since it arrived shortly after my son did (not a coincidence).  For those non-UK citizens reading this blog Sky+ similar to the Tivo but more locked down as it comes from the main satellite TV company here.  Anyway, it’s great and has totally changed my viewing habits to the point that I very rarely watch live TV anymore – and watch adverts less often.  I keep meaning to upgrade the internal hard-drive but that would mean catching up on the viewing – which is just never going to happen.  I’ll probably just get the HD version a few months after it comes out which has had a hard-drive upgrade to cope with the additional storage capacity HD broadcasts take.

This morning (Valentine’s day) the post man delivered a little red envelope addressed to me looking awfully like a Valentine’s card – my wife admitted that had I not been working from home she would have spent the whole day stewing over it wanting to steam the thing open to see who was sending me love notes (a couple of weeks after I’ve returned from a long business trip).  I definitely would not have returned home to a romantic Valentines evening atmosphere.  Turns out it was an advert from Sky+ to try and “show your love” to your friends by recommending them for Sky+.  Not a bad piece of marketing as I was forced at dagger point to open it.

Delete Old Files

| 3 Comments

I was just trying to get some backups configured and I wanted a way of deleting files from a directory stucture that were older than a certain date. I couldn't figure out how to do it easier from a Windows 2003 command script, so I wrote a quick C# console app to do the job. I've included the code and a copy in case you find this useful. WARNING: Use this at your own risk, as I wrote this for myself I haven't spent any time putting in "Are You Sure" prompts or anything. If you were to do something crazy like DeleteOldFiles 5 c:\ it will delete any file on your C:\ drive that has not been written to in 5 days - including things in the Windows directory..

Update: The second I posted this, I noticed the ForFiles command in the Windows Server 2003 resource kit that works a bit like find on unix. Hey ho, at least I wrote some C# code today.

028 9018 4242 is the new 555

| 1 Comment

Anyone who watches the Simpsons or Ghostbusters (555 2368) is aware that numbers beginning with 555 in the states are usually fake. While looking for information about international dialing from the UK, I stumbled upon the official Ofcom list of fake numbers - UK number ranges reserved for drama purposes.

In most areas in the UK, a 496 number is fake - however there is an entirely fictitious area code of 01632 and even reserved number ranges for mobiles, premium rate and even freephone services. Who would have expected them to be so organised!

A quick check over at Wikipedia gives an interesting article on the use of Fictitious phone numbers including gems of information such as both 24 and Scrubs use numbers that go through to production staff. The Scrubs one is (apparently) answered by a voicemail message given by one of the cast in character.

Hmm, maybe I should ask that my extension at work get changed from 42 to 555...

You'll probably be seeing a lot of these type of posts around the net, but I just wanted to say that I've got the RC version of Team Foundation Server up and running in a VPC. Apart from my only allocating the virtual server 384 Mb of memory for the first part - the installation went very smoothly. Honestly, they are really taking the fun out of it. I remember when getting a successful install of TFS was cause for celebration.

Anyway, at Teamprise we will be coding against this new version to pick up all the changes and then migrate our dogfood server once we have a java client that is stable against the new RC web service schemas. Apart from the headline changes in the RC build, I'm noticing lots of subtle cosmetic changes with Microsoft's RC version of the client - like all the additional subtle help pointers and a few really minor things (such as the current workspace version of a file being displayed when you right-click and select properties within Source Control Explorer).

Team Foundation Server RC on MSDN

Team Foundation Server Release Candidate on MSDN Subscriber Downloads siteI woke up this morning to find the Release Candidate version of Team Foundation Server in my MSDN Subscriber downloads site. Who-hoo! I am currently downloading it while reading the Beta 3 (refresh) to RC upgrade procedures.

Scott Hanselman's Hanselminutes podcast continues with this weeks episode about Continuous Integration. Jamie Cansdale (the genius behind TestDriven.NET) has posted about the tool Scott was on the way to mentioning when Karl interrupted him.

Probably also worth mentioning, as Scott missed it in his list of source control systems, that the source control provided by Team Foundation Server in Visual Studio Team System is also supported. To see a full list of the Source Control systems supported by CC.NET then take a look at the Wiki.

As I have previously mentioned about three bazillion times, I'm at VSLive at the moment. Yesterday I sat in on a session where folks were being introduced to programmatic unit testing for the first time - it was great to watch the light bulbs go off in the collective heads of the 50 or so people in the audience as they realised what an amazing impact this would have in their organisation.

Check Out in Team System

| 5 Comments

Internally in Teamprise, we have been having a lot of discussions about check-in and check-out in Team System and how to explain this concept to our end users. The problem is that the terms are overloaded depending on the source control system that you come from. In Visual Source Safe (VSS) or PVCS, check-out means “give me the latest version of the file and lock it so that no-one else can edit it”. In CVS and subversion, checkout means “get the latest version”. If you are using the source control features in Team System then checkout means “Tell the server I want to edit this file and mark that file as writeable in my file system”, at the same time that you check-out the file you also get an option to lock the file using one of three lock types (none, check-out and check-in).

We have to figure out a way to explain this to the end user, as this is new behaviour to them no matter what source control system they are coming from.

Archives

Creative Commons License
This blog is licensed under a Creative Commons License.