17 — Resources¶
Level: reference · for anyone who wants the source behind a page
One line: The primary sources every page here can be checked against, the books worth the time, the talks worth the hour — and for each Ruby entry, the Python counterpart, so the comparison can continue past the last page.
Every URL below answered on 2026-09-22. Books are cited by author, title and publisher; a chapter is named rather than numbered, because numbers move between editions. Where a source describes a Ruby that no longer exists — a 2007 book on Ruby 1.8 — the entry says so under Read with care.
The primary sources¶
Ruby
- Ruby 4.0 documentation ↗ — the class reference every page links. The pages this library leans on most:
Object↗,BasicObject↗,Kernel↗,Module↗,Class↗,Proc↗,Method↗,Enumerable↗,Enumerator↗,Enumerator::Lazy↗,Comparable↗,Hash↗,Array↗,Range↗,Set↗,Struct↗,Data↗,Symbol↗,NilClass↗,Exception↗,Warning↗,Integer↗,Float↗,Rational↗,BigDecimal↗,Random↗,Time↗,IO↗,File↗,Pathname↗,Process↗,JSON↗,Psych↗,Marshal↗,Gem↗. - The syntax guides, under the same site: calling methods ↗, methods ↗, assignment ↗, control expressions ↗, pattern matching ↗, modules and classes ↗, exceptions ↗, refinements ↗, literals ↗, comments ↗, miscellaneous syntax ↗ (
alias,undef,BEGIN/END), and the command-line options ↗. - The runtime:
Thread↗,Thread::Mutex↗,Thread::Queue↗,Timeout↗,Fiber↗ and the Fiber scheduler guide ↗,Ractor↗ and the Ractor guide ↗,Binding↗,TracePoint↗,ObjectSpace↗,GC↗,RubyVM::InstructionSequence↗,Prism↗ (the parser, on GitHub ↗), and YJIT's benchmark board ↗. - NEWS for 4.0.0 ↗ (also on GitHub ↗) — the authoritative list of what changed; and Ruby Changes ↗, Victor Shepelev's annotated, cross-linked history of every release since 2.0, which is what Ruby versions — what changed is checked against. His Ruby Reference ↗ reorganizes the official docs into a book.
- The Ruby Style Guide ↗ — the community guide RuboCop enforces (source on GitHub ↗); the basis of Style and naming.
- RubyGems guides ↗ and Bundler ↗ — for Gems, Bundler and the Gemfile.
- ruby-lang.org documentation ↗ — the index of official material; rubyapi.org ↗ and ruby-doc.org ↗ — two other renderings of the same reference, with a search box each.
Python
- The data model ↗ — the chapter of the language reference behind every Compared with Python section in chapters 06, 07 and 10:
__init__and__new__,__getattr__,__init_subclass__,__set_name__, the dunder operators,__eq__and__hash__,__match_args__. - The descriptor guide ↗ — how
@property,classmethodand bound methods actually work; the Python side of Singleton classes and Method objects. - Compound statements ↗ (
match,try,with,def,class), expressions ↗ (operator precedence, comparison chaining,lambda) and lexical analysis ↗ (indentation, literals, keywords); PEP 636 ↗ is the pattern-matching tutorial and PEP 634 ↗ the specification. - The library, page by page as the chapters need it:
functools↗,itertools↗,collections.abc↗,dataclasses↗,enum↗,copy↗,exceptions↗,warnings↗,traceback↗,pdb↗,inspect↗,dis↗,gc↗,weakref↗,threading↗,contextvars↗,asyncio↗,multiprocessing↗,subprocess↗,importlib↗,pathlib↗,json↗,pickle↗,datetime↗,string↗ (the format mini-language),numbers↗,fractions↗,decimal↗,random↗,unittest↗. - Floating-point arithmetic: issues and limitations ↗ — the tutorial chapter that says, for Python, everything Floats and rounding says for both.
- What's new ↗, release by release — the Python column of Ruby versions — what changed; PEP 703 ↗ (free-threaded CPython) and PEP 734 ↗ (multiple interpreters) are the Python answers to the GVL and to Ractors.
- PEP 8 ↗, PEP 257 ↗ (docstrings) and PEP 20 ↗ (the Zen — the one that
import thisprints) — the Python side of Style and naming, No docstrings and The Ruby way and the Pythonic way. - The programming FAQ ↗ — "Why do lambdas defined in a loop all return the same result?" and "Why are default values shared between objects?" are both answered there, in Python's own words; this library measures them in Closures capture variables and Default arguments.
- The glossary ↗ — when a Compared with Python section uses a word like descriptor, iterable or hashable, this is where it is defined.
Books¶
Ruby's books are older than Python's on average and it shows: the classics were written for 1.8 and 1.9, and a reader has to carry the changes since. Each entry says which chapters this library leans on and what to read with care.
Ruby, the language
- Programming Ruby 3.3: The Pragmatic Programmers' Guide — Noel Rappin, with Dave Thomas (Pragmatic Bookshelf, 2024; publisher's page ↗). The current "Pickaxe": the chapters on blocks and iterators, on classes and modules, on exceptions, on pattern matching and on Ractors are the book-length version of chapters 03, 06, 08, 09 and 12 here. The earlier editions — Programming Ruby 1.9 & 2.0 by Dave Thomas with Chad Fowler and Andy Hunt (2013) and Programming Ruby 1.9 (2009) — are the same book for an older Ruby.
- The Well-Grounded Rubyist, third edition — David A. Black and Joseph Leo III (Manning, 2019; publisher's page ↗). The best single explanation of the object model in print: its chapters on the
selfand scope, on modules and program organization, on the default object and on singleton classes are what chapters 06 and 07 here measure. The first edition (2009) covers Ruby 1.9 and is still right about the model. - The Ruby Programming Language — David Flanagan and Yukihiro Matsumoto (O'Reilly, 2008). Co-written by Ruby's author as 1.9 arrived: the chapters on expressions and operators, on statements and control structures, on methods, procs, lambdas and closures, and on classes and modules are still the most precise description of the semantics that chapters 02, 03 and 09 here test. Read with care: Ruby 1.9 — no keyword arguments, no refinements, no pattern matching,
FixnumandBignumstill separate. - Eloquent Ruby — Russ Olsen (Addison-Wesley, 2011). The idioms: the chapters on
?and!methods, onrespond_to?and duck typing, onmethod_missing, oninstance_evaland on building DSLs are the reading behind chapters 10 and 16. Read with care: Ruby 1.9 era, and its advice on monkey patching predates refinements. - Metaprogramming Ruby 2 — Paolo Perrotta (Pragmatic Bookshelf, 2014; publisher's page ↗). The book of chapter 10: "The Object Model", "Methods" (
define_method,method_missing, ghost methods), "Blocks" (instance_eval, bindings), "Class Definitions" (singleton classes, class macros, hooks). Its "spells" appendix names every technique this library measures. - Polished Ruby Programming — Jeremy Evans (Packt, 2021). By the maintainer of Sequel and Roda: the chapters on choosing a data structure, on designing method APIs, on
Comparable/Enumerable, on exceptions and on metaprogramming trade-offs, written for Ruby 3. - Practical Object-Oriented Design: An Agile Primer Using Ruby, second edition — Sandi Metz (Addison-Wesley, 2018; author's page ↗). Design rather than syntax: the chapters on duck typing, on inheritance versus composition and on modules are where chapter 06's mechanisms turn into decisions.
- Confident Ruby and Exceptional Ruby — Avdi Grimm (self-published, 2013 and 2011). The first is about method structure — collecting input, performing work, delivering results — and is the source of the
Array()/Integer()conversion-function pattern in Duck typing; the second is the book of chapter 08: the failure lifecycle,raiseandrescuein detail,ensure,retry, exception hierarchies. - Ruby Under a Microscope — Pat Shaughnessy (No Starch Press, 2013; author's page ↗). The book of chapter 11: how the parser and YARV compiler work, what a
Bindingand a closure are in memory, howmethod_missingand the method cache work, and how the garbage collector runs. Read with care: written for Ruby 2.0 — before Prism, YJIT, Ractors and the compacting GC — but the diagrams of the object model are unchanged. - Refactoring: Ruby Edition — Jay Fields, Shane Harvie, Martin Fowler and Kent Beck (Addison-Wesley, 2009); Ruby Best Practices — Gregory Brown (O'Reilly, 2009); Ruby Cookbook, second edition — Lucas Carlson and Leonard Richardson (O'Reilly, 2015). Three books of worked recipes, useful once the mechanisms are clear.
Ruby, older and introductory — on the shelf, and still readable for the parts of the language that have not moved
- The Book of Ruby — Huw Collingbourne (No Starch Press, 2011); Beginning Ruby: From Novice to Professional — Peter Cooper (Apress, several editions); Learning Ruby — Michael Fitzgerald (O'Reilly, 2007); Everyday Scripting with Ruby — Brian Marick (Pragmatic Bookshelf, 2007); Practical Ruby Projects — Topher Cyll (Apress, 2008); Best of Ruby Quiz — James Edward Gray II (Pragmatic Bookshelf, 2006), whose puzzles are still good exercises. Read with care: all Ruby 1.8 — hashes were unordered,
String#eachexisted,require 'set'was needed, symbols and strings behaved differently as hash keys in several APIs. - Text Processing with Ruby — Rob Miller (Pragmatic Bookshelf, 2015) — belongs to the Ruby text library ↗ and is listed there.
Python, for the comparison
- Fluent Python, second edition — Luciano Ramalho (O'Reilly, 2022). The Python book that answers the same questions this library asks of Ruby: the chapters on the data model, on functions as first-class objects, on decorators and closures, on dynamic attributes and properties, on attribute descriptors, on class metaprogramming and on concurrency models are the Compared with Python sections of chapters 03, 07, 10 and 12 at book length.
- Python Distilled — David Beazley (Addison-Wesley, 2021). Short and exact about the language, especially the chapters on functions, on classes and objects and on modules and packages.
- Effective Python, third edition — Brett Slatkin (Addison-Wesley, 2024). Ninety items, each the size of a page here; the ones on closures, on default arguments, on
__init_subclass__and on__getattr__versus__getattribute__are the Python halves of pages in chapters 02, 03 and 10. - CPython Internals — Anthony Shaw (Real Python, 2021). The Python twin of Ruby Under a Microscope: the compiler, the evaluation loop, the GIL, memory management.
Talks¶
Titles and speakers, without links — recordings move between channels; Confreaks ↗ and RubyKaigi ↗ hold most of the Ruby ones. (Titles checked from memory on 2026-09-22, not against a recording.)
- Sandi Metz — Nothing is Something (RailsConf 2015):
nil, null objects and composition; the talk behindnil,falseand truthiness and Safe navigation. - Avdi Grimm — Confident Code (Cascadia Ruby 2011): the four-part method structure from Confident Ruby.
- Jim Weirich — Y Not? Adventures in Functional Programming (RubyConf 2012): lambdas, closures and the Y combinator, built live in Ruby; chapter 03 in an hour.
- Koichi Sasada — Ractor: Ruby's Actor-like concurrent abstraction (RubyKaigi 2020): the design behind Ractors share nothing.
- Maxime Chevalier-Boisvert — YJIT: Building a New JIT Compiler Inside CRuby (RubyKaigi 2021): the background of JITs and the interpreter.
- Kevin Newton — Yet Another Ruby Parser (RubyKaigi 2023): Prism, the parser that became the default in 3.4.
- Ned Batchelder — Facts and Myths about Python Names and Values (PyCon 2015): the Python side of Variables are references, in thirty minutes.
- David Beazley — Python Concurrency From the Ground Up: LIVE! (PyCon 2015): threads, the GIL and coroutines written on stage; the Python side of chapter 12.
- Raymond Hettinger — Beyond PEP 8: Best practices for beautiful intelligible code (PyCon 2015): what "Pythonic" means past the style guide; the counterpart of The Ruby way and the Pythonic way.
Practice¶
- Ruby Koans ↗ — a test suite with the answers removed; each koan is one of this library's claims, to be filled in rather than read.
- RubyTapas ↗ — Avdi Grimm's short screencasts, one idea each, the same size as a page here.
- Ruby Weekly ↗ — the newsletter that announces each release and links the NEWS.
- RubyGuides ↗ and ruby-doc.com ↗ — tutorials and a searchable reference, for a second explanation when a docs page is too terse.
The sibling libraries¶
The same house rule — every claim printed by a program CI runs — applied to the other languages Adam's shelf holds, and where each is linked from here:
- Python ↗ — the twin of every page; its crosswalk ↗ puts the same ideas beside Rust, C and ABAP.
- Ruby text ↗ — strings, encodings, Unicode, regex, literals, the Perl heritage; Text lives in the text library maps every one of its pages.
- Regex ↗ — one regular-expression question per page, put to Ruby, Python and six other engines.
- Concurrency ↗ — the ideas behind chapter 12, in Rust, Go, C, C++, Java and Python.
- Encodings ↗, Perl ↗, Rust ↗, C ↗, Go ↗, Java text ↗, Linux ↗, Math ↗, ABAP ↗.