Where to go next

Chapter map

The course tree lays every chapter out on one page. Pick a chapter there, open its first lesson and follow the chain to the end of the chapter.

The questions below check one chapter at a time. Answer from memory first, then follow the link in the answer to the exact place in the lesson.

Check yourself: install

  1. How do you print the installed Ruby version?
    Answer: lesson 2, version
  2. Which tools let you keep several Ruby versions side by side?
    Answer: lesson 2, managers

Check yourself: first steps

  1. How do you quit irb?
    Answer: lesson 3, exit
  2. How do you run the file script.rb from the terminal?
    Answer: lesson 4, run
  3. Which file extension do Ruby scripts use?
    Answer: lesson 4, file

Check yourself: core types

  1. Which two values are falsy — everything else is truthy?
    Answer: lesson 9, falsy
  2. String or Symbol for a hash key that repeats often — and why?
    Answer: lesson 8, strings vs symbols
  3. Brackets return nil for a missing key — which method raises KeyError instead, or takes a fallback?
    Answer: lesson 13, read and fetch

Check yourself: methods and IO

  1. No explicit return in a method — what comes back?
    Answer: lesson 15, return
  2. What does yield do inside a method?
    Answer: lesson 16, yield
  3. Which block guarantees cleanup code runs even on error?
    Answer: lesson 19, ensure

Check yourself: objects and tooling

  1. What does super do inside an overridden method?
    Answer: lesson 22, super
  2. each returns the receiver — what does map return?
    Answer: lesson 23, map
  3. Which assertion checks two values are equal in Minitest?
    Answer: lesson 26, assert

Check yourself: networking

  1. How do you perform an HTTP GET with the standard library?
    Answer: lesson 31, get
  2. What runs when you call a method that does not exist?
    Answer: lesson 35, missing
  3. How do you make the greet task run prepare first in Rake?
    Answer: lesson 39, dependencies

Check yourself: finish

  1. How do you expose a JSON endpoint path in WEBrick?
    Answer: lesson 44, mount
  2. Where do URLs get mapped to controller actions in Rails?
    Answer: lesson 45, routes
  3. How do you benchmark two snippets against each other?
    Answer: lesson 48, bench
  4. Why do threads not speed up CPU-bound Ruby code — and what are they good for?
    Answer: threads and fibers, GVL
  5. How do you wait for a thread to finish before continuing?
    Answer: threads and fibers, threads

How to practice

Short daily reps beat rare long sessions. Type every snippet by hand, change one value, and predict the output before running it.

Keep one drill file per lesson so progress stays visible and review takes minutes, not hours.

name = "Ada" puts "hi #{name}"

Two capstones, revisited

The course ends with two builds that reuse nearly every earlier lesson. Lesson 46 builds the todo CLI with options, files, JSON, and tests.

Lesson 47 lifts the same todo idea onto the web with WEBrick routes and JSON handlers, then checks it with Net HTTP.

ruby todo.rb --list

curl http://localhost:8000/todos

Next steps

Finish both capstones, then deepen one direction at a time. Rebuild the CLI with new flags or extend the API with update and delete paths.

The Threads and fibers page adds concurrency to the picture: threads, fibers and the lock that keeps them honest.

Continue with Ruby notes, the introduction to Ruby and the Ruby hub (in Russian) for more material in Russian.

Next: Project: a log analyzer

Article author: Arthur Isaev

Banner image