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 »

Windows 10: First Impressions (Preview Build 10041)

While I was grooming my unicorn on Crazy-Talk Island I read on the Internet about a thing called Windows 10. Curious as I am, I went out to watch the huge presentation on Jan, 21 where Microsoft officially unveiled the mobile version of Windows 10 and the cool hardware stuff. There’s also a very nice set of videos by Scott Hanselman on YouTube that show the changes from version to version.

Actually I’m very much aware of Windows 10 since the beginning, as a developer I’d be crazy not to, so I registered as a Windows Insider yesterday and downloaded the technical preview build 10041. Here’s a summary of my first impressions.
Read More »

Windows 8.1: One Year Later – I Get It Now

Windows 8 wasn’t all too well received, hardly a secret if you follow the tech press, neither by customers nor by businesses. There are a few folks who like it but they are, like those Windows Phone enthusiasts (that really do exist), a very minor minority (without report).

*Ahem*

About a year ago, I started using Windows 8.1 as my main operating system (which I’ve written about a few months later). Before, it was just a necessity to get the Soundblaster audio card to work. However, going through the same positional-sound problem again after upgrading from 8.0 to 8.1, I’m sure using Windows 8 fixed the problem by accident. Creative’s drivers are just a bulk load of crap, as they’ve always been. Had I not had the iMac as a work computer at that time, I’m not sure I would’ve installed Windows 8 instead of 7, but rather gotten rid of the Soundblaster Z. If you’ve read the post about the sound card, you know I was one of the many people that had an axe to grind with this OS.
Read More »

NVIDIA GTX 970 vs. AMD HD 7870 vs. NVIDIA GTX 560 Ti

My gaming PC is about two years old now (read this and this for more information) and although I didn’t really have any serious, permanent performance issues in games, I felt that it was about time to change something.

Here’s a short review and benchmark comparison of NVIDIA’s latest GTX 970 vs. the AMD Radeon HD 7870 (quite a mouthful) that I had installed before. The latter also had to show what it can do compared to an older NVIDIA GTX 560 Ti.
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 »

Grails Startup Error: ASSERTION FAILED at JPLISAgent.c

Grails always has something new to offer, not only features but also random bugs (unfortunately). Out of the blue I couldn’t even let Grails show its own version (grails –version) let alone perform any other action. This is all I got for each and every command I tried to execute.

*** java.lang.instrument ASSERTION FAILED ***: "!errorOutstanding" with 
message transform method call failed at 
../../../src/share/instrument/JPLISAgent.c line: 844 
Exception: java.lang.StackOverflowError thrown from the 
UncaughtExceptionHandler in thread "main"

The following runtimes were used:

  • Windows 7 64bit
  • Java 7 Update 71 64bit
  • Grails 2.4.4

Of course I removed all temporary files and folders, the “target” folder of the project and the “.grails”, “.groovy”, “.m2” and “.ivy” folders in the user directory. Nothing helped. Some say it has to do with forking processes, but playing with those settings didn’t change a thing. After all, the error happens way earlier.

Then I came across a post that mentioned to create the “.inputrc” file (on a Linux system) because through debugging it was found that Grails tries to access this files. Well, I’m not using Linux, but since I was already in the “helplessly desperate” phase I wanted to give it a shot. Surprisingly, this file already existed.

Solution: I deleted “.inputrc” from the user folder et voilà, Grails worked again.

ASRock P67 Pro3 BIOS Error Code 97

Recently I wanted to install a Gigabyte Radeon HD7870 in an older PC with an ASRock P67 Pro3 Mainboard. The surprise was big when the monitor didn’t show an image and the computer didn’t boot. Instead, the mainboard’s debug panel showed the error code 97. According to the manual this means “Console Output devices connect”. Not connectED but more likely in the process of initializing the graphics card and failing while doing that.

There’s an easy fix for that. Installing the latest BIOS version (3.30, installed at the time was 2.02) resolved the issue and the computer booted without problems.

Grails Upgrade 2.3 to 2.4: Validation Errors

Recently I have updated our Grails 2.3 based web application to Grails 2.4. Although the 2.3 release was working fine, one doesn’t want to fall too far behind. I know out of experience that this can happen very fast. If you wait too long, then at some point the migration to a newer version is almost like starting from scratch, instead of just updating a few lines of code to accommodate for deprecated APIs. The biggest problem I encountered going to version 2.4 was a behavioral change regarding the validation.
Read More »

Samsung R50 WVM 1730 Disassembled

In my second year as a trainee (nine long years ago) I bought myself a Samsung R50 notebook to replace my aging desktop PC and also take it with me to school (and play games on it – at home of course). At the time this computer was very efficient from a mobile perspective and also well suited to play serious games. Of course, at some point several years later its age became apparent and this year on April 8 the installed operating system, Windows XP, finally became officially obsolete. Since then the computer was sitting at my mother’s house, waiting for… well… a resurrection!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 »