Skip to content
academia.sh

Course Advanced

The Ruby Ecosystem and Production

Published Updated

By the end of this course

Start course

01

Packages and Testing

A package's specification, version and file name, version constraints and the lock file, test order shuffled by a seed and shared state, tests that take the clock and collaborators from outside, fake objects and repeatable test data.

  1. 01 Gem Structure and Publishing This course asks what determines a result. The lesson introduces the nine-observation measurement core, then measures the package specification, the origin of the file name, the dependency kinds and version comparison.
  2. 02 Dependency Management Why does the installed version not change while the lock file stays the same? The lesson measures which versions a version constraint accepts, shows that resolution without a lock file depends on the registry, and that the dependency is the determinant.
  3. 03 Testing Frameworks Why do the same tests sometimes fail? The lesson builds the three parts of a test framework in pure Ruby and measures that the seed chooses the order and that shared state makes a test fail.
  4. 04 Mocking and Test Data Why does a test that reads the clock fail tomorrow? The lesson measures passing the clock in from outside, fake objects and seeded test data, and separates which determinant mocking removes and which it leaves.

02

Runtime and Performance

The global interpreter lock, threads and Ractors, scaling with forked worker processes and environment variables, object allocation and the garbage collector, finding the hot path by counting calls, content-digested assets and a release switch that can be rolled back.

  1. 01 The Concurrency Model The same code with the same inputs giving different numbers is an order problem. The lesson measures how a switch between a read and a write loses a count, how a mutex lets the result come from the code, and how a Ractor removes shared state.
  2. 02 Process-Based Scaling The worker count comes from the environment, not from the code. The lesson measures that the memory of a forked process does not reach its parent, that work can be sliced and collected through a pipe, and that the worker count is read from an environment variable and the core count.
  3. 03 Memory Management While the same job runs with the same code, how many objects a block allocates is also a measurement question. The lesson measures allocation counts, the garbage collector's visible counters, and why the first run differs from the later ones.
  4. 04 Profiling Which method of a program is the hot path is asked with call counts, and the call count belongs to the code. The lesson counts calls with TracePoint, measures how a fix changes the count, and shows why a ranking by time depends on the environment.
  5. 05 Deployment What is inside a release that goes to production is asked with three separate questions. The lesson measures the asset name, the release directory, and the release manifest one by one, tests an atomic switch and a rollback with a symbolic link, and gathers the course's nine measurements in one table.

Final exam

The Ruby Ecosystem and Production — Final Exam

In preparation

This course's question bank is not complete yet. The exam opens here automatically once enough questions are added.

Start typing to search.

↑↓ ↵ Esc navigate · open · close