~/talk

Will your program still be correct next year?

Talkat NDC TechTown 2025 · 2025-09-22..09-25· [testing]
slides:none on file

Implementing a words-per-count histogram, the code evolves from manual prints to automated assertions and then to real frameworks: doctest, Catch2, and GoogleTest (using death tests). Refactors replace std::map with unordered_map plus a transparent hasher for tens of thousands of strings, and a freestanding for_each_word plus std::views::split exposes edge cases. Tests find order assumptions, separator corner cases, and an assert-on-remove design flaw; replacing the assert with a pluggable violation handler or returning counts fixes behavior and survives CI.

AI-written summary · about

  1. 0:00Introduction
  2. 1:10Histogram implementation and testing
  3. 4:25Manual testing limitations
  4. 5:51Types of tests
  5. 7:59Test result recipients
  6. 9:03Test failure outcomes
  7. 11:29Test properties and expectations
  8. 13:16Improving tests with requirements
  9. 15:02Introducing doctest
  10. 17:10Expanding histogram functionality
  11. 18:57Behavior-driven development
  12. 21:04Range behavior and order testing
  13. 22:11Switching to Catch2
  14. 24:45Performance improvements
  15. 27:23Generalizing tests
  16. 27:46Inserting and removing words
  17. 29:11Testing private functions
  18. 31:41Benefits of standalone testing
  19. 33:32Refactoring with C++20 split
  20. 35:19Testing asserts and termination
  21. 38:13Mocking and violation handlers
  22. 41:09Testing violation handlers
  23. 44:00Testing remove operations
  24. 47:35Wrap-up and testing principles
  25. 50:47Flaky tests dangers
  26. 52:13Long-term test importance
  27. 53:18Further learning recommendations
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.