Monday, March 19, 2012

Business Optix blog now live

The blog of my employer Business Optix has gone live. We’ll be posting there as we roll out new features to our web and desktop products, along with tips and tricks to use the current software and any other company news. Keep up to date by signing up to the RSS feed.

Saturday, March 10, 2012

Veloset GPS 600 bike computer review

My first foray into the world of bike computers was a Sigma 1609 device. I quite liked it, since it was simple to use with a clear display, big chunky buttons and a very low price. The only minor downside was a certain amount of faffing around required to get it configured initially since it needed to know how big my wheels were.

But one day on my ride to work, a driver decided it would be a good idea to pull out at a junction without looking to see if anybody was coming and knocked me to the ground in the process. As I dusted myself off at the side of the road I heard a crunching sound and realised me and my bike had successfully got to the road side but my Sigma hadn’t.

So it was time to get another bike computer, since they are quite addictive. Being a map geek, I thought it was time I bought one with GPS, so I could map my routes on my PC. The Veloset GPS 600 caught my eye, since it was probably the cheapest GPS enabled bike computer available.

And it when it arrived first impressions were good, coming in a nice attractive box. But firing it up was disappointing. For some reason it uses a butt ugly font to display text and since it’s only a small device it’s not only ugly but difficult to read as well.

imageAnd things got worse when I fired up the accompanying software, which is possibly the ugliest software I’ve seen in my life. For people used to fondling iPads and the like, this will probably be a grave disappointment. But it does what it needs to do, importing data from the computer and displaying it in various graphs (speed, altitude) and on a map. It does consistently show my average speed as being higher than my maximum speed, which my basic grasp of maths suggests is incorrect, but other than that it seems to function correctly.

Which can also be said for the bike computer itself. It’s not the prettiest device ever but it does what it needs to do, displaying current speed, average speed (this time accurately!), distance covered, altitude, journey time etc. I’m not particularly keen on the touchpad buttons, since it’s easy to press them by accident and it’s impossible to press them at all when wearing gloves. Also on occasion the GPS seems to take a while to switch itself on, so the starts of journeys are sometimes lost.

So in conclusion, it’s the cheapest GPS enabled bike computer available and it shows in the presentation. It’s not a device you’ll fall in love with, but it does do everything it needs to do.

Tuesday, March 06, 2012

Finding a UserPrincipal for an email address

I wanted to let users log in to our application using their Windows user name or their email address. In order to achieve this aim, I needed to get hold of a UserPrincipal from the user’s email address so I could then test the password they entered was correct. It took quite a lot of searching to find the relevant code, so I thought I’d post the pertinent part here.

      PrincipalContext context = new PrincipalContext(
        ContextType.Domain, Environment.UserDomainName);
      
      UserPrincipal user = new UserPrincipal(context);
      user.EmailAddress = "test@test.com";

      // create a principal searcher for running a search operation
      PrincipalSearcher pS = new PrincipalSearcher(user);

      // run the query
      PrincipalSearchResult<Principal> results = pS.FindAll();

      foreach (Principal result in results)
      {
        // do something useful...
      }