With help of the following open source project it is easy to add memory leak detection to Google Test:
The author of the quite popular Rhino Mocks framework recently stated he does not believe in object mocking anymore and thus will give up the project.
See The state of Rhino Mocks
VIM is one of my favorite text editors. In the following GitHub repository I maintain the configuration files to make it work for me on Linux and Windows. I mostly run it in GUI mode (GVim).
The socket.io library is great. Unfortunately its Node.js client does not support proxy servers. This is bad since most corporate networks access the internet via a proxy server and would render socket.io useless.
Therefore I have created a small open source socket.io client that works well behind a proxy: socket.io-proxy.
I like the password strength indicator for the Apple ID. While typing it is visualized which criteria are met and which not.
Recently I have written about the Managed Stack Explorer. In the meantime MDbg (.NET Framework Command-Line Debugger) is my favorite tool for creating stack traces of running .NET applications in customer or test environments.
Download: MDbg_2.1.zip (412 KB)
- Start MDbg.exe (if you want to trace a process that is running in 32 bit compatibility mode in a 64 bit environment, use MDbg32.exe).
- Enter “a” to list all running .NET processes and their process IDs.
- Enter “a <ProcessID>” (e.g. “a 1234″) to attach the debugger to a specific process.
- Enter “fo w” to display stack traces of all threads within the attached process.
- Enter “de” to detach the debugger from the process.
To easily get stack traces of a running .NET application I was searching for a small tool and found the Managed Stack Explorer from Microsoft. Unfortunately it was not maintained anymore since 2006 and thus didn’t support Windows 7 and 64 bit. I fixed these issues and built a version 1.01. It currently only can trace .NET 2/3/3.5 applications and not .NET 4 applications.
I mostly use the tool from the command line:
- List process IDs (needed for step 2):
- Dump stack traces of all threads from a certain process to a text file (1234 is a placeholder for the process ID):
MSE /p 1234 /s > c:\temp\StackTraces.txt
The package now additionally contains a MSE32.exe. Use it if you want to monitor an application that is running in 32 bit compatibility mode on a 64 bit OS.
Recently TeamCity 3.0 was released. It has a bunch of new features, but the best of all: There is a free version now. And the free version already is quite powerful: up to 20 users, 20 build projects and 3 build agents. That is really a cool marketing strategy, because now there are no reasons anymore, why not to start with Continuous Integration, if even a easy-to-use software is for free.
Three C# code snippets with the same meaning…
Variant 1: Using a full if/else clause:
if (input != null)
result = input;
result = new MyClass();
Variant 2: Using the ?/: conditional operator:
MyClass result = input != null ? input : new MyClass();
Variant 3: Using the ?? operator
MyClass result = input ?? new MyClass();
I did not know about the ?? operator, until Resharper 3 suggested to use variant 3 instead of variant 2
I wrote a small test, comparing the performance of case sensitive and case insensitive hashtables in .NET. The result is, that the case sensitive hastable is 3 times faster than the case insensitive hashtable …mmmh, quite a difference!
Case sensitive – 527 ms:
new Dictionary<string, string>()
Case insensitive – 1297 ms:
new Dictionary<string, string>(StringComparer.InvariantCultureIgnoreCase)