Reviewing C++11 code

Wednesday, June 14, 2017

I had the pleasure to review some C++11 code today, conversion from old C code. It was interesting to see a combination of very C-esque efficient code, e.g. use of strcmp, with at the same time for (auto &foo : bar) loops, or uses of final and override.

That made the review quite long, but quite interesting.

One more attempt to explain the things that I don't see in Spice and would like to see:

  • a logging system that knows how to record stuff and print it out efficiently.
  • a tracing system that lets me view selected things as they happen, including in hot paths
  • a flight-recorder recording information continuously and dumping useful data after specific events, e.g. crash, signal, assert, etc.
  • performance probes, to continuously measure key things and report them
  • a tuning / tweaking system, to adjust internal parameters, ideally on a running system, and observe the effect

The follow-on emails show that at least two key maintainers of the product see no benefit in this, and keep attributing that to me not wanting to use "the right tools".