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.
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.
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’.
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”.
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.
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.
So, it’s nearly a year since I first started noticing issues with VS2015 on my build servers. The bug in question now has an entry on Microsoft Connect and Google can help with some work arounds which don’t require turning the machine off and on again a random number of times until it works… There’s even a Visual Studio extension that fixes the issue for you (!).
I find it disappointing that this hasn’t been fixed, it’s a fundamental usability issue which seems to be causing lots of people lots of pain.
I’m looking at adding support for the TLS Application-Layer Protocol Negotiation Extension to The Server Framework as a precursor to looking into HTTP 2.0 support. This TLS extension is supported by both SChannel and OpenSSL. It’s relatively new (only having been included in SChannel since June 2014 (!)) but there seems to be no documentation on MSDN for the structures and how to use them to add the appropriate entries to the TLS handshake and then to select and validate the protocol of your choice… Searching today with Google for something like “SEC_APPLICATION_PROTOCOL_NEGOTIATION_EXT” just gives just the usual selection of hits to people who think it’s clever to run the Windows header files through their document generators and then publish the results on the web…
There should be a Developer Advocate position within Microsoft. They seriously need someone who doesn’t “Drink the Kool-Aid” who can step in and tell the Program Managers or Marketing bods or whoever it is who makes all the really STUPID decisions that the decision is stupid and that they should get back in their box and leave the developers who support the Windows ecosystem by building software that runs on it to just get on with their lives…
As I said a while ago, Visual Studio 2015 appears to have lots of pretty serious bugs.
One that probably bites me more than many people is this Save As bug. If you have a project and you select a file in that project and do a “Save As” such that the target file is also in the project then the VS2015 IDE crashes.
I tweeted about this a while back, and the Visual Studio Program Manager, Cathy Sullivan, wanted me to create a new project and see if the problem happened with it… Not quite sure why she couldn’t do this herself, but anyway, here’s a zip of a project created with VS2015 where there’s a file called SaveMeAsTargetver.