Removing useless Windows 10 preinstalled apps

Based on https://community.spiceworks.com/topic/1408834-removing-windows-10-apps-gpo, with the additional refinement of a filter that removes only Store apps and not system apps or frameworks, using PowerShell:

1. List the apps that would be uninstalled.

The -AllUsers flag requires an elevated PowerShell run on an administrator account. Omit the -AllUsers flag if running as a nonadministrator for the current user.

Get-AppxPackage -AllUsers | where-object {$_.IsFramework -eq $false -And $_.name -notlike "*store*" -And $_.name -notlike "*calc*" -And $_.SignatureKind -eq "Store"} | select Name

On a 1711 newly installed VM, this resulted in this list:

Name
----
Microsoft.MicrosoftOfficeHub
Microsoft.Microsoft3DViewer
Microsoft.ZuneVideo
Microsoft.WindowsMaps
Microsoft.WindowsFeedbackHub
Microsoft.BingWeather
Microsoft.Messaging
Microsoft.MicrosoftStickyNotes
Microsoft.XboxIdentityProvider
Microsoft.XboxSpeechToTextOverlay
Microsoft.Print3D
Microsoft.GetHelp
Microsoft.WindowsSoundRecorder
Microsoft.Getstarted
Microsoft.WindowsCamera
Microsoft.3DBuilder
Microsoft.Xbox.TCUI
Microsoft.People
Microsoft.RemoteDesktop
Microsoft.XboxGameOverlay
Microsoft.Office.Sway
Microsoft.Windows.Photos
Microsoft.MSPaint
Microsoft.SkypeApp
Microsoft.XboxApp
Microsoft.DesktopAppInstaller
Microsoft.WindowsAlarms
Microsoft.OneConnect
Microsoft.Wallet
Microsoft.ZuneMusic
Microsoft.Office.OneNote
microsoft.windowscommunicationsapps
Microsoft.MicrosoftSolitaireCollection

2. Actually uninstall them.

Get-AppxPackage -AllUsers | where-object {$_.IsFramework -eq $false -And $_.name -notlike "*store*" -And $_.name -notlike "*calc*" -And $_.SignatureKind -eq "Store"} | Remove-AppxPackage

Certain apps that cannot be uninstalled might be listed in the output.

Creating a LUKS-encrypted DVD/BD data disc

I’ve been backing up some of my larger files to Bluray lately, instead of trying to upload them over a 10 Mbps uplink.

In the past, I used GPG (on a .tar or compressed .tar.xz) or Veracrypt (on a file container) to encrypt at rest, before burning those files onto a standard UDF/ISO9660 optical disc. Now that I use a Linux desktop, I wanted something slightly more native — a method that

  1. protects the directory structure and filenames without needing to use an archive file (like .tar);
  2. would be generally unintelligible on a Windows PC (this is a feature, not a bug); and
  3. could be scripted on the command line for server backups, without requiring a GUI.

Based on some resources online, I settled on using LUKS.

Continue reading “Creating a LUKS-encrypted DVD/BD data disc”

Microsoft derps on Excel ad

Original resolution of Excel ad showing treemap chart

Microsoft’s Facebook ad for new features in Excel highlights the Treemap visualization, but gets it totally wrong.

Ad for Excel visualization features

A treemap is supposed to visualize relative size in a hierarchy. But in the illustration here, the data don’t fit this type of visualization (it’s a time series of one flat variable—without hierarchy).

Original resolution of Excel ad showing treemap chart

But it’s even worse than that. The relative sizes don’t make sense! Why would the 31 MPG box for January be so much larger than the 32 MPG box for May?

This seems like a great illustration of why math/statistical education should be required for everyone—even visual designers and marketers. Or at least, the people selling the product should understand what the software actually does.

CRA PDF form validation frustrations

While trying to file my Canadian taxes as a nonresident, using the “Income Tax and Benefit Return for Non-residents … of Canada” — since I live in the United States and am a tax resident of the United States — I ran into a really frustrating bug in the first 5 form fields.

The form doesn’t accept non-Canadian provinces/territories and postal codes!

Can't put Massachusetts as a state
MA? not allowed.
Can't input a ZIP code
ZIP code? not allowed.

It’s really foolish, because many of the people who would be filing this form are likely residing outside of Canada. That’s why this version of the T1 return has an added Country field in the address block.

This is the kind of situation when PDF forms should just step back and allow free-form, unvalidated input.

Pretty sure the IRS made a typo in Publication 519

There’s a provision that allows aliens in the U.S.[1] to choose to be treated as a U.S. resident for tax purposes even if they would not otherwise qualify as a resident. Income tax rules themselves are already really confusing — and they are even more complicated for foreigners in the U.S. — so a typographic error could really confuse a taxpayer.

I think the IRS made a typographic error, but I’m not even sure how to get in touch with them to fix this.

Motivating example

Suppose you arrive in the U.S. for the very first time on October 1, 2015 to work for the foreseeable future on a TN-1 (NAFTA Professional) visa. Because the period from 2015-10-01 to 2015-12-31 is insufficient to meet the Substantial Presence Test,[2] you would otherwise be a nonresident alien for tax year 2015. This would mean your income in the United States might be subject to taxation in the U.S. as well as in your home country. What if you wanted to be treated as a resident alien starting on October 1, 2015 — despite not satisfying the Substantial Presence Test?

This is the First-Year Choice, and it’s documented in Publication 519 (“U.S. Tax Guide for Aliens”) by the IRS.

The error

I got a little confused when I first read the rule, because it seemed to require an impossibility:

2015 Publication 519 typo on page 7

Let me excerpt that to show why it’s so self-contradictory: “If you do not meet either the [GCT] or the [SPT] for 2014 … but you meet the [SPT] for 2014.”

Huh? Clearly they meant 2016 there. Moreover, if you met the SPT for 2014, the current tax year — 2015 — wouldn’t be your first year in the U.S.

This is confirmed by the bulleted list on the following page:

2015 Publication 519 excerpt from page 8

Motivating example resolved

If you are going to satisfy the Substantial Presence Test in the following tax year — 2016 — you can choose to pretend to be a U.S. resident from 2015-10-01 to 2015-12-31 as well, if you meet all of the requirements in the bulleted list above.

 

Footnotes   [ + ]

1. Foreigners, not extraterrestrials.
2. The Substantial Presence Test (SPT) requires, in its simplest form, at least 183 days of physical presence within the United States in a three-year period.

What’s in that USPS postage barcode?

pbSmartPostage test stamp

I am publishing this post as a hobbyist, because I find barcodes cool (as demonstrated by a prior open source project using 2D barcodes that I worked on). Do not attempt to use this information for any illegitimate purpose. Counterfeiting postage is a federal crime. 18 U.S.C. § 501.

Blogs don’t really have to be about a single theme, but it’s nice when they let the blogger’s personality shine through. This post ties together some of my favourite things: 2D barcodes, high speed automation, printers, cryptographic signatures (!), postal mail and postage, fraud prevention, and even a little bit about patents! If you know me at all, you’ll understand why I find this stuff so ridiculously cool.

Continue reading “What’s in that USPS postage barcode?”