October 2006 Archives

Running Virtual Machines

| 1 Comment

I use VMWare a lot.  Not only do I use it for demonstrations of Teamprise, I also use it for day-to-day development and testing (one of the joys of developing a cross platform product that talks to a Microsoft server product).

I work on a laptop most of the time.  It's a Dell Precision M70 with 2Gb Ram, but the hard drive is only 60Gb (I went for speed rather than size).  When I first started running out of space, I ran up a virtual machine over my USB2.0 connection to an external hard drive.  I'd assumed that this was going to be even slower, but much to my surprise it was noticeably faster.

Jeff Atwood has an excellent post over on his Coding Horrors blog this morning explaining why this is so.

The Single Most Important Virtual Machine Performance Tip

If you use virtual machines at all, you should have the single most important virtual machine performance tip committed to heart by now: always run your virtual machines from a separate physical hard drive

Personally, I have a couple of the Seagate 100Gb 5400rpm USB 2.0 Drives as they strike a nice balance between portability, robustness and capacity.  They are also nearly always available when I pop into Best Buy or PC World.  However, the SmartDisk CrossFire drives look pretty good and I just noticed a 7200rpm, 250Gb one on Amazon for £120.  As Jeff's post explains, going for eSATA looks like the way to go in the future - especially a drive enclosure that supports both eSATA and USB.  However, for the meantime, I'll stick with my USB 2.0 only models as they are very portable and are powered by the USB lead.

TestDriven.NET 2.0 now shipping

In case you missed the excellent news, Jamie Cansdale has announced that TestDriven.NET 2.0 is now shipping.  The TestDriven plug-in is essential for anyone wanting to run unit tests from with Visual Studio (any edition).  Not only does it allow you to run any flavor of test from the comfort of your right mouse button - it is also lightening fast (much faster than the built in test runner than comes with Visual Studio Team System).

Along side the ability to run all common unit testing frameworks from any version of Visual Studio, Version 2.0 brings many new "power" features that are just fantastic for those of us that spend a lot of time creating plug-ins to Visual Studio.

Jamie is committed to keeping TestDriven.NET available for the community so that the power of unit testing is available to all (not just those of us lucky enough to work for organizations who can provide the upfront investment required for Team System).  A fully functional, no nag, version of TestDriven.NET is available if you want - however if you are using this professionally, then I urge you to sign up for a professional or enterprise license.

If you are not unit testing today, then you really have no excuse to go out, download your test framework of choice, install TestDriven.NET and get started.  Not only will your tests all be available should you make the wise decision to upgrade to Team System, if you use one of the popular testing frameworks such as NUnit then there is a convertor available to turn them into the MSTest framework used by Team System - meaning that your testing investment is protected for the foreseeable future at least.

Team System Training Content

| 1 Comment

A couple of weeks ago, Brian Harry posted about some Team System training content that is now available.  If you missed the post and you have an interest in Team System then I highly recommend you take a read.

The training content is being made available through the http://connect.Microsoft.com site.  Currently there is some Level 300 training available and some Level 200 stuff is on the way.  Not only is this content a great way of learning the vast Team System product, it is also very valuable for training companies and in-house training initiatives.  I was also happy to see that Teamprise gets several mentions in the official course material :-)

Thanks to all the people who came along to the Developer Track of todays conference in Galway.  It was great to see such a mix of people with different experience of .NET and Team System in General - but also nice to see some Java folks.  Here are m y slides as promised:-

The sessions were also all recorded so I will link to them on my blog as they are published.  Thanks again to all those attending and a special thanks to Eric Lee for travelling such a long way just to talk.  Hope everyone found it a useful and enjoyable event.

Galway Team System Talk

| 1 Comment

Tomorrow (October 12th), I'll be talking at the first annual ICT Conference in Galway, Ireland.  While having me attend is probably reason for you to stay away, Eric Lee (PM on Visual Studio Team System) is flying in from Redmond especially to talk.

Eric is one of the best presenters on Team System that I have ever had the pleasure of witnessing.  Also, as a senior manager on the team, it is your opportunity to ask questions face to face and influence the team as they plan out what to include in future releases of Team System.  Also presenting in the Developer Track is Rob Burke, who is just a pleasure to listen to.  To be honest, it's a conference that I agreed to talk at just so I could listen to the other speakers - hopefully my sections will be worth listening to as well.

The conference is being held all-day at the Galway Bay Hotel.  Take a look at the ITAG site for more details.  I'm currently sitting in the hotel and it is very nice (with fast internet access) - however it was crazily hard to find a map to the place - so thanks to the power of Live Writer, one is included with this post.  (BTW - http://local.live.com currently has by far the best mapping data I have found for Ireland and Northern Ireland, and the map print utility is great.)

Anyway - as usual, the slides will be available on this site in a follow up post sometime tomorrow.

iPod Reset Tip

| 3 Comments

I've used my old iPod Mini nearly every day for 2 years (since I discovered Podcasting for the first time).  Tomorrow I have a rather long car journey ahead of me and I have been saving up a few episodes of .NET Rocks, Slacker Astronomy, In Business and a new episode of Today in Parliament for the trip.  However - when I tried to switch on my iPod for my evening walk last night it just wasn't playing.  I figured that the battery had finally given up the ghost after all those recharge cycles - while a little annoyed that I was going to have to go back to the radio for my long car journey, I wasn't that unhappy as it meant I now had an excuse to get a brand new iPod.

However, this morning I did a bit of digging around and eventually stumbled on the following tip from the Apple Site:-

Slide the Hold switch and check the screen.
If your iPod is frozen or won't turn on, connect your iPod to your computer, then press and hold the "Menu" and "Select" buttons simultaneously for 10 seconds to reset the iPod

Worked just fine for me, my iPod is now charging from the mains adapter and looks set to last me a while longer - however I think I might treat myself to a new MP3 player of some sort soon - but now I can take my time researching :-)

Team Foundation Server source control has a great feature called Shelving.  Shelving lets you set store a batch of pending changes onto the server and optionally remove them from your local workspace.  It comes in really handy for the times when you want to backup your code and store it on the server but don't want to commit it to source control.  I also sometimes use it when I would like a remote colleague to take a look at some code I have written before I commit it into the code base.  For more information about Shelving, see the MSDN documentation.  A Shelveset is identified by developer and the name the developer gave it when shelving.

One of the features of shelving (and how it differs from working in a private developer branch) is that a Shelveset is in itself not versioned.  If the same developer saves a Shelveset with the same name, then it will overwrite the previous Shelveset.  This comes in really handy when you have a Shelveset that you commonly use for one thing - for example, I have a Shelveset that I normally call "Work In Progress" (actually, I normally call it "wip" because I am lazy when it comes to typing, but you get the idea).  If I need to stop work, but I haven't been able to get to a point where I can check-in the code, then I shelve the pending changes and call the Shelveset "Work In Progress".  That way, I only have one of these and I know the purpose of it.

However, most of the time when you shelve, it is a temporary thing.  You create a Shelveset and then you unshelve it - and then you no longer want it.  The old shelvesets will sit on your shelf gathering dust until you tidy them up by deleting them.  The unshelve dialog has a "Delete" button that you can use to delete a particular shelveset.

Additionally, if you press "Details", then you get to see more information about the shelveset in question - but you also get a couple of other options controlling the behavior that occurs while the unshelve is being performed:-

If you un-check the "Preserve shelveset on server" check-box then your shelveset will be automatically deleted after you successfully unshelve it - which is a quite handy (if slightly hidden) feature.

It's good practice to delete the shelvesets when you no longer need them.  Not only will it get rid of clutter for you, it will also help when another person is trying to unshelve something that you have placed there for them.

October Team System Chat

Just a reminder that the next Team System chat is this afternoon.  Not only is this a great opportunity to talk about the Orcas CTP and the "Data Dude" edition of Team System, but any other questions you have.  The Team Chats are a great way to talk directly to the product group and to influence the direction of the product in the future.

Visual Studio Team System Chat

Join members of the Visual Studio Team System product group to discuss features available in Visual Studio Team Foundation Server, Team Editions for Architects, Developers, Database Pros, and Testers. In addition, discuss what's new in Visual Studio Code Name Orcas September CTP and Visual Studio 2005 Team Edition for Database Professionals CTP 5

Join the chat on Wednesday, October 4th, 2006 10am PDT (6pm BST).

To add this to your calendar, click here.
To see your local time of when this chat is, click here.

So, the day after I get made a Microsoft MVP I do two posts about Java - go figure.  Anyway, today I had one of those moments where you thought you understood something and then realize you didn't and probably a lot of your code that you've written over the past 10 years doesn't work as well as you thought...  All this with the humble String.compareTo method.

Take the following strings:-

  • charlotte
  • Chloé
  • Raoul
  • Real
  • Réal
  • Rico

In .NET, if you want to perform a standard case insensitive, dictionary based comparison between two strings then you can use the String.Compare method.  This does a culture based, case insensitive comparison.

In Java, if you were to do use the Comparable interface which makes use of the standard String.compareTo method to sort a list, you would end up with:-

  • Chloé
  • Raoul
  • Real
  • Rico
  • Réal
  • charlotte

That is because compareTo looks at the unicode value of the character and sorts on that - which for those of us that tend to live in the ASCII range tends to work ok (only that lowercase letters come after the uppercase ones) - however if you have a language that uses one of the many other characters it doesn't work so well.  If you had a language where M comes before A in the alphabet you are totally screwed.

This is were you should be using the java.text.Collator class in Java.  The Collator class does locale sensitive string comparisons - i.e. allowing you to do a dictionary base sort of a set of strings.

Dope.  One of those classes I should have been using for a while...  I thought I was just being dumb, but then a couple of other people I mentioned this to were not aware of the issue so I thought it worth a blog post.

Assert in Eclipse

| 1 Comment

One of the things that Java IDE's have always had over Visual Studio is the ability to target older versions of the VM from the latest and greatest versions of the tools.  For example, I develop in Eclipse 3.2 day to day, but I target Eclipse 3.0 on Java 1.4 for compilations and to debug against.  That way I get errors in Eclipse 3.2 if I try to use a method that isn't in the Eclipse 3.0 object model.  Very useful.  That said - I had a problem recently because my IDE was telling me that I couldn't use the "assert" keyword which was introduced in Java 1.4 (which we require for Teamprise).

The problem was in Windows, Preferences, Java, Compiler.  Source compatibility was set to Java 1.3 and .class file compatibility set to Java 1.2 - I corrected these preferences to make them allow Java 1.4 source and class files and now the assert keyword works just fine.

MVP Award

| 11 Comments

Apologies for being quiet the past couple of weeks.  I've been on vacation with my family and it was great.  This morning has been spent going though the emails I've missed and catching up on what's been happening while I was away (mainly all the TFS SP1 goodies - more on that later as I experiment with it).  Anyway, a piece of very nice news in my inbox is that I am now a Team System MVP

I have to say that I'm incredibly flattered.  Whenever anyone has asked me about it in the past, I've always given the same sort of answers as when you ask a politician if they want to lead the country - something I've secretly wanted but never really thought that I'd contributed enough to the community to receive.  However, to be recognized in this way is very nice - especially when you consider that my "day job" has me coding in Java....  One of the perks of the MVP award is a Team Suite MVP subscription, which means I'll be able to upgrade to the full Team Suite edition rather than the Developer Edition that comes with my work MSDN Subscription.

Anyway, just wanted to let you all know.  It is certainly a great encouragement to keep up the blog posts and to carry on posting at the MSDN forums.  As far as I am aware, I'm only the second MVP who lives in Northern Ireland and the first Team System MVP based in the UK or Ireland - which is nice.  Thanks to the folks who nominated me!

Archives

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