February 2008 - Posts

Picked up a cold on my way home from the DR
Friday, February 29, 2008

I just got back from 10 days vacation, with a cold, which I caught somewhere between the Dominican Republic and Victoria.

The "Pandemic Spread and Airline Travel" map from Infonaut's Map of the Moment shows a map image from NASA, showing flight patternover the USA.

Watch this video to see a 24 hour view of the air traffic over the Continental US – you can see how infectious diseases can be spread, quickly.

by Jade | with no comments
Filed under:
Fun Stuff at the IMF/Geocortex User Conference
Thursday, February 21, 2008
The conference is happening in April, and we’re trying to come up with some unique and/or new things for delegates to do when they’re not nerding out at the IMF/Geocortex User Conference.

Whale watching is always popular, but lots of people have already gone out in previous years. In addition, we’re thinking perhaps adding one or more of the following:

  • trip to Butchart Gardens (to reinforce Victoria stereotypes)
  • kayaking tours (done before, but fun and not done to death)
  • feeding the seals at Fisherman’s Wharf (so close you can smell seal breath)
  • surf lesson at Jordan River (hello waiver!)
  • trip to Botanical Beach (giant trees up to the rugged beach, extraordinary inter-tidal pools)
  • yardwork/chores at the Herle house (as authentic as it gets)

Does anyone have any other ideas? We’re also seeking good evening activities, in addition to the annual group dinner at a local brewpub.

One Step Closer to ArcIMS/ArcGIS Server Feature Parity
Tuesday, February 19, 2008

Geocortex Essentials 1.2.1 is now available, and the demo site has been updated. Here’s a list of some of the new features:

  • Enhanced security/authorization
  • Full support for geoprocessing models
  • Extract Data API (GUI still under development for out-of-the-box deployment, but developers can create tasks that clip and extract data for download now)
  • Field aliasing (i.e. renaming), auto-formatting, inclusion/exclusion
  • Buffer selected markup
  • Feature hyperlinking
  • Upload Shapefiles (which can then be used just like any other layers in the Layer List)

We're heads down developing towards our next release (code name "Crispy Crunch") which will be ready for the ESRI Business Partner/Developer Conference in Palm Springs (mid-March).

by Drew | with no comments
Unit Tests, Exceptions and Agile Development at Latitude
Friday, February 15, 2008

We're nearing the end of our first Agile iteration and things are looking pretty good. Development is proceeding at a brisk pace and a lot of cool new features are being added to Geocortex Essentials. These new features appear to be pretty solid and the existing code-base has held together well. Everyone is writing unit tests and apart from some scheduling issues, things have actually gone quite well.

As many of you know, one of the Agile practices is Test-Driven Development. The idea simple, yet really changes the way you write code. The idea is to write tests in parallel with the feature you are developing. When the feature is complete, all of your unit tests pass and you're left with a high quality feature together with a high-quality set of unit tests. If the tests are comprehensive, the developer can have a high level of confidence that his code is very high quality. 

We organize our unit tests so that we have one test fixture per public class and one test method per public or protected method. For example, if we have a class called DataStore, we would also have a class called DataStoreFixture.  Similarly, if  DataStore has a method called ReadXml, DataStoreFixture would have a corresponding test method called ReadXml. We keep test fixtures in separately compiled assemblies in a subdirectory called Tests, beneath the project containing the classes we are testing. The test project references the project being tested.

We test the coverage of our unit tests using TestDriven.net. Its pretty easy to get to 80% coverage without too much effort but its fun to try and get as close to 100% coverage of possible. In practice, anything over 95% is excellent. To achieve this, we must test all of our code; code that actually does the work, together with any code that throws exceptions. Testing exceptions can be a challenging and can lead to some very repetitive patterns.

One approach to testing exceptions would be to call a method, passing it arguments that induce an exception and wrap that call in a try-catch block. If the exception does not fire, then the test fails. If the methods you are testing have long parameter lists, then you will end with a lot of try-catch blocks. Another method would be to use NUnit's [ExpectedException] attribute. The idea is that you decorate a test method with [ExpectedException] and if that method runs to completion without throwing that exception, then the test fails. This is an interesting solution but it would require writing one test method per exception we are testing which could be quite a large number of methods.

The solution I came up with was to write a method called AssertException. AssertException takes an object, the name of a method on that object, an exception that we're expecting to be thrown, and a set of arguments to pass that object and then asserts that that exception is fired. For example,

AssertException("AddUsersToRoles", roleProvider, typeof(ArgumentException), null, new string[0]);

Here is my implementation of AssertException. It uses reflection to call the method being tested and the params feature of C# to pass that method its parameters.

public static void AssertException(string methodName, Object target, Type exceptionType, params object[] methodParams)
{
    try
    {
        MethodInfo methodInfo = target.GetType().GetMethod(methodName);
        methodInfo.Invoke(target, methodParams);
        Assert.Fail(exceptionType.Name + " expected");
    }

    catch (Exception e)
    {
        if (e.InnerException != null)
        {
            if (e.InnerException.GetType() != exceptionType)
            {
                Assert.Fail(exceptionType.Name + " expected");
            }
        }

        else
        {
            throw;
        }
    }
}

Enjoy.

Unadvised: Software Releases on Valentine’s Day
Thursday, February 14, 2008

I sighed a few weeks back when I was informed that the Essentials team had selected Feb 14 as the release date for Geocortex Essentials 1.2.1. Why? Their commitment is incredible (they’ve been working long hours to hit this target), so I didn’t doubt they’ll get it out the door given the tight timeline. The problem is that they selected Valentine’s Day as the release day, and release days often turn into release evenings.

Though I had nothing to do with setting today as the deadline, you can probably guess at whom their significant others’ will direct their chagrin for being abandoned on Valentine’s Day (evening)… the archetypal whip-cracking CEO. I’m going to have to make up for this somehow, but I don’t think even a complimentary spousal-use Geocortex Essentials 1.2.1 license would help (as outrageous as that sounds).

Latitude Geographics is Selling Chocolate Bars
Wednesday, February 06, 2008

I always thought that code names for software products were kind of cheesy.  A lot of companies use code names internally for describing an upcoming product release, some use them externally.  For example, long before Windows Vista was available information on the next version of windows was coded under "Longhorn".  Code names typically have themes... Longhorn is the name of a bar between the Whistler and Blackcomb ski resorts (Whistler and Blackcomb were code names for Windows XP and Windows 7 AKA "Vienna" respectively).  Seemingly, Microsoft has chosen the "Whistler" theme for it's code names.

Our agile development approach has our development team releasing (either publically or internally) Geocortex Essentials every three weeks.  It has become important to refer to upcoming releases of Essentials; however, the development team wasn't always sure what version number each release would correspond to (for example, should an upcoming release be labelled 1.3 or 1.2.1??).  Alas, in order to accommodate flexibility in choosing version numbers, while still being able to distinctly describe and discuss upcoming releases we have adopted code names. 

Geocortex Essentials code names have assumed the chocolate bar theme; thus, developers are coding heavily towards "Oh Henry".

by Drew | 1 comment(s)
Filed under:
Job opportunities at Latitude
Friday, February 01, 2008

Once again, we're facing a situation where finding the right people is the biggest obstacle to our growth. While the frequency with which we receive high-calibre applications has dramatically increased over the last couple years, we still encounter bottlenecks from time to time (that said, we've been able to hire several great people in the last six weeks and have had to get more office space).

We're especially interested in (and consistently challenged by) hiring junior account managers (a.k.a salespeople). It is unfortunate that so many new graduates have such negative associations with a career in sales. I suppose we've all had unpleasant encounters with salespeople as consumers. I can only speak for Latitude when I state my belief that it is a valuable and honorable profession when approached with a core focus on the best interests of the customer and you needn't ever sacrifice your integrity. At Latitude, our account reps don't just "sell" either... they really do act as technology advisors and our customers seem to like and respect them. I wish I knew how to translate this message into a program that would get new grads to give sales a try that might not otherwise.  Anyway... if you're a new grad, there are lots of possibilities in sales out there at good companies--especially if you're a smart, friendly person who likes and understands technology.

Incidentally, if you know of anyone looking for a GIS/cartography job in the Victoria area, we posted a new position earlier today. 

by Steven | with no comments
Filed under: