"Little Snippets"
summary
Presents concrete rules: use max instead of sorting then taking last (avoids O(n log n) work), prefer File.write over open/write blocks for whole-file writes, use require_relative or __dir__ instead of File.dirname(__FILE__) juggling, prefer String#include over index/regex when checking substrings, pass a string to send (it accepts both), use %r{} to avoid backslashes in regex, use tap to return a mutated object, and run RuboCop to enforce consistent style and catch these patterns.
AI-written summary · about
chapters (10)
- 0:00Introduction to code quality
- 1:19Opinions and subjectivity
- 6:18Conciseness and API design
- 17:10Redundancy and conventions
- 20:25Cognitive load and readability
- 22:32Practical code improvements
- 26:36Natural code flow
- 31:10Advanced Ruby idioms
- 35:05Mastering regular expressions
- 40:57Consistency and tooling








