It's often desirable compare objects to see which is "lesser" or "greater"; but not all objects are inherently comparable. Today we'll look at a scheme for easily imposing an arbitrary …
Search results for: episode 11
616 results found.
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 #141: Bounded Queue
We continue to evolve our thread-safe queue implementation. Today, we add the ability to set a bound on the queue size.
Episode #134: Rake Clean
My children know they are supposed to clean their place at the table after dinner. Sometimes software builds need to be cleaned up too, and today we'll learn about an …
Episode #130: Rake File lists
As we continue our series on Rake, today we look at the Rake::FileList and how it can help us find the files we need and ignore the ones we don't.
Episode #090: class<<self
Ruby gives as a number of options when it comes to defining class methods. This episode starts by demonstrating three of them, and then gets a bit opinionated.
Episode #089: Coincidental Duplication
The DRY principle teaches us to get rid of duplication wherever we find it. But not all duplication is created equal...
Episode #088: Gem Love Part 5
In this continuation of the Gem-Love project, I complete the end-to-end acceptance test, verifying that the client can talk to the server. Source code here: https://github.com/avdi/gem-love/tree/rubytapas-088 Just a reminder, I'm collecting …
Episode #078: Tail Part 7: Cooperating Objects
In a final refactoring to our pseudo-tail(1), we use an enumerator to encapsulate the process of searching text chunks for newlines.