You should have a pretty good handle on the basics of using Ruby by now, though you may feel unsure of all the different methods that are available to you and when to use them. We promise that you'll only actually end up using a handful of them in the real world so it won't be nearly as confusing later on.
For this assignment, we want to make sure you really understand Ruby and give you a chance to solve some problems with it on your own. The first section will have you go through an existing resource which is laid out with a series of small challenges and then the second part will have you solving some trickier (and classic) problems on your own.
The last introductory-level assignment for you is to conquer the Ruby Monk's Introduction to Ruby. This is a fairly comprehensive and fast-moving course. Some of it will overlap what you already know and other parts may surprise you. If you're totally comfortable with Ruby by now, you can skip it.
Note: Ruby Monk is currently unavailable and can be accessed from this archived version for the time being.
Project Euler is a site containing a series of increasingly difficult programming problems. Many of the later ones are designed to be solved algorithmically instead of using a brute force method (some of them would take your computer 100 years to finish if you didn't find the "sneaky" way to solve it). The early ones, though, are great exercises for practicing to use Ruby for solving problems.
Some of these will require you to dust off a bit of math but if you're too lost in thinking mathematically, you're probably not doing it right -- let the computer do all the work for you and just use iteration and conditional logic to your advantage. This is a good test of "Can you find the simplest, dumbest possible solution or will you try to out-think the problem?" Remember KISS (Keep It Simple Stupid) is one of the principles of software engineering!
Write your solutions to the following problems in a
.rb file and run it from the command line (Remember how? Does
$ ruby ./yourfilename.rb sound familiar?):