# Tuesday, July 24, 2018

A package manager is a tool to install desired software and any other components on which that software depends. They do so by reading from a pre-configured package file, which lists dependencies, required configurations, where to retrieve binaries, and the order in which each step must occur.

Many software developers are familiar with package managers, such as NuGet (for Microsoft applications), PIP (for Python) and RubyGems (for Ruby). These are used to add components to a software project.

Chocolatey is a Package Manager designed specifically for installing desktop applications onto a Windows computer, outside of any software project.

You can get started using Chocolatey by navigating to https://chocolatey.org/. Chocolatey requires Windows and PowerShell (which comes pre-installed on current versions of Windows).

Install Chocolatey by opening a Command prompt and typing

@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"

or by opening a PowerShell prompt and typing

Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))

You will likely need to open those prompts as an Administrator. Close the prompt when you are done.

choco install openlivewriter -y choco install googlechrome -y choco install firefox -y choco install notepadplusplus -y choco install nodejs -y choco install git -y choco install putty -y choco install nodejs -y choco install visualstudiocode -y choco install paint.net -y choco install dropbox -y choco install fiddler -y choco install azure-cli -y choco install audacity -y choco install visualstudio2017enterprise -y choco install slack -y choco install filezilla -y choco install handbrake -y choco install gitkraken -y choco install camtasia -y choco install snagit -y choco install unity -y choco install azure-cli -y choco install curl -y choco install everything -y choco install spotify –y
choco install icloud -y choco install docker -y
choco install kindle –y
choco install microsoft-teams –y
choco install postman –y
choco install microsoftazurestorageexplorer -y

Once Chocolatey is installed, you can install software with the command "choco install ", followed by the name of the package. Uninstall software with the command "choco uninstall ", followed by the name of the package. You can find existing packages and their names at https://chocolatey.org/packages.

"choco install" and "choco uninstall" have a number of command line switches. I found "-y" to be the most useful, which answers "Yes" to any prompts to download or run software, saving you a lot of time and intervention.

My number 1 use case for Chocolatey is to re-install all my desktop applications after I reset a PC (delete all data and applications and re-install Windows). I have created a batch file named "ChocolateyInstallScript.bat" to install many of my favourite desktop applications.

The script is listed below:


I ran this script this morning after resetting my laptop. It ran for about an hour with no intervention from me. After an hour, all the apps were installed.

Below is part of the output:


The best part is that, for what I am doing, Chocolatey is completely free!

For more information, check out the the Chocolatey documentation here or watch my interview with Chocolatey creator Rob Reynolds here.

Chocolatey provides a a simple way to install and manage desktop applications. It saved me time and energy when I rebuilt my machine.

Tuesday, July 24, 2018 4:06:00 PM (GMT Daylight Time, UTC+01:00)
# Monday, July 23, 2018
Monday, July 23, 2018 8:20:00 AM (GMT Daylight Time, UTC+01:00)
# Sunday, July 22, 2018

Azure blob storage is a good, inexpensive way to store files in the cloud.

Putting some thought into how you will use this data will save you some money.

Azure offers 3 tiers of blob storage access: Hot, Cold, and Archive. Your choice depends on how frequently you intend to access your data.

It is always free to upload data to Azure storage, but there may be a charge to retrieve data.

Hot storage and Cool storage each offers easy, quick access to your files if you want to read or download them. The difference is the price. There are 2 components of Azure storage pricing: storage and data transfer. Storage is the fee for using space on Azure hard drives. Data Transfer is the fee to access your data (for example, you may want to download a copy of a file or point to an image stored in blob storage). Hot storage has higher storage costs, but lower data access costs than cool storage. So, if you plan to access your data a lot, Hot storage makes more sense; for infrequently accessed data, cool storage is cheaper. 

There is a third Azure Storage tier called "Archive" that is designed for long-term storage data that is accessed very infrequently. Archive tier differs from the other two not only in price - but in how quickly you can access your data. The storage price is much lower, and the access price is much higher than the other two tiers. In addition, it may take hours between the time you request your data and the time you can access your data.

Hot and Cool tiers can be set at the storage account level, but Archive tier can only be set for individual blobs.

If you want to store 5TB data in Azure storage the cost per month (as of July 2018) would be:

Hot tier $104
Cool tier $76
Archive tier $10

The cost to retrieve 1 GB of data with each tier would be

Hot tier $0.00
Cool tier $0.01
Archive tier $0.02

To summarize:

Tier Monthly storage cost, 5TB Access cost / GB
Hot $104 $0.00
Cool $76 $0.01
Archive $10 $0.02

Of course, these prices can change over time. You can view the current prices at https://azure.microsoft.com/en-us/pricing/details/storage/blobs/ 

As you can see, the costs can vary significantly. Your choice depends on how frequently you plan to access your data. If you want to store images to display on your web site, the Hot Tier makes sense. If you want to store customer invoice PDFs and you expect people to only review them every month or two, Cool is probably the best choice. If you want to back up your video files just in case your local drive fails (like I did), Archive is more practical, because I might never retrieve those files.

As Azure evolves, these options become more and more driven by the demands of the customer.

Sunday, July 22, 2018 9:33:00 AM (GMT Daylight Time, UTC+01:00)
# Saturday, July 21, 2018

HillbillyElegyJ.D. Vance was never a hillbilly. He isn't even from the hills. He was raised in the southwest Ohio city of Middletown - a rust belt town hit hard economically when a major employer left.

But his family migrated to Middletown from rural Kentucky and displays many of the attributes of the white working class of Appalachia. These people, Vance tells us, identify as "hillbillies". And in Hillbilly Elegy: A Memoir of a Family and Culture in Crisis, Vance describes the attributes of these hillbillies - sometimes through the stories of his own family and neighbors and sometimes through statistics drawn from studies and journals.

Most of those traits are not good. The undereducated, underemployed whites with roots in Appalachia (read "hillbillies) are verbally abusive and prone to violence and share a feeling of hopelessness. They tend to believe that they are not in control of their destiny - that those who succeed were born to better circumstances or were just born smarter. To make matters worse, hillbillies are often dishonest with themselves. They are convinced that they work harder than they actually do and that they attend church more often than they really do. They distrust outsiders; they distrust the government; they distrust the press. These factors combine to keep them poor and exclude them from the American Dream.

They do profess a fierce family loyalty, but only in the sense that they will attack any outsider who insults or otherwise threatens their family. They are generally not supportive of their own family and are often treat one another with cruelty. 

Hillbilly Elegy tells Vance's story of being raised by these folks, the effect it had on him and others like him, and how he was able to escape this culture and graduate from a prestigious law school.

Vance's mother was a drug-addicted single mother, who marched through a plethora of boyfriends and husbands as he was growing up. He nearly flunked out of high school while growing up and many of his friends and neighbors got into trouble and/or made nothing of their lives.

He was largely raised by his gun-toting, foul-mouthed grandmother (aka "Mamaw") and his grandfather (aka "Papaw").

Eventually, Vance graduated high school, enlisted in the US Marine Corps, earned a bachelor’s degree and a Yale law degree.

Three things contributed to Vance's eventual success.

Mamaw succeeded in instilling in him a willingness to work hard and improve himself.

He enlisted in the US Marines right after high school, where he learned discipline and many of the life skills not taught to him growing up.

He was accepted into Yale, where he learned the art of networking to achieve success.

Hillbilly Elegy is an interesting story, about a man who overcome adversity by taking control of his life and rejecting his circumstances.

But is also a social study of an American demographic that is often overlooked - the poor, white working class of Appalachia. These are people whose lifestyle is not well suited to adapting as the economy changed and felt left behind by the rest of America. This feeling of hopelessness may explain why so many of them shifted from the Democratic to the Republican party in less than a generation.

I cannot speak to the generalizations that Vance makes about his people. My ten years living in Kentucky were mostly not spent among the very poor. But I don't doubt his personal experiences and how he was able to overcome his own expectations and his perceived destiny. And I appreciate that he made me think about a group of people in a new light.

Saturday, July 21, 2018 9:09:00 AM (GMT Daylight Time, UTC+01:00)
# Friday, July 20, 2018

I decided I needed to re-image my laptop.

After more than two years, my laptop felt slow. Installing and uninstalling applications and forgotten / unneeded service that are still running made their presence felt in sluggish performance.

I was pleasantly surprised how easy it was do this on Windows 10.


My goal was to completely wipe out everything on my PC and start fresh, so I wanted to know what I was removing and would have to add back.

Step 1 is to back up any data or documents on your laptop. If you are using tools like OneDrive, Dropbox, and GitHub, all your data might already be backed up. This was true for most of my files, but I found a few (most notably my PST email archive) that I needed to back up manually to an external hard drive.

Step 2 is to make note of the applications you will need to re-install after you reset the computer.

Reset PC

Once everything is backed up, you can reset your machine with a clean install.

Click the START button in the bottom left and type "Reset this PC", as shown in Fig. 1.

Fig. 1

This should bring up the "Recovery" screen, as shown in Fig. 2. (Note: If this does not work, you can go to Windows Settings and search for "Reset this PC".)

Fig. 2

On the "Recovery" screen, click the [Get Started] button to launch the "Reset this PC" wizard. The first screen ("Choose an option") of the Wizard is shown in Fig. 3.

Fig. 3

Click the [Remove everything] button to advance the "Do you want to clean the drives, too?" screen, as shown in Fig. 4.

Fig. 4

On this screen, select [Remove files and clean the drive] button to advance to the "Ready to reset this PC" screen, as shown in Fig. 5.

Fig. 5

On this final wizard screen, click the [Reset] button.

This will delete all files, re-install windows, and launch a startup wizard to ask you about things like preferred language and keyboard layout.

When finished, you will have a PC with Windows 10 installed and little else. At this point, you will want to re-install any applications you need and restore desired files from your backup. I used Chocolatey to automate re-installing my applications.

I did this for 2 different laptops. The whole process took about 90 minutes on my 2-year-old Surface Book and about 3 hours on my 4-year-old Surface Pro 3.

The most stressful part was backing up everything and hoping I did not forget an important file. My next project is to make sure everything is included in Dropbox, so I won't need to worry about this.

Friday, July 20, 2018 9:29:00 AM (GMT Daylight Time, UTC+01:00)
# Thursday, July 19, 2018

GCast 7:

Azure SQL Database

Azure MySQL Database

Thursday, July 19, 2018 8:46:00 AM (GMT Daylight Time, UTC+01:00)
# Tuesday, July 17, 2018

Fahrenheit451Guy Montag is a fireman. Unlike the world of today, firemen in Montag's dystopian near-future are charged with burning books. Books are illegal because books encourage free thought, which makes it difficult for the government to control its citizens.

One day, Montag meets Clarisse, a high school girl who is not afraid to think about the world and question what she sees. Montag enjoys his conversations with Clarisse and is jarred when she suddenly disappears - an apparent victim of an automobile accident. Montag begins to question his life and the morality of his job. He courts disaster when he steals a book he is supposed to burn.

Fahrenheit 451 is one of the great novels of  the twentieth century. Not only is it a compelling story; it is a warning against anti-intellectualism and those who mindlessly follow authority. It is a warning of choosing comfort and vapid entertainment over freedom; and allowing power to be too concentrated. 65 years after its publication, these issues are still relevant.

This is a book everyone should add to their reading list. It is a simple parable but packed with so much that I have read it three times.

Tuesday, July 17, 2018 11:21:00 AM (GMT Daylight Time, UTC+01:00)
# Monday, July 16, 2018
Monday, July 16, 2018 9:07:00 AM (GMT Daylight Time, UTC+01:00)
# Sunday, July 15, 2018

TheJungleBrace yourself before reading Upton Sinclair's the The Jungle.

The Jungle tells the story of European immigrants lured to Chicago with promises of high-paying jobs in the meat packing industry. The promises of a good life turn out to be false - particularly for the family of Lithuanian immigrant Jurgis Rudkus. Jurgis arrives believing that he can handle the hard work and provide for his new wife and his extended family. He is strong and hard-working, and he quickly finds a job in the local stockyards.

But they have entered a world where the entire system conspires to keep down the poor. Wages are reduced downward and workers are not paid for time lost.

Even time lost to injury or illness.

Even injury or illness caused by unsafe and unsanitary working conditions, which is the norm in Chicago's meatpacking industry.

A dishonest realtor tricks the family into buying a home with hidden costs and his entire family must go to work to make ends meet. The meat trust exploits them all by keeping them in in unsafe and unhealthy conditions. Foremen, policemen, businessmen, judges, and politicians are all corrupt and use their power to prey on the powerless.

As time passes, the family falls farther into debt and deeper into despair. Some die, some are maimed, some are arrested, some are blacklisted by all the local companies, one is raped with impunity by her boss, and one disappears without a trace. Despite their best efforts, their fate seems almost inescapable. They work hard and play by society's rules but are cast aside anyway. Before long, the hope and optimism with which they arrived slips away.

Sinclair was a devout socialist and concludes the novel with a pitch for socialism as a cure for the dangers of unchecked capitalism. It's interesting to read this today over a hundred years after its publication and with the perspective of history. Socialism never took over the US and has produced mixed results in those nations where it was adopted.

But the novel did have an impact on society - mostly by calling attention to the unsanitary products sold by the meat packers. This led to increased regulation and the formation of what would become the Food and Drug Administration.

The preaching about socialism in the last few pages makes the ending feel a bit weak, but the story is a powerful one and I could not help but feel for the heartbreak experienced by Jurgis and his family. The reader feels both sympathy and outrage at the injustices they suffer.  There is a reason why this novel is considered an American classic.

Sunday, July 15, 2018 10:54:53 PM (GMT Daylight Time, UTC+01:00)
# Thursday, July 12, 2018

GCast 6:

Azure SQL Database

How to create an Azure SQL database in the Azure portal.

Thursday, July 12, 2018 9:16:00 AM (GMT Daylight Time, UTC+01:00)