Today's episode introduces the concept of thread-local variables, and shows how they can be put to use in an ActiveRecord-like library.
Category: Episodes
Episode #160: Reduce Redux
Today we revisit the Enumerable#reduce method, addressing some viewer feedback about seed values as well as exploring a novel application of reduce for traversing data structures.
Episode #159: Array Set Operations
Sometimes we'd like to treat Ruby arrays like sets, in which each item is unique. Today's dish shows how!
Episode #158: Constant Lookup Scope
This episode takes a look at some potentially surprising rules for how Ruby looks up constants. Notes: "Everything you ever wanted to know about constant lookup in Ruby", by Conrad …
Episode #157: Lockstep Testing
In this episode we'll explore a novel technique for testing multithreaded code. The lockstep library can be found here: https://github.com/avdi/lockstep
Episode #156: Array New with James Edward Gray II
Today, special guest chef James Edward Gray II hosts, and shows us a thing or two about generating arrays pre-filled with values!
Episode #155: Matching Digits
Today's episode delves into some advanced regular expression features, including "lookahead" and "lookbehind". Notes for further exploration: The book "Programming Ruby 1.9 and 2.0" rubular.com Talks from Nell Shamrell. There …
Episode #154: Testing Threads
Working with threads is hard enough, but getting them under test is even trickier. In this episode we start to look at techniques for verifying the logic of multithreaded code.
Episode #153: Testing Sleep
We try to avoid writing slow unit tests, but what if we are testing a method whose responsibilities include waiting for a period of time? In this episode we look …