Because Ruby: A Love Letter to the Language That Gets It
September 19, 2025 · View on GitHub
"when you don't create things, you become defined by your tastes rather than ability. your tastes only narrow & exclude people. so create." — _why the lucky stiff
🎉 Book Status: COMPLETE! All 30 Chapters Written!
✅ Technical Review Complete (v1.0.1)
The book has undergone a comprehensive technical review with corrections made to ensure all code examples work correctly and follow Ruby best practices.
About This Book
Because Ruby is a complete guide to learning Ruby in 2025, taking you from "what is code?" to building full web applications with Sinatra. It's written with humor, heart, and a deep appreciation for what makes Ruby special: developer happiness.
This book celebrates Ruby not just as a programming language, but as a philosophy—one that believes code should be expressive, communities should be welcoming, and programming should bring joy.
A Different Kind of Technical Book
This isn't your typical programming textbook. Inspired by the legendary work of _why the lucky stiff—whose "Why's (Poignant) Guide to Ruby" showed us that technical writing could be art, that learning could be whimsical, and that programming books didn't have to be dry—Because Ruby continues that tradition of making Ruby accessible, enjoyable, and memorable.
Where _why gave us cartoon foxes and surreal stories alongside Ruby wisdom, we give you a consistently humorous, encouraging voice that treats you like the intelligent human you are, while never forgetting that learning should be fun.
The Story Behind This Book
A Collaboration Between Human and AI
Because Ruby represents something new in technical writing: a full-length programming book written through human-AI collaboration. Every word was crafted by Claude Code (powered by Anthropic's Opus 4.1 model) under the creative direction and guidance of a human partner.
This collaboration brings together:
- Human creativity and vision: The concept, structure, tone, and pedagogical approach
- AI capability and consistency: The ability to maintain voice across 30 chapters while providing accurate, working code examples
Why This Matters
We're living in a moment where AI can be a powerful creative partner. This book proves that AI can help democratize knowledge creation, making it possible to produce comprehensive educational resources that might otherwise never exist. It's not about replacing human authors—it's about augmenting human creativity and making knowledge more accessible.
The irony isn't lost on us: using cutting-edge AI to teach a programming language that prizes human happiness above all else. But perhaps that's exactly the point. Ruby taught us that technology should serve humans, not the other way around. This book, created through human-AI collaboration, embodies that same spirit.
What's Inside
30 Chapters of Ruby Goodness
Part I: The Beginning of a Beautiful Friendship
- What Even Is Code (And Why Should You Care)?
- Meet Ruby - Your New Best Friend
- Setting Up Your Ruby Playground
Part II: Ruby Fundamentals (But Fun)
- Variables and the Art of Naming Things
- Control Flow: Teaching Ruby to Make Decisions
- Methods: Teaching Ruby New Tricks
- Arrays and Hashes: Ruby's Junk Drawers
Part III: Objects All the Way Down
- Everything Is an Object (No, Really, Everything)
- Classes: Building Your Own Objects
- Modules: Ruby's Mix-and-Match System
- Inheritance: It's a Family Thing
Part IV: Ruby Gets Fancy
- Blocks, Procs, and Lambdas: Ruby's Secret Weapons
- [Additional chapters on Enumerable, Regex, Error Handling]
Part V: Ruby in the Real World
- Working with Files and Gems
- Testing and Debugging
Part VI: Web Development with Sinatra
- Sinatra: The Minimalist's Web Framework
- Building a Real App: RubyLinks (A complete social link-sharing platform)
Part VII: The Ruby Philosophy
- The Ruby Way and Your Journey Forward
Who This Book Is For
- Complete beginners who want to learn programming with a language that respects them
- Developers from other languages curious about the Ruby way
- Ruby enthusiasts who want a fresh perspective on familiar concepts
- Anyone who believes programming should be joyful
How to Use This Book
# Clone the repository
git clone https://github.com/cloudstreet-dev/Because-Ruby.git
cd Because-Ruby
# Start from the beginning
open 01-what-even-is-code.md
# Or jump to what interests you
ls *.md | grep -i sinatra
# Run the examples
ruby examples/hello_world.rb
Each chapter includes:
- Working code examples you can run immediately
- Exercises to reinforce learning
- Humor that makes concepts memorable
- Real-world context for when and why to use techniques
The Ruby Philosophy This Book Embraces
- Matz is nice and so we are nice (MINASWAN)
- Optimize for developer happiness
- There's more than one way to do it
- Code should be expressive and readable
- Learning should be fun
Running the Code Examples
All code in this book is tested and working with Ruby 3.0+. To run the examples:
# Install Ruby (if you haven't already)
brew install ruby # macOS
apt install ruby-full # Ubuntu/Debian
# Install dependencies for the web app chapters
bundle install
# Run any example
ruby chapter_examples/27-rubylinks/app.rb
Contributing
Found a bug? Have a suggestion? Want to add your own humor? Contributions are welcome!
def contribute
fork_repo
create_branch
make_changes
submit_pr
spread_joy
end
A Note on AI Authorship
This book was written by Claude Code (Anthropic's Opus 4.1 model) through an extensive collaborative process with a human partner. This represents a new form of creative collaboration—one where AI serves as a tireless writing partner, maintaining consistency across thousands of paragraphs while infusing personality and accuracy into technical content.
We believe in transparency: every word was AI-generated, but every decision about what to write, how to structure it, and what voice to use came from human creativity and insight. It's a partnership that produced something neither could create alone.
Inspiration and Dedication
This book is dedicated to:
-
_why the lucky stiff, whose disappearance from the Ruby community left a void that can never be filled, but whose spirit of whimsy, creativity, and generosity continues to inspire. _why showed us that programming books could be art, that documentation could tell stories, and that the Ruby community was about more than code.
-
Yukihiro "Matz" Matsumoto, for creating a language that prioritizes human happiness.
-
The Ruby community, for maintaining a culture of kindness, creativity, and inclusion.
-
Every beginner, who opens a programming book despite feeling intimidated. This book is for you.
The Spirit of _why
_why taught us that:
- Programming is creative expression
- Technical writing doesn't have to be boring
- Community matters more than code
- Whimsy and rigor can coexist
- Sometimes the best teachers are the ones who remember being confused
This book tries to carry forward that spirit into 2025 and beyond.
License
This book is released under the MIT License. Learn from it, share it, build upon it. That's the Ruby way.
class License < MIT
def terms
{
learn: true,
share: true,
build: true,
attribute: "nice to have",
be_kind: "required"
}
end
end
Final Thoughts
Ruby changed programming by insisting that developer happiness mattered. This book, written through human-AI collaboration, suggests that the future of knowledge creation might be similarly collaborative—humans and AI working together to make learning more accessible, more enjoyable, and more human.
_why disappeared from the internet in 2009, taking much of his work with him. But his influence remains in every Ruby programmer who believes code can be art, in every documentation writer who adds a bit of humor, in every teacher who remembers that confusion is just the first step toward understanding.
This book is our attempt to keep that spirit alive. It's proof that whether authored by human, AI, or both, what matters is the impact on readers—inspiring them, teaching them, and welcoming them into the wonderful world of Ruby.
Because Ruby.
Because developer happiness matters.
Because programming should be fun.
Because Matz is nice, and so we are nice.
"THE RUBY UNDERGROUND COMPUTES AN ETERNAL KOAN FOR YOU UNTIL THE FRIZZY DONUT-SHAPED MACHINE MEETS ITS MATCH IN THE FORM OF A RUBY MINER WHO HAPPENS TO BE LOOKING FOR THAT PARTICULAR BRAND OF INSANITY."
— why's (poignant) guide to ruby
Start reading: Chapter 1: What Even Is Code?
puts "Happy coding! ❤️"