Fantastic Bugs and How to Test Them

Robert Leahy

⏱ 60 minute session
intermediate
advanced
09:30-10:30, Friday, 5th July 2024

Software engineers universally admit that their code is broken. Bugs don’t seem like single differentiated events but rather individual snowflakes in a constant avalanche. Perhaps we should crystallize this into a principle: Code is broken unless it’s proven working.

This principle of course raises the question of how we should prove code works. Tests are the seemingly-obvious answer but given C++’s low level nature we often see proper testing neglected because it would be difficult or it is said to be impossible. However principles are stronger than suggestions: If code is broken until it’s proven working we need to write tests regardless of how difficult it is.

This talk will take the audience on a tour of several real world C++ bugs, the test code written to prove they were addressed, and the structure of the surrounding code which enabled and supported said tests. Unit testing will be shown not to be a luxury to be afforded, but a necessity which cannot be dispensed with.

Robert Leahy

Robert is a graduate of the University of Victoria where he specialized in graphics, gaming, and digital geometry processing. After spending 4.5 years in full stack web development he pivoted to financial infrastructure in early 2016 and now works on next generation market data storage and retrieval mechanisms. In 2019 he became involved in the ISO C++ committee with a particular focus on library evolution.