How to engage a software development company – Part 1 – Introduction

If there’s one thing that rings true for most organisations investigating custom software development, it’s that engaging with vendors can be a daunting process – you’re committed to your project and want the best possible outcome, so how do you select a vendor that understands your needs and that you will have confidence in to deliver? I’d like to share a couple of guidelines that will assist you in answering these questions and achieving successful outcomes.  The guidelines I’m presenting in this mini-series are designed to give you an insight into the ‘how, when and what’ to ask of vendors to ensure you have consistent, relevant information to compare so you can make an informed choice.

Topics I’ll cover over the coming weeks include:

  1. Being ready to go to market
  2. Selecting suppliers that play in your ballpark
  3. Understanding the software suppliers process
  4. How to specify requirements

In covering the above I’m making an assumption that you’re going to approach a number of suppliers in order to get an idea of their capability and experience in achieving your goal, an idea of what your project will cost to realise, and the timeframe within which it can be achieved.

If you:

  • Are tasked with sourcing a software solution for your business or;
  • Have an idea for a software application, but don’t know where to start or;
  • Are writing an expression of interest (EOI), request for tender (RFT) or any variant of these that involves a formal, structured invitation to suppliers

Then these guidelines will help, and are relevant to you.

How “Just another PC” is about to change your landscape

Right now, we’re on the precipice of what could be a revolution for small to medium business, and I’m very excited about the potential that’s about to be released byMicrosoft’s Surface!

Back in June Microsoft announced ‘Surface’ – their response to tablet computing, currently dominated by Apple’s iPad and a slew of affordable Android powered devices.  ‘Surface’ hardware is tablets running Windows 8, or a trimmed down version designed specifically for ARM processors called Windows RT. In this post I’ll focus on the ‘full’ Windows 8 Surface tablet.

Here’s what’s got me bouncing around like a kid on Christmas morning – the Microsoft Surface is just another PC, in a portable package. Now as underwhelming as that sounds, consider the impact:

  1. All of your existing programs, business applications and software will work on your Windows 8 Surface tablet.  No need to buy apps for a new device or platform, you can already use what you already have because it’s just another PC.
  2. Sure, there’s going to be some new window dressing with Windows 8, but becauseit’s just another pc, you’re already an expert in using it. So is your mum, probably.
  3. Like every other Windows PC in the world, you get access to every one of your files, anywhere.  You don’t need a specific app to copy, move and manage specific file types, and sharing of files isn’t limited to pre vendor configured, currently in favour end points like Facebook and Twitter.  You don’t need a specific app to post MyCatDoingSomethingStupid.jpg to lolcatz.com, because you can access and upload any file, via any browser, to any website.
  4. Like all PC’s made in the last decade, it’s got a USB port. Hello expandable storage, hello external mouse / keyboard, hello Doctor Who TARDIS USB hub, speakers, TV Tuner, game controller and novelty desktop Surface to Air missile launcher toy for the discerning purveyor of cubicle warfare.
  5.  It’s got a keyboard built into the cover.  More on this in a minute.

Now for business this gets even more interesting. Your spread-sheets, databases,SharePoint instance and custom in-house applications are all just as available on a Surface, as they are on any other office PC. Legions of developers world-wide have been developing Windows solutions, add-ons and apps for a very long time, which means that the range of options for selecting an approach that’s appropriate to your need, environment and budget is HUGE. Contrast this with iOS development, which really only has two models – deploy via iTunes – which is great for start-ups, but less so for the SME, or join the iOS Developer Enterprise Program.  Where this misses the point is in the expectation that SME’s will be happy to support two completely different platforms. While the consumer market is proving eager to  ‘go cloud’, businesses still have on-premise infrastructure, standard operating environments, maintenance and update schedules, antivirus, firewalls, VPN’s etc. to manage – to expect the IT department to manage a fleet of devices for one app is asking a lot. With a Surface tablet – it’s just another PC, so the impact is negligible.

Now, back to the keyboard. The iPad is an absolutely wonderful (yes Steve, even magical) way to consume content however it is not as effective a device for producing content. By producing content, I don’t mean creating finger paintings or posting holiday photos to Facebook, I mean the documents, emails, spread-sheets and myriad of other files you create every day in your usual course of business. From a user / computer interaction perspective, gestures are wonderfully expressive when used to indicate a desired action. Swiping a finger to navigate forwards or backwards within a playlist is natural and intuitive, and the ability for the same gesture to behave differently depending on the context in which it’s taken is something that Apple have implemented superbly.  And there’s the crux – gestures need a context within which to work, they cannot be used to create context.  That’s why you can’t gesture an email to your boss asking for next Friday off, you need to make the appropriate gestures at the leave request app, or fall back to the on screen keyboard. This is why we currently have to have an app for that, the app must exist to provide the context, and we have no other choice.

By building a physical keyboard into the Surface’s cover, Microsoft has freed users from having to use apps designed to provide a specific context for a limited set of tasks.  On a Surface, users can do whatever they could do before, just as effectively. So app development on the Surface becomes less about providing a narrow context and more about the value the form factor can bring to your business processes such as mobility, connectivity, location awareness and whatever other peripheral you wish to plug in.

I started this post with a very important qualifier – that is I deliberately espoused the potential for what the surface could bring to the SME market.  Microsoft is renowned for its operating systems, productivity software and desktop applications. Outside of consumer peripherals and the Xbox, developing market leading hardware hasn’t been its key strength.  So while I’m firmly cheering in Microsoft’s corner, they have a lot of ground to cover. In order to succeed, here’s what I think Surface tablets must be:

  • The Surface must be ‘just a PC’ in terms of operating system, connectivity and hardware specifications
  • The Surface must provide a physical keyboard, that is at least as good as a regular, traditional keyboard
  • The Surface must have options for cellular and wireless internet connectivity as well as a GPS receiver
  • The Surface must be able to get through a day on a single battery charge
  • The Surface must be as portable as an iPad

You can do it Microsoft, I’m counting on you.

Creating object hierarchies with LINQ

I’m constantly amazed by the power and simplicity of LINQ.  I love that I can turn a flat table into a  object graph with a couple of view models and a single LINQ query.

Given a repository method that returns a list of Tracks based on the following SQL:

Select Id, Title, Artist, Album, Year, TrackNumber, FilePathName From Track Order By Artist, Album, TrackNumber, Title

We can create a nice hierarchy of  Artists, each with 0 or more albums, of which each may have a number of tracks – with a nice, neat LINQ query:

var artists = _libraryRepository.FetchLibrary()
    .AsParallel()
    .GroupBy(track => track.Artist)
    .Select(group => new Artist(group.Key,
        group.GroupBy(track2 => track2.Album)
            .Select(group2 => new Album(group2.Key,group2)))
   );

And the models:

public class Artist
{
    public string Name { get; set; }
    public IEnumerable<Album> Albums { get; private set; }

    public Artist() { }

    public Artist(string name, IEnumerable<Album> albums)
    {
        Name = name;
        Albums = albums;
    }
}

public class Album
{
    public string Name { get; set; }
    public IEnumerable<Track> Tracks { get; private set; }

    public Album() { }

    public Album(string name, IEnumerabl<Track> tracks)
    {
        Name = name;
        Tracks = tracks;
    }
}

public class Track
{
    public Guid Id { get; private set;}
    public string Title { get; set; }
    public string Artist { get; set; }
    public string Album { get; set; }
    public string FilePathName { get; set; }
    public int? Year { get; set; }
    public int? TrackNumber { get; set; }

    public Track() {}

    public Track(Guid id, string filePathName)
    {
        Id = id;
        FilePathName = filePathName;
    }
}

Got comments?  Tweet me @padgettrowell

On switching from Apple to Android

My thoughts on having recently switched from an Apple iPhone 4 to an Android Samsung Galaxy S3:

  • Being able to plug my Android into any computer, drag and drop media files into the relevant directories then be able to immediately access that content on the phone via the music/video player apps is absolutely freaking wonderful. Good bye iTunes.
  • I miss the visual consistency, simplicity and elegance of the iPhone apps.  By contrast, Android apps seem to favour quantity of features and breadth of configurable options over making simple software that *just works*.
  • I’ve found the IntelliJ / Android development process far simpler  and more intuitive  than the equivalent  iOS / Xcode.  It’s also a lot cheaper, especially when you factor in the Mac Tax.
  • Not being able to uninstall the default ‘system’ (bloatware) apps installed by Telstra and Samsung is ridiculous.  I hope they both address this BEFORE getting sued.
  • The 4.8-inch Super AMOLED HD screen is superb – it’s a real pleasure to watch video content on.
  • Turn-by-turn navigation and offline maps is great – epically the later.  As a motorcycle rider who likes to get  outside of cell service areas, I really appreciate this feature.
  • The default messaging and email apps on the S3 suck.  Still looking for reasonable replacements.
  • I miss Reeder.

If I was to summarise my experience after one week: Being untethered from iTunes is undeniably the biggest benefit of moving to Android.  It’s archaic that users are forced to rely on a desktop application to manage their device for them – especially given the general ‘everything in the cloud’ strategy that’s occurring right now.  Also, Androids open and accessible approach to application development is both it’s greatest strength, and it’s greatest weakness.

 

Many to One relationships with PetaPoco

One small ‘gotcha’ to be aware of with the excellent lightweight ORM PetaPoco is when mapping many to one object references to entity properties.
The following repository call returns a list of Schedule entities. A schedule enitity has two object properties: Category and Resource. So the call to db.Fetch accepts an SQL statement that will return all the entities we’re interested in while correctly mapping the Resource and Category objects.

		       /// Fetches all schedules with a start date greater then or equal to the supplied date for all active resources
       public List&lt;Schedule&gt; FetchAllFutureSchedules(DateTime from)
        {
            // Ensure columns are grouped by table!!!!!
            // the poco parser expects all poco fields to be sequential, after the poco id

            var db = new PetaPoco.Database(&quot;DatabaseConnection&quot;);

            var relator = new ScheduleRelator();

            return db.Fetch&lt;Schedule, Resource, Category, Schedule&gt;(
            relator.MapResources,
            @&quot;SELECT [ScheduleId]
              ,[Title]
              ,[StartDate]
              ,[EndDate]
              ,[Utilisation]
              ,[Resource].[Name]
              ,[Resource].[ResourceId]
              ,[Resource].[IsActive]
              ,[Category].[Name]
              ,[Category].[CategoryId]
              ,[Category].[IsActive]
              ,[Category].[Colour]
	        FROM [Schedule]
	        LEFT JOIN [Resource] ON Schedule.ResourceId = [Resource].ResourceId
	        LEFT JOIN [Category] ON Schedule.CategoryId = [Category].CategoryId
            WHERE
                    [Resource].[IsActive] = 1
                AND (StartDate &gt;= @0 OR EndDate &gt;= @0)
	        ORDER BY [Resource].[Name]&quot;

            , from
            );
        }

I ran into an issue where my entities where not being correctly loaded – properties where either null, or being assigned the wrong value from the database. The issue is with the way PetaPoco delineates the returned data reader field to construct your entity.
To help it out:
– Construct your SQL to keep all the properties for each entity grouped together.
– When specifying the fields for a new entity, don’t specify the primary key first, PetaPoco can get confused as to whether it’s the foreign or primary key.
As a little extra, I’ve included the code to resolve and map two many to one entities as the PetaPoco example only show’s how to achieve this with one .
internal class ScheduleRelator

 {
        // A dictionary of known resources
        Dictionary&lt;int, Resource&gt; _resources = new Dictionary&lt;int, Resource&gt;();
        Dictionary&lt;int, Category&gt; _categories = new Dictionary&lt;int, Category&gt;();

        public Schedule MapResources(Schedule p, Resource r, Category c)
        {
            // Match resource
            Resource aResource;
            if (_resources.TryGetValue(r.ResourceId, out aResource))
                r = aResource;
            else
                _resources.Add(r.ResourceId, r);

            // Wire up objects
            p.Resource = r;

            // Match categories
            Category aCategory;
            if (_categories.TryGetValue(c.CategoryId, out aCategory))
                c = aCategory;
            else
                _categories.Add(c.CategoryId, c);

            // Wire up objects
            p.Category = c;

            return p;
        }
    }

MCPD Certifications

Back in December 2010 I made a concerted effort to complete my MCPD certifications in both Enterprise Application Development and ASP.NET.

So without any further ado:

MCPD Certification

These certifications are less relevant to my current technical/sales orientated role, but I’m still proud in having achieved them and will most likely upgrade to .Net 4.0 in the near future.

Returning a DTO from a one to many relationship

Wrote this neat query the other day.  It queries a 1:M relationship (a make can have zero or more models) and returns a list of tuples, with the third property being a dictionary of makes.  This neatly preserves the make/model relationship and returns the entire hierarchy in one database call.  Thanks to Blair Davidson for the help on this!

		  public IEnumerable<System.Tuple<string,int,Dictionary<string, int>>> SelectAllMakeModelsAsReverseDictionary()
        {
            var session = GetCurrentSession();

            return session.Query<Model>()
                .Where(x => !x.IsDeleted)
                .Select(x => new
                                 {
                                     MakeId = x.Make.Id,
                                     MakeName = x.Make.Name,
                                     ModelId = x.Id,
                                     ModelName = x.Name
                                 })
                .AsEnumerable()
                .GroupBy(x => new {x.MakeId, x.MakeName})
                .Select(x => Tuple.Create(x.Key.MakeName,x.Key.MakeId,x.Select(y => y).ToDictionary(z => z.ModelName, z => z.ModelId, StringComparer.OrdinalIgnoreCase)));
        }

Hello world

This is the first post on my new blog, so HelloWorld().

Custom software development often involves managing client expectations.  As someone who works for a software development company, this is a task I’m reasonably familiar with, so feel it’s a good place to start.

My name is Padgett, and this might be my blog.

This is an experiment for me.  I’m going to start small and see if:

(a) What I write has any value to anyone else and

(b) If I can manage to build an effective blog without having to sink in an inordinate amount of time.

The time issue is a big one for me.  I like the idea of having a blog.  I like the idea of adding value and contributing to the local Perth .NET community.

But I’m just not sure how much of my free time I’m willing to spend doing so.

So this is me testing the water.  I’m going to blog as often as I feel able to.  I’m going to write mostly about software and information technology, but I might slip in a post or two about my other passions (namely anything with an engine) – I haven’t decided yet.  I’d love to get feedback.   I’ll certainly read any and all comments, but I may not always reply, so please don’t be offended if I don’t respond to yours .

I also occasionally tweet, though usually only in response to abuse from my co-workers.  You can find me on twitter.com/padgettrowell

My name is Padgett, and I’m an Apple addict

At least that’s what I think it is.  I mean, only Apple users are masochistic enough to buy the newest iWhatsIts every 12 months regardless of the nature of incremental updates, right?

Like most addicts, my relationship with my drug of choice is complicated.  Take my iPhone, on one hand it satisfies my need to communicate but in doing so I’m often left feeling somewhat frustrated.  I love my iPhone.  It has exactly the right number of hardware buttons in exactly the right places.  I don’t have to think about how to work the phone, I just use it and it does what I want it to do.  This wonderfully polished, absolute ease of use is dubbed by the Apple marketing guru’s as ‘magical’.  And I think it’s deserved.

Apple achieves this magical experience by enforcing consistency on developers, and therein lays my issue.  Apple publishes a set of design guidelines and rules that all app developers must follow should they wish access to the Apple garden, and your app purchasing dollars.  And I can see Apple’s point – to keep the magic, Apple have to control the environment.  And this is what I loathe.  Apple doesn’t just control the environment; they also control the distribution and the market.   This pisses me off to no end.  If I want my phone to whistle Dixie every time I receive an SMS, then I should have appropriate level of access to be able to do so.  If I want to replace mobile Safari with a browser that farts every time a page is loaded, that’s my prerogative.

Someone far funnier than I once said something about how the only thing faster than the speed of light is the speed at which a pizza slice can go from blister-your-mouth-hot to oil-soaked-box-luke-warm.

Well, he was wrong.  The only thing faster than light is the time it takes for an Apple product to go from chic to passé.  And that’s the exact unit of time it take’s Apple to announce its latest iWhatsIt.  In fact, it’s even less time than that because during the lead up to the we-never-actually-know-when-if-or-what-Apple is-going-to-announce, the rumour mill is already in over drive and our deliciously svelte Apple gear starts to lose some of its lustre as we anticipate what’s around the corner.

What sucks, what really gets my goat, ties it to a tree and throws *cough* apples at it is that knowing this, I still want, nae desperately desire a new iPad, knowing there’s a shiny newer one just around the corner.

About a year ago we did some development for a new client who wanted his application on the iPad.  So we purchased a couple of iPads, did a feasibility study and reported back to our client.  Lucky me got to do the study.  Luckier me got to keep an iPad.

Apart from masochistic (for all the about stated reasons) I’ve always considered Mac users to be people with little sense but really great hair.  I’ve never seen the point of a Mac.  Their hideously expensive and underpowered when compared to a PC at the same price point, and the component upgrade route is, well no one ever gets there because by the time an upgrade is required a new version is out and we all know what that means.

Then I started using my iPad.  It was just a little at first.  Some light browsing on the couch if I couldn’t be arsed to get up and go to the PC in my office.   Then I tried iBooks, ditching A. A. Milne for Neal Stephenson.  Before you know it I was over the embarrassment of using my iPad in public and getting my morning blog fix on the train ride into work.  Pretty soon I was using daily, hello Drop Box, hello ABC news, hello Instapaper.

Wifey and I drove from Melbourne to Perth.  An hour (ok, sometimes 1/2 an hour, Telstra’s national coverage is good, but there’s still great swaths of Australia where the Cooee is a far more reliable form of communication)  out of town we’d hit wotif and lastminute to find the best deal’s and reviews for accommodation.  On more than one occasion we had Google Maps navigate us to recently discovered accommodation as our (relatedly new) GPS didn’t have a Scooby.  Shit, now Wifey was using as well.

So December rolls round and I get an email from my boss, “Infrastructure have a big project coming up, please return your iPad because they need it.”  (I say *my* iPad, really it was works as they bought it and were paying the 3G bill, but hey – if you lick it it’s yours right?).

Meh, so what.  It’s just a big iPhone.  I mean, I’m not addicted or anything.

So it’s been just over a month, and I’m in hell.  I’ve looked at the Kindle (nice , but for someone who reads a lot the screen *blinking* at me every time I turn a page may as well carry a warning sticker ‘may induce homicidal tendencies’) and read every review of every tablet that was even hinted at during CES.  I tried a couple of different Android phones (it’s just a small iPad right?) and while I really, really wanted to like them they just didn’t spark anything in me.  There was no shizzle, no amazement, and no magic.

During this last month I’ve realise how much I relied on my iPad.  It got me through 3 exams (I achieved my MCPD Enterprise Application Developer having studying every day for two weeks on my train ride to work), it got us across Australia.  It’s what I’d pull out to show Mom our latest family photos on when we’d go visit.  It was part of my life, and I miss it.

Even knowing that any day a new version’s going to be announced, I still want one.  Knowing the price will drop as soon as the new version comes out, I still want one.  Knowing I’d probably buy the new version as well.  And it’s not just me, Wifey and I nearly went halves on one over the weekend.  I’m still not sure how we avoided that purchase.

I know I’ll cave, I know I’m weak.  It’s just a matter of when.  Please Lord, give me the strength hold out for the iPad 2.

I’ve been 33 days without a fix.  My name is Padgett, and I’m an Apple addict.