~/talk

Accidental Struggle by Example of Ringbuffers

slides:none on file

A ring buffer for an embedded logger is implemented, then repeatedly extended until feature creep breaks it: 16-bit indices and a simple overwrite-or-drop policy become templated element types, configurable capacity, container policy and iterator support, then push_back/front and peek semantics are bolted on. The redesign extracts a wrapping index as a non-type template (non-type template size), separates use cases into small view classes like consume view, and uses iterator + sentinel so each case is minimal, testable and composable.

AI-written summary · about

  1. 0:00Introduction and speaker intro
  2. 1:56What is a ring buffer
  3. 3:21Ring buffer use cases
  4. 5:28First ring buffer implementation
  5. 7:11Handling full buffer scenarios
  6. 8:14Need for testing and interfaces
  7. 9:19Adding peek functionality
  8. 11:07Templatizing the ring buffer
  9. 12:32Customizing container type
  10. 13:36Adding iterator support
  11. 16:28Expanding to vector-like methods
  12. 17:13Further extensions and complexity
  13. 18:39The need for redesign
  14. 19:23Analyzing design problems
  15. 20:05What makes ring buffers special
  16. 22:55Proposing a new design
  17. 23:16Implementing the wrapping index
  18. 25:21Creating buffer indices class
  19. 26:49Designing the cyclic buffer
  20. 27:31Separating use cases
  21. 28:34Consume use case implementation
  22. 30:00Summary of new design
  23. 31:03Reviewing the redesign
  24. 31:45Closing remarks and contact
~/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.