Some exercise from Learn The Hard Way Ruby