enable_shared_from_this: boost vs. std

If you are a modern C++ developer, then you are probably using some kind of smart pointer implementation. The boost C++ libraries offer one possible solution (among many other useful features) and are generally held in high regards in the C++ community. With the latest C++11 standard, some of those ideas found their way into the standard library bundled with your C++ compiler. At some point, you very likely run into a situation where you need a shared_ptr of one of your classes, but only have a raw pointer or this available.

This is where enable_shared_from_this comes in. Boost and the standard C++ library provide this feature and they both have a very important prerequisite for this to work.
Read More »

The Pitfall of Trying to Be Too Smart When Using dllexport/dllimport

As a seasoned C++ developer I should’ve been aware of this which makes it a little bit embarrassing. But, since this issue has cost me several hours of searching through the Internet over the course of two or three days, I thought it might be worth sharing. Maybe somebody else is trying to be too smart or just doesn’t know better.

The problem? It is summarized in short in this StackOverflow question that I posted. With this blog post I’ll be a bit more elaborate and show some details.
Read More »

Performance Iterating Directories Revisited

I have written about the performance of iterating directories before, in the context of Java and its switch from version 6 to 7 that brought with it the new Java NIO API. For whatever reason I felt the urge to do something similar again, but this time I wanted to compare two different approaches to recursively scanning a directory’s contents:

To make things more interesting, I implemented this in C++ using the Windows API and the Qt framework, in C# in combination with its buddy the .NET framework and, for good measure, I also threw in the old Java code from over a year ago.

Update (26.12.2014): I added additional data at the bottom of the article.
Read More »

WorkTracker v1.2.2 Released

It has been around three months since the last release, June 22nd to be exact. Since then I have made some small changes along the way, but didn’t publish them because they haven’t been in the shape that I wanted them to be for a release, but still good and helpful enough for me to use them on a daily basis. The biggest new feature is an editor. Second comes the translation and around them gather a few improvements regarding usability.

Visit the GitHub page to download the latest version.Read More »

C# LINQ Performance vs. Iteration

It’s been a while since I have written something related to programming. Time to remedy that.

Just recently my interest for the C# language rose again and to get back up to speed with the fundamentals I swallowed all videos of an absolute beginners guide on Microsoft Virtual Academy. Something that has been touched briefly was LINQ and my initial thought was: how’s the performance of that compared to how I would usually write it in C++ – where my expertise is?

Mind you, I’m not comparing C# vs C++, but merely LINQ vs. old-school iteration. Let’s go and find out.
Read More »