Programming Rants

Windows Azure: “user friendly” copy utility
25 Feb 2015
Story in a nutshell: I wanted to copy a huge Azure blob from one place to another. Since there are no convenient Azure management tools from Microsoft*, I used command line AzCopy utility. A minute or two into the process, I realized that a) The speed ain’t that great and the copy will take several […]

Windows Store Apps: Back to DLL Hell
04 Feb 2015
I was recently tasked with creating a Windows Store (Metro, WinRT) version of an existing app. This is my first WinRT project. Documenting my experience so far: 1. So called “universal apps” are not truly universal. They actually consist of several platform-specific projects that may share some code. There is no true binary or even […]

MySQL: you get what you’re paying for
22 Dec 2014
Long, long time ago in the galaxy not so far away I installed mySql 5.05 on my server. After some time I decided to upgrade to the current version, MySql 5.6. It turned out to be quite an ordeal. First of all, there is no easy upgrade path between different major versions of MySQL. Official […]

WPF user controls: do not use merged dictionaries for shared resources
24 Nov 2014
Resource dictionaries in WPF are not shared, unless they are part of App.xaml. That is, if you have a user control that loads (and uses) some resource dictionary, new instance of the dictionary will be loaded for each instance of the user control. This can (and does) lead to increased loading time and memory footprint. […]

Checksum program that actually works
06 Nov 2014
Often when I download files from the Internet I need to verify the checksum. That is, calculate actual checksum of the file and make sure it matches the expected value. I used checksum calculator from Codeplex (checksum.codeplex.com), but I could not make it to compare checksums for me; -c option simply did not work as […]

One more time about Resource vs. EmbeddedResource
30 Oct 2014
In Visual Studio you can set “Build Action” for a project item to ‘Resource’ or ‘Embedded Resource’, among other things. The difference between the two is confusing, and exact up-to-date documentation is hard to find. (This StackOverflow post is probably the best, but not 100% accurate.) Today I became confused one more time, so I […]

The Git language
03 Oct 2014
I came to realize that Git is not only a “fast version control”, but also a language (lingo, slang) that sounds very obscure to the non-initiated. This is exacerbated by the feature of the English language where every noun can be verbed and every verb can be nouned. I collected a number of quotes from […]

Capturing unhandled exceptions in a mixed native/CLR environment
25 Aug 2014
Observing Unhandled Exceptions In .NET unhandled exceptions can be observed via AppDomain.UnhandledException event: AppDomain.CurrentDomain.UnhandledException += myHandler; // C# In Win32 unhandled exceptions are observed via SetUnhandledExceptionFilter call: SetUnhandledExceptionFilter(myfilter); // C/C++ Is native or managed exception filter called first? In a mixed native/managed environment it is possible to setup both filters, which begs the question which […]

Windows: Getting callback on child process exit in C++
07 Aug 2014
In my current capacity I sometimes descend into the virtually forgotten depths of C++ desktop programming. One interesting problem I needed to solve is how to get notified about a process exit. My program can create potentially unlimited number of child processes, and I need to know when they die. In the .NET world I […]

Program to restart Belkin – N300 Wireless-N Router
01 Jun 2014
Various Wi-Fi devices, especially mobile ones, started to “lose” the router. They can easily find the network, but then are stuck on obtaining the IP address. I guess this is some bug in the DHCP server. Restarting the router usually helps. I ended up writing a little C# program (binaries, full source, Program.cs) to automate […]