I’ve been looking at Resharper C++ by JetBrains for a while now and the trial period has finally run out. I immediately bought a license which shows how my feelings have changed about the product during the trial. Initially I found that the tool got in my way too much, I still find it a little sluggish at times but I think that my initial tests were hurt by the fact that I was running multiple copies of Visual Studio (as is my way) with multiple large projects and generating code inspection reports in all of them at the same time… Well, that’s how I’d want to use it… Anyway, when limiting myself to one or two concurrent instances things were better.
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.
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.
Having got the CMessageProcessor under test in the last posting. I added a few easy tests for the object and then I came to another hard to add test. The reason that it was hard to add was that the object is doing a little too much. The easy to add tests were for the object’s Initialise() and Shutdown() functions; though whilst adding the tests I made a note to see if I could do away with the functions in the near future.
I’m currently working on a simple auction server for a client using The Server Framework. You can think of it as a specialised chat server, of sorts. One of the things it must do is broadcast messages from one user to a set of users. This is relatively easy to implement in a crude way in The Server Framework but it’s not nice. Time to refactor towards niceness… The lack of niceness in the quick and dirty implementation of broadcast messages is the fact that the message must be duplicated for each client that will receive the broadcast.
I’m back with the guys on the refactoring project for a couple of days. I got to my desk, updated my CVS tree and started to check my email. The first mail was from the boss man of the team; “I fixed a bug in the FX code earlier in the week, we need to write a test for it so it doesn’t happen again”, followed by “by the way, this time all the tests still run, I checked them all myself on Monday”.
I’ve got one of those ‘please dig us out of this hole before we ship on Friday’ gigs this week. I’m back with the refactoring project for a few days and, well, when the cat’s away… So, we’re 80% done but none of it seems to work, no tests, and the design seems a tad overly complex and it just must go live by Friday… Our task is simple, just clean things up, make it work right and finish the other 80%.
I spent a little time with the guys on the refactoring project last week. Of course, as is the way, pressure from the business for more functionality has reduced the amount of clean up work that they’ve been able to do. The good news is that the builds are still repeatable and most of the tests pass. The bad news is only most of the tests pass. The first thing I did after checking out the latest source from CVS was build all the test harnesses.
I have a couple of days to myself. We’ve just shipped some code to a client a couple of days ahead of schedule and we’re waiting to recieve a purchase order from another client so I find myself without any client work to do. I’ve decided to try and refactor The Server Framework code that we’re using a lot right now. Whilst working on the code that we’ve just shipped I realised that the new code I was writing was much easier to test than the socket server library that formed a major part of the project, so now that I have some time I’m going to try and rectify that.
My time working on the refactoring project has come to an end; at least for a while. Here’s a little look back over what we achieved. I’ve been working on the “Refactoring Project” for around 9 months now. I’ve worked alongside the team responsible for the project several days a week for most weeks of that period. In that time we’ve tried to take a project that had become a big ball of mud, whose original developer had left, and make it more maintainable and testable and correct.