clip_image001

The idea for the Global Azure Boot Camp began in 2013. Community developers from all over the world would hold a workshop in different cities on the same day. In fact, I organized and delivered a Boot Camp in the Detroit area that year, before I joined Microsoft.

On Saturday April 18, the 4th annual Global Azure Boot Camp took place in 161 cities around the world. While some cities focused on presentations and others on hands-on labs, all events provided education on Microsoft’s cloud computing platform.

Microsoft Regional Director Eric Boyd and Responsive X organized an event in Addison, IL – just outside of Chicago. Based on feedback, he received from attendees last year, Eric decided to reduce the length of the event to a half day, instead of a full day. The event was free to the public.

Eric kicked off the morning with an overview of Azure.

clip_image002

Next, a representative from Baracuda Networks gave a presentation on Azure security.

I delivered a session on App Services, covering Web Apps, Mobile Apps, Logic Apps, and API Apps.

clip_image004

The only downside to the Saturday event was the number of people who registered and did not attend – over 50%. This was almost certainly due to the fact that the Chicago weather that morning was the nicest it had been in a long time. Still, over 60 people showed up to learn about Azure and cloud computing.

Response from the audience was overwhelmingly positive. Many people stayed after to ask questions about Azure and about BizSpark.



Learn how to use the Microsoft Cognitive Services Face API to recognize faces and the properties of faces within image. This API is based on Machine Learning.

Cognitive Services - Face API



I have a lot going on the next few months. Here is what is confirmed:

On April 9 (today), I will deliver the opening keynote at EnvisionDo: Tech in 2016 at the University of Chicago.

On April 15, I will talk about Azure App Services at the Global Azure Boot Camp in Addison, IL.

Later that same day, I will mentor student hackers at the Spring MadHacks hackathon in Madison, WI.

On Tuesday, April 26, I will present "Adding Image and Voice Intelligence to your apps with Microsoft Cognitive Services" at Geekfest in Chicago.

From April 27-29, I will mentor high school students at the FIRST Robotics competition in St. Louis, MO

On Saturday, April 30, Brian Lewis and I will deliver the opening keynote at the Chicago Code Camp in Chicago.

On May 26 and 27, I will deliver 2 presentations: “Open Source Technologies in Microsoft Azure” and “Adding Image and Voice Intelligence to your apps with Microsoft Cognitive Services” at IT Camp in Cluj-Napoca, Romania.

On June 4, I will be one of the hosts of MVP Open Days in Downers Grove, IL.

On June 9, I will present “Building Powerful Enterprise Apps with Angular 2 and Typescript" at Open Source North in Minneapolis, MN.

On June 15, Shawn Wildermuth will interview me for his “Hello World” podcast in Chicago, IL.

On August 11, I will present "Building a TV show with Angular, Bootstrap, and Web Services" at MidwestJS in Minneapolis, MN.

I am waiting to confirm a few others. Watch this space.


Wolfgang - 220x123 Last year, Security expert Wolfgang Goerlich began recording short videos from the front seat of his car. Each video lasted on only a few minutes and each covered a different topic of IT Security and/or infrastructure.

Now, you can watch many of these videos on Channel 9. This provides not only a different audience for Mr. Goerlich, but gives viewers the ability to subscribe to a video feed and to download different resolutions of the each video and even an audio-only track.

You can find these videos at https://channel9.msdn.com/blogs/stuck-in-traffic.


Microsoft Cognitive Services (formerly Project Oxford) provides a set of APIs for analyzing images, video, speech, and language. Learn how to get started and start developing against these APIs..


Windows Server 2016 will contain support for Containers.

Containers are a method of software virtualization, similar Virtual Machines (VMs). As with Virtual Machines, you can create multiple containers on a single physical machine; and this allows you more flexibility, portability, and efficient use of hardware.

Unlike Virtual Machines, each container does not have to run an entire operating system. Instead, each shares a common kernel operating system.

Because of this, Containers tend to be is much lighter than VMs. One can create folders and files and install applications in a container and those applications will be isolated from other containers - even those on the same machine.

Here are some differences between Containers and Virtual Machines

  • At its lowest level, a Virtual Machine interacts with a virtualized hardware layer, while a Container interacts with an Operating System kernel.
  • A container tends to be much smaller than a Virtual Machine (mostly because it does not require an Operating System in the container itself).
  • The operating system of a container must be the same as the operating system of the computer on which it is hosted (although the host computer can be a VM). The operating system of a VM can be different from that of the machine on which it is hosted.
  • It usually takes less effort to create and configure a container than a VM (again, no operating system to install on a container)
  • Containers start up and shut down much faster than VMs. This makes them ideal for either scaling out new instances. Reboots  are also much faster, of course.

As you can see, most of the differences between Containers and VMs are advantages of Containers. Now that Windows will support both, I expect the popularity of Containers to increase dramatically.
Windows Server 2016 will contain support for Containers.

Containers are a method of software virtualization, similar Virtual Machines (VMs). As with Virtual Machines, you can create multiple containers on a single physical machine; and this allows you more flexibility, portability, and efficient use of hardware.

  • Unlike Virtual Machines, each container does not have to run an entire operating system. Instead, each shares a common kernel operating system.
  • Because of this, Containers tend to be is much lighter than VMs. One can create folders and files and install applications in a container and those applications will be isolated from other containers - even those on the same machine.
  • Here are some differences between Containers and Virtual Machines
  • At its lowest level, a Virtual Machine interacts with a virtualized hardware layer, while a Container interacts with an Operating System kernel.
  • A container tends to be much smaller than a Virtual Machine (mostly because it does not require an Operating System).
  • The operating system of a container must be the same as the operating system of the computer on which it is hosted (although the host computer can be a VM). The operating system of a VM can be different from that of the machine on which it is hosted.
  • It takes much less effort to create and configure a container than a VM (again, no operating system to install)
  • Containers start up and shut down much faster than VMs. This makes them ideal for either scaling out new instances.

As you can see, most of the differences between Containers and VMs are advantages of Containers. Now that Windows will support both, I expect the popularity of Containers to increase dramatically.


Growing up, I was always aware of Conan the Barbarian. I knew of the comics but it was not a title I read regularly; I saw the Robert Howard books in the bookstore, but I passed over them for the stories by Edgar Rice Burroughs; I watched the Schwarznegger movie but did not watch it twice.

Recently, I decided to read the Conan source material. Del Ray has gathered together all of Howard's Conan stories into a 3-volume set: The Coming of Conan the Cimmerian; The Bloody Crown of Conan; and The Conquering Sword of Conan.

Robert Howard wrote dozens of stories of the iconic barbarian. These were originally published in pulp magazines of the 1940s, such as "Weird Tales".

The stories are presented in the order they were written, which matches neither their publication order nor the chronological order of Conan's "life". There is very little continuity to the stories. Conan wanders the world, moving from adventure to adventure. If we order them chronologically, we see Conan as first a lone thief, then a mercenary and a pirate, a warlord, and finally king of the empire he conquers.

Unlike many fantasy characters, Conan exists on our world, but lived during the fictional Hyborian Age, which took place after the destruction of Atlantis, but before most of recorded history. Many of the places to which Conan travels are places that still exist today with different names (Iranistan for Iran, Afghulistan for Afghanistan, Kambulja for Cambodia, and Vendhya for India,Pakistan & Bangladesh). Magicians, gods, demons, and giant deadly creatures were common in these lands during the Hyborian Age.

It is a world marked by wars and brutality, in which wars are common. There are civilizations, but a common theme of these stories contrasts the low morals of "civilized" aristocrats with Conan's own moral code.

Conan is a brutal killer; but he has a strong moral code. In one story, he agrees to kill the master of a beautiful enslaved woman in return for her promise of sex. After fulfilling his end of the bargain, the woman flees to avoid Conan. He finds her (and rescues her from a new threat) but does not hold her to the bargain.

Although Conan uses his violence to further agenda, he has his own code of honor and looks down on those who condone slavery or torture for pleasure.

When reading these stories, one has to deal with stereotypes and imagery that strike many of us as insensitive today. Women serve mostly as props in Howard's stories - scantily-clad spoils of battle who exist to be rescued by Conan - or as hyper sexualized amazons. The black men in these stories are often savage and superstitious; and we hear descriptions of cunning hooked-nose men in turbans. If you can accept these stories are a product of an earlier century, you can enjoy them more.

This volume concludes with some incomplete stories. It's fine to skip these but I read them for completeness.

I enjoyed my journey into the stories of Conan. The action is abundant (if often violent); and Howard provides drama within the confines of stories that typically have a  short and simple plot.


Donovan Brown on DevOps

Comments [0]

March 2016 Gratitudes

Comments [0]

4/3
Today I am grateful that I now have cable TV in my apartment for the first time since moving to Chicago.

4/2
Today I am grateful for breakfast with Tim yesterday.

4/1
Today I am grateful to co-present with my son Tim at Indiana University last night.

3/31
Today I am grateful to attend The McDonald's High School All-American basketball games for the first time.

3/30
Today I am grateful for my first visit to the historic Harold Washington Library.

3/29
Today I am grateful that my son was offered a summer internship yesterday.

3/28
Today I am grateful for Easter dinner with family.

3/27
Today I am grateful for:
-An evening seeing Trevor Noah at the Chicago Theatre
-New clothes and Christina for helping me choose them.

3/26
Today I am grateful for: -Dinner with Dave and Bobbi. -Drinks with Gary and Patty

3/25
Today I am grateful for my new (to me) espresso machine and for the 2 cappuccinos I've had so far this morning.

3/24
Today I am grateful that my TSA Pre-Check status was approved.

3/23
Today I am grateful I was finally able to restore my personal email account yesterday.

3/20
Today I am grateful to see "Love and Information" at the Patinkin Theatre yesterday - my first time seeing live theater in years.

3/19
Today I am grateful for a day in St. Louis, with Nick, Darlene, Kevin, and Henry.

3/18
Today I am grateful for: -a chance to speak at Indy Software Artisans for the first time in almost 2 years. -a visit to my so Nick's home.

3/17
Today I am grateful I was able to unpack a bunch of boxes yesterday and remove some clutter from my life.

3/16
Today I am grateful for an amazing view of last night's lightning storm.

3/15
Today I am grateful for a good afternoon at the gym yesterday.

3/14
Today I am grateful for another Big10 Championship! #GoGreen

3/13
Today I am grateful to attend the St. Patrick's Day parade yesterday in downtown Chicago.

3/12
Today I am grateful for coffee with Tom yesterday.

3/10
Today I am grateful for a sushi dinner, and a walk around the South Loop on a balmy evening.

3/9
Today I am grateful for a surprise gift from my sons.

3/8
Today I am grateful for good dental insurance.

3/7
Today I am grateful for: -A long walk through the city yesterday -Relaxing in this apartment's Jacuzzi last night for the first time.


At the beginning of this semester, Microsoft hired a new Student Partner at Indiana University. A Microsoft Student Partner (MSP) is a college student responsible for helping promote the Microsoft platform on campus. Part of that responsibility involves hosting technical events.

This new MSP invited me to campus to co-present with him. He reserved a room, ordered pizza, invited students, and brought some giveaways. We decided to present on Project Oxford - a set of web services that use machine learning to analyze images, videos, and voice. A day before the presentation, Project Oxford was renamed to Microsoft Cognitive Services, so I had to rush to update my slides and re-test all my demos.

The event was a success. Students studying computer science and related fields attended, students who were curious about the technology attended, and one Informatics professor attended.

For me, it was a rewarding experience - in part because it was a chance to connect with students and to share a cool technology that Microsoft is offering;

But more importantly, I was excited to work with the new Indiana University MSP - Tim Giard.

Tim is my son and a junior majoring in Informatics at IU. This was our first chance to work together professionally and it was one of the highlights of my year.

V__7763


The Microsoft Build conference opened this morning. Some of the announcements were technologies that had been previously announced, but are now more generally available (such as Hololens); Some were brand new technologies, such as Bash on Windows.

I was most excited about the Microsoft Bot Framework that allows you to build intelligent bots that interact with Cortana to act as a personal assistant within your app; and Cognitive Services, which includes many of the APIs included in Project Oxford.

Below are the raw notes I took during the keynote. Please let me know (politely) if you discover any typos.

Edge: Biometric authentication for supporting web sites

Fingerprint login (USAA web site)

Ink

Sticky notes: Cortana recognizes words like "tomorrow" as date in appointments or reminder

Draw lines on a map: Distance automatically calculated.

Add labels to map: Labels stay in place when map is rotated in 3D space

Low latency: Ink from pen

Virtual ruler on screen to draw straight line

Developer

GPU Effects, e.g., Blur background synchronized with touch movement

control

control: Allow users to mark up your screen

Over 1000 new APIs and features

Released today: VS 2015, Update 2

Announced: Bash shell is coming to Windows (native Linux binaries)

Gaming

UWP: Achieve 4k at 60 frames/second

Xbox games running on desktop

  • Take advantage of Windows features
  • Consistent input experience

Xbox developer mode

  • Run, test, debug game on Xbox
  • Preview available today

Cortana on Xbox One

Direct X 12

Hololens

First & only Untethered holographic computer

Hololens shipping today

Releasing app and source code

Apps

  • Holographic anatomy: View internal organs &nerves; collaborate with remote partners
  • Destination Mars by NASA: Virtual tour of another planet

Cortana

Works on lockscreen

Add Cortana to your app.

Insights: When Cortana surfaced in app

Users must give permission for Cortana to their data

Windows, Android, Web Sites, and (soon) iOs

Skype

Interaction with Cortana

Bots: Remembers context from conversation

  • Location of events, friends in locations
  • Bots available today

Skype for Hololens

Microservices

Microsoft Bot Framework

https://dev.botframework.com/

Build conversational bots for your application

Rule-based natural language processing

UI to teach bot to understand your jargon/ terms/ slang

Cognitive Services

22 APIs

https://www.microsoft.com/cognitive-services/

Many of them used to in Project Oxford

Custom Recognition Intelligent Service (CRIS):

  • Understand speech and language
  • Customize speech-to-text

Demo

Smart Phone / Smart glasses app for blind people

Facial recognition and analysis

Read menu, including headings



In the last article, we described the 2-way data binding with the ng-binding directive. In this article, I will introduce the ng-repeat directive.

Recall that a directive is a well-known attribute defined by AngularJS or your AngularJS application that is applied to an HTML element to provide some functionality.

The ng-repeat directive acts in a similar way to foreach loops or other constructs in a programming language. We point ng-repeat to an array of objects and Angular will loop through this array, repeating the HTML contained in the attributed element once for each element in the array.

In the following example, our controller creates an array of "customers" and adds it to the $scope directive, making the customers stateful and available to the HTML. Each customer has a firstName, lastName, and salary property.

var app = angular.module("myApp", []);
app.controller("mainController", function($scope) {
    $scope.customers = [{
      id: 1,
      firstName: "Bill",
      lastName: "Gates",
      salary: 200000
    }, {
      id: 2,
      firstName: "Satya",
      lastName: "Nadella",
      salary: 100000
    }, {
      id: 3,
      firstName: "Steve",
      lastName: "Balmer",
      salary: 300000
    }, {
      id: 4,
      firstName: "David",
      lastName: "Giard",
      salary: 1000000
    }];
}); 

In our HTML, we can loop through every customer in the array by applying the ng-repeat directive to a element, such as:

<tr ng-repeat="customer in customers"> 

Because the array contains 3 customers, the tag and all markup within this tag (including any bound data) will be repeated 3 times. As a result, the user will see 3 rows.

Here is the markup for the entire table.

<table>
  <thead>
    <tr>
      <th>Firstth>
      <th>Lastth>
      <th>Salaryth>
    tr>
  thead>
  <tbody>
    <tr ng-repeat="customer in customers">
      <td>{{customer.firstName}}td>
      <td>{{customer.lastName}}td>
      <td style="text-align:right">{{customer.salary | currency:$USD}}td>
    tr>
  tbody>
table> 

The beauty of this is that we don't need to know in advance how many customers we have or how many rows we need. Angular figures it out for us.

The ng-repeat directive allows us the flexibility of repeating HTML markup for every element in an array.


In the last article, we discussed Angular controllers. In this article, we will add code to a controller to do 2-way data binding.

The $scope object exists to hold stateful data. To use it, we add this object to the arguments of our controller, as shown in Listing 1.

app.controller("mainController", function($scope) {
...
} 

Because JavaScript is a dynamic language, we can create new properties on an object simply by assigning values to those properties. We can maintain state by adding properties to to the $scope object. For example, in Listing 2, we add the FirstName and LastName properties and assign the values "David" and "Giard", respectively.

app.controller("mainController", function($scope) {
  $scope.firstName = "David";
  $scope.lastName = "Giard"; 
}

Now that we have these values assigned, we can bind HTML elements to these properties in our web page, using the ng-bind attribute, as shown in Listing 3.

First: <input type="text" ng-model="firstName" />
<br /> 
 
Last: <input type="text" ng-model="lastName" /> 

We don't need to add the "$scope." prefix because it is implied. In this example, we bind these properties to 2 text boxes and the browser will display the property values.  But unlike the {{}} data binding syntax, this binding is 2-way. In other words, changing the values in the textbox will also change the value of the properties themselves. We can demonstrate this by adding a

element to the page to output the current value of these properties, as shown in Listing 3.

<div>Hello, {{$scope.FirstName}} {{$scope.LastName}}!div> 

When the user modifies the text in the 2 textboxes, the text within the div immediately changes because both are bound to the same properties.

We can do the same with objects and their properties, as in the following example:

JavaScript:

$scope.customer = {
  firstName: "David",
  lastName: "Giard"
}; 

HTML:

First: <input type="text" ng-model="customer.firstName" />
<br /> 

        Last:
By adding and manipulating properties of the $scope object and using the ng-model directive, we can implement 2-way data binding in our Angular applications.


In the last article, I showed you how to set up your page to use Angular and do simple, one-way data binding.

In this article, I will describe modules and controllers.

A module is a container for the parts of an Angular application, including its controllers. This helps provide a separation of concerns, which helps us organize large, complex applications.

We create a controller in JavaScript with the following syntax:

app.controller("mainController", function() {
  ...
});

In the example above, we named the controller "mainController", but we can give it any name we want. The function argument contains the controller's code and we can pass into this function any Angular objects that we want the function to use.

One common parameter to pass to a controller function is $scope. $scope is a built-in object designed to hold stateful data. We can attach properties to $scope and they will be available in both the view (the web page) and the controller.

The ng-controller directive is an attribute that identifies which controller is available to a page or a section of a page. We can add this attribute to any element, but the controller is only available to that element and the objects contained inside it. If we add it to the body tag, it is available to anything within the body, as in the following example:

<body ng-controller="MyController"> 

which points to the MyController controller and makes it available to everything in the page body.

Once I do this, I can write JavaScript in this controller to add and update properties of the $scope object and those properties become available to the affected part of my page, as in the following example:

JavaScript:

var app = angular.module("myApp", []); 
 
app.controller("mainController", function($scope) {
  $scope.message = "Hello";
  $scope.customer = {
    firstName: "David",
    lastName: "Giard"
  }; 

HTML:

<body ng-controller="mainController">
  <h3>
    {{message}}, {{customer.firstName}} {{customer.lastName}}!
  h3>
body> 

In the above example, we use the one-way data binding to display the properties of $scope set within the controller. The output of this is:

Hello, David Giard

This is a simple example, but you can do what you want in a controller and anything created or manipulated in that function is availabe to your web page.

In this article, we introduced Angular controllers and showed how to use them in an Angular application.


AngularJS is a popular framework that takes care of many common tasks, such as data binding, routing, and making Ajax calls, allowing developers to focus on the unique aspects of their application. Angular makes it much easier to maintain a large, complex single page application.

Angular is an open source project that you can use for free and contribute to (if you are skilled and ambitious).

As of this writing, AngularJS is on version 1.x. The Angular team is still actively working on the 1.x version; but they have already begun work on AngularJS 2.x, which is a complete rewrite of the Angular framework. AngularJS 2 is currently in beta and features some different paradigms than AngularJS 1. This series will initially focus on AngularJS 1, which has been out of beta for many months. In the future, after AngularJS is out of beta, I hope to write more about that version.

To get started with Angular 1, you need to add a reference to the Angular libraries.

You can either download the Angular files from http://angularjs.org or you can point your browser directly to the files on the Angular site. In either case, you need to add a reference to the Angular library, as in the examples shown below.

<script 
src="https://code.angularjs.org/1.5.0-rc.0/angular.js">script> 

or

<script src="angular.js">script> 

Angular uses directives to declaratively add functionality to a web page. A directive is an attribute defined by or within Angular that you add to the elements within your HTML page.

Each Angular page requires the ng-app directive, as in the examples below.

<html ng-app>

or

 
<html ng-app="MyApp"> 

The second example specifies a Controller, which is a JavaScript function that contains some code available to the entire page. We'll talk more about Controllers in a later article.

You can add this attribute to any element on your page, but Angular will only work for elements contained within the attributed element, so it generally makes sense to apply it near the top of the DOM (e.g., at the HTML or BODY tag). If I add ng-app to the HTML element, I will have Angular available throughout my page; however, if I add ng-app to a DIV element, Angular is only available to that DIV and to any elements contained within that DIV. Only one ng-app attribute is allowed per page and Angular will use the first one it finds, ignoring all others.

Once you have the SCRIPT reference and the ng-app attribute, you can begin using Angular. A simple use of Angular is one-way data binding. There are several ways to perform data binding in Angular. The simplest is with the {{}} markup. In an AngularJS application, anything within these double curly braces is interpreted as data binding. So, something like

The time is {{datetime.now()}} 

will output the current date and time. Below are a few other examples.

<h3>{{"Hello" + " world"}}h3>
<div>{{5+2+3}}div> 

which will output the following:

Hello World
10

If your controller contains variables, you can use those as well, such as:

<div>{x} + {y} = {x+y}! div>

Although working with AngularJS can be complex, it only takes a small amount of code to get started.

You can see a live example of the concepts above at this link.

In this article, we introduced the Angular JavaScript framework; then, showed how to add it to your web application and perform simple, one-way data binding.


User expectations for web applications have increased exponentially the past few years. Users now expect applications to respond quickly to their interactions and to render appropriately for different size devices. In addition, users have pushed back against using browser plug-ins, such as Flash and Silverlight.

Developers can meet these expectations by writing an application that performs much of its activity on the client, rather than on the server. The default browser client languages are HTML, JavaScript, and CSS. But these are relatively small languages and they were not originally developed with the idea of building large, complex applications.

Enter: Frameworks. A framework is a combination of pre-built components and utilities that sit on top of HTML, JavaScript, and CSS to manage some of the complexity of large applications.

Some frameworks are very specific, such as jQuery which eases the process of selecting and acting on the DOM elements of a browser; and MustacheJS, which provides automatic data binding. And some are very general frameworks, such as Knockout, Ember, Angular, and React, that provide complex functionality for most aspects of your application and allow you to build custom modules of your own.

Of course, the frameworks themselves add overhead - both in terms of learning time for the developer and download time for the user.  For very simple pages, this overhead might not be worthwhile; but for even moderately complex applications, a framework can manage said complexity, making your code easier to maintain, deploy, debug, and test; and freeing you up to focus less on the application plumbing and more on the code that is unique to your application.

Choosing a framework can be overwhelming. You can find a list of hundreds of JavaScript frameworks and Plug-Ins at http://www.javascripting.com/. Some factors to consider when choosing a framework are:

Does it meet the needs of my application

Do you need a do-everything framework or just data binding. Is the User Interface the most important thing or is synchronizing with backend data more important. Each framework has its strengths. Determine what you need; then find the framework that suits you.

How difficult is it to learning

Look for a framework with good documentation and tutorials. Often, ease of learning is a function of your current knowledge. If you are already familiar with the Model-View-Controller pattern, it may make sense to use a framework that implements this pattern.

How popular is it?

This may strike you as a frivolous criterion, but a popular framework will have more people blogging about it; more people answering forum questions; and bugs will get found and fixed more quickly.

Will it be popular next year?

Future popularity is difficult to predict; but it may be more important than current technology. You are likely to keep this framework for a long time - possibly the life of your application and you want your technologies to remain relevant and supported.

Whichever framework you choose, you will learn it best by diving in and beginning your project.


Seth Juarez on Channel 9

Comments [0]

Project Oxford offers a set of APIs to analyze the content of images. One of these APIs is a REST web service that can determine the words and punctuation contained in a picture. This is accomplished by a simple REST web service call.

To begin, you must register with Project Oxford at http://www.projectoxford.ai.

Then, get the key at https://www.projectoxford.ai/Subscription

Thu04-ShowKey
Figure 1: Subscription key

To call the API we send a POST request to https://api.projectoxford.ai/vision/v1/ocr

If you like, you may add optional querystring parameters to the URL, language and detectionOrientation to have the service determine automatically whether the text is tilted. If you omit those parameters, Oxford will make an effort to determine these values on its own. As you might guess, it is faster if you provide this information to Oxford.

In the header of the request, you must provide your key as in the following example:

Ocp-Apim-Subscription-Key:15e24a988a179f13a25aac4713aec800

Optionally, you can provide the content-type of the data you are sending. To send a URL, use

Content-Type: application/json

To send an image stream, you can set the Coneplication/octet-stream orten-Type to application/octet-stream or multipart/form-data.

In the body of POST request, you can send JSON that includes the URL of the image location. Here is an example:

{ "Url": "http://media.tumblr.com/tumblr_lrbhs0RY2o1qaaiuh.png"}

This web service returns a JSON object containing an array of regions, each of which representing a block of text found in the image. Within each region is an array of lines and within each line is an array of words.

Region, line, and word objects contain a boundingBox object with coordinates of where to find the corresponding object within the image. Each word object contains the actual text detected, including any punctuation.

The beauty of a REST web service is that you can call it from any language or platform that supports HTTP requests (which is pretty much all of them).

The following example uses JavaScript and jQuery to call this API. It assumes that you have a DIV tag on the page with id="OutputDiv" and that you have a reference to jQuery before this code.

var myKey="";
var url="http://media.tumblr.com/tumblr_lrbhs0RY2o1qaaiuh.png";
$.ajax({
    type: "POST",
    url: "https://api.projectoxford.ai/vision/v1/ocr?language=en",
    headers: { "Ocp-Apim-Subscription-Key":myKey },
    contentType: "application/json",
    data: '{ "Url": "' + url + '" }'
}).done(function (data) {
    var outputDiv = $("#OutputDiv");
    outputDiv.text(""); 
 
    var linesOfText = data.regions[0].lines;
    // Loop through each line of text and create a DIV tag 
    // containg each word, separated by a space
    // Append this newly-created DIV to OutputDiv
    for (var i = 0; i < linesOfText.length; i++) {
        var output = "";
        var thisLine = linesOfText[i];
        var words = thisLine.words;
        for (var j = 0; j < words.length; j++) {
            var thisWord = words[j];
            output += thisWord.text;
            output += " ";
        }
        var newDiv = "
" + output + "
"
;
        outputDiv.append(newDiv);
    }
}).fail(function (err) {
    $("#OutputDiv").text("ERROR!" + err.responseText);
}); 

The call to the web service is done with the line

$.ajax({
    type: "POST",
    url: "https://api.projectoxford.ai/vision/v1/ocr?language=en",
    headers: { "Ocp-Apim-Subscription-Key":myKey },
    contentType: "application/json",
    data: '{ "Url": "' + url + '" }' 

which sends a POST request and passes the URL as part of a JSON object in the request Body.

This request is Asynchronous, so the "done" function is called when it returns successfully.

            }).done(function (data) {

The function tied to the "done" event parses through the returned JSON and displays it on the screen.

If an error occurs, we output a simple error message to the user in the "fail" function.

}).fail(function (err) {
    $("#OutputDiv").text("ERROR!" + err.responseText);
}); 

Most of the code above is just formatting the output, so the REST call itself is quite simple. Project Oxford makes this type of analysis much easier for developers, regardless of their platform.

You can find this code at my Github repository.

In this article, you learned about the Project Oxford OCR API and how to call it from a JavaScript application.


Speech recognition is a problem on which computer scientists have been working for years. Project Oxford applies the science of Machine Learning to this problem in order to recognize words spoken and determine their probable meaning based on context.

Project Oxford exposes a REST web service so that you can add speech recognition to your application.

Before you can use the Speech API, you must register at Project Oxford. and retrieve the Speech API key

SpeechKey
Figure 1: Speech API Key

The easiest way to use this API in a .NET application is to use the SpeechRecognition library. A NuGet package makes it easy to add this library to your application. In Visual Studio 2015, create a new WPF application (File | New | Project | Windows | WPF Application). Then, right-click the project in the Solution Explorer and select Manage NuGet Packages. Search for and add the "Microsoft.ProjectOxford.SpeechRecognition" package. Select the "x64" or "x86" version that corresponds with your version of Windows.

NuGet
Figure 2: NuGet dialog

Now, you can start using the library to call the Speech API.

Add the following using statement to the top of a class file:

using Microsoft.ProjectOxford.SpeechRecognition; 

Within the class, declare a private instance of the MicrophoneRecognitionClient class

MicrophoneRecognitionClient _microphoneRecognitionClient; 

To begin listening to speech, instantiate the MicrophoneRecognitionClient object by using the SpeechRecognitionServiceFactory.CreateMicrophoneClient method and pass and pass in  the Speech Recognition Mode, the language to listen for, and your Speech Subscription Key.

The Speech Recognition Mode is an enum that can be either ShortPhrase or LongDictation. These are optimized for shorter or longer voice messages, respectively. Below is an example of this creating a new MicrophoneRecognitionClient instance:

var speechRecognitionMode = SpeechRecognitionMode.ShortPhrase;
string language = "en-us";
string subscriptionKey = ConfigurationManager.AppSettings["SpeechKey"].ToString(); 
 
_microphoneRecognitionClient
        = SpeechRecognitionServiceFactory.CreateMicrophoneClient
                        (
                        speechRecognitionMode,
                        language,
                        subscriptionKey
                        ); 

Now that you have a MicrophoneRecognitionClient object, wire up the OnPartialResponseReceived and the OnResponseReceived events to listen for speech and call the API to turn that speech into text.

_microphoneRecognitionClient.OnPartialResponseReceived += OnPartialResponseReceivedHandler;
_microphoneRecognitionClient.OnResponseReceived += OnMicShortPhraseResponseReceivedHandler;

The MicrophoneRecognitionClient object calls the web service frequently - often after every word - to interpret what words has heard so far. When it makes this call, its OnPartialResponseReceived event fires. 

The signature of OnPartialResponseReceivedHandler is:

void OnPartialResponseReceivedHandler(object sender, PartialSpeechResponseEventArgs e)

and you can retrieve Oxford's text interpretation of the spoken words from e.PartialResult. Oxford may revise its interpretation of words spoken at the beginning of a sentence when it receives more of the sentence to provide some context.

After a significant pause, the MicrophoneRecognitionClient object will decide that the user has finished speaking. At this point, it fires the OnResponseReceived event, giving you a chance to clean up. The EndMicAndRecognition method of the MicrophoneRecognitionClient stops listening and severs the connection to the web service.

Here is some code that may be appropriate in the OnResponseReceived event handler:

_microphoneRecognitionClient.EndMicAndRecognition();
_microphoneRecognitionClient.Dispose();
_microphoneRecognitionClient = null; 

I have created a sample WPF app with a single window containing the following XAML:

<StackPanel Name="MainStackPanel" Orientation="Vertical" VerticalAlignment="Top">
    <Button Name="RecordButton" Width="250" Height="100" 
            FontSize="32" VerticalAlignment="Top" 
            Click="RecordButton_Click">
        Start!
    Button>
    <TextBox Name="OutputTextbox" VerticalAlignment="Top" Width="600" 
        TextWrapping="Wrap" FontSize="18">TextBox>
StackPanel> 

The code-behind for this window is listed below. It includes some visual cues that the app is listening and displays the latest text returned from the Speech API.

using System;
using System.Configuration;
using System.Threading;
using System.Windows;
using System.Windows.Media;
using Microsoft.ProjectOxford.SpeechRecognition; 
 
namespace SpeechToTextDemo
{
    /// 
    /// Interaction logic for MainWindow.xaml
    /// 
    public partial class MainWindow : Window
    {
        AutoResetEvent _FinalResponseEvent;
        MicrophoneRecognitionClient _microphoneRecognitionClient; 
 
        public MainWindow()
        {
            InitializeComponent();
            RecordButton.Content = "Start\nRecording";
            _FinalResponseEvent = new AutoResetEvent(false);
            OutputTextbox.Background = Brushes.White;
            OutputTextbox.Foreground = Brushes.Black;
        } 
 
        private void RecordButton_Click(object sender, RoutedEventArgs e)
        {
            RecordButton.Content = "Listening...";
            RecordButton.IsEnabled = false;
            OutputTextbox.Background = Brushes.Green;
            OutputTextbox.Foreground = Brushes.White;
            ConvertTextToSpeech();
        } 
 
        /// 
        /// Start listening. 
        /// 
        private void ConvertTextToSpeech()
        {
            var speechRecognitionMode = SpeechRecognitionMode.ShortPhrase;
            string language = "en-us";
            string subscriptionKey = ConfigurationManager.AppSettings["SpeechKey"].ToString(); 
 
            _microphoneRecognitionClient
                    = SpeechRecognitionServiceFactory.CreateMicrophoneClient
                                    (
                                    speechRecognitionMode,
                                    language,
                                    subscriptionKey
                                    ); 
 
            _microphoneRecognitionClient.OnPartialResponseReceived += OnPartialResponseReceivedHandler;
            _microphoneRecognitionClient.OnResponseReceived += OnMicShortPhraseResponseReceivedHandler;
            _microphoneRecognitionClient.StartMicAndRecognition(); 
 
        } 
 
        void OnPartialResponseReceivedHandler(object sender, PartialSpeechResponseEventArgs e)
        {
            string result = e.PartialResult;
            Dispatcher.Invoke(() =>
            {
                OutputTextbox.Text = (e.PartialResult);
                OutputTextbox.Text += ("\n"); 
 
            });
        } 
 
        /// 
        /// Speaker has finished speaking. Sever connection to server, stop listening, and clean up
        /// 
        /// 
        /// 
        void OnMicShortPhraseResponseReceivedHandler(object sender, SpeechResponseEventArgs e)
        {
            Dispatcher.Invoke((Action)(() =>
            {
                _FinalResponseEvent.Set();
                _microphoneRecognitionClient.EndMicAndRecognition();
                _microphoneRecognitionClient.Dispose();
                _microphoneRecognitionClient = null;
                RecordButton.Content = "Start\nRecording";
                RecordButton.IsEnabled = true;
                OutputTextbox.Background = Brushes.White;
                OutputTextbox.Foreground = Brushes.Black; 
 
            }));
        }
    }
}

You can download this project from my GitHub repository.

In this article, you learned how to use the Project Oxford Speech Recognition .NET library to take advantage of the Oxford Speech API and add text-to-speech capabilities to your application.


In the last article, we showed how to call the Project Oxford Emotions API via REST in order to determine the emotions of every person in a picture.

In this article, I will show you how to use a .NET library to call this API. A .NET library simplifies the process by abstracting away HTTP calls and providing strongly-typed objects with which to work in your .NET code.

As with the REST call, we begin by signing up for Project Oxford and getting the key for this API, which you can do at https://www.projectoxford.ai/Subscription?popup=True.

Em01-GetKey
Figure 1: Key

To use the .NET library, launch Visual Studio and create a new Universal Windows App (File | New | Project | Windows | Blank (Universal Windows))

Add the Emotions NuGet Package to your project (Right-click project | Manage NuGet Packages); then search for and install Microsoft.ProjectOxford.Emotion. This will add the appropriate references to your project.

In your code, add the following statement to top of your class file.

using Microsoft.ProjectOxford.Emotion;
using Microsoft.ProjectOxford.Emotion.Contract; 

To use this library, we create an instance of the EmotionServiceClient class, passing in our key to the constructor.

var emotionServiceClient = new EmotionServiceClient(emotionApiKey);

The RecognizeAsync method of this class accepts the URL of an image and returns an array of Emotion objects.

Emotion[] emotionResult = await emotionServiceClient.RecognizeAsync(imageUrl); 

Each emotion object represents a single face detected in the picture and contains the following properties:

FaceRectangle: This indicates the location of the face

Scores: A set of values corresponding to each emotion (anger, content, disgust, fear, happiness, neutral, sadness, and surprise) with a value indicating the confidence with which Oxford thinks the face matches this emotion. Confidence values are between 0 and 1 and higher values indicate a higher confidence that this is the correct emotion.

The code below returns a string indicating the most likely emotion for every face in an image.

var sb = new StringBuilder();
var faceNumber = 0;
foreach (Emotion em in emotionResult)
{
    faceNumber++;
    var scores = em.Scores;
    var anger = scores.Anger;
    var contempt = scores.Contempt;
    var disgust = scores.Disgust;
    var fear = scores.Fear;
    var happiness = scores.Happiness;
    var neutral = scores.Neutral;
    var surprise = scores.Surprise;
    var sadness = scores.Sadness; 
 
    var emotionScoresList = new List();
    emotionScoresList.Add(new EmotionScore("anger", anger));
    emotionScoresList.Add(new EmotionScore("contempt", contempt));
    emotionScoresList.Add(new EmotionScore("disgust", disgust));
    emotionScoresList.Add(new EmotionScore("fear", fear));
    emotionScoresList.Add(new EmotionScore("happiness", happiness));
    emotionScoresList.Add(new EmotionScore("neutral", neutral));
    emotionScoresList.Add(new EmotionScore("surprise", surprise));
    emotionScoresList.Add(new EmotionScore("sadness", sadness)); 
 
    var maxEmotionScore = emotionScoresList.Max(e => e.EmotionValue);
    var likelyEmotion = emotionScoresList.First(e => e.EmotionValue == maxEmotionScore); 
 
    string likelyEmotionText = string.Format("Face {0} is {1:N2}% likely to experiencing: {2}\n\n", 
        faceNumber, likelyEmotion.EmotionValue * 100, likelyEmotion.EmotionName.ToUpper());
    sb.Append(likelyEmotionText); 
 
}
var resultsText = sb.ToString(); 
 

This will return a string similar to the following:

Face 1 is 99.36% likely to experiencing: NEUTRAL

Face 2 is 100.00% likely to experiencing: HAPPINESS

Face 3 is 95.02% likely to experiencing: SADNESS

You can download this Visual Studio 2015 Universal Windows App project from here.

Full documentation on the Emotion library is available here. You can find a more complete (although more complicated) demo of this library here.

In this article, you learned how to use the .NET libraries to call the Project Oxford Emotion API and detect emotion in the faces of an image.


It's difficult enough for humans to recognize emotions in the faces of other humans. Can a computer accomplish this task? It can if we train it to and if we give it enough examples of different faces with different emotions.

When we supply data to a computer with the objective of training that computer to recognize patterns and predict new data, we call that Machine Learning. And Microsoft has done a lot of Machine Learning with a lot of faces and a lot of data and they are exposing the results for you to use.

The Emotions API in Project Oxford looks at pictures of people and determines their emotions. Possible emotions returned are anger, contempt, disgust, fear, happiness, neutral, sadness, and surprise. Each emotion is assigned a confidence level between 0 and 1 - higher numbers indicate a higher confidence that this is the emotion expressed in the face. If a picture contains multiple faces, the emotion of each face is returned.

The API is a simple REST web service located at https://api.projectoxford.ai/emotion/v1.0/recognize. POST to this service with a header that includes:
Ocp-Apim-Subscription-Key:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

where xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx is your key. You can find your key at https://www.projectoxford.ai/Subscription?popup=True

and a body that includes the following data:

{ "url": "http://xxxx.com/xxxx.jpg" }

where http://xxxx.com/xxxx.jpg is the URL of an image.
The full request looks something like:
POST https://api.projectoxford.ai/emotion/v1.0/recognize HTTP/1.1
Content-Type: application/json
Host: api.projectoxford.ai
Content-Length: 62
Ocp-Apim-Subscription-Key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

{ "url": "http://xxxx.com/xxxx.jpg" }

This will return JSON data identifying each face in the image and a score indicating how confident this API is that the face is expressing each of 8 possible emotions. For example, passing a URL with a picture below of 3 attractive, smiling people

SpartaHack-068-X2[1] 
(found online at https://giard.smugmug.com/Tech-Community/SpartaHack-2016/i-4FPV9bf/0/X2/SpartaHack-068-X2.jpg)

returned the following data:

[
  {
    "faceRectangle": {
      "height": 113,
      "left": 285,
      "top": 156,
      "width": 113
    },
    "scores": {
      "anger": 1.97831262E-09,
      "contempt": 9.096525E-05,
      "disgust": 3.86221245E-07,
      "fear": 4.26409547E-10,
      "happiness": 0.998336,
      "neutral": 0.00156954059,
      "sadness": 8.370223E-09,
      "surprise": 3.06117772E-06
    }
  },
  {
    "faceRectangle": {
      "height": 108,
      "left": 831,
      "top": 169,
      "width": 108
    },
    "scores": {
      "anger": 2.63808062E-07,
      "contempt": 5.387114E-08,
      "disgust": 1.3360991E-06,
      "fear": 1.407629E-10,
      "happiness": 0.9999967,
      "neutral": 1.63170478E-06,
      "sadness": 2.52861843E-09,
      "surprise": 1.91028926E-09
    }
  },
  {
    "faceRectangle": {
      "height": 100,
      "left": 591,
      "top": 168,
      "width": 100
    },
    "scores": {
      "anger": 3.24157673E-10,
      "contempt": 4.90155344E-06,
      "disgust": 6.54665473E-06,
      "fear": 1.73284559E-06,
      "happiness": 0.9999156,
      "neutral": 6.42121E-05,
      "sadness": 7.02297257E-06,
      "surprise": 5.53670576E-09
    }
  }
]

A high value for the 3 happiness scores and the very low values for all the other scores suggest a very high degree of confidence that the people in this photo is happy.

Here is the request in the popular HTTP analysis tool Fiddler [http://www.telerik.com/fiddler]:

Request

Em01-Fiddler-Request

Response:

Em02-Fiddler-Response

Sending requests to Project Oxford REST API makes it simple to analyze the emotions of people in a photograph.



Generating a thumbnail image from a larger image sounds easy – just shrink the dimensions of the original, right? But it becomes more complicated if the thumbnail image is a different shape than the original. In this case, we will need to crop or distort the original image. Distorting the image tends to look very bad; and when we crop an image, we will need to ensure that the primary subject of the image remains in the generated thumbnail. To do this, we need to identify the primary subject of the image. That's easy enough for a human observer to do, but a difficult thing for a computer to do, which is necessary if we want to automate this process.

This is where machine learning can help. By analyzing many images, Machine Learning can figure out what parts of a picture are likely to be the main subject. Once this is known, it becomes a simpler matter to crop the picture in such a way that the main subject remains.

Project Oxford uses Machine Learning so that you don't have to. It exposes an API to create an intelligent thumbnail image from any picture.

You can see this in action at www.projectoxford.ai/demo/vision#Thumbnail.


Thu01-LiveDemo
Figure 1

With this live, in-browser demo, you can either select an image from the gallery and view the generated thumbnails; or provide your own image - either from your local computer or from a public URL. The page uses the Thumbnail API to create thumbnails of 6 different dimensions.

Thu02-LiveDemo-2
Figure 2

For your own application, you can either call the REST Web Service directly or (for a .NET application) use a custom library. The library simplifies development by abstracting away HTTP calls via strongly-typed objects.

To get started, you will need a free Project Oxford account and you will need to sign into projectoxford.ai with a Microsoft account.

For this API, you need a key. From the Computer Vision API page, (Figure 3); click the [Try for free >] button; then, click the "Show" link under the Primary key of the "Computer Vision" section (Figue 4).

Thu03-ComputerVisionApiPage
Figure 3 

Thu04-ShowKey
Figure 4 

To use the SDK, add the Microsoft.ProjectOxford.Video NuGet package to your project: Right-click on your project, select Manage NuGet Packages, search for "ProjectOxford.Video", select the package from the list, and click the [Install] button, as shown in Figure 5

Thu05-NuGet
Figure 5

This adds a reference to Microsoft.ProjectOxford.Vision.dll, which contains classes that make it easier to call this API.

Add the following statement to the top of a class file to use this library.

using Microsoft.ProjectOxford.Vision;

Now, you can use the methods in the VisionServiceClient class to interact with the API.

Create a VisionServiceClient with the following code:

string subscriptionKey = "15e24a988f484591b17bcc4713aec800";
IVisionServiceClient visionClient = new VisionServiceClient(subscriptionKey);

where “xxxxxxxxxxxxxxxxxxxxxxxxxxx” is your subscription key.

Next, use the GetThumbnailAsync method to generate a thumbnail image. The following code creates a 200x100 thumbnail of a photo of a buoy in Stockholm, Sweden.

string originalPicture = @"https://giard.smugmug.com/Travel/Sweden-2015/i-ncF6hXw/0/L/IMG_1560-L.jpg";
int width = 200;
int height = 100;
bool smartCropping = true;
byte[] thumbnailResult = null;
thumbnailResult = visionClient.GetThumbnailAsync(originalPicture, width, height, smartCropping).Result;

The result is an array of bytes, but you can save the corresponding image to a file with the following code:

string folder = @"c:\test";
string thumbnaileFullPath = string.Format("{0}\\thumbnailResult_{1:yyyMMddhhmmss}.jpg", folder, DateTime.Now);
using (BinaryWriter binaryWrite = new BinaryWriter(new FileStream(thumbnaileFullPath, FileMode.Create, FileAccess.Write)))
{
    binaryWrite.Write(thumbnailResult);
}

Below is the full listing in a Console App to generate a thumbnail; then open both the original image and the saved thumbnail image for comparison.

using System;
using System.Diagnostics;
using System.IO;
using Microsoft.ProjectOxford.Vision;
 
namespace ThumbNailConsole
{
    class Program
    {
        static void Main(string[] args)
        {
 
            string subscriptionKey = "15e24a988f484591b17bcc4713aec800";
            IVisionServiceClient visionClient = new VisionServiceClient(subscriptionKey);
 
            string originalPicture = @"https://giard.smugmug.com/Travel/Sweden-2015/i-ncF6hXw/0/L/IMG_1560-L.jpg";
            int width = 200;
            int height = 100;
            bool smartCropping = true;
            byte[] thumbnailResult = null;
            thumbnailResult = visionClient.GetThumbnailAsync(originalPicture, width, height, smartCropping).Result;
 
            string folder = @"c:\test";
            string thumbnaileFullPath = string.Format("{0}\\thumbnailResult_{1:yyyMMddhhmmss}.jpg", folder, DateTime.Now);
            using (BinaryWriter binaryWrite = new BinaryWriter(new FileStream(thumbnaileFullPath, FileMode.Create, FileAccess.Write)))
            {
                binaryWrite.Write(thumbnailResult);
            }
 
            Process.Start(thumbnaileFullPath);
            Process.Start(originalPicture);
 
            Console.WriteLine("Done! Thumbnail is at {0}!", thumbnaileFullPath);
        }
    }
}

The result is shown in Figure 6 below.

Thu06-Output

One thing to note. The Thumbnail API is part of the Computer Vision API. As of this writing, the free version of the Computer Vision API is limited to 5,000 transactions per month. If you want more than that, you will need to upgrade to the Standard version, which charges $1.50 per 1000 transactions.

But this should be plenty for you to learn this API for free and build and test your applications until you need to put them into production.

The code above can be found on GitHub.


Project Oxford is a set of APIs that take advantage of Machine Learning to provide developers with

These technologies require Machine Learning, which requires a lot of computing power and a lot of data. Most of us have neither, but Microsoft does and has used it to create the APIs in Project Oxford.

Project Oxford provides APIs to analyze pictures and voice and provide intelligent information about them.

There are three broad categories of services: Vision, Voice, and Language.

The Vision APIs analyzes pictures and recognizes objects in those pictures.  For example, several Vision APIs are capable of recognizing  faces in an image. One analyzes each face and deduces that person's emotion; another can compare 2 pictures and decide whether or not 2 photographs are the same person; a third guesses the age of each person in a photo.

The Speech APIs can convert speech to text or text to speech. It can also recognize the voice of a given speaker (if you want to use that for authentication in your app, for example) and infer the intent of the speaker from his words and tone.

The Language APIs seem more of a grab bag to me. A spell checker is smart enough to recognize common proper names and homonyms.

All these APIs are currently in Preview but I've played with them and they appear very solid. Many of theme even provide a confidence factor to let you know how confident you should be in the value returned. For example, 2 faces may represent the same person but it helps to know how closely they match.

You can use these APIs. To get started, you need a Project Oxford account, but you can get one for free at projectoxford.ai.

Each API offers a free option that restricts the number and/or frequency of calls, but you can break through that boundary for a charge.

You can also find documentation, sample code, and even a place to try out each API live in your browser at projectoxford.ai.

You call each one by passing and receiving JSON to a RESTful web service, but some of them offer an SDK to make it easier to make that call from a .NET application.

You can see a couple of fun applications of Project Oxford at how-old.net (which guesses the ages of people in photographs) and what-dog.net (which identifies the breed of dog in a photo).

Sign up today and start building apps. It’s fun and it’s free!


SpartaHack 2016

Comments [0]

The auditorium darkened. The music began and a small light appeared at the front of the room; then more. Students on stage danced and waved lanterns on ropes for an impressive musical light show to kick off the 2016 SpartaHack hackathon.

 

Students came from all over the world to attend this hackathon on the East Lansing campus. Over 200 universities were represented among the applicants. In addition to a number of international students studying on American campus, I met students who traveled to the hackathon from India, Russia, Germany, and the Philippines.

AnnaMattDavidBrian My colleague Brian Sherwin arrived in East Lansing the day before the hackathon to host an Azure workshop for 30 students - showing them how to use the cloud platform to enhance their applications. Ann Lergaard joined us a day later and we did our best to answer student questions and help them build better projects. Late Friday night, I delivered a tech talk showing off some of the services available in Azure.

Microsoft offered a prize for the best hack using our technology. It was won be 2 students who built an application that allowed users to take a photo of text with their iPhone and, in response to voice commands, read back any part of that text. The project combined Microsoft's Project Oxford OCR API with an Amazon Echo and its Alexa platform, an iPhone app, and a Firebase database.

A couple other cool hacks were:

  • ValU, an app that used Microsoft Excel to analyze historical stock price data using Excel VBA scripts.
  • Spartifai, which modified a driver, allowing a Kinect device to be used with a MacBook.

JazzBand A hackathon is an event at which students and others come together and build software and/or hardware projects in small teams over the course of a couple days. I attend a lot of hackathons and SpartaHack was one of the better organized that I've seen. Over 500 students spent the weekend building a wide variety of impressive projects - often with technology they had not touched prior to that weekend. The organizers also did a great job of providing fun activities beyond just hacking. A jazz band and a rock band each performed a set for students to enjoy during a break; a Super Smash Brothers tournament was scheduled; and a Blind Coding Contest challenged students to write code without compiling or testing to see if it would run correctly the first time in front of an audience. 

Snowman As sponsors of the event, we tried to provide some fun as well. We gave away prizes for building a snowman and for tweeting about open source technology. We also provided some loaner hardware for students; and we spent a lot of time mentoring students, which resulted in a lack of sleep this weekend.

The MSU campus has changed a great deal since I earned my undergraduate degree there decades ago. It has even changed since my son graduated from there 4 years ago. But it still felt like a homecoming for me.

 

 



February 2016 Gratitudes

Comments [0]

3/6
Today I am grateful to unexpectedly run into Jody​ and David in Chicago yesterday.

3/5
Today I am grateful for new shelves and less clutter in my apartment.

3/4
Today I am grateful for a home-cooked dinner last night.

3/3
Today I am grateful for dinner last night with Kevin.

3/2
Today I am grateful for:
-an overwhelming number of kind messages on Facebook yesterday.
-a birthday lunch with Chris in Grand Rapids yesterday.

3/1
Today I am grateful for my first visit to ann arbor, MI since I sold my house, including: -A personal tour of The Forge by Jeeva -Coffee with Velichka -A great crowd to attend my Azure Mobile Apps talk at Mobile Monday.

2/29
Today I am grateful to the SpartaHack organizers and hackers who contributed to a successful hackathon this past weekend.

2/28
Today I am grateful that this parking ticket was thrown out by the local police.

2/27
Today I am grateful for a day in East Lansing, MI and at Michigan State University.

2/26
Today I am grateful for a good crowd at our Azure Workshop last night at MSU.

2/25
Today I am grateful for the technology that allows me to watch TV and movies when and where I want.

2/24
Today I am grateful to Michael, Chris, Chris, and Murali for helping make yesterday's Cloud Camp a success by bringing real world experience to the presentations.

2/23
Today I am grateful to be able to ride my bike in February in Chicago.

2/22
Today I am grateful to the organizers and participants at HackIllinois who made this weekend's hackathon so successful.

2/21
Today I am grateful to Vanessa, who brought me espresso yesterday each time my energy ran low.

2/20
Today I am grateful for the hundreds of students who came to my Azure talk last night that I re-wrote yesterday afternoon.

2/19
Today I am grateful for this excellent and unexpected moving gift from Betsy

2/18
Today I am grateful for unsolicited praise from a co-worker yesterday.

2/17
Today I am grateful for an unexpected call from my cousin Kevin yesterday.

2/16
Today I am grateful for dinner with Christina last night.

2/15
Today I am grateful for a pristine blanket of snow covering downtown Chicago this morning.

2/14
Today I am grateful for Nyquil, Dayquil, and a Neti Pot.

2/13
Today I am grateful for finally paying off some sleep debt.

2/12
Today I am grateful for: -Lunch yesterday with Matt -A chance to present to a group of University of Chicago students

2/11
Today I am grateful for: -My first day with a personal trainer at the new gym -Attending Founder Institute graduation

2/10
Today I am grateful for my first game at Purdue's Mackey Arena.

2/9
Today I am grateful for the help I received yesterday unpacking dozens of boxes from my move.

2/8
Today I am grateful for an excellent week in Seattle.



semjs-large When I lived in Michigan, I was a regular attendee of the Southeast Michigan JavaScript meetup – a local user group that attracted close to a hundred attendees each month and excellent speakers from all over the country.

One thing I admired about this meetup is their habit of recording meeting presentations. 

Those recordings are now available on Microsoft’s Channel 9 site. You can view dozens of these presentations at https://channel9.msdn.com/Blogs/semjs.

In the past 2 weeks, over 50,000 people have watched these videos on Channel 9.

Below are some of the more popular presentations:

 
 
 


I spent years as a software consultant and I wrote a lot of web applications during that time.

I remember when I first discovered Active Server Pages  (which we now call "Classic ASP") and I remember how excited I was by this technology. It empowered me to write dynamic applications that the whole world could see.

When Microsoft introduced ASP.NET, I quickly embraced it and when ASP.NET evolved to MVC, I was excited to move to this new paradigm.

I even wrote a bit of JavaScript, enhancing my web applications with client-side validation and interactivity. I wrote even more JavaScript after discovering how jQuery made the DOM manipulation easier to write, debug, and maintain.

But, about 5 years ago, I stopped writing web applications. It wasn't because I disliked anything about them; it was only because my customers were looking for different solutions. So, for a few years, I wrote middleware services and web services and rich client applications and I built databases and I set up continuous integrations systems and I barely looked at web development.

But Web Development technologies did not stand still; if anything, they changed faster than almost any other area of software.

Web Development has moved largely from the server to the client. Interactions that were once handled by a form post and full page refresh are now done using Ajax calls to a web service and client-side DOM manipulation. An asynchronous callback from the server to client triggers a JavaScript function to update elements on the page, eliminating the need for a disruptive repainting of an entire page.

The user experience of a Single Page Application tends to be far superior to the older multi-page applications, so users are demanding more and developers are now writing large, complex applications that run almost entirely inside a browser.

JavaScript wasn't designed with this complexity in mind, so a number of JavaScript frameworks emerged to help developers manage this complexity. These frameworks take care of things like data binding, DOM manipulation, input validation, and separation of concerns, freeing developers to focus their efforts on business logic and other features unique to their own applications.

These frameworks help, but they come at a cost. It takes time to learn a new framework and each framework has its own set of rules and idiosyncrasies.

Even more challenging is the speed at which these frameworks are released. A year after the popularity of ember.js and backbone.js peaked, developers began flocking to Angular.js. Last year, Angular seemed to lose ground to React.js. It's hard to tell what will be the next hot JavaScript framework (Angular 2.0? Aurelia? Something else?), but the rate at which new frameworks appear is accelerating.

Of course, it is not practical to re-write every application every year, simply because you discover a new framework - even one with advantages over your existing framework of choice. And most of us don't have the time to become familiar with a new framework every few months. We have to balance the increased productivity of a new framework against the time spent learning (as opposed to building).

This is the world in which I now find myself as I return to Web Development after a half decade absence. Everything has changed and continues to change at a startling rate.

In many ways this constant innovation is exciting and energizing. But it can also be overwhelming as I try to select the appropriate tools from a plethora of options and as I spend the time and effort learning how to use these tools.

meerkats I feel like I'm in a science fiction movie where the hero departs the Earth at light speed; then returns to discover the planet is ruled by talking meerkats: All the rules have changed while I was gone and I need to adapt. Quickly.

The approach I've taken is to pick a JavaScript framework, learn it, and build an application with it. I chose Angular to start - partly because I had heard good things about it and partly because its popularity ensured I would be able to find samples, tutorials, videos, and other reference materials to assist me. Next, I'll rebuild this functionality in ReactJs, followed by some other framework, until I have a feel for the paradigms involved in JavaScript development and for the relative strengths of each framework.

You can track my progress at https://github.com/DavidGiard/tvdg and on this blog.

So far, I'm enjoying the ride.



At CodeMash last month, I was interviewed for Channel 9 about Azure Mobile Apps.

You can watch the interview below:



January 2016 Gratitudes

Comments [0]

2/7
Today I am grateful for yesterday's Hackathon.

2/6
Today I am grateful for my first time recording in the Microsoft Channel 9 studios.

2/5
Today I am grateful for yesterday's highlights:
-Coffee with Suzanna
-Lunch with Glenn
-TechReady party at Century Link Field

2/4
Today I am grateful for lunch with Tim yesterday.

2/3
Today I am grateful for dinner last night with Ted and his family.

2/2
Today I am grateful for a rare evening, hanging out with much of my team in-person.

2/1
Today I am grateful for an evening watching Improv comedy last night.

1/31
Today I am grateful I was able to finally make it to Seattle last night.

1/30
Today I am grateful for lunch with Nick yesterday.

1/29
Today I am grateful for my first ever Illinois basketball home game at Assembly Hall.

1/28
Today I am grateful for coffee with Chris yesterday.

1/27
Today I am grateful to the neighbor who stopped by while I was moving yesterday and offered to go grocery shopping for me.

1/26
Today I am grateful for lunch with Kristen yesterday.

1/25
Today I am grateful for the ribs at Twin Anchors.

1/24
Today I am grateful for the Microsoft Holiday Party at the Mid-America Club high above Chicago last night.

1/23
Today I am grateful for coffee with Manohar yesterday.

1/22
Today I am grateful that Marc, my personal trainer is still working with me, even though we were supposed to finish in December.

1/21
Today I am grateful that my calendar is mostly clear the next 2 days, so I can get some actual work done.

1/20
Today I am grateful for dinner last night with Paul and Jeremy. .

1/19
Today I am grateful I was able to find the packages this morning that FedEx lost yesterday.

1/18
Today I am grateful for Dr. Martin Luther King, Jr., who confronted hatred, violence and racism; and responded with peace and the word of God.

1/17
Today I am grateful for all the independent coffee shops in Chicago.

1/16
Today I am grateful that the story of my friend Bill was told during an executive meeting with the Microsoft CEO yesterday.

1/15
Today I am grateful for a chance to use the new MTC studio for the first time.

1/14
Today I am grateful to chat with Becky last night.

1/13
Today I am grateful for dinner last night with Adam at the Old Town Pub.

1/12
Today I am grateful to all the guests and viewers who made it possible for #TechnologyAndFriends to reach 400 episodes.

1/11
Today I am grateful for: -The strangers who helped push my car out of a snow bank yesterday. -Watching my first game at IU's Assembly Hall.

1/10
Today I am grateful for an afternoon and evening with my son Tim.

1/9
Today I am grateful to Brian Prince and the other organizers of #CodeMash, who worked so hard to put on another excellent conference this week.

1/8
Today I am grateful for: -all those who helped us build toys for special needs children yesterday. -a party at a water park last night.

1/7
Today I am grateful for an excellent steak dinner last night with friends, courtesy of Betsy.

1/6
Today I am grateful that Best Buy exchanged my broken SD card, even though I didn't have the receipt.

1/5
Today I am grateful to see so many old friends last night in Sandusky - many for the first time in a long time.

1/4
Today I am grateful for this large latte that Sarah just bought me.



My Common Git Commands

Comments [0]

I admit that I am a novice when it comes to Git. But I recognize the importance of this version control system, so I documented the most important commands.

Git is a distributed version control system, so it is necessary to commit changes to a local repository (a repository on your local computer) before pushing those changes to a central repository that can be shared by others.

Commands

My needs are simple. In the vast majority of cases, I want only to get the latest code, make my changes, save them to a local repository, and share those changes with others. Git contains a lot of commands, but the following git commands suffice for most of my needs:

  • git init
  • git config
  • git add .
  • git pull
  • git commit
  • git push

Here is a brief description of each command:

git init

Intialize an empty Git repository

git config

Store information, such as username and email address in a local config file, so you don't need to re-type it later.

git remote add

Associate the local git repository with a remote repository

git add

Adds files in the current folder to the git repository

git commit –m “Comment about change”

Commits changed files to the local repository. The “-m” switch allows you to provide a comment describing the code you are committing.

git pull repositoryname branch

Retrieves code from the remote repository and merges it with your local code

git push repositoryname branch

Pushes any changes from your local repository to a central repository

Workflow

My usual workflow is below. It assumes my code is in the local directory c:\development\MyProject and that the remote repository is named “myproj”.

Starting a new project

At github.com, create a new repository

cd \development\MyProject
git init
git config --global user.name "David Giard"
git config --global user.email djgiard@hotmail.com
git remote add origin https://github.com/DavidGiard/nameofmynewrepository.git
git add .

git commit -m "Initial revision"
git push origin master 

After I make a change and test it and it seems to work:

git pull origin master
// Test that the application still works after pulling and merging other developers’ changes
git add .
git commit -m "My change"
git push origin master



I moved to Chicago in 2014. Although I had spent a lot of time in this city prior to my move, much of Chicago was a mystery to me. I knew a few square miles of the Loop and the area just to north of the Loop; and I was sure I would become familiar with Old Town, where I rented an apartment.

But Chicago has 77 Community Areas and over 200 neighborhoods. And I knew little or nothing about most of them. I wanted to get to know them better.

My first thought was to take some time driving around the city - either randomly or in an organized pattern, but that would have given me only a view from my car and no taste of the actual neighborhoods, so I rejected this idea.

Heritage General Store

One day, I happened upon a list of the best coffee shops in Chicago.  Those who know me, know my fondness for fine coffees and will not be surprised that I was drawn into this list.  I formed a plan.

I decided to visit each coffee shop on the list and use this journey as a way to explore the neighborhoods of Chicago. Every cafe except Hard Boiled Coffee offered a latte on its menu, so that’s what I ordered. Sometimes I accompanied the caffeine with food. Mostly I went alone, but my brother Dan and I visited 2 places in Pilsen when he was visiting from Australia. I also visited a few places that were not on the list but that were close to my home or where I happened to be on a given day.

Kristoffer's

The coffee shops themselves were just a means to an end. My goal was to see the city.  While visiting each cafe, I was able to also visit a new neighborhood and absorb its charm. I experienced the family atmosphere of Ravenswood and the bustle of Wicker Park. I spent time walking around the Mexican culture of Pilsen and the stylish area of Boys' Town. I found areas filled with artists, with rushing businessmen, and with working class people.

The Perfect Cup

As for the cafes themselves, the decor ranged from the simplicity of Big Shoulders Coffee to the hodgepodge of Jackalope Coffee and Tea. A giant cat painted on a garage door looms over the backyard of Dark Matter Coffee at the Star Lounge, while I found a man repairing a bicycle in the back of the Heritage General Store. I don't have a favourite coffee or cafe, but I will say that all were good and I would recommend any of them.

Dark Matter Coffee at Star Lounge

If you decide to make this same journey, be aware that 2 of the coffee shops on the list (Bad Wolf Coffee and Knockbox Cafe) have closed and that Hard Boiled Coffee now exists only inside the Horse Thief Hollow Restaurant in Beverly.

Ipsento

And I feel now like I know Chicago a little bit more for having experienced her neighborhoods.

I'm still deciding what my next urban journey will be. I may explore the top Chicago Style Hot Dogs.

More photos



CodeMash 2016

Comments [0]

CodeMash2016-03  CodeMash2016-59

For me, CodeMash is like a family reunion.

CodeMash2016-46 Even though the event has grown to 2500 attendees, I still look forward to seeing people that I've got to know at previous CodeMashes - many of them have been coming every year.

CodeMash2016-83Sure, there are over 200 great sessions and I was proud to be asked to deliver one of them ("A Hitchhiker's Guide to Azure Mobile Apps"); and there are plenty of great workshops and I was pleased to help out at a couple of those presented by my colleagues; and there were sponsors (including Microsoft) happy to share information about their company and talk with potential customers or recruits or just about anyone; and there were numerous activities organized by volunteers, sponsors, and others, including cocktail parties, charity events, a record-breaking Pong game (the Guinness Book folks were there to confirm this), and a game room, and a jam session, and... well, you get the picture.

CodeMash2016-52 But, for me, the conversations with speakers and attendees are what make an event special. And CodeMash is even more special to me because I was attending for the 9th consecutive year. I still kick myself for declining an invitation to the first CodeMash. I learn so much from these conversations and there are so many experts to learn from at this event. I worked as a sponsor at the Microsoft booth for most of the event, so people were coming to me to talk. CodeMash2016-22 Highlights of the week included:

  • A charity event organized by Microsoft in which attendees adapted toys so they could be used by special needs children. Over 100 participants adapted dozens of toys.
  • A conversation with Mark Miller about UX design principles
  • My own session, for which I received some positive feedback.
  • The CodeMash Factory, where numerous people came to learn about and hack on IoT and other topics and build some amazing projects.

CodeMash2016-01 This was the 10th anniversary of CodeMash and it shows no signs of slowing down. It was an excellent way to kick off 2016.

 

More photos


Recently, I chatted with Oisin Kim, CEO webdoctor an online prescription and medical service. We talked about Azure and BizSpark and their market.

You can watch the interview below.


2015 in Review

Comments [0]

2015 was the year my son Nick completed his Masters degree at the University of South Florida, He is now the Director of Basketball Operations at Southern Illinois University - Edwardsville. I was able to attend 2 SIUE games in December - at Wisconsin-Milwaukee and at Northwestern (both losses by the Cougars).

2015 was the year my son Tim decided to pursue Informatics - a field of applied Computer Science - as a major at Indiana University. He is currently halfway through his third year of college.

2015 was the year I finally got serious about my health. It had been years since I had a medical checkup so I scheduled one, along with a long-overdue colonoscopy. I had not been to the dentist since the Reagan administration so I scheduled a checkup and a series of teeth cleanings. Miraculously, I had no health issues and only one small cavity. The doctors did not point it out, but I was aware that I had been steadily gaining wait over the past few years. So I began a serious exercise program and cut my calorie intake dramatically. As a result, I lost about 45 pounds and I've kept it off for 4-5 months now. I hired a personal trainer and worked with him to increase my stamina and core strength and I began riding my bicycle all over downtown until the weather dropped below freezing.

2015 was the summer I finally sold my house in Michigan, closing an unpleasant chapter in my life. My drivers license now reads "Illinois" and I have very nice home in urban Chicago. More importantly, for the first time in over a decade, I was able to choose where I want to live.

2015 was the year that my friend Jay lost his wife to an automobile accident and my friend Bill lost his life to cancer. It was also the year my cousin Sharon successfully made it through her cancer treatments.

2015 was a busy year for me professionally. I delivered well over 100 presentations at user groups, conferences, universities, and startup incubators; mentored at 7 student hackathons; held monthly office hours at 2 startup incubators; staffed the Office 365 booth at the Ignite conference; and attended countless user group meetings. I delivered 9 Cloud Camps and 14 Dev Camps during the year. I traveled around the country from Miami to Seattle to San Diego. I made my first trip ever to Alabama when I spoke at the DevSpace conference in Huntsville. I delivered 2 keynote presentations: One at Detroit Dev Day at Cobo Hall and one at GR DevNight in Grand Rapids, MI.

2015 was the year I accelerated my practice of producing online videos. I released a new episode of Technology and Friends ever Monday (Episode 400 aired in early 2016) and I recorded and released 15 DevRadio episodes; I also began a new series - GCast - featuring short educational screencasts.

2015 included a trip to Europe. In May, I flew to Romania to speak at the IT Camp (my second time speaking at the this conference); then to Stockholm, Sweden to speak at DevSum. I spent a few extra days in Stockholm visiting friends and exploring the region. This is by far the farthest north I have ever been. Although most days were partly cloudy, the sun set after I went to bed at night and rose before I awoke in the morning. I highly recommend a visit to Stockholm.

2015 was an excellent year for my favourite sports teams - the Michigan State Spartans. Both the basketball team and the football team advanced to the national Final Four - an unexpected and amazing accomplishments. I was blessed to see a few games, including the Big 10 Championship football game in Indianapolis last month.

In 2015, I continued my practice of beginning each day thinking of something for which I am grateful.

It's hard to believe 2015 consisted of only 12 months. I packed a lot into this time. On the other hand, it feels like I wrote a retrospective of 2014 just a few weeks ago. 2016 is beginning strong. I've already attended one excellent conference and I have some adventures planned for the first month. I approach this coming year with much optimism and much anticipation.




December 2015 Gratitudes

Comments [0]

1/3
Today I am grateful for unbound optimism for the coming year.

1/2
Today I am grateful for the progress I made on my software project yesterday.

1/1
Today I am grateful for an amazing season by the Michigan State Spartans football team. ‪#‎GoGreen

12/31
Today I am grateful for 2015 - all the good times and all the challenges and opportunities to learn and become better.

12/30
Today I am grateful for a hot tea in a warm room on a cold morning.

12/29
Today I am grateful that Matt and Tim made it back to Michigan yesterday, despite the bad weather and hazardous road conditions.

12/28
Today I am grateful for a couple days in Chicago with my son Tim and my nephew Matt.

12/27
Today I am grateful for a visit to Shedd Aquarium yesterday with my son and my nephew.

12/26
Today I am grateful for Christmas with my family.

12/25
Today I am grateful for Christmas Eve dinner with Nick and Tim last night.

12/24
Today I am grateful to re-start my Personal Trainer sessions after a long hiatus.

12/23
Today I am grateful for a morning exploring Chicago's South Loop yesterday.

12/22
Today I am grateful to those who donated over $800 to the Fink family in the first couple hours the donation page was online.

12/21
Today I am grateful to win a bottle of wine at a Christmas party raffle last night.

12/20
Today I am grateful for a rare day of relaxing and doing almost nothing.

12/19
Today I am grateful for: -Seeing "The Force Awakens" yesterday morning. -Watching a 4-overtime victory by the Pistons last night at the United Center.

12/18
Today I am grateful for the empathy shown by friends, colleagues, and strangers.

12/17
Today I am grateful to know William Fink as a friend and a colleague and that I had a chance to spend time with him the last few months of his life.

12/16
Today I am grateful for inspiration and education from those around me.

12/15
Today I am grateful to be able to ride my bike in the middle of December. In Chicago!

12/14
Today I am grateful I live in a neighborhood with beautiful churches.

12/13
Today I am grateful for dinner with Kate last night.

12/12
Today I am grateful that my car is now fixed.

12/11
Today I am grateful to J. for inviting me to speak at GRDevNight in Grand Rapids and allowing me to stay at his house last night.

12/10
Today I am grateful for: -A chance to teach young children to code yesterday -A holiday party at 1871 last night

12/9
Today I am grateful for God's grace that shines on me every day.

12/8
Today I am grateful for dinner with my team last night.

12/7
Today I am grateful to arrive home safely yesterday morning after driving all night.


Eric Potter on Canopy

Comments [0]

© 2026 - David Giard