~/talk

Naming is Hard!

Talkat Wicked Good Ruby 2013 · 2013-10-12..10-13· [ruby, developer-experience]
name:Jon Yurek
links:none on file
slides:none on file

Names should reveal why something exists not just what it does; extraction into tiny methods follows Sandi Metz rules (classes <100 lines, methods <5 lines) and makes intent visible. Concrete refactors include simplifying a long controller into named helpers, cleaning a Paperclip method in paperclip, and extracting a command-runner library called cocaine. Tests act as original documentation so test names must justify behavior. Prefer precise names like recent_popular_posts and arrays named users so code reads as a story.

AI-written summary · about

  1. 0:00Intro
  2. 0:37This talk is about naming
  3. 2:40Code is communication
  4. 2:54The computer doesn't care about names
  5. 3:05It just cares that everything lines up
  6. 4:26Languages are written for humans
  7. 5:03We work on teams. We need to communicate.
  8. 5:40Names have power.
  9. 6:00A hypothesis holding that the structure of a language affects the perceptions of reality of its speakers and thus influences their thought patterns and worldviews. Sapir-Whorf Hypothesis
  10. 6:42Build a domain language
  11. 7:04Assigning good names helps you think about concepts
  12. 7:39SRP applies to names, too
  13. 8:49If it has one function, it easier to name
  14. 9:16Sandi Metz's rules
  15. 9:49Small classes, small methods
  16. 10:08The parts become labelled for you
  17. 10:28Best action is to extract methods
  18. 10:55Refactoring and extraction reveal meaning
  19. 11:29Learn how it works by extracting methods
  20. 12:04Knowing intent lets you apply names
  21. 12:25Document the system
  22. 12:39Code can tell a story
  23. 15:09Ruby isn't statically typed
  24. 16:28Don't ever name a variable "x" Try searching for
  25. 17:14Let your names document your code
  26. 19:45Systems Hungarian strUsername
  27. 21:59Clarity is key
  28. 22:16Say what you mean, mean what you say
  29. 23:42Don't take a metaphor too far
  30. 24:22Cocaine.do_line("...")
  31. 25:00Document your Documentation
  32. 25:38A test's name should be its justification
  33. 26:58Names are important
  34. 27:17Names are how you interact with your code
  35. 28:07This is hard, don't feel too bad
  36. 29:17It's one of the hardest things in Computer Science
~/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.