Scott Hanselman

The 2020 Christmas List of Best STEM Toys for Kids

November 29, 2020 Comment on this post [3] Posted in Reviews
Sponsored By

Hey friends, another year, another list of Great STEM Christmas Toys for Kids (and people who are kids at heart)! In case you missed them, here's the previous years' lists! Be aware I use Amazon referral links so I get a little kickback (and you support this blog!) when you use these links. I'll be using the pocket money to...wait for it...buy STEM toys for kids! So thanks in advance! Apparently I missed 2019, but I don't remember missing it. Hm.

Let's get to it!

The Piper Mini Computer

I've talked about my appreciation for the Piper Raspberry Pi-based Computer before, but some folks have felt it's a little expensive. It's not just a Raspberry Pi, it's a wooden laptop and some extraordinary software that bridges the virtual and physical words with Minecraft.

However, this year they've introduced the Piper Mini at just $99. It's all the stuff you usually get with a Piper with no frills. Same software, same breadboard and Raspberry Pi, but you'll need to provide the monitor and HDMI cable and optional keyboard.

I can't say enough nice things about the software - it's a highly customized version of Minecraft that includes voiceover work and electronics lessons and a virtual Pi where you can check your work on a physical breadboard. Great for 10 and up, or clever 7-8 year olds.

Piper Mini Raspberry Pi Kit

A Kids Book About...

These aren't technically STEM but "A Kids Book About..." are great for kids and both my boys appreciate the series. This is a series of 26 (so far!) books about all kids of things from Creativity to Cancer, Money to Death, Racism to Privileged. Priced at just $9.99 each on Kindle and written by kids with adults helping, these books debuted on Oprah's Favorites List this year and they are on mine as well. She beat me to it but I had the idea first, so I'm taking full credit. Call me, Oprah!

You can also get A Kids Book About as a Subscription, with a new book showing up on your preferred schedule.

A Kids Book About

A Day in Code: An illustrated story written in the C programming language

The #1 new release in Children's Computer Programming on Amazon, "A Day in Code" is an illustrated story written in C by Shari Eskenas. In fact, it's told in a series of C programs, with teach C program presented next to a full page illustration showing that event described in the code.

It started as a popular and successful Kickstarter and now it's available on Amazon and elsewhere!

image

LEGO Boost Creative Toolbox

I've had a few folks from LEGO on the Podcast lately, and they've really been doing a great job moving into the connected tablet world. LEGO Boost is 847 LEGO elements that talk to your iPad and enable you to build a robot that's over 10" tall, as well as a 4 other models and robots. Good for 7 to 12 year olds.

Also, kids can combine their kit with LEGO City 60194 Arctic Scout Truck or LEGO NINJAGO 70652 Stormbringer and use the LEGO BOOST app to control their own original electronic creations.

image

AmScope 1200X Kids Beginner Microscope

In a world of connected phones and tablets I have to admit I'm a sucker for a microscope and lab kid. Pick up one of Microscope STEM kits and send you kid out into the backyard or park to find stuff to look at under the microscope! It's not expensive but for the price it includes a case and goes from 120x to 1200x magnification. Another option, if you'd prefer to use that tablet or PC is a USB Microscope camera that goes up to 1000x.

image

Elenco Building STEM Kits and Snap Circuits

I'm a fan of the Elenco Company, they have no-nonsense tools for makers like Soldering Iron Kits to build an FM Radio and the joyous and ALWAYS a good STEM gift Snap Circuits. The 300 Project Snap Circuits is a good place to start, but if you're obsessed as my kids are, you'll quickly graduate to the 500 Project Snap Circuits set or add on the Snap Circuits LIGHT with 175 additional light-related projects. They are safe for kids 7 or 8 and up, and even adults and my 15 year old can learn a LOT about electronics, safely.

image

LEGO MINDSTORMS updated for 2020 with nearly 1000 pieces

LEGO aren't cheap but they are timeless and last forever. Our investment in Mindstorms from many years ago still works and is still played with today. Once the boys followed an online tutorial and build a LEGO Mindstorms Rubik's Cube solver. I was surprised it was possible with the original LEGO Mindstorms EV3 base kit. Updated for 2020, the new Mindstorms Robot Kit includes a robot over a foot call and a visual scratch-like programming language for phones or tablets.

If something like this is too much, check out the Klutz LEGO Chain Reactions book for under $20. It's got 10 moving machines and 30 LEGO elements for trying out physics experiments from home! Or the Klutz LEGO Science Gadgets with double the pieces for $25.

image

Engino Discovering STEM Structures Constructions & Bridges

I love kits that make real engineering visible and understandable for kids. This kit has 9 working models like a suspension bridge, Truss bridge, and more. I used to built things like this with popsicle sticks! Additionally, the Models are illustrated online at the Engino website or using the Engino 3D app downloadable free for Android or iOS. Affordable and fun.

image

Chess.com membership

And last but not least, the first virtual thing on my list, a Chess.com membership. For $29 a year you can learn Chess and this amazing website. That's cheaper than your average chess set (which are all sold out anyway!) You can learn chess at your own pace, play safely online in real time or asynchronously,

Check it out and watch for my interview with International Master Danny Rensch, the Chief Chess Officer of Chess.com coming soon on the Hanselminutes Podcast!

image


Sponsor: Me! I've recently started a YouTube at http://youtube.com/shanselman and I'm nearing 100k subscribers. I'd love it if you were a subscriber also! Check out http://www.computerstufftheydidntteachyou.com for a playlist of some of my best episodes. See you there!

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Hosting By
Hosted in an Azure App Service

How to make a WinForms app with .NET 5 entirely from the command line and publish as one self-contained file

November 19, 2020 Comment on this post [14] Posted in DotNetCore | Open Source | Windows Client
Sponsored By

I got a lovely email from a reader named Steven who has been doing .NET for many years and is excited about .NET 5. He has an interesting perspective:

I really like the .NET library.

During 2020, I've taught myself enough Windows Forms to write my own JPG photo viewer.  Sorry but I'm not a fan of XAML, so I just write and compile raw Windows forms in C#.

Now before we start, I would offer that XAML is how you express your UI in WPF, and there is a WinForms designer for .NET Core in the latest version of Visual Studio so if you do want to mix and match using a designer and also writing your WinForms straight you can do that these days.

Steven asks:

I wonder if you could help me with a good recipe for command line compile on C#9 / .NET 5 to make a .exe?

More specifically he adds:

I want to be able to:
- from a command line
- without Visual Studio
- create a standalone .exe file for Windows
- from csharp myprog.cs
- where I don't mind if installing the Windows .NET runtime is a prerequisite
- Using C# 9 and .NET 5

Cool, I can help with that. Using only the .NET 5 SDK which you can install from http://www.dot.net, you can make a single EXE that will run on any Windows Machine in two commands, assuming you are already in a new empty folder.

~\Desktop\forsteven>
dotnet new winforms
The template "Windows Forms App" was created successfully.

Processing post-creation actions...
Running 'dotnet restore' on C:\Users\scott\Desktop\forsteven\forsteven.csproj...
Determining projects to restore...
Restored C:\Users\scott\Desktop\forsteven\forsteven.csproj (in 56 ms).
Restore succeeded.

~\Desktop\forsteven>
dotnet publish -r win-x64 /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true
Microsoft (R) Build Engine version 16.8.0+126527ff1 for .NET
Copyright (C) Microsoft Corporation. All rights reserved.

Determining projects to restore...
Restored C:\Users\scott\Desktop\forsteven\forsteven.csproj (in 94 ms).
forsteven -> C:\Users\scott\Desktop\forsteven\bin\Debug\net5.0-windows\win-x64\forsteven.dll
forsteven -> C:\Users\scott\Desktop\forsteven\bin\Debug\net5.0-windows\win-x64\publish\

First I say dotnet new winforms which is the command line equivalent for "File | New Project in Visual Studio.

Next I dotnet publish -r win-x64 /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true which is a little extra with that last bit, but look at the design for the single file feature you'll see that if you want all the native libraries linked in you have suck in more.

Personally, I think that the last two in the list should just be one. It's not obvious but it turns out it's quite hard as you move into things like WinForms that require some native libraries. Those native libraries don't like being run while embedded in an EXE. To solve this, you can either use IncludeAllContentForselfExtract or IncludeNativeLibrariesForSelfExtract.

Self-Contained Publish

  • Normal publish: dotnet publish -r win-x64
    • Published files: HelloWorld.exe, HelloWorld.pdb, and 224 more files
  • Single-file publish Linux: dotnet publish -r linux-x64 /p:PublishSingleFile=true
    • Published files: HelloWorld, HelloWorld.pdb
  • Single-file publish Windows: dotnet publish -r win-x64 /p:PublishSingleFile=true
    • Published files: HelloWorld.exe, HelloWorld.pdb, coreclr.dll, clrjit.dll, clrcompression.dll, mscordaccore.dll
  • Single-file publish Windows with Extraction: dotnet publish -r win-x64 /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true
    • Published files: HelloWorld.exe, HelloWorld.pdb

So that "WithExtraction" means things get unzipped and run, while the other Single File isn't really single file (because some native bits are outside) but it avoids the temporary directory and just unfolds into memory. So it's more "Single small folder."

The resulting app is one 145 meg EXE that can be run anywhere without installing .NET 5 because we included it all in the EXE.

You can also add /p:PublishTrimmed=true and it's just 83 megs, again, just one EXE.

image

Hope this helps!


Sponsor: Need a multi-cluster load balancer and API gateway? Try VoltMesh: built for modern and distributed apps that require automation, performance and visibility. Start for free today.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Hosting By
Hosted in an Azure App Service

Spectre.Console lets you make beautiful console apps with .NET Core

November 17, 2020 Comment on this post [1] Posted in DotNetCore | Open Source
Sponsored By

I've long said, as a fan of the console and text mode, that the command line is underloved. You can do accelerated 3D VR, sure, but impress me with a nice ASCII progress bar or spinner and oh my! *Chef's kiss*

Enter yet another lovely Console library in the form of Spectre.Console. You may know Patrik Svensson as the creator of the wonderful Cake build system. He is also enhancing our consoles with Spectre.Console. It even has support for Figlet! What's FIGlet you say?!? Well, it's giant fonts with ASCII, of course!

 _____ ___ ____ _      _   
| ___|_ _/ ___| | ___| |_
| |_ | | | _| |/ _ \ __|
| _| | | |_| | | __/ |_
|_| |___\____|_|\___|\__|

Not very accessible, to be sure, but super impactful for the sighted. I encourage you to make apps that include everyone.

How cool is to bring such madness to C# and .NET!

var font = FigletFont.Load("starwars.flf");

AnsiConsole.Render(
new FigletText(font, "Hello")
.LeftAligned()
.Color(Color.Red));

That's just the start! Who ever said ASCII/ANSI style tables needed to be hard and ugly? Spectre says nay nay!

Nice Spectre.Console Animated Gif

You don't need to be fancy if you don't want to. You can just do some ANSI which is supported by nearly every console out there. Just bring in dotnet add package Spectre.Console and

using Spectre.Console

public static class Program
{
public static void Main(string[] args)
{
AnsiConsole.Markup("[underline red]Hello[/] World!");
}
}

You can render calendars!

var calendar = new Calendar(2020,10);
AnsiConsole.Render(calendar);

Giving you

         2020 October
┌─────┬─────┬─────┬─────┬─────┬─────┬─────┐
│ Sun │ Mon │ Tue │ Wed │ Thu │ Fri │ Sat │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ │ │ │ │ 1 │ 2 │ 3 │
│ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 10 │
│ 11 │ 12 │ 13 │ 14 │ 15 │ 16 │ 17 │
│ 18 │ 19 │ 20 │ 21 │ 22 │ 23 │ 24 │
│ 25 │ 26 │ 27 │ 28 │ 29 │ 30 │ 31 │
│ │ │ │ │ │ │ │
└─────┴─────┴─────┴─────┴─────┴─────┴─────┘

But tables are where Spectre.Console really shines!

There is so much good stuff in there. I wish the .NET command line would use the AnsiConsole.WriteException method, just to make my failures that much prettier!

Pretty exceptions

Regardless, get over to https://github.com/spectresystems/spectre.console and give this team a Star or two. And go make your utilities, your console apps, those little apps that are just gray and sad...go make them awesome!


Sponsor: Need a multi-cluster load balancer and API gateway? Try VoltMesh: built for modern and distributed apps that require automation, performance and visibility. Start for free today.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Hosting By
Hosted in an Azure App Service

Your dotnet outdated is outdated! Update and help keep your .NET projects up to date

November 12, 2020 Comment on this post [9] Posted in DotNetCore | Open Source
Sponsored By

I've talked about the dotnet-outdated tool before but now it's, ahem, outdated. It's moved to new owners so head over to your command line and update "dotnet-outdated" like this:

dotnet tool uninstall --global dotnet-outdated
dotnet tool install --global dotnet-outdated-tool

Just copy paste those and you'll be updated. Yes, it's changed it's moniker but the tool is the same and you still invoke it with "dotnet outdated." You can learn more about the wonderful dotnet outdated tool on their GitHub! Take a moment, Dear Reader, and give them a GitHub Star!

Now, here's the output of dotnet outdated on my own podcast's website

dotnet outdated finds older NuGet packages

I enjoy the use of color with this command line tool. Note that it's calling out that there may be some real Breaking Changes with some of these version number moves. Updating to a major version could be scary, so I'll take extra care there.

If I was feeling super lucky, I could do a dotnet outdated -u and have it automatically upgrade all my references and then test the resulting project. I could also update just a few, or do them one at a time. If you combine dotnet outdated with Github bots like Dependabot you can really get a handle all libraries updates once and for all.

dotnet outdated
No outdated dependencies were detected

Woohoo!


Sponsor: Have you tried developing in Rider yet? This fast and feature-rich cross-platform IDE improves your code for .NET, ASP.NET, .NET Core, Xamarin, and Unity applications on Windows, Mac, and Linux.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Hosting By
Hosted in an Azure App Service

How to change the background of your Windows Terminal settings

November 10, 2020 Comment on this post [4] Posted in Win10
Sponsored By

I've often asked for my Windows Terminal's settings.json (formerly profiles.json) so I keep it up on GitHub. The thing is, all my machines are different. I mix it up, I change it.

Remember that the Windows Terminal is approaching version 1.5 today! Make sure you upgrade and read about the new features! This version includes clickable hyperlinks! UPGRADE NOW.

Get Windows Terminal free from the Store. You can also get it from GitHub's releases but I recommend the store because it'll stay up to date automatically.

Here's what my Terminal looks like today! I've added transparent PNGs in the lower right corners of each shell so I can keep track, but it's also nice for teaching folks how to use the Command Line.

Here's the settings block for PowerShell, for example. Note the backgroundImage* items:

{
"guid": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
"hidden": false,
"name": "PowerShell",
"source": "Windows.Terminal.PowershellCore",
"backgroundImage": "D:\\Dropbox\\utils\\TerminalBackgrounds\\powershell-2-400x225.png",
"backgroundImageStretchMode": "none",
"backgroundImageAlignment": "bottomRight",
"colorScheme": "Campbell Powershell"
},

I keep my background images in DropBox or OneDrive so they can be referred to from any of my computers. You can make stretch wallpaper-like images, or you can make subtle (or less subtle, like mine) logo watermarks.

Lovely backgrounds for your Windows Terminal

Here's the PNG backgrounds for these images. I also put this images at https://github.com/shanselman/PrettyWindowsTerminalThings and you're welcome to put nice ones and your own tips up there as well!

dos

powershell-2-400x225

ubuntu_white-orange_hex_su

Thanks to https://www.powershellmagazine.com/ for the use of their PowerShell Logo! Also check out How to make a pretty prompt in Windows Terminal with Powerline, Nerd Fonts, Cascadia Code, WSL, and oh-my-posh.


Sponsor: Have you tried developing in Rider yet? This fast and feature-rich cross-platform IDE improves your code for .NET, ASP.NET, .NET Core, Xamarin, and Unity applications on Windows, Mac, and Linux.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Hosting By
Hosted in an Azure App Service

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.