C++ Tools - JetBrains ReSharper C++ is slowly winning me over

I’ve been looking at Resharper C++ by JetBrains for a while now and I expect I’m nearing the end of the trial period. Initially I found it got in my way but slowly I think it’s training me to ignore the niggles and I’m finding the functionality quite compelling. At present, I’m most interested in the “code inspection” report from Resharper. Comparing it to the similar functionality in PC-Lint and CppDepend, etc.

Practical Testing: 36 - Timeout handle wrap

Previously on “Practical Testing”… I’ve just fixed a new bug in the timer queue and in doing so I updated the code used in the blog posts to the latest version that ships with The Server Framework. This code included two fixes that had been fixed some time ago and which I hadn’t documented here. They also lacked unit tests… Last time, I wrote tests for, and fixed, the first bug.

Practical Testing: 35 - Heap corruption

Previously on “Practical Testing”… I’ve just fixed a new bug in the timer queue and in doing so I updated the code used in the blog posts to the latest version that ships with The Server Framework. This code included two fixes that had been fixed some time ago and which I hadn’t documented here. They also lacked unit tests… In this episode I find and fix the first of these issues by writing a unit test that triggers the issue.

C++ Tools - Some thoughts on JetBrains ReSharper C++

Following on from my rant about C++ tooling and its follow up. I’ve been looking at JetBrains ReSharper for C++. This isn’t a review, more just my initial thoughts. TL;DR I’d like to like it. It does some good things but it also gets in my way and slows me down. ReSharper is a Visual Studio add-in. In general I don’t like add-ins but this comes from my years working short contracts and multiple clients where it was easiest to be at home in a clean Visual Studio installation as no two clients would have the same add-ins installed.

Practical Testing: 34 - Potential reentrant locking deadlock

Back in 2004, I wrote a series of articles called “Practical Testing” where I took a piece of complicated multi-threaded code and wrote tests for it. I then rebuild the code from scratch in a test driven development style to show how writing your tests before your code changes how you design your code. Since the original articles there have been several bug fixes and redesigns all of which have been supported by the original unit tests and many of which have led to the development of more tests.

More thoughts on C++ Tools (on Windows)

Last Friday’s rant about C++ static and dynamic analysis tools was picked up by Reddit and I have had quite a few helpful suggestions for other tools to try. Thanks! Dr. Memory. Microsoft’s Application Verifier. CPPDepend PVS Studio Microsoft’s CRT Debug heap. CLang - various options, especially using AddressSanitizer. So far I’ve had a quick look at Dr. Memory, which seems to be pretty good. Free, easy to download and install and it’s faster than DevPartner and ‘just works’.

It must be about time for a 'the state of C++ tooling' rant...

I tend to develop code with JITT (Just in time testing), this is like TDD when I’m doing it but it doesn’t always get done. What does get done, generally, is the “first test” for each class. This ensures that subsequent testing is possible as the code doesn’t have hidden dependencies and it gives me a test harness that’s ready to go when I find that I need it. More complex code end up being TDD, easier bits end up as JITT where the tests are only written when I’ve wasted time banging my head on the desk trying to debug problems the “old fashioned way”.

Hosting .Net Core in C++

One of the things that came out of my conversations with clients last night was an interest in hosting .Net Core from native code. Of course we already host the CLR and provide an easy way to write servers that do the heavy lifting in native code and call out to managed code for the business logic. We have several clients using this to host managed “plugins” inside a native host and it works very well.

London MMO Meetup - Christof Wegmann from Exit Games and Ben Hollis from King

I dragged myself into London last night for the London MMO Meetup. I had some clients that I wanted to chat to who were going and the programme looked good. This was the first “meetup” that I’d been to, it was good and the format worked well. We were hosted by King at their London office on Wardour Street. The office was great, the presentation space was good and they provided a nice spread of food and drink.

Asynchronous Events: Supporting Visual Studio 2015 Update 3

Visual Studio Update 3 adds some new warnings for precompiled header generation. One of these, C4598, will prevent precompiled header builds of framework code due to our warnings as errors policy. A fix for this issue is to add the new warning to the list of disabled warnings in the project file. The easiest way to do this is to do a search and replace across your source tree for *.