Idiomatic C++ Training

C++ is widely used in finance but often quality is highly variable. With the recent standardisation of C++11 and C++14 the language is becoming "sexy" again and training courses are springing up to cater for demand. Sadly many courses are nothing more than feature overviews of varying quality with no real advice on how to actually write good, idiomatic C++. We decided to do something about that.

With some of our team active members of the C++ standards committee we care about writing good, idiomatic C++ code. More importantly we'd like to see that knowledge spread. More often than not companies turn to training companies for quick courses to bring people "up to speed" on a language. Unfortunately though this often leads to attendees coming away with just more tools to inflict on their code base and no real sense of when best to use them.

We have a very different view. We believe that the most important thing with a large, complex langauge like C++ is to learn good idiomatic usage. That idiomatic usage should drive the selection of tools and techniques. In Python there has long been a special word for this. Good, idiomatic Python code is referred to as Pythonic. Unfortunately we don't have a special term for idiomatic C++ except of course "idiomatic" but that's actually good enough. Afterall, Pythonic is just short for "idiomatic Python".

Idiomatic C++ has a long history with many great techniques discovered over time. One of the beauties of C++ is that features of the language originally added to solve one problem have turned out to open doors to yet unthought of techniques. In the early naughties the explosion of techniques derived from (ab)use of templates is one great example. It truly is a language were people are constantly learning. Two books in this story deserve special mention.

First, the oft-coined "LSD book", the "purple book that will expand your mind", namely Advanced C++: Programmming Styles and Idioms - by James O. Coplien, 1992 was one of the first books to really explore in depth the idea of idiomatic programming in C++, and attempt to distil what is it that makes C++, well, C++. It's a little dated now for sure (it was written over 20 years ago!), but it certainly helped set the tone with some of the many great books that followed (something we hope to talk about in a separate article).

The second book that deserves a mention is Accelerated C++: Practical Programming by Example - by Andrew Koenig & Barabara E. Moo, 2000. This book successfully showed that you could really teach C++, not just C with C++'isms layered on top of it. For example it introduced iterators first, not pointers. The standard library was introduced right at the beginning so that students could write useful programs from the get go. Only once you had a foundation in good C++ were topics like pointers and arrays introduced. At the time of publication such an approach was extremely rare. Having taught courses using this approach we can say it does indeed lead to better, more productive developers faster, and without a need to "unlearn" approaches. What makes this book important beyond just the order of delivery of topics is that it provides a good foundation for teaching idiomatic C++ right from the start. For such a complex and large language that's a very compelling proposition.

Following in that trend of distilling what idiomatic C++ is, and teaching it from the start, we are offering C++ training courses that will bring you up-to-date on what is currently considered idiomatic. With the recent acceleration in the standardisation of C++ what is idiomatic is evolving at a much faster pace than previously. Fortunately many idioms are as important today as they were 25 years ago and some aspects of the evolution of C++ have been to reinforce them. There are of course new idioms and changes to old ones so to be sure you are capable of writing high quality C++ it is worth investing in staying current. With C++ typically used for large system programming this is even more important. Many companies are suffering from aging C++ infrastructure built on shakey foundations. We will provide you with the insight to look at those systems holistically and have a much better chance of evolving them successfully.

To learn more about what we offer download our course outlines or get in touch: training@clearpool.io

Training Course Outlines