# Friday, 18 November 2016

This week, Microsoft hosted the keynote event in New York City. Although attendees could travel to New York to attend in person, most who watched the keynote (including me) watched a live stream or recording of the keynote and breakout sessions online.

There were a number of important announcements, including Microsoft joining the Linux Foundation; the upcoming Visual Studio 2017; and Visual Studio on a Mac.

Here are the notes I took during the keynote:

VSCODE
    Support for multiple languages
    Intellisense support for hundreds of npm modules
    Docker extension (constainerize app)
   
Azure App Service now supports running on Linux

DocumentDB
    Cloud-scale document database
    Global replication
        Click on data center in map
    Configure API to be MongoDB API compatible
   
OPEN SOURCE
    Most active contributor on GitHub
    Microsoft joins Linux foundation as a Platinum member
   
XAMARIN / VISUAL STUDIO 2017
    Visual Studio for Mac preview now available
    Free with MSDN
    Community Edition will be free to everyone
    .NET Core Support
    Visual Preview of Xamarin.Forms XAML
   
DOCKER
    Visual Studio integration
        Right-click
            Create container
            Publish (dialog is specfic to containers)
            Debug in container
            Release Management / Continuous Deliver supports Containers

AZURE FUNCTIONS
    Write code that runs in response to events in Azure (or outside Azure)
    Languages PHP, Python, Powershell, C#, etc. supported
    Write Functions in Visual Studio
        1-click publish
        Debug
    Available today
   
SQL SERVER
    Gartner: SQL Server is least vulnerable database (past 6 years)
    In-memory advanced analytics
        R Language support
    SQL Server 2016 SP1 released today
    SQL Server on Linux (public preview available today)
    Advanced security
    Advanced compression
   
AZURE BOT SERVICES
    Conversational app
    Built on Azure Functions
    Integrate with Slack, Facebook, etc.
   
VISUAL STUDIO
    Install, uninstall faster
    Icons in code margin indicate failing tests, passing tests, and uncovered code
    New Exception Helper
    Style Rules enforced in editor
    Indent Guides (dotted vertical lines) match beginning & ending brackets
    Helpers at bottom of dropdowns
        Filters results in list
        CTRL+T search to activate
   
C#
    Tuples: Allow you to return multiple values

WinApp Driver
    UI Testing of Windows apps
    Doesn't care what language app is writtenin
   
.NET Core
    60% of contributions from Community
    .NET Foundation
        Many repositories
        .NET Core on Tizen OS (courtesy of Samsung)

Friday, 18 November 2016 22:58:00 (GMT Standard Time, UTC+00:00)
# Monday, 14 November 2016
Monday, 14 November 2016 11:22:00 (GMT Standard Time, UTC+00:00)
# Monday, 07 November 2016
Monday, 07 November 2016 09:12:00 (GMT Standard Time, UTC+00:00)
# Sunday, 06 November 2016

11/6
Today I am grateful for dinner last night with Randy and Emilija.

11/5
Today I am grateful for lunch yesterday with Aalap.

11/4
Today I am grateful that I recovered a keyboard that I left weeks ago in a Starbucks 140 miles from my home.

11/3
Today I am grateful to sip scotch and watch baseball last night with J.

11/2
Today I am grateful for a 7-game World Series.

11/1
Today I am grateful for a quiet corner table I a restaurant to unwind while traveling.

10/31
Today I am grateful for open and honest debate, free of ad hominem attacks and untruths. I do wish they were more common.

10/30
Today I am grateful to see a Jeff Daniels play last night at the Windy City Playhouse

10/29
Today I am grateful to ride my new bike to and from work yesterday.

10/28
Today I am grateful for my new phone.

10/27
Today I am grateful for a friend who will listen to me rant when I'm feeling overwhelmed.

10/26
Today I am grateful for dinner with Manohar last night.

10/25
Today I am grateful for lunch yesterday with Jimmy in Austin.

10/24
Today I am grateful for drinks last night with Jeff and Chrissy.

10/23
Today I am grateful for college students with a passion for learning.

10/22
Today I am grateful to be part of DevUp this year.

10/21
Today I am grateful to be back in St. Louis.

10/20
Today I am grateful for dinner with Nick last night.

10/19
Today I am grateful Emilija was able to meet for a late dinner before I leave town for a week.

10/18
Today I am grateful that an old friend called me to ask for some advice.

10/17
Today I am grateful for these 2 bikes that I bought from my brother last week.

10/16
Today I am grateful for my first visit to the Milwaukee Public Market yesterday.

10/15
Today I am grateful for dinner last night with Gary, Patricia, Andrew, and Lisa.

10/14
Today I am grateful for 3 years at the best job I've ever had.

10/13
Today I am grateful for a day in Champaign, IL.

10/12
Today I am grateful to my 2,000 Twitter followers who think I'm saying something worth listening to.

10/11
Today I am grateful for:
-Great crowds at MSU and #SEMJS last night
-Lunch with Matt yesterday.
10/10
Today I am grateful that my brother, my nephew and I had a chance to visit my mother yesterday.

10/9
Today I am grateful for a weekend in Detroit.

10/8
Today I am grateful for an afternoon with my mother yesterday.

10/7
Today I am grateful for:
-Attending and speaking at #dogfoodcon for the first time
-An unexpected drink with Stuart and Michele last night.

10/6
Today I am grateful for a full room at each of my presentations yesterday.

10/5
Today I am grateful for audiobooks on a long drive.

10/4
Today I am grateful for:
-Lunch yesterday with Thad
-Dinner last night with Dan

10/3
Today I am grateful for all the people who came out to hear my presentation on a Sunday afternoon.

Sunday, 06 November 2016 22:40:43 (GMT Standard Time, UTC+00:00)
# Monday, 31 October 2016
Monday, 31 October 2016 18:43:55 (GMT Standard Time, UTC+00:00)
# Monday, 24 October 2016
Monday, 24 October 2016 09:53:00 (GMT Daylight Time, UTC+01:00)
# Tuesday, 11 October 2016

Microsoft Cognitive Services provides a number of APIs to take advantage of Machine Learning. One of the simplest APIs to use is Sentiment Analysis.

Sentiment Analysis examines one or more text entries and determines whether each text reflects a positive or negative sentiment. It returns a number between 0 and 1: A higher number indicates a more positive sentiment, while a lower number indicates a more negative sentiment.

To use this service, POST a JSON message to the following URL: https://westus.api.cognitive.microsoft.com/text/analytics/v2.0/sentiment

Unlike some web Cognitive Service URLs, this one takes no querystring parameters.

In the HTTP header, pass the following information: Content-Type and the Ocp-Apim-Subscription-Key.

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.

In the Content-Type, pass "application/json".

For the Ocp-Apim-Subscription-Key, include the the Text Analytics key. You can find your key at https://www.projectoxford.ai/Subscription?popup=True

In the body, pass a JSON object that contains an array of documents. Each document contains 3 properties:

language - the Language of the text you want to analyze. Valid values are "English", "Spanish", "French", and "Portuguese".

id - A string that uniquely identifies this document. Used to match the return value to the corresponding text.

text - the text to analyze

Below is a sample JSON body:

{
"documents": [
{
"language": "English",
"id": "text01",
"text": "This is a great day."
}
]
}

After you POST this to the URL, you should expect a response that includes JSON. If all goes well, you will receive an HTTP 200 response and the returned JSON will include an array of documents (the same number that you passed in the Request body). Each Response document will contain

id - matching the id of the document in the Request document.

score - A value between 0 and 1. The higher the score, the more positive the sentiment of the text; The lower the score, the more negative the text sentiment.

You may also receive an array of errors. Each error contains the following properties:

id - matching the id of the document in the Request document.

message - a detailed error message.

Below is an sample response JSON body

{
"documents": [
{
"score": 0.95412,
"id": "text01"
}
]
}

Here is a bit of code to call this API from JavaScript. I am using jQuery's Ajax method and displaying output in a div, like the following:

<div id="OutputDiv"></div> 

var subscriptionKey = "566375db01ad43dc8f62dcc8dc3e5c1f";
var textToAnalyze = "Life is beautiful";

var webSvcUrl = "https://westus.api.cognitive.microsoft.com/text/analytics/v2.0/sentiment";

var outputDiv = $("#OutputDiv");
outputDiv.text("Thinking...");

$.ajax({
type: "POST",
url: webSvcUrl,
headers: { "Ocp-Apim-Subscription-Key": subscriptionKey },
contentType: "application/json",
data: '{"documents": [ { "language": "en", "id": "text01", "text": "'+ textToAnalyze + '" }]}'
}).done(function (data) {
if (data.errors.length > 0) {
outputDiv.html("Error: " + data.errors[0]);
}
else if (data.documents.length > 0) {
var score = data.documents[0].score;
if (score > 0.5){
outputText = "That is a Positive thing to say!";
}
else{
outputText = "That is a Negative thing to say!";
}
outputDiv.html(outputText);
}
else {
outputDiv.text("No text to analyze.");
}

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

Tuesday, 11 October 2016 06:48:00 (GMT Daylight Time, UTC+01:00)
# Monday, 10 October 2016
Monday, 10 October 2016 05:38:20 (GMT Daylight Time, UTC+01:00)
# Thursday, 06 October 2016

Lately, I've been using Visual Studio Code to create TypeScript projects.

When working with TypeScript, I always create a file with ".ts" extension and allow the TypeScript Compiler to create a ".js" and a ".map" file. It's rare that I ever open the js or map files, let alone modify them. In fact, it's a fool's errand to modify these files because they will be overwritten the next time the ".js" file changes.

So it is generally easier to work with a TypeScript project if I don't even see these files.

Visual Studio Code allows me to hide files in a project. To do so, select File | Preferences | Workplace Settings.

This creates a ".vscode" folder in the root of my project and adds a file named "settings.json" to this folder. In settings.json, add the following code:

{
"files.exclude": {
"**/*.js": true,
"**/*.map": true
}
}

Of course, you can add any file mask to this "files.exclude" extension to hide specific files or folders.

File matching patterns are described in this Help topic.

Save this file and the specified files will remain on disc but will not clutter the left pane of Visual Studio Code.

Thursday, 06 October 2016 05:32:33 (GMT Daylight Time, UTC+01:00)
# Wednesday, 05 October 2016

This was not the book I was expecting.

Joe Jackson's recording career has spanned decades - from the late 1970s until the present. But this memoir ends where that recording career began - with the release of his excellent debut album Look Sharp.

"A Cure For Gravity: A Musical Pilgrimage" details Jackson's education and the evolution of his musical style before he secured a recording contract.

Jackson was an outsider in the working class town of Portsmouth, England. He was sickly and introspective and no good at sports, which made him unpopular with his classmates. And he was obsessed with music, which made him odd.

But he loved music enough to pursue it - almost single-mindedly - for his entire youth. He attended the Royal Academy of Music during the Day, while performing at small pubs nights and weekends with rock & roll or punk bands. He was the musical director of a cabaret in order to save money to record an album of his own material.

Through Jackson's education and his musical experience, he encountered many characters and many different styles of music and he was influenced by them all. This helps to explain why his recorded music crosses so many different genres - from jazz to rock to reggae to new wave to classical. "When people ask who has influenced me", he writes, "I always sense that they're expecting to hear certain names: John Lennon, David Bowie, Graham Parker.  The truth is that I'm influenced by everything, but especially by the people I've worked with closely, people no one else has heard of."

Jackson's style is often clever and frequently self-effacing. He acknowledges his youthful awkwardness and his lack of success with women. And he tells stories of driving for hours and waiting all day outside a pub, then changing in a small restroom to perform for a small, audience that didn't want to hear a band or didn't like the music they played.  He speaks freely of his musical frustrations and his inability to find his voice. But his love of music kept him going.

Jackson was driven to succeed in music, never considering any other career. "I had to succeed in music," he insists. "I was no good at anything else."

Although Joe Jackson had a hit album at age 22, "A Cure for Gravity" chronicles what it took him to get there. The book gave me new insights into an artist I have loved since my high school days when I first heard his music on an A&M sampler LP and (a few months later) when I saw his concert at the Punch and Judy Theater in Grosse Pointe, MI. "A Cure for Gravity" is a delightful story that this lifetime Joe Jackson fan enjoyed immensely.

JoeJackson
Joe Jackson in concert, 1979
(photo by D Giard)

Wednesday, 05 October 2016 10:59:00 (GMT Daylight Time, UTC+01:00)