~/talk

Symmetry in Code - Should We Care?

Talkat ACCU 2024 · 2024-04-17..04-20· [software-architecture]
slides:none on file

Examines concrete code patterns and their payoffs: turning repeated comment-blocks into named functions improves clarity and extensibility, replacing nested if/else with left-leaning code cuts branches and often speeds hot paths, and encoding conditionals into index math such as size & 1 arithmetic trick removes a CPU branch and reduces mispredict cost. Notes language support for these shapes — Rust let-else / Swift guard — and warns symmetry can mislead: add mirrored APIs only when deliberate, not by habit.

AI-written summary · about

  1. 0:00Introduction
  2. 1:17Symmetry in nature and code
  3. 3:52Mathematics and physics symmetries
  4. 6:50Galois and algebraic symmetries
  5. 7:56Gell-Mann and theoretical beauty
  6. 12:37Symmetry in code structure
  7. 14:21Recognizing code shapes
  8. 15:47Code complexity by indentation
  9. 16:51Left-leaning code features
  10. 17:34Performance of left-leaning code
  11. 19:23Deliberate versus incidental symmetries
  12. 20:06Takeaways and closing remarks
~/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.