If you’re using boost::variant, you need to have a look at Boost 1.53

The Lone C++ Coder's Blog from The Lone C++ Coder's Blog

I was profiling some code a while ago that makes extensive use of boost::variant and one of the lessons from the profiler run was that boost variants appear to be fairly expensive to construct and copy. As of 1.53, variants support rvalue constructors and rvalue assignment operators. My initial measurements suggest that when used with types that are “move enabled”, there is a benefit in upgrading to this version of boost variant, both in performance and memory consumption.

Improving the Emacs integration in Windows

The Lone C++ Coder's Blog from The Lone C++ Coder's Blog

I was trying to make Windows a little more Emacs-friendly (or was it the other way around?). First step was to enable the emacs server in my .emacs so I could make use of Emacs for quick and dirty editing tasks that require an editor better than Notepad but where the average Emacs startup time was just a little too long to make Emacs a viable alternative. A typical example would be to use Emacs as the editor for commit messages in Mercurial.

The stuff you find when you’re moving home

The Lone C++ Coder's Blog from The Lone C++ Coder's Blog

Happy New Year to all readers. I’ve been blogging even less recently as we’ve just moved house but unpacking all the boxes meant that I came across one of my favourite magazines: German readers of this blog (if are there any) might recognise the magazine - it’s the first issue of “c’t”, a magazine that is still going on strong almost thirty years later. The issue above is dated November/December 1983 and has moved house (and continents) with me a fair number of times.

How to make a self-signed SSL certificate work with Windows RT’s Mail App on a Microsoft Surface RT

The Lone C++ Coder's Blog from The Lone C++ Coder's Blog

Long title, I know… I was trying to get Windows RT’s Mail App to access the email on my own server. The server uses IMAPS with s self-signed certificate as I only want SSL for it encryption and don’t really need it for authentication purposes as well. As long as it is the correct self-signed certificate I’m happy. The Mail app however rejects certificates that weren’t signed by a trusted authority and doesn’t offer an obvious exception mechanism (like Thunderbird or Apple Mail) that circumvents the need for a trusted certificate.

I don’t want to see another ‘using namespace xxx;’ in a header file ever again

The Lone C++ Coder's Blog from The Lone C++ Coder's Blog

There, I’ve said it. No tiptoeing around. As a senior developer/team lead, I get involved in hiring new team members and in certain cases also help out other teams with interviewing people. As part of the interview process, candidates are usually asked to write code, so I review a lot of code submissions. One trend I noticed with recent C++ code submissions is that the first like I encounter in any header file is

That’s another warranty voided, then

The Lone C++ Coder's Blog from The Lone C++ Coder's Blog

Last night I did something I was adamant I wasn’t going to do, namely rooting my Android phone and installing CyanogenMod on it. Normally I don’t like messing with (smart)phones - they’re tools in the pipe wrench sense to me, they should hopefully not require much in the way of care & feeding apart from charging and the odd app or OS update. Of course, the odd OS update is can already be a problem as no official updates have been available for this phone (a Motorola Droid) for a while and between the provider-installed bloatware that couldn’t be uninstalled and the usual cruft that seems to accumulate on computers over time, the phone was really sluggish, often unresponsive and pretty much permanently complained about running out of memory.

A(nother) tool post

The Lone C++ Coder's Blog from The Lone C++ Coder's Blog

I generally don’t post that much about the tools I use as they’re pretty standard fare and most of the time, your success as a programmer depends more on your skills than on your tools. Mastery of your tools will make you a better software engineer, but if you put the tools first, you end up with the cart before the horse. I guess people have noticed that I use Emacs a lot :).

If you want to remove a (C++) project from a Visual Studio 2010 solution

The Lone C++ Coder's Blog from The Lone C++ Coder's Blog

… make sure that you have removed all dependencies on the project that you are about to remove before you remove the project from the solution. If you don’t, the projects that still have dependencies on the project you just removed will retain the dependencies, but the dependencies will have become invisible and the only way to rid yourself of the “phantom dependencies” is by editing the actual vxcproj files with a text editor and remove the dependency entry in there manually.

Why I still use a separate editor

The Lone C++ Coder's Blog from The Lone C++ Coder's Blog

There is a lot that modern IDEs do well, but uncluttered writing space isn’t one of them. Once you add the various views of your project, the debug window, the source control window and various other important panes you’re left with a tiny viewport into your code. The visual clutter can be disabled of course, but you’ll get it back sooner or later. When you switch back to debug mode or build mode, for example.