Preface

Published

Reading notes from Clean C++: software entropy, clean code, and why code health matters.

Written by - kok-s0s

C++

How to do something is just as important as doing it. --- Eduardo Namur

A common joke: “Do not touch a system that already works.”

Bad software is called “a Big Ball of Mud”, meaning a messy mix of arbitrary structure, clumsy design, rushed implementation, and tangled code.

Software Entropy

Some things behave like a natural law. Like other closed complex systems, software becomes more chaotic over time. This phenomenon is called software entropy.

The second law of thermodynamics: the total disorder of a closed system never decreases. It can only stay the same or increase.

Do not tolerate “broken windows” in your code. Fix them in time.

The continuous health of software requires someone to care about it, and clean code is the key.

Clean Code

  1. It is easy for any team member to understand and maintain.
  2. It is the foundation for efficient work.
  3. It is the foundation for sustainable software development. It allows software to run for a long time without accumulating heavy technical debt. Developers must actively maintain the code and keep a consistent style, because code is the foundation of a software company’s survival.

Most importantly: clean code saves money.

C++

C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg. --- Bjarne Stroustrup, Bjarne Stroustrup’s FAQ

C++11 marked the beginning of a new era.