# Monday, November 16, 2015
Monday, November 16, 2015 9:39:00 AM (GMT Standard Time, UTC+00:00)
# Monday, October 19, 2015
Monday, October 19, 2015 3:00:40 PM (GMT Daylight Time, UTC+01:00)
# Monday, September 21, 2015
Monday, September 21, 2015 1:02:31 PM (GMT Daylight Time, UTC+01:00)
# Monday, August 24, 2015
Monday, August 24, 2015 9:46:19 PM (GMT Daylight Time, UTC+01:00)
# Saturday, August 22, 2015

Last week, I had a chance to attend, sponsor, and present at the Midwest JS conference in Minneapolis, MN.

I was excited because, I used to do a lot of web development but switched to other technologies a few years ago. During my time away from web development, JavaScript technology has had some amazing advances as many frameworks were created, rose to great popularity and fell out of favor to be replaced by a new framework. I watched from a distance as the web I knew changed from mostly server side code generating HTML to powerful client-side code calling back-end web services and dynamically updating content in the browser. Although my historical experience began with "classic" ASP and continued through ASP.NET Web Forms and MVC, I've spent the past few weeks learning how to build a site with Angular.

This conference featured very little Microsoft technologies and most of the attendees did not development with Microsoft tools. A quick glance around the room revealed more Macs than PCs. I was nervous because I didn't know many attendees and speakers and because I didn't know how they would respond to a Microsoft employee in their midst.

It turns out that I worried for nothing. I met so many people who were interested in hearing about what Microsoft was doing. Our support of open source technologies the past few years really resonated with this crowd and there was a lot of interest in tool like TypeScript.

I created a talk on Microsoft Edge - the new browser that ships with Windows 10 and replaces Internet Explorer. The audience was interested in the speed of this browser (it's a total rewrite of the rendering engine) and with its support of web standards. During Q&A, one attendee expressed frustration that the Edge team had not announced a version for the Mac.

It wasn't long ago that a non-Microsoft conference would have also been an anti-Microsoft conference. But I experienced none of this. Everyone I met kept an open mind about other technologies - including ours. And I learned a great deal from them about the tools and frameworks that they embrace.

I left with a favorable experience of the JavaScript community and a desire to connect with them more. Of course, my education in this area continues as I try to catch up with the advances of the past 4 years, but conferences like Midwest JS help.

Saturday, August 22, 2015 3:48:07 PM (GMT Daylight Time, UTC+01:00)
# Monday, August 17, 2015
Monday, August 17, 2015 9:41:30 PM (GMT Daylight Time, UTC+01:00)
# Monday, August 3, 2015
Monday, August 3, 2015 4:06:00 PM (GMT Daylight Time, UTC+01:00)
# Monday, February 2, 2015
Monday, February 2, 2015 3:31:00 PM (GMT Standard Time, UTC+00:00)
# Monday, November 17, 2014
Monday, November 17, 2014 1:05:00 PM (GMT Standard Time, UTC+00:00)
# Wednesday, October 1, 2014

Here is my interview with Todd Gardner of Track:js, describing his company and how they used BizSpark and Azure to grow.

Wednesday, October 1, 2014 7:24:06 PM (GMT Daylight Time, UTC+01:00)
# Monday, September 1, 2014
Monday, September 1, 2014 10:25:23 PM (GMT Daylight Time, UTC+01:00)
# Monday, December 30, 2013
Monday, December 30, 2013 5:31:02 PM (GMT Standard Time, UTC+00:00)
# Monday, December 16, 2013

Episode 296

Ward Bell on Breeze

Monday, December 16, 2013 10:58:00 PM (GMT Standard Time, UTC+00:00)
# Monday, November 11, 2013
Monday, November 11, 2013 11:05:00 PM (GMT Standard Time, UTC+00:00)
# Tuesday, September 3, 2013


The Google GeoCode API offers a service for retrieving driving directions between 2 addresses.


The service is exposed through a URI. The syntax of the URI is


output is the format in which I want to receive result – either “json” or “xml”. I prefer the simplicity of json.

parameters is an ampersand-delimited list of name value pairs to pass to the API. The parameters I care about are


The starting address


The ending address


”true”, if you want the service to return more than one possible route. Unless I have a reason to provide multiple routes, I prefer “false”


”imperial” to return data in feet and miles; “metric” to return data in meters and kilometers. This should depend on the country where the data is going to be used.


”true”, if I am using a sensor to provide location; otherwise “true”. I don’t own such a sensor, so I set this to false.

Sample Code

Here is a sample URI to request directions from my old office to my new one, returned as JSON data.

http://maps.googleapis.com/maps/api/directions/json?origin=31555 W 14 Mile Road, Farmington Hills, MI, 48334&alternatives=false&units=imperial&destination=26957 Northwestern Highway, Southfield, MI, 48076&sensor=false

This is a nice function to call from JavaScript. I prefer the simple jQuery syntax for making Ajax calls like this.

var startAddress='439 East 31st Street #214, Chicago, IL 60616';

var endAddress='30 North LaSalle St, Chicago, IL 60616’;

var requestUrl = 'http://maps.googleapis.com/maps/api/directions/json?origin=' + startAddress + '&alternatives=false&units=imperial&destination=' + endAddress + '&sensor=false';

url: requestUrl, 
dataType: "json", 
type: "GET", 
data: {}, 
error: function (err) { 
$(#distanceDiv).html("Error calling Web Svc.<br/>Calculate."); 
success: function (data) { 
var distance = data["routes"][0]["legs"][0]["distance"].text; 
$(# distanceDiv).text(distance); 

The code above calls the service; then parses the resulting JSON to retrieve the distance and displays that distance in a DIV with the ID distantDiv. In this example, I hard-coded the 2 addresses, but you could use jQuery selectors to retrieve the address from elements on the page or user input.


Below is part of the Json response to the service call

JSON Results


There are some limitations you should be aware of. I am a cheapskate, so I’m using the free version of this API. With the free version, I can only send 2500 addresses per day. If I try to send more, the service will respond with a status of “REQUEST_DENIED” and no results will be returned.

Also, Google expects you to display the results on a Google Map. I’m not sure how they enforce this, but they don’t allow you to use the Geocoding API to display data on someone else’s map.

Tuesday, September 3, 2013 6:02:00 PM (GMT Daylight Time, UTC+01:00)
# Monday, June 24, 2013
Monday, June 24, 2013 12:47:31 PM (GMT Daylight Time, UTC+01:00)
# Monday, June 3, 2013
Monday, June 3, 2013 7:10:00 PM (GMT Daylight Time, UTC+01:00)
# Monday, September 24, 2012
Monday, September 24, 2012 2:03:36 PM (GMT Daylight Time, UTC+01:00)
# Sunday, August 19, 2012

JavaScript’s popularity proves how useful people have found the language. Novices use it to add simple validations to web forms, while advanced build amazing applications with JavaScript.

Yet, for all its utility, many look at JavaScript with disdain and fear, pointing to dangerous features and to the difficult of dealing with the browser's Document Object Model.

In JavaScript: The Good Parts, Douglas Crockford distinguishes between the good features of JavaScript that make it and elegant and powerful language; and the bad parts that make it dangerous and difficult to understand. Crockford’s message is to use the good parts and avoid the bad parts and stop fearing JavaScript.

According to Crockford, most people misunderstand JavaScript and so they misuse it; then, they complain about the language.

Crockford acknowledges that the designers of JavaScript made some mistakes (global variables, for example), but that there are enough good features of the language to make it appealing to a wide range of users writing a wide range of applications. He notes that JavaScript succeeded as a platform for creating client code for the web – something that that the more powerful Java language attempted and failed badly – and that this proves JavaScript’s power.

Applications will be better and developers happier, notes Crockford, if developers avoid the bad parts of the language. For example, always use the "===" operator, which returns what most users expect because it doesn't do any type coercion. Avoid the confusion of the "==" operator, Crockford recommends.

Crockford's style is concise and straightforward. At fewer than 200 pages, the book has no room for distractions. Regular Expressions are presented and described and examples are shown how to use them. Crockford clearly describes Closures, a feature that is likely new to many developers; and he spells out how callbacks are implemented in JavaScript.

Before reading this book, I was unaware of implied semicolons in JavaScript and whey they can be dangerous. Crockford spelled out the dangers and how to avoid them very clearly.

JavaScript can be a great language if you confine your programs to using the best parts of the language and steer clear of most of the dangerous features. This book will help distinguish the two.

Sunday, August 19, 2012 3:36:23 AM (GMT Daylight Time, UTC+01:00)
# Monday, July 30, 2012
Monday, July 30, 2012 4:57:00 PM (GMT Daylight Time, UTC+01:00)
# Monday, May 28, 2012
Monday, May 28, 2012 10:34:00 PM (GMT Daylight Time, UTC+01:00)
# Friday, May 4, 2012

At Codeslingers last night, someone pulled out some coding Katas. For those who don’t know, a Kata is a coding exercise that is designed to practice your programming skills, rather than to solve a particular business problem. I was handed the classic “FizzBuzz” problem. The assignment:

Create a function that will print the integers from 1 to 100 with the following exceptions:

  • If a number is divisible by 3, print the word “Fizz” in place of that number.
  • If a number is divisible by 5, print the word “Buzz” in place of that number.
  • If a number is divisible by both 3 and 5, print the word “FizzBuzz” in place of that number.

The output should look something like the following:


I started with a C# console application because that is the language with which I am most familiar. It was able to finish the following in under 2 minutes. It took me 5 minutes to write the unit tests.

class Program
    static void Main(string[] args)
        for (int i = 1; i < 100; i++)
            var p = FizzBuzz(i);

    protected static string FizzBuzz(int i)
        if (i % 15 == 0)
            return "FizzBuzz";
        if (i % 3 == 0)
            return "Fizz";
        if (i % 5 == 0)
            return "Buzz";
        return i.ToString();

I only occasionally code in JavaScript, so I tackled that language next. Someone recommended using http://jsfiddle.net/
as an online IDE for writing and sharing JavaScript, so I tried it and liked it. Of course, JavaScript is a dynamic language and one of my big challenges was spelling things correctly without all the help Visual Studio provides when writing in a statically-typed language. In my case, I misspelled the id of a div, which cost me at least 15 minutes. I created the following boilerplate HTML:

        <div id="fizzbuzz"></div>

Then, I used the following JavaScript (plus a bit of jQuery) to output the FizzBuzz results:

for (i = 1; i <= 100; i++) {
    $("#fizzbuzz").append(function() {
        var newLine = i;
        if (i % 3 === 0) {
            newLine = "Fizz";
        if (i % 5 === 0) {
            newLine = "Buzz";
        if (i % 15 === 0) {
            newLine = "FizzBuzz";
        var newDiv = $("<div>").text(newLine);
        return newDiv;

A simple program like this provides a fun way to practice an old language and to learn a new language. Next up, I’ll try this program with F# and Ruby, since I have very little experience with these languages.

Friday, May 4, 2012 12:40:00 AM (GMT Daylight Time, UTC+01:00)
# Monday, January 16, 2012
Monday, January 16, 2012 4:15:00 PM (GMT Standard Time, UTC+00:00)
# Monday, June 27, 2011
Monday, June 27, 2011 7:25:37 PM (GMT Daylight Time, UTC+01:00)