Programming challenges in Ruby