Ruby Banter

We’ll take you on a journey along the coast of Ruby, where we try to uncover gems between the driftwood and seaweed while we steer clear of the word ‘metaprogramming’ with great dexterity.

Subscribe with iTunes

  • #011: Last week’s episode

    Manfred answers some questions from our viewers about last week’s episode where Eloy defined a method called ‘Object’.

  • #010: Struct with defaults

    Eloy shows how to set up a class with default attributes in a single line of code.

  • #009: Code and data together

    In Smalltalk code and data are always kept together. In Ruby this isn’t the case. Manfred looks at a poor man’s version of keeping your data with your code.

  • #008: Conditional logic with methods

    Ruby has dedicated keywords like if and else to define conditional logic. Other languages, like IO, use methods for conditional execution of code. Manfred shows how you can use a class in Ruby to do something similar.

  • #007: Act enterprisy

    Sam wonders whether Ruby and Rails are really ready for the Enterprise. In this episode Manfred answers this burning question and shows how you can make Ruby feel like Java.

  • #006: Function Composition 2.0

    This episode shows some syntactic improvements on the Function Composition code we demonstrated in the first video of the series.

  • #005: ===

    The Case Equality, Treequal or Equaal operator, however you want to call it, allows us to match objects in a more meaningful manner than plain equality. In this episode Manfred shows how you can override the method on your own classes to do advanced matching. Please note that, although Manfred thinks he’s implementing the disjoint set of markers, he’s actually implementing the union.

  • #004: Memoize

    Memoization is a technique for speeding up your code by caching the results of method calls. In this episode Norbert shows a Ruby implementation of memoization and how you can use it.

  • #003: &:to_proc

    In Ruby the & character maps to the to_proc method. In this episode Manfred shows what you can do with it and how it works.

  • #002: The Boat

    The sort method in Ruby uses the boat operator, sometimes called ‘spaceship’, to compare object instances. In this episode Manfred shows how you can make your objects sortable by defining the boat operator.

  • #001: Function Composition

    Function composition is a common concept in functional programming languages. This first episode of ‘Ruby Banter’ shows you how to do it in Ruby.

© 2007, 2008 Fingertips. You’re free to share Ruby Banter episodes under a Creative Commons License.