Beginner attempts at ruby programs