~/talk

Ouch! That Code Hurts My Brain

Talkat Rubyfuza 2018 · 2018-02-01..02-03· [ruby]
slides:none on file

Claim: refactor by keep each puzzle small and leave many clues so future readers reconstruct the big picture with far less effort. Concrete actions: rename confusing names (topics_in_category → topic_ids_in_category), extract three-line chunks into private methods (associate_displayable_topics_for_category), map IDs to objects and filter displayable topics earlier. Measured payoff: avoid the ~4–5 minutes of guessing per confusing chunk and make intent explicit so callers read what the code does, not how it does it.

AI-written summary · about

  1. 0:00Introduction to code clarity
  2. 1:02The problem with complex code
  3. 2:14Cognitive load in development
  4. 4:04Why poor code is problematic
  5. 4:46Strategies for improvement
  6. 6:20Refactoring for readability
  7. 7:21Code example one: Chunk upload
  8. 9:28Code example two: Categories
  9. 13:21Advanced refactoring techniques
  10. 18:50Conclusion
~/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.