~/talk

What's in a name?

slides:none on file

Code naming follows a concrete rule: choose length by the distance between declaration and use, so use short names for short scope (single-letter i/j for loops, n for counts, db for database, ctx for context) and longer, descriptive names for package-level or widely used identifiers. Stop repeating types in names — don't repeat type in name — and prefer functions named for their result while methods name the action. Favor small functions, consider the functional options pattern for many constructors, and avoid catchall util packages or embedding v2 in package names.

AI-written summary · about

  1. 0:00Introduction
  2. 1:09Why names matter in Go
  3. 2:55Variable naming principles
  4. 7:57Scope and variable proximity
  5. 9:03Avoid type names in variables
  6. 11:34Predictable naming conventions
  7. 13:46Common short variable names
  8. 14:08Function naming best practices
  9. 17:56Functional options pattern
  10. 19:02Method naming conventions
  11. 20:10Package naming philosophy
  12. 22:00Avoiding utility packages
  13. 24:10Combining similar concepts
  14. 25:35Package naming pitfalls
  15. 26:40Avoid stealing good names
  16. 27:22Key characteristics of good names
  17. 29:51Package globals and scope
  18. 30:32Q&A session begins
~/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.