Thoughts on Microsoft Build 2020

I “attended” the virtual Microsoft Build conference this week. Here is what I found interesting.

MakeCode Arcade

I had no idea anything like this existed. MakeCode Arcade is a website that lets you build old school 8-bit video games using blocks. In the above image, the game is running on a simulator on the left. In the middle is a list blocks you can use to build your game. On the right is where you connect your blocks to create your game.

This is a fantastic way to learn how to program. Blocks include…

  • Sprites (graphics)
  • Controller (input)
  • Game (game loop)
  • Music (audio)
  • Scene (background)
  • Info (score, player lives, timers)
  • Loops (for, for each, while)
  • Logic (if/then/else, comparisons, Boolean)
  • Variables
  • Math (basic math, random numbers, clamping, rounding)
  • Images
  • Functions
  • Arrays
  • Text (string operations)
  • Console (log file)

Here is the part that puts it over the top… Once you have your game ready, you can download it to standalone hardware and play your game without a computer.

The example above is called “Meowbit” and it goes for $40. There are other options listed under hardware on this page.

I know this is for kids, but I’d love to spend some time playing with this.

More here.

The Windows Package Manager: winget

Windows now has a package manager called “winget.” This means you can easily setup a box to have all the apps you want by running a script. Eventually winget will be part of Windows. You can try it out now from here: https://github.com/microsoft/winget-cli/releases

Not all the apps I want are there yet, but many are. They are adding more apps quickly.

Here is the current list of supported apps as of today (5/21/2020):

I created my own PowerShell script to setup a PC…

#Requires -RunAsAdministrator

# Install winget https://github.com/microsoft/winget-cli/releases
# In same order as 'winget search', using Id
winget install --exact --silent Canonical.Ubuntu
winget install --exact --silent EpicGames.EpicGamesLauncher
winget install --exact --silent Git.Git
winget install --exact --silent GitHub.GitLFS
winget install --exact --silent GitHub.cli
winget install --exact --silent Kitware.CMake
winget install --exact --silent Microsoft.Edge
winget install --exact --silent Microsoft.GitCredentialManagerforWindows
winget install --exact --silent Microsoft.PowerToys
winget install --exact --silent Microsoft.Powershell
winget install --exact --silent Microsoft.Skype
winget install --exact --silent Microsoft.Teams
winget install --exact --silent Microsoft.VisualStudio.Community
winget install --exact --silent Microsoft.VisualStudioCode
winget install --exact --silent Microsoft.WindowsSDK
winget install --exact --silent Microsoft.WindowsTerminal
winget install --exact --silent Microsoft.dotNetFramework
winget install --exact --silent Microsoft.dotnet
winget install --exact --silent Python.Python
winget install --exact --silent ScooterSoftware.BeyondCompare4
winget install --exact --silent SimonTatham.Putty
winget install --exact --silent Spotify.Spotify
winget install --exact --silent Valve.Steam
winget install --exact --silent WinSCP.WinSCP
winget install --exact --silent Zoom.Zoom

GitHub for iOS and Android

Now you can review pull requests on your phone. More here.

Windows Subsystem for Linux 2 supports GUI apps, GPU’s

You will be able to run Linux GUI apps side by side with Windows apps. Linux apps that require a GPU/CUDA will be supported with WSL2. More here.

WebView2

WebView2 is a new UI control that contains a chromium browser with support for WebGL2 that works on all supported versions of Windows. More here.

C# 9

One new feature in version 9 is you can write a simple app with less code. Here is how you code “hello world” now…

Same app in C# 9…

More here.

Codespaces

The idea behind Codespaces is great: one click on the upcoming “Codespaces” button in a GitHub repo and get a VS Code editor running in a browser with everything configured and ready to go for development and debugging. The Codespace VM can also run in Visual Studio 2019 or VS Code.

More here.

Microsoft Edge now on Linux

The new Microsoft Edge browser was shown running on Linux.

More here.

Windows Virtual Desktop

Windows Virtual Desktop (WVD) lets you package up an app and run it with the OS and hardware it needs in the cloud. Users can access it on their desktop as if it was locally installed. It can be used for running 3d apps like Maya, 3ds Max on underpowered machines.

More here.

WinUI 3

WinUI 3 is the latest/greatest UI toolkit for Windows. What is new is that it is decoupled from the OS so that you can use the latest UI controls with older OS’s. Also new, is this toolkit can be used by UWP, WPF, Windows Forms, and MFC. The idea is every Windows app should be able to access the latest UI components.

More here.

.NET MAUI

.NET MAUI (Multi-platform App UI) is Microsoft’s solution for cross platform UI development. This is going to replace Xamarin.Forms. Microsoft will support macOS, Windows, Android, and iOS. The “community” is supporting Linux as they have for Xamarin.Forms.

More here.

Fluid vs Fluent

I was confused. I knew “Fluent” was Microsoft’s UI design language. When I heard about “Fluid,” I thought it was the same thing because it is about UI and it is a similar word.

It isn’t the same thing. Fluid is about making web apps that support collaboration. Microsoft will use it in Office (Word, Excel, PowerPoint, etc.). It is open source.

More here.

Blazer

Blazer let’s you script web pages with C# instead of JavaScript via WebAssembly.

More here.

Access Windows API via Rust language

Rust is now a supported language for building system software (ie building OS’s). It is considered a safer language to use than C or C++, yet still has speed and predictable performance.

More here.

Windows Terminal 1.0

The 1.0 version of Windows Terminal was released. There is a lot to like. It is missing one feature that I use all the time: using Ctrl+Space in PowerShell to see parameters and the options for parameters. There is a bug report for this and it sounds like it is not a quick fix, so I may be waiting for a while before I switch to Windows Terminal.

More here.

New Printer: HP Tango

I have had problems printing for a while. Everything worked OK until I moved from a direct connection to my printer to WiFi wireless printing.

I tracked down the problem: my WiFi printer only supports 2.4GHz WiFi, not 5 GHz. I can print if I set my WiFi router to use 2.4 GHz.

I want to use 5 GHz for WiFi. My download speeds are about 6 times faster with 5 GHz vs. 2.4 GHz.

What to do? I decided to upgrade my printer and get one that works on 5 GHz WiFi: The HP Tango.

Tango is a very different printer. It does not have a screen. It does not support a direct connection. It is designed for use via WiFi, both 2.4 GHz and 5 GHz.

My favorite thing about Tango is how you can hide it when it is not in use. This is what it looks like when I don’t need to print (i.e. most of the time)…

I bought an Indigo linen cover that fits the printer like a book cover. You wouldn’t know it is a printer. It is out of sight/out of mind. No lights. Nothing digital.

The printer is small enough to easily fit on my bookshelf. The only cable is a white power cable that blends in with the wall.

When I need to print, I take the paper off the top of the printer, open the cover, open the printer, place the paper in printer…

Here is a video of the process…

There is something magical about this printer: how does it connect to WiFi in the first place? It does not have a display or buttons for you to choose a connection and enter a password.

I actually do not know the answer to this question. The HP setup app showed that there was a Tango printer that I could setup. How did my computer know there was a printer it could setup?

Once I selected to setup my new Tango printer, I was asked if I wanted to use the same WiFi my computer is using. I said I did, and then my printer started working.

Magical.

There is a Tango and a Tango X. What is the difference? The Tango X is a Tango with an included cover. The Tango is $150. The Tango X is $200. A cover is $50.

Print quality is great. It is very fast. It is out of the way. And it works.

5/5 stars

What I use: Text Editor

My previous choice for text editor was Sublime. I paid for it. I liked that I could learn one text editor and use it on Windows, Mac, and Linux. It came with dark mode by default and looked good.

Then Visual Studio Code happened. VS Code works on Windows, Mac, and LInux. It has a dark mode by default. AND…it is free and open source.

The pace of development is amazing. New features are released every month. It is hard to keep up with all the goodies they cram in.

When you start VS Code, it comes lean without any plugins. As you open different file types, you get recommendations to install plugins that will improve the experience for that particular file type. Just click “install” on the recommendation and the plugin is installed and enabled very quickly.

Here are the plugins I am currently using…

If you look at the most popular plugins, the top plugin is Python with 18 million downloads…

If you look at the Stack Overflow Developer Survey for “Most Popular Developer Environment,” Visual Studio Code is tops and growing quickly….

Year% of respondents that choose Visual Studio CodeRanking against all developer environments
201950.7%1st
201834.9%1st
2017 (calculated from original source data)19.0%6th
20167.2%13th

I use VS Code for Python, PowerShell, and C# development. I highly recommend Visual Studio Code.

Long Paths on Windows

When you create a file path with Windows, you are limited to a length of MAX_PATH, which is defined as 260 characters.

That limitation was removed in Windows 1607 (Anniversary Update) released in July 2016. Now you can have a path with 32,767 characters. Each component of the path (directory/file name) can be at most 255 characters.

To enable long paths, open a PowerShell window and type:

sp HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem LongPathsEnabled 1

The setting will apply to any process started after you enable long paths.

Let’s see this in action. This PowerShell script takes the opening crawl of Star Wars and creates a directory for each line. Open a new PowerShell window to ensure you have the long paths enabled setting. Copy and paste this script:

$crawl = @"
LONG_PATH_TEST
Episode IV
A NEW HOPE
It is a period of civil war.
Rebel spaceships, striking
from a hidden base, have won
their first victory against
the evil Galactic Empire.
During the battle, Rebel
spies managed to steal secret
plans to the Empire's
ultimate weapon, the DEATH
STAR, an armored space
station with enough
power to destroy an entire
planet.
Pursued by the Empire's
sinister agents, Princess
Leia races home aboard her
starship, custodian of the
stolen plans that can save
her people and restore
freedom to the galaxy...
"@
$crawl -replace "[.']", "" -split "\n" |%{$d = $_.trim(); md $d -f; cd $d}
write-host "PATH LENGTH IS $((pwd).path.length)" -ForegroundColor Green

Rethinking Taskbar Location

The taskbar is normally on the bottom of your screen. You can optionally move it to the top, left, or right. I decided to try a different location for one reason: I need more vertical space.

Since I need vertical space, I did not consider placing the taskbar on the top. So the question is: left side or right side?

I decided to go with right side. Why?

  • Muscle memory: The clock placement is in bottom right, same as bottom taskbar
  • Muscle memory: The Action Center button is in bottom right, same as bottom taskbar
  • Muscle memory: The Notification Area is in the bottom right, same as bottom taskbar
  • Muscle memory: The peek desktop in in the bottom right corner, same as bottom taskbar
  • Minimize mouse travel: When you click on Action Center it opens on the right side. With the left taskbar, you click on the left side of your screen to open Action center and interact with it on the right side. With the right taskbar, you click on the right side to open and interact with it. For dealing with Action Center, Fitt’s Law says it should be on the right.
  • Left to Right: We read left to right. With the taskbar on the right side, it stays out of the way of our natural vision pattern. I also put my primary app on the left side, which allows me to focus better with less distractions from the taskbar.