Clean Code

Covariance can be a useful concept, e.g. when implementing the abstract factory design pattern. However, in modern C++, we should return smart pointers that are not recognized to be covariant like […]

Sometimes, a fixed set of string values is allowed as input. Often these string values are then stored, used for control flow etc. Enumerators are a better alternative.

In the last two posts I have written about compiler warnings. There’s much more to getting hints about code smells and potentially problematic pieces of code than that. That’s the job […]

This is another post motivated by Twitter: It’s about those cheat sheets, for example those showing C++ operator precedence, that some people have stick to their monitor or cubicle wall. Unless they […]