Program Analysis Tools
Producing high-quality code is not an easy task, even for highly experienced developers. By including tests in our solution, we lower the chance of making basic mistakes in the main code. But that won’t be enough to avoid more intricate problems. Every piece of software consists of so many details that keeping track of them all becomes a full-time job. Various conventions and specific design practices are established by teams responsible for maintaining the product.
Some questions relate to consistent coding style: should we use 80 or 120 columns in our code? Should we allow std::bind
or stick to lambda functions? Is it acceptable to use C-style arrays? Should small functions be written in a single line? Should we always use auto, or only when it improves readability? Ideally, we should steer clear of statements known to be generally incorrect: infinite loops, the use of identifiers reserved by a standard library, unintended data loss, unnecessary...