Ruby: From Beginner to Intermediate
Blocks are the feature that makes Ruby feel like Ruby, and they are also where beginners stop understanding what they are reading. Once a block is recognisable as an argument rather than syntax, the standard library opens up - Enumerable stops being a list of methods to memorise and becomes a small vocabulary you compose, which is the whole intermediate step.
Generate my free courseFree to start · no credit card · the outline below is an example, yours is generated around your goals
What this path covers
Sample curriculum
An example outline for going from beginner to intermediate in Ruby. Your generated course adapts this to your experience, target level and available study time.
-
Blocks, Procs and Lambdas
Blocks as arguments, yield, block_given?, the difference between a proc and a lambda in how they return, and writing your own methods that take blocks.
-
Enumerable as a Vocabulary
map, select, reduce, each_with_object, group_by and lazy enumerators - composed rather than memorised, and the point at which a plain loop is clearer.
-
Modules, Mixins and Namespacing
Modules as namespaces and as mixins, include against extend against prepend, the ancestor chain, and composition as the alternative to deep inheritance.
-
Objects and Duck Typing
Attribute accessors, self, the difference between class and instance state, and duck typing as a design approach rather than an excuse to skip interfaces.
-
Errors and Resource Safety
Rescuing specific exceptions, custom error classes, ensure for cleanup, retry used carefully, and blocks that guarantee a resource is closed.
-
Gems, Bundler and RSpec
Bundler and the Gemfile, semantic versioning, writing your first gem, and an RSpec suite that makes refactoring safe rather than ceremonial.
Ruby beginner-to-intermediate questions
What is the actual difference between a proc and a lambda?
Two things: a lambda checks its argument count and a proc does not, and return inside a lambda returns from the lambda while return inside a proc returns from the enclosing method. The second one causes the more surprising bugs.
Is Ruby worth learning outside of Rails?
It is an excellent scripting and tooling language - Homebrew, Vagrant and a lot of infrastructure tooling are Ruby. Realistically though, Rails is where the jobs are, so most people learn Ruby with Rails as the destination.
Should I learn Rails at this stage?
Not yet. Rails leans heavily on blocks, modules and metaprogramming, and starting there produces developers who can follow Rails conventions without understanding what the framework is doing. This stage builds that foundation first.
Where to go next
Ready to start Ruby?
Ruby is designed for developer happiness, and still the fastest way to ship a web app. Tell LearnForge where you are now and where you want to get to, and it builds the course around that.
Generate my free course