Learning how to write code in Ruby