Pages

Wednesday, 30 September 2009

Can Distributed Teams be Truly Creative?

As I've mentioned before, I lead a distributed, UK-based development team. We have been using this model for a number of years now and have produced and shipped a number of quality, profitable products.

I spent all of yesterday in the same room as another developer as we blue-sky-brain-stormed-out-of-the-box (!) some solutions for an ongoing problem. What I noticed most was how easily ideas started to flow when we were both just walking around the same home office, sipping coffee, tossing a rugby ball and occasionally glancing at the same screen.

Now, we are an Agile company - and I'm not just paying lip-service to this morning's most fashionable meme. We ship regularly and often, we Scrum every morning and we hold retrospectives after every 4 week sprint. However, are we missing something? Are we missing an environment that creates those sparks of genius that turn a profitable product into a remarkable product?

Working from home has some enormous advantages:
  • No daily commute.
  • Perfect, individual working environment.
  • Flexible hours (being home for the delivery or boiler service).
  • No overtime barrier. It's easy to stop at 6pm, put the kids to bed, walk the dog and dine with your wife then carry on with work immediately after.
  • ... the list goes on.

How, then, do we combine the benefits of home-working with those of being in the same room? My understanding is that teleportation is still some way off. There is also the issue of cost. Do we rent more office space that we can sporadically utilise? That would seem like an unwarranted overhead.

I apologise if you've now read all this way, made a temporal investment in this article and are just waiting for the payback answer... cos there isn't one! Sorry.

In my defence I think my development team will be meeting more regularly and we'll see what that spawns. I will update this post as and when I discover new solutions. Alternatively, contact me with your ideas and we can start building a list of suggestions.

Saturday, 19 September 2009

Microsoft WinQual - An Oxymoron?

Microsoft has a website dedicated to helping partners develop and test quality software that targets their platforms. Unfortunately, they don't seem to have been dog-fooding their own standards.
  1. Their site is not internationalised. I live in the UK and, as such, I would like my dates to be dd/MM/yyyy and my words to have significantly less 'z's, thank you very much.
  2. It has a headline banner stating that the entire site will be offline the 2nd Tuesday of every month for 'future planning'.
  3. If you forget your password it emails your company's administrator asking them to reset it for you. Imagine my surprise when I received an email requesting that I reset the password for myself!
  4. I am currently trying to submit our test results to certify one of our products as 'Compatible with Windows 7'. Unfortunately, "The Windows Quality Online Services Web application is temporarily unavailable. Please try again later."
  5. The site only works with IE6 or higher (no support for Opera, Chrome, Safari or Firefox).
  6. Finally, they provide 64- and 32-bit versions of their self-test software. After spending quite a few hours running through the 32-bit tests (as Virtual PC doesn't support 64-bit OSs!) I was delighted to receive the following message from the website: "This site only supports 64-bit submissions."!
As a small company these acknowledgements are very important in allowing us to play with the 'big boys'. Come on Microsoft, a little help?


Follow up...

To top it all I've just tried adding the tested product to our Gold Partner status to increase our points tally - but it fails. The submission ID does not match their database records. Luckily the WinQual site has a satisfaction survey on the main page, so I thought I fill it out and submit some feedback. Yep, you've guessed it - "Page Not Found".

And finally...

Apparently the reason my partner program won't recognise the submission ID is that it takes a minimum of 15 days for the services to sync with each other. I'm sorry, this is still 2009 isn't it!?

Thursday, 17 September 2009

Why you shouldn't call Abstract Methods from your Constructor

Calling abstract methods from your constructor is bad practice as it denies your concrete class any opportunity to set itself up. This is particularly noticeable in IoC situations (e.g. Unit Testing). Here's an example...

abstract class BaseClass
{
    public BaseClass()
    {
        Setup();
    }

    public abstract void Setup();
}

class ConcreteClass : BaseClass
{
    public ConcreteClass()
    : base()
    {
    }

    public override void Setup()
    {
        // TODO: add setup code here...
    }
}

Well, that will work fine. But what if ConcreteClass is tightly coupled to another class. For instance, it could access the Configuration class...

class ConcreteClass : BaseClass
{
    public ConcreteClass()
    : base()
    {
    }

    public override void Setup()
    {
        string setting = ConfigurationManager.AppSettings["MySetting"];
    }
}

Again, no problems here. However; ideally, we would like to remove this tight coupling by implementing an IoC pattern...

class ConcreteClass : BaseClass
{
    private IConfigurationManager _configurationManager;

    public ConcreteClass()
    : this(new DefaultConfigurationManager())
    {
    }

    public ConcreteClass(IConfigurationManager configurationManager)
    : base()
    {
        _configurationManager = configurationManager;
    }

    public override void Setup()
    {
        string setting = _configurationManager.AppSettings["MySettings"];
    }
}

And this is where the problems arise. The Setup() method will now throw a NullReferenceException because the ConcreteClass's constructor has not been allow to run before its own instance methods have been called!

Unfortunately, there is nothing in the C# compiler or Code Analysis tools (to my knowledge) that will flag this as even a warning.

The solution is to recognise why you need to call the Setup method and before what other event. This normally gives you the opportunity to call it from an OnMyEvent() method.

Tuesday, 15 September 2009

RSS Mashup for VS2008

Having stared at the VS2008 homepage for more than a year now and realised that the RSS content hadn't updated, not once, I finally decided a change was in order. I use my HTC HD mobile RSSHub for all my 'real' news reading and I subscribe to over 70 feeds. VS2008 can handle one - so my options were rather limited!

That is until I discovered xFruits. They offer a blindingly simple mashup facility whereby you can take n feeds and squeeze them into one. The resultant feed itself has its own url. Now my VS homepage subscribes to one feed that contains the headlines for my most read subscriptions. The RSS -> PDF function is pretty cool too!

Simple and fantastic.

Tuesday, 18 August 2009

Domain Names: Use 'Em or Lose 'Em

I have been getting increasingly frustrated by the number of vacant or abandoned spaces on the web that could be put to good use. Just last week I thought of a great idea for a website and also found the perfect domain name. Unfortunately, this had been registered in 2004 but still hadn't had a single page uploaded.

So, here's my shout-out to ICANN to regulate the following:

Let's give domain name purchasers a window of opportunity to do something useful with their site. The first instance of a domain name should only be registerable for a one year period. This aught to be more than sufficient to make use of it. If, after that period, you've done sod-all except hold on to it in the hope that someone will buy it off you; well, you forfeit it. You also can't re-register it.

There are so many people with so many good ideas, but they're being stifled by greedy name-huggers.

Wednesday, 8 July 2009

Current Reading List

These are the books I currently have open (on my desk, on my floor, on the window sill - you get the picture)...
Not enough hours in the day!

Saturday, 4 July 2009

Entity Framework: First Impressions

I have been working my way through Julie Lerman's book 'Programming Entity Framework' (review to follow) in order to evaluate the technology. On the face of it it seemed the perfect replacement for part of our existing solution that leveraged, the rather delapidated, SQLXml.

The concepts and patterns of the model seem absolutely spot on - very encouraging. However...

The EDM UI Designer that Microsoft has shipped is not even Beta 1. It seems that every change / customisation I make to my model is accompanied by a caveat. For example:
  • "Remember that if you make the base class abstract and then extend it you'll receive a compilation error. That's OK."
  • "If you want a '0 or 1'-to-Many relationship, first add it as a 1-Many, then setup your mappings then, finally, change the relationship back. Otherwise the designer breaks."
  • "You'll need to manually edit the SSDL Xml for this to work."
One of the really neat features of EF is the way it will sync with any changes to your underlying data source. Unfortunately, any manual changes you make to the conceptual layer are lost every time you update the model!

Secondly, the automatic code-behind generation leaves much to be desired. I think I read that this can be re-configured, but I shouldn't have to. Each Entity comes with its own Factory method. I would like this in a separate, static class please. I would also like it to instantiate a Builder class to do the work.

Finally, the exceptions. I appreciate that I am new to the framework but the errors (normally relating to Mapping Fragments) require the developer to wade through xml. Not good.

Overall, I want to use this framework but I'm loathed to give it the thumbs up. Hopefully, VS2010 will have a working designer?