Curious USA

I am a fairly new to States, just counting my third year as a resident. I have only ever lived in the Virginia and the Washington state and traveled through another fifteen or so. My experience is not only incomplete but heavily skewed toward north. Even worse, it is limited only to small towns with big IT companies around.

Historically I come from quite a small town within even a smaller country (Osijek, Croatia). I have traveled decent amount but almost always within Europe. In other words I have really limited experience of other countries and their customs.

Maybe it is all those factors together or maybe it is my confused person, but I found living in the USA full of interesting peculiarities and customs. Since most of my wonder happened at the very beginning of my life in USA I caught myself forgetting some details and even outright understanding a thing or two.

Since I will be on blog hiatus for a next few weeks as far as technical content goes, I might as well write some overly generalized easy going opinions. I plan to keep it light and hopefully readable.

Death of the Desktop Mapping

Illustration

After a long time Microsoft is discontinuing its MapPoint and Streets and Trips offerings. On one side I didn’t expect this move - I even recommended using MapPoint to a friend just a few weeks ago. But I cannot say it was really a surprise. Considering its overlap with the Bing maps it probably had a good stretch.

I cannot say anything about Streets and Trips since I really haven’t used them although I know few people who swear by it. MapPoint is completely different story and a program I will miss a lot. Well, not really the program - I will miss its API.

MapPoint as a mapping program was quite humble. Not too bad albeit not really any better than all other offerings. I must confess that I rarely used it to search anything - for that web-based maps are God-given. But I did adore option of using MapPoint as cheap local Bing/Google maps alternative. It had it all: search for coordinates, conversion from coordinates to address, map image… It was a perfect tool for quick one-time mapping work. You buy it and do whatever you want to it on your local computer (or server) and, unless you need newer maps, there is no additional expense.

Its replacement, Bing maps, might be better but it does come at the cost. Licensing for Bing maps is ridiculously difficult and costly. For just a basic mapping application you are looking at steady monthly expense that can easily get into thousands of dollars. Compared to one-time cost of $400 for MapPoint, price hike is definitely noticeable.

Yes, Bing maps has a free offering for small project doing under 125,000 transactions but only if you are not using GPS functionality and you plan to create a Windows Store App. As soon as you utter Desktop usage, you are looking at the death by a thousand cuts.

Big business will probably live with this change just fine. They haven’t used MapPoint to start with and cost of Bing maps license is cheap enough for them. Small independent software developers will be affected the most with this change and there is no full replacement for MapPoint.

While there are some alternatives on the web, MapPoint was an unique flower that worked just fine without an internet connection. It will be missed.

Compacting VHD of a Linux Host

At home I use Linux exclusively in virtual machines under Windows. Call me spoiled but I still use Windows as my main OS.

Since I have multiple machines quite often I use dynamic disks (Microsoft VHD format) so I can fit them all on my notebook. With usage some of them simply grow to large and a compact is needed.

In order for compact to work, we need to zero-out all free disk space. While dd is a popular choice, I personally prefer zerofree. As always, first step is to install it:

sudo apt-get install zerofree
...

Again, there are ways to do it on-line but I prefer to play it safe. Upon system reboot, just pressand you’ll be greeted by Grub’s menu. Go to Recovery and select root. Once single user prompt is shown, everything is ready for zerofree:

zerofree /dev/sda1

Once command has completed (and it’ll take a while) shut machine down.

As Linux virtual machine is powered off we are ready for Windows part. Everything here is done in the diskpart:

DISKPART> **select vdisk file "C:\VMs\Mint\Mint.vhd"**
DiskPart successfully selected the virtual disk file.

DISKPART> **attach vdisk readonly**
DiskPart successfully attached the virtual disk file.

DISKPART> **compact vdisk**
DiskPart successfully compacted the virtual disk file.

After this is done, your virtual disk should be much smaller than before.

Modern UI and the Remote Procedure Call Failed

Illustration

New Windows 8.1 updates have arrived so I had to make quick visit to Windows Update Modern UI application. There I was greeted with The remote procedure call failed. So I tried to open Control Panel - same issue. All Modern UI application suddenly didn’t work. Ok, when I say suddenly, it might have been days - I am not really using Modern UI applications in my daily work. But, since I needed one now, it was a time to do a cleanup.

First order of business was running System File Checker utility:

SFC /scannow
 Beginning system scan.  This process will take some time.
 Beginning verification phase of system scan.
 Verification 100% complete.
 Windows Resource Protection found corrupt files but was unable to fix some
 of them. Details are included in the CBS.Log windir\Logs\CBS\CBS.log. For
 example C:\Windows\Logs\CBS\CBS.log. Note that logging is currently not
 supported in offline servicing scenarios.

As soon as it finished repairs, I could use my Modern UI applications once more, including Control Panel and Windows Update. But some corruption was left. In order to determine what exactly, I extracted parts of CBS log:

FINDSTR /c:"[SR]" %windir%\Logs\CBS\CBS.log >"%userprofile%\Desktop\sfcdetails.txt"

In newly created sfcdetails.txt I found this damning entry:

[SR] Cannot repair member file [l:36{18}]"Amd64\CNBJ2530.DPB" of prncacla.inf, Version = 6.3.9600.16384, pA = PROCESSOR_ARCHITECTURE_AMD64 (9), Culture neutral, VersionScope = 1 nonSxS, PublicKeyToken = {l:8 b:31bf3856ad364e35}, Type = [l:24{12}]"driverUpdate", TypeName neutral, PublicKey neutral in the store, hash mismatch

Well, it was the time to get the big guns out. Here comes [Deployement Image Service and Management](http://technet.microsoft.com/en-us/library/hh825265.aspx) utility (DISM for friends):

C:> DISM /Online /Cleanup-image /Restorehealth

Deployment Image Servicing and Management tool Version: 6.3.9600.17031

Image Version: 6.3.9600.17031

[==========================100.0%==========================] The restore operation completed successfully. The component store corruption was repaired. The operation completed successfully.


After a long time (overnight actually) and few megabytes DISM has updated the system. Short verification proved the same:

C:> SFC /scannow

Beginning system scan. This process will take some time.

Beginning verification phase of system scan. Verification 100% complete.

Windows Resource Protection did not find any integrity violations.


I'll probably never know what exactly caused this, but fix worked as a charm. More cynical side of me cannot help noticing that Windows is becoming more and more like Linux in the extensive use of a command line tools to fix GUI issues. Not sure that is improvement though. ;)

PS: You might as well ignore progress bar for DISM. It only updates every 20%. Idiotic.

End-to-end Encryption

Illustration

Well, with all these NSA revelations it had to happen. Not only that Google is thinking about easing encryption in GMail but we got a pretty nice early code drop in a form of a Google Chrome extension.

Extension is called End-To-End and it will help you use OpenPGP encryption for your e-mails. Since it is a really early code drop, Google intentionally made it a bit difficult to install. First of all, you’ll need to compile thing yourself.

For that you would need any Linux machine (e.g. Mint 17). Step-by-step instructions are really good and work flawlessly after you install Git and Subversion:

sudo apt-get install git
sudo apt-get install subversion

After going through all steps, the extension is ready for deployment under /end-to-end/javascript/crypto/e2e/extension. To load it into the Chrome, go to Tools, Extensions, Load unpacked extension. I all went good you will see an additional icon next to the address bar.

Click on that icon will allow you access to Options where you can import key if you already have one (RSA or ECDSA). If you don’t have a key, you can provide your e-mail have one created (only ECDSA). From that moment on you can create a new message by clicking that same magical button.

Currently extension is not really polished. Sending mail still requires a few manual steps, e.g. opening mail window yourself, decryption is not automatic, there is no public key lookup… but this is still probably best solution I have seen for a web mail. Best of all, it works with essentially any web mail - not just GMail.

While there is still a lot of work remaining to make this a comfortable solution, first steps are promising. Mail encryption is a bit hard by design but I could see myself explaining all necessary steps to someone with basic computer knowledge and having them send encrypted e-mail within minutes. To me that means that biggest issue is resolved. All other stuff is just an icing on the cake.

P.S. Those who don’t have a Linux machine (or don’t want to deal with compile) can download unpacked extension here. But do notice that this extension is alpha and I probably won’t bother updating these binaries as the source gets updates.

[2014-12-17: Project source is now available on GitHub.]