Programming Rants

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 […]

Android OS eats the battery
04 May 2014
My Motorola Droid RAZR MAXX suddenly started eating the battery much faster than it did just a couple of days ago. I went to System Settings->Battery and discovered that the main consumer of power is now the Android OS, which has left Screen, the traditional battery hog, far behind. I tapped on the “Android OS” […]

WPF: Editable ComboBox Text Disappears
30 Apr 2014
ComboBox looks like a simple thing, but it’s surprisingly hard to get right. Today I bumped into another bug (or feature) of the WPF combo-box. I am recording it here, so I don’t forget the details. Suppose you have a ComboBox. The user selects an item in the combo box. ComboBox’s ItemSource then changes. If […]

Staying on hold: why background music is better than chatter
21 Feb 2014
US Mail lost my package. Trying to call them, I am waiting on hold for 25 minutes and counting. But that’s not the most annoying part. The most annoying part is that they use constant chatter about their excellent services instead of background music. A male and a female announcer alternate talking about how priority […]

Changing order of enum values in C# breaks binary compatibility badly
27 Jan 2014
Suppose I have a public interface that uses this enum: public enum LogLevel // v1 { Info, Warning, Error, Debug } There is a problem with this enum: the values are not in the order of increasing severity. Let’s say we want to fix this like so: public enum LogLevel // v2 { Debug, Info, […]

Boost log
02 Jan 2014
I was doing some googling around the Boost log library, and here’s what came up: U.S. House backs bill to boost logging in national forests. www.peninsuladailynews.com/apps/pbcs.dll/article?AID…‎ Sep 22, 2013 – Greg Walden, R-Ore., said many rural counties in Oregon and other states … rural West, Matson said, adding that an increase in logging jobs … […]

Molecular communication for closed environments
20 Dec 2013
Many of us heard about transmitting Internet traffic via avian carriers. While avian carriers have definite advantages, they cannot be used in small scale confined environments. Researches from Canada came up with a new, revolutionary communication channel based on stimulated molecular diffusion. In other words, they were able to send a text message using a […]