Writing robust code
summary
Argues for strong types and compile‑time validation with concrete examples: Ariane 5 $500M failure from a 64→16 bit cast, Mars Climate Orbiter $27.6M lost for unit mismatch. Recommends self‑validating parameters, RAII/unique_ptr, std::reference_wrapper, Boost.Optional/expected, and a bounded integer library (author builds one). Uses tools: turn on all compiler warnings, cppcheck, clang scan‑build, sanitizers and Valgrind. Measures show exceptions cost ~12.8% when not thrown vs ~32.8% for return codes and ~900% when exceptions actually throw.
AI-written summary · about
chapters (7)
- 0:00Robust code in mission-critical software
- 4:14Strong types and type safety
- 12:46RAII and resource management
- 23:20Runtime error handling strategies
- 39:19Static analysis and compiler warnings
- 47:13Sanitizers and runtime tools
- 1:07:11Simplifying systems to reduce bugs
related talks
01h 01mBack to Basics: Debugging and Testing in C++ Software Development
01h 40mTesting, Preconditions, Coverage and Templates in Safety-Critical C++ Code
59mHardening Your Code
01h 06mDefensive Programming Done Right, Part II
26mThe software bug all stars - and what we can learn from them
01h 01mBack to Basics: Debugging in Cpp
59mC++ Unit testing - the good, the bad & the ugly
52mNobody Can Program Correctly - Lessons From 20 Years of Debugging C++ Code
