Help us understand how you find a software developer and get a free copy of our book

October 17, 2016 Leave a comment

As you may or may not know, we’ve recently published a book that guides people through the software development process.  The book is called “How to know if your software developer is trying to kill you

Now that the book is out in the wild, we need to work out how to advertise it.  We’ve created this quick survey to help understand what people’s first steps are if they have a great software idea.

Click here to fill out the survey now – it will only take a couple of minutes.

To thank you for your time, we’re giving away a few copies of the book – just provide your name and email at the end of the form and we’ll be in touch with the winners at the end of the month.

Categories: General

Using the Microsoft Dynamics CRM Online Web API from your ASP.Net MVC website

August 30, 2016 Leave a comment

The MS Dynamics Web API has a lot of promise, allowing users to authenticate using OAuth2 then granting your application access to their CRM data.  Unfortunately, the documentation provided by Microsoft is misleading at best.

After bashing my head against the wall for about ten hours, I got a response back from an MS developer with the following working solution, which I’ve padded-out and am sharing here to hopefully save somebody else the headache.

Here’s the working code sample, just drop in as a standard ActionResult in your MVC project – no other code is required/involved.

public async Task<ActionResult> GetAccountsFromDynamics()
{// Once you've created your Native Client in Azure AD, you can get the clientID for it
var azureTenantGuid = "***";
var clientID = "***";
var tokenRequestUrl = string.Format(@"{0}/oauth2/token", azureTenantGuid);
// The credentials for the CRM *user* that you are accessing CRM on behalf of
var crmUrl = "";
var userName = "***";
var password = "***";

// Connect to the authentication server
var request = (HttpWebRequest)WebRequest.Create(tokenRequestUrl);
request.Method = "POST";

// Write our request to the request body
using (var reqStream = await request.GetRequestStreamAsync())
var postData = string.Format(@"client_id={0}&resource={1}&username={2}&password={3}&grant_type=password", clientID, crmUrl, userName, password);
var postBytes = new ASCIIEncoding().GetBytes(postData);
reqStream.Write(postBytes, 0, postBytes.Length);

// Call the authentication server and parse out the response
var accessToken = "";
using (var response = (HttpWebResponse)request.GetResponse())
// Proceed interpreting result
var dataStream = response.GetResponseStream();
if (dataStream != null)
var reader = new StreamReader(dataStream);

// The response is returned as JSON, these lines just conver it to a C# object. The format includes our access token:
// Example format: {access_Token: "abc...", scope: "public"}
var json = reader.ReadToEnd();

var tokenSummary = json.FromJson<TokenSummary>();
accessToken = tokenSummary.access_token;

// Now make a request to Dynamics CRM, passing in the toekn
var apiBaseUrl = "";
var httpClient = new HttpClient();
httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", accessToken);
var result = await httpClient.GetAsync(apiBaseUrl + "accounts?$select=name&$top=3");
var accountInfoJson = await result.Content.ReadAsStringAsync();

// You're done!
return Content(accountInfoJson);
Categories: General Tags: ,

Read our new book – How to know if your software developer is trying to kill you

August 29, 2016 Leave a comment

How to know your software developer is trying to kill you.jpgWoohoo!  Eight months in the making, my book is now published and released into the wild.

How to know your software developer is trying to kill you is available from Amazon or you can grab a free electronic copy from our website.

Everything you need to know to get started with software development

The book is a simple guide for people planning to get started with software development.  By the end you should be able to:

  • confidently select a software developer.
  • assess the price your developer is charging.
  • understand the basics of software development.
  • ensure your application is future-proofed and adaptable.
  • “speak geek” and actually understand what your developer is talking to you about.

It’s basically the spiel I give to any new client.  Plus some pictures of bears.


Categories: General

Choosing between open- and closed-source software

This is a pre-release chapter from my upcoming book about developer selection and beginning IT projects – I hope you enjoy it.  For more on the book, or notifications about its release date, please send me a quick message via my website.

Bruce is a chef who is famous for his delicious tomato soup. People flock to his restaurant from miles out of town and naturally he keeps the recipe a closely guarded secret, lest another chef cut in on his business. In this respect, we would call Bruce’s recipe “closed source”, meaning that while we can see the end result, we cannot see how it is made.

Later in life, Bruce decides he’s had enough of the restaurant business retires. Without a restaurant to serve it in, Bruce releases his soup recipe so that other chefs may serve it, or people may even make it at home themselves. Bruce has essentially “open sourced” his recipe.


In a similar way, a lot of modern software is now open source, meaning that anybody (usually another developer) can see exactly how the platform was built. This initially seems like a ridiculous idea (if everybody knows Bruce’s recipe, they will make the soup themselves and his sales will plummet). However the issue is not so cut-and-dried and open-source software has some other compelling benefits for its vendors:

  • open source software fosters a community of trust and transparency amongst its developers
  • other developers (many better than the vendor themselves) will spot and fix bugs and contribute them back to the community
  • technically it is possible for somebody to copy and use the software, so the risk of people doing this is real. But if they do so, their version will become incompatible from the ‘base’ version and they will forego any the aforementioned updates or bug-fixes from the community and/or vendor. So this is actually lower-risk than you might initially think

However, open-source software also suffers from a variety of ailments:

  • you still need a strong governing body to keep the software updates on track and in a consistent direction for the software’s evolution
  • failing that, because the software is contributed to by a wide variety of disparate developers, there is no single accountable entity to address problems when things go wrong
  • in-fighting and personal/political differences amongst members of the open-source community have brought many open-source projects to a standstill

To clarify, when talking about open-source here I do not mean that you open source your software product (that will be just for you). Instead I’m talking about the platform that your developer uses to build your software.

The open vs closed debate has very passionate advocates on both sides, but I don’t think it really matters. So here’s my recommendation to you:

  • open source is usually free (or at least cheaper), but any money you save is minimal compared to other costs in your business
  • open source is touted as having a stronger & more giving community but in my experience there is nothing lacking in any of the ‘paid’ communities. Developers in general are very willing to share their time & expertise, regardless of the platform
  • there are other much more important considerations in selecting a platform, like speed and developer support
  • most systems use a variety of platforms/languages, so you will probably end up using a bit of both anyway

Ultimately I suggest you simply ignore whether a platform is open- or closed-source and evaluate them on their other merits

Categories: General

Meet the star of my new book


Jenny from has found the perfect tone for my new book – How to know if your software developer is trying to kill you.

The illustrations strike the perfect tone – bring fun and simplicity to an otherwise pretty dry subject.  We’re working through the rest of the illustrations now and the book should be ready to go by mid-year.

Remember you can download an early preview from our site.

Categories: General

SQL Server–Always use sp_executesql over exec

April 27, 2016 Leave a comment

Today I was looking through some legacy code and found a loop that dynamically created a SQL string and executed using exec().

A quick check of the execution plans showed that SQL Server was creating a new plan for each loop.

We changed it to use sp_executesql instead.  Because this uses parameterised queries, it can re-use the execution plan each time.

Final result – our routine ran 9 times faster and as a bonus it used about a 1/3 less CPU.  Happy days!

Categories: General

Is your SQL Azure sys.event_log empty?

April 26, 2016 Leave a comment

Yip, mine was too.  The trick is that you have to query on the master database and filter by database_name:

select * from sys.event_log where database_name=’<your db>’

Happy debugging!

Categories: General