A CppQuiz a day, keeps the debugger away!

December 19, 2013

C++ is a difficult language to master. Very difficult. It does not take more than a few days away from the keyboard before you start forgetting some of the details that will bite when you visit the dark and dusty corners of the language (sometimes because you work with code written by others).

Last month, Anders Schau Knatten officially launched a great tool for practicing your C++ language skills:


I recommend that you visit this site once in a while to challenge yourself. A good score on this quiz does not make you a great programmer, but it does suggest that you have a deeper understanding of the language than most. Being fluent in a programming language makes it much easier to avoid the dark and dusty corners so that you can concentrate on writing high quality software instead of spending time in the debugger.

C++ Idioms by Example

November 27, 2008

I read a lot of code. Often I like what I see, but sometimes I see code that is perfectly OK according to the definition of the language but which is flawed because it breaks too many established idioms and conventions of the language. There are plenty of really good books about this topic, but most of them start at a slightly too advanced level – they assume that the reader already know about the basic stuff.

I have tried to make a little contribution by illustrating some of the really basic C++ idioms and conventions using a contrived but still complete example. Please take a look at this presentation.

When presenting this stuff, I usually hand out the first code snippet to a group of people, then I do online coding while the group suggests improvements and we discuss why it is so. Interesting enough, it seems like we always end up roughly at the same place. This presentation is just one of several paths that might happen when a group decides what to improve or not.

C++0x – A quick and dirty introduction (November 2007)

November 23, 2007

Together with Lars Gullik Bjønnes, I recently gave a quick and dirty introduction to C++0x as of November 2007. We did not have any intention about making a complete and accurate description, but rather present stuff that we find interesting. It includes:constexpr, static_assert, template <typename… args>, scoped enums, aligned_storage, decltype, auto, defaulted and deleted functions, rvalue reference, delegating constructors, std::array, std::shared_ptr, std::tuple, std::minmax, std::function, std::bind, std::regex, std::thread, … and more.Here are the slides from this talk.