#Ruby
26 articles
7 Books for Learning Ruby and Rails (Beginner to Advanced)
A staged reading list of 7 books for learning Ruby and Ruby on Rails: getting started, deepening the language, and Rails in practice. Each entry links to its full review.
Understanding IO and CPU Characteristics in Ruby and Rails
Understand Ruby GVL, Puma concurrency, IO-bound vs CPU-bound workloads, thread/process tuning, and GC impact on Rails performance.
Differences Between Instance Variables, Class Variables, and Class Instance Variables in Ruby
Summarizing the differences between instance variables, class variables, and class instance variables in Ruby.
Implementing Singleton Pattern in Ruby
A summary of how to implement the Singleton pattern in Ruby. It introduces ways to guarantee that only one instance of a class exists, using the standard Singleton module, class methods, and constants, so that a single instance can be managed in a thread-safe manner.
Metaprogramming Ruby 2nd Edition
A review of Metaprogramming Ruby, 2nd Edition. A book for learning the mechanisms and uses of Ruby metaprogramming. Through the object model and dynamic features, it reveals the nature of Ruby magic, while making clear that truly mastering it takes real effort.
Practical Ruby Programming: Principles and Trade-offs for Effective Code
A review of Polished Ruby Programming. A book for those who, having finished the primers, want more practical knowledge. Tracing what Ruby-like code looks like through the lens of principles and trade-offs, it conveys Ruby's appeal while also teaching design ideas that transcend the language.
Code Reading of Pundit
Understand Ruby Pundit authorization framework through code reading, exploring permission policies and authorization mechanisms.
Code Reading of irb
Explore the inner workings of Ruby's interactive shell (irb) and understand its startup process, history loading, and command execution.
Code Reading of reline
Examine reline Ruby library internals through code reading: readline calls, line editing, and text input buffering mechanics.
RSpec Code Reading
Analyze RSpec framework internals: runner invocation, test execution flow, and result reporting mechanisms for Ruby testing.
Ruby Code Recipe Collection
A review of Ruby Code Recipe Collection. A book that compiles what you can do in Ruby and common patterns as a recipe collection. Written clearly and concisely, it is just right for beginners learning Ruby to build up their repertoire.
Code Reading of Sidekiq
Understand Sidekiq architecture for Redis-based asynchronous job queuing, job enqueuing, and execution flow in Ruby applications.
Ruby on Rails Code Reading Part 3 - Invoking WelcomeController
The third installment of my code reading notes for Ruby on Rails. Using a project created with rails new, it traces how a request flows through routing until the action of the WelcomeController is invoked, following the request handling step by step.
Ruby on Rails Code Reading Part 1 - Rails Startup
Trace Rails startup sequence from command invocation through Rackup, Puma server initialization, and request handling flow.
Ruby on Rails Code Reading Part 2 - Rails Request Processing
The second installment of my code reading notes for Ruby on Rails. Using a project created with rails new, it follows how Rails processes a single request from the moment it arrives until a response is returned, tracing the flow of request handling through the framework.
Learning Ruby
Master Ruby fundamentals using official documentation, classic books, object-oriented design patterns and practical implementation practice.
About Ruby Block Syntax
Learn Ruby block syntax with do..end and {} forms, passing blocks to methods, yield statements, and Proc/lambda closure behavior.
About Ruby Modules
Understand Ruby modules for namespacing, mixin multiple inheritance, and providing common methods without class instantiation.
About Ruby's Proc and Lambda
Compare Ruby Proc and Lambda differences in argument handling, return behavior, and jump statement semantics for closures.
About Ruby's Singleton Classes and Singleton Methods
Explore Ruby singleton classes, singleton methods, class methods, and object-specific method definitions for advanced metaprogramming.