# Thursday, 16 August 2018

GCast 9:

Azure Linux Virtual Machines

Microsoft Azure supports many open source and non-Microsoft technologies, including Linux VMs. Learn how to create and connect to a Linux VM hosted in Azure.

Azure | GCast | Screencast | Video
Thursday, 16 August 2018 08:22:00 (GMT Daylight Time, UTC+01:00)
# Wednesday, 15 August 2018

Here is my presentation "Building and Training your own Custom Image Recognition AI" that I delivered in June at NDC-Oslo in Norway.

Building and Training your own Custom Image Recognition AI
Wednesday, 15 August 2018 09:53:00 (GMT Daylight Time, UTC+01:00)
# Tuesday, 14 August 2018

ClockworkOrangeA Clockwork Orange by Anthony Burgess is the story of Alex - a juvenile delinquent sociopath living in a dystopian society of the near future. Alex and his friends spend their days and nights  terrorizing anyone they can. Alex fills his life with rape, battery, robbery, and (eventually) murder. In prison, Alex becomes the subject of an experimental treatment that forces him to become violently ill at even the thought of violence or sex. He is released back into the violent society, where he is harmless, but has no way to defend himself.

This book is a morality play - primarily about whether removal of free will is justified if it results in greater lawfulness and whether the needs of society take precedence over the rights of individuals. The message is not subtle. Burgess fills the first third of the book with acts of extreme violence in order to emphasize Alex's corruption. When he is treated and released, his punishment comes quickly, harshly, and very violently.

One of the reasons I love this book is Burgess's creative use of language. It is told in the first person by Alex, who speaks in Nasdat, the slang of  his day. Burgess invented Nadsat by combining English and Russian words ("droog" for "friend"; "golova" for "head") with a bit of cockney rhyming ("pretty polly" for "money") and some childlike phrases ("appy polly loggy" for "apology"). This may slow down the reading as we must infer meaning of words from their context; but it adds a timeless quality to the book that it would not have had the author chosen an existing slang from a specific period. 

This book is not for everyone. The use of Nadsat makes it more difficult than most books of this length. Some readers will not be able to get past the violence. Some may think that, because of Alex's intelligence and charm, Burgess is glorifying him and his violence. But the author uses this violence as a setup for Alex's fall. Alex justifies his ultraviolent lifestyle because he lives in an ultraviolent society. But he takes this logic way too far, contributing mightily to the violence and blaming all his misfortunes on others. Still, he is proved right in a way, as he is completely unable to cope in a world when he becomes incapable of responding with any violence. Alex is a somewhat sympathetic anti-hero, but his soul is clearly corrupted - perhaps beyond redemption.

The book does not take a position on the moral questions it raises - particularly around the rights of individuals versus the safety of society. Clearly, Alex and his droogs were a great threat to their world and citizens feared even to go outside at night. But the government's solution was also a failure, causing them to re-think how they addressed crime.

Burgess himself did not count A Clockwork Orange among his best novels. He claimed he wrote it in just three weeks and he preferred stories with a subtler message.

But I loved it. I loved the language and the style. I loved the scenes that would mirror themselves in the beginning and end of the book. I loved the twisted sense of justice displayed in the story. And I loved how the beauty of the language contrasted so sharply with the ugliness of the actions it was describing. This tension kept me focused throughout the book.

It is a real horrorshow story that remains in the golova of me and my droogs.

Tuesday, 14 August 2018 09:51:00 (GMT Daylight Time, UTC+01:00)
# Monday, 13 August 2018
Monday, 13 August 2018 08:41:00 (GMT Daylight Time, UTC+01:00)
# Sunday, 12 August 2018

Here is my presentation "How Cloud Computing Empowers a Data Scientist" that I delivered in June at IT Camp in Cluj-Napoca, Romania.

ITCamp 2018 - David Giard - How Cloud Computing Empowers a Data Scientist from ITCamp on Vimeo.

Sunday, 12 August 2018 09:14:00 (GMT Daylight Time, UTC+01:00)
# Saturday, 11 August 2018

Here is my presentation “Own Your Own Career – Advice from a Veteran Consultant” that I delivered in June at IT Camp in Cluj-Napoca, Romania.

ITCamp 2018 - David Giard - Own Your Own Career – Advice from a Veteran Consultant from ITCamp on Vimeo.

Saturday, 11 August 2018 20:09:27 (GMT Daylight Time, UTC+01:00)
# Friday, 10 August 2018

I have a number of JavaScript projects that require an API key or other secret information that I don't wish to share with the outside world. This is a problem if I share the rest of the source code in a public GitHub repository.

Here is how I handle it.

  1. Create a getkey.js file with a single getKey function.
  2. Include getkey.js in my HTML document(s).
  3. Call getKey() from another JavaScript file, but wrap the call in a try/catch block. If an error occurs, warn the user that they must add this file / function.
  4. Add a .gitignore file to my project to exclude getkey.js
  5. Check the rest of the project into GitHub.

Create a getkey.js file

Here are the contents of my getkey.js file:

var getKey = function(){
    return "3899084ab2353243735944a95b0eba51";
}

Of course, the return value will be your appropriate key.

Include getkey.js in my HTML document(s)

JavaScript is called from script files referenced in my HTML documents. I typically have a file named "script.js", which contains the main functions for my page. So I include both that file and getkey.js within the <head> tag as shown below.

<script src="scripts/script.js"></script>
<script src="scripts/getkey.js"></script>

Call getKey() from another JavaScript file

From script.js, I add code to call the getKey() function within a try/catch block. This will throw an exception if the script cannot find the getKey function (usually because it cannot find the getkey.js file). In this example, I output a useful error message in a DIV with an ID of "OutputDiv".

Here is the relevant code.

const missingKeyErrorMsg = `<div>No key found.<br>
	This demo will not work without a key.<br>
	Create a script.js file with the following code:.</div>
	<div style="color:red; padding-left: 20px;">
	var getKey = function(){<br>
		&nbsp; &nbsp; return "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";<br>
	}
	</div>
	<div>where xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx is your Azure Face API key</div>`

try {
	var subscriptionKey = getKey();
}
catch(err) {
	$("#OutputDiv).html(missingKeyErrorMsg);
	return;
}

Add a .gitignore file to my project to exclude getkey.js

I want to keep the getkey.js file locally, but I don't want to check it into GitHub. Adding a file named ".gitignore" in the root of my project allows me to list any files or folders that I don't want to include in my GitHub repository.

Add the following line to the .gitignore file

getkey.js

Check the rest of the project into GitHub.

Once the above steps are completed, it is safe to check it into GitHub. The getkey.js file will not be checked in. When another user checks it out, they will need to create this file. I recommend creating a read.me file and pointing this out.

Even if they forget, the error message should give them an idea why their code is not working.

There are other ways to address this issue, but this way works for me.

Friday, 10 August 2018 05:30:02 (GMT Daylight Time, UTC+01:00)
# Tuesday, 07 August 2018

WatchmenWho watches the Watchmen?

I remember reading Watchmen by Alan Moore and Dave Gibbons 30 years ago, when it was originally released as a 12-issue series. I waited for each issue and it took me a year to get through the entire story. But this week, I read the complete saga as a single volume and I think this is how Moore and Gibbons intended it. The story is complex enough that mysteries are introduced in one chapter and resolved several chapters later.

Although published by DC Comics, the story takes place outside the DC superhero continuity.

The main difference from the DC universe is the impact that superheroes had on their world, since first appearing on the scene in the 1930s. Originally, they were a group of costumed people with excellent athletic abilities and desire to fight crime. But things changed when Dr. Manhattan appeared on the scene. Dr. Manhattan was a physicist caught in an atomic experiment that gave him nearly godlike powers of strength, invulnerability, the ability to transport himself and other people and objects; and the ability to see forward and backward in time.

Dr. Manhattan working for the U.S. government greatly shifted the balance of power during the Cold War. In this world, the U.S. won the Vietnam War and Richard Nixon remained president for decades (Woodward and Bernstein's bodies were found in a parking garage and the Watergate scandal never came to light).

Costumed heroes eventually lose favor among the general public, which distrusts their great power; and by the police, who are frustrated by them operating outside the law as vigilantes.

The story follows a number of costumed heroes and former heroes:

  • The aforementioned Dr. Manhattan
  • The cynical and amoral Comedian, who works for the government or whoever will pay him the most
  • Retired hero Nite Owl - the second of that name
  • Ozymandias, who hung up his costume to start a business and become a billionaire
  • Rorschach, a psychopath with a strong moral compass that justifies him murdering criminals.
  • The Silk Spectre, who inherited that name from her mother, who pressured her into the superhero business.

It's a fascinating story, made better by all the little details - the graffiti on the wall in the background; the minor subplots (Rorschach’s psychiatrist is so troubled by his interactions with the hero that his marriage begins to crumble); the easter eggs (The pages of Chapter 5 are symmetrical, such that the last page mirrors the first, page 2 mirrors the second last, and so on); and stories within stories (a minor character reads a pirate comic throughout the series, which tells a morality play, not dissimilar to the one acted out by the major characters). One gets the feeling that multiple readings would reveal even more layers to the story.

But the strength of Watchmen is in the conflicting morals of each of the characters and the conflict this causes among the group. Some, like Ozymandias and Rorschach are absolutely convinced of their moral high ground; Dr. Manhattan loses his connection with the human race as he loses his humanity, and this affects his morality; The Comedian and the first Silk Spectre are in the superhero business for the fun of it; while others, such as Nite Owl and the second Silk Spectre, wrestle with questions of right and wrong and how to respond to evil.

The reader is confronted with moral questions, most of which go unanswered:

  • Do the ends justify the means?
  • Is nuclear deterrent (or superhuman deterrent) enough to preserve peace?
  • Does the universe need humans? Is it better with or without them?
  • What obligations do the powerful have to protect the powerless?

It is the last question that drives this story forward.

Watchmen changed the perceptions many had about comic books and graphic novels in the 1980s. Its dark themes and complex plots and characters were more than other titles at the time. As a result, the entire industry was challenged to produce at least some more titles that were heavier and higher quality than their normal super hero fare.

3 decades later Watchmen still stands up - not just as a graphic novel, but as a novel.

Tuesday, 07 August 2018 09:18:00 (GMT Daylight Time, UTC+01:00)
# Monday, 06 August 2018
Monday, 06 August 2018 08:14:00 (GMT Daylight Time, UTC+01:00)
# Sunday, 05 August 2018

8/5
Today I am grateful to visit the American Writers Museum for the first time.

8/4
Today I am grateful to tour the Clarke House Museum yesterday.

8/3
Today I am grateful for my first visit to Rosa's Lounge for the Thursday night blues jam.

8/2
Today I am grateful for my first visit to Door County, WI.

8/1
Today I am grateful for a bike ride around Sturgeon Bay, WI yesterday.

7/31
Today I am grateful for my first visit to a Wisconsin Supper Club.

7/30
Today I am grateful for lunch yesterday with Tim, Natale, and Emilija.

7/29
Today I am grateful for the summer party at my condo building yesterday.

7/28
Today I am grateful for breakfast yesterday with Kevin and Dustin.

7/27
Today I am grateful for dinner last night with Brent, Carl, and Michael.

7/26
Today I am grateful for:
-an amazing week at the Imagine Cup World Finals
-Lunch with Becky at the Microsoft expo
-Coffee with Steve

7/25
Today I am grateful for dinner with Nino last night in Seattle.

7/24
Today I am grateful to chat with a couple members of my new team.

7/23
Today I am grateful for a party last night at the University of Washington.

7/22
Today I am grateful for my first Kindle.

7/21
Today I am grateful for a walk through the natural area of Winnemac Park last night.

7/20
Today I am grateful to have had Dan and Rowena and their family visit this week.

7/19
Today I am grateful to successfully rebuild my 2 laptops yesterday and for Sergiy's help with this.

7/18
Today I am grateful for a walk around Chinatown last night with Rowena.

7/17
Today I am grateful to Dan for cooking me a steak dinner last night.

7/16
Today I am grateful to go to B.L.U.E.S. Chicago last night with Nick, Tim, and Natale.

7/15
Today I am grateful for my first visit to the Upper Peninsula of Michigan.

7/14
‪Today I am grateful to spend the past 2 days with Dan and Rowena and their family. ‬

7/13
Today I am grateful for my first visit to Mackinac Island. .

7/12
Today I am grateful for dinner last night in Pellston, MI at the home of Patrick and Susan.

7/11
Today I am grateful to have Nick at my place last night and to Tim for picking us up and taking us to dinner last night.

7/10
Today I am grateful to work with some top Chicago high schools students yesterday through Northwestern Academy.

7/9
Today I am grateful for
-a visit to the National Museum of American History yesterday
-a weekend in Maryland and Washington, DC

7/8
Today I am grateful to attend a family reunion this weekend and re-connect with so many of my extended family.

7/7
Today I am grateful for a visit to the National Aquarium in Baltimore yesterday.

7/6
Today I am grateful for:
-a visit to the Smithsonian National Museum of Natural History
-my first visit to Nationals Park, where I saw the larges comeback in franchise history yesterday

7/5
Today I am grateful I managed to get these family photos organized before the reunion.

7/4
Today I am grateful to live in the United States of America.

7/3
Today I am grateful for:
-a tour of Southern Illinois University
-a drive through Crab Orchard National Wildlife Refuge

7/2
Today I am grateful for my first visit to Carbondale, IL.

Sunday, 05 August 2018 11:11:00 (GMT Daylight Time, UTC+01:00)