In another peek into my ongoing behind-the-scenes work on RubyTapas, today I extract the responsibility for representing a logged-in screen-scraping user-agent session into its own class.
Category: S2 Premium
Episode #116: Extract Command Object
In today's live-recorded episode I show one of the most fundamental refactorings for breaking up a large class into smaller classes. Since this is a live episode there is no …
Episode #115: pp
In this quick live episode I demonstrate a standard library that improves on Kernel#p
Episode #114: Null Object
In today's episode, we encounter a starship in trouble, and a software pattern that helps cleanly disable whole categories of behavior.
Episode #113: p
We all use 'puts' for debugging at some point. This episode shows why 'p' is a better choice.
Episode #112: Special Case
In this episode we take a look at the Special Case pattern, and see how it can be used to drastically simplify some typical logic around logged-in and anonymous users.
Episode #111: Symbol Placeholder
Nobody wants to debug an "undefined method for NilClass" error. Today's episode shows a little trick for making these errors more meaningful.
Episode #110: Catch And Throw
A refactoring episode, showing how to replace exceptions-as-flow-control with the "catch" and "throw" methods.
Episode #109: SAX
This episode takes a look at how to use the Nokogiri gem to extract data from large HTML documents without reading the whole document into memory.