back to the future with c plus plus

Around 6 years ago I was steadily programming away in C++ in Unix using a Sun Workstation and I quickly followed this up with some Windows programming using MFC. During this time I also experimented with PHP creating a small “MVC” style framework long before Rails was even a twinkle in it’s daddy’s eye. Now since then I’ve managed to have quite a varied experience with languages such as Java, C#, and most recently Ruby. However, I now find myself running back 6 years and working with good old C++ again.

So why am I back here? Well to be honest, performance. The stuff that I’m currently working on (Kidney Exchange Problem) requires a fair bit of it – it’s NP-hard optimization problem that that we really do need to find an optimal solution for using an exponential-time algorithm. Anyway, maybe more details on this another day.

With C++ being decidedly “yesteryear” with the cool kids, I was pleased to find that it still seems to have a large user base, a moderately active community, and with Google being heavily invested, it would appear that it ain’t going to die as quickly as people may have though. Despite this, I wasn’t holding out too much hope for finding a wealth of “modern” programming tools, and first on my list was a JUnit/NUnit clone.

After some searching and experimentation (which resulted in some moderate surprise) I came across Google Test – good old Google! In my opinion this is the best C++ unit test framework out there. I did try others (CppUnit, CppUnitLite, and another which I now can’t remember) but Google Test was the easiest to use, has everything I need, and seemed to be the most active in terms of development.

Also, now very old hat, is Boost. Although this has been around for quite some time, back when I was first invested in C++, this just didn’t exist (or if it did it was in its infancy). I just love things like shared_ptr and the Boost Graph Library. I’m sure there will be much much more I will find to use in the coming months in Boost.

Finally, for just now, I also have to put out an honerable mention to Google Mock. I’ve not had a chance to use this much at the moment but, like Google Test, it looks as if it will come in pretty handy.

It’s nice to see that C++ is still living and breath, even if it ain’t so cool any more. However, with the community and C++0x it looks as if it may well just have some sort of future.