I highly recommend that all Ruby programmers own a copy of this book:
Before we begin, here's a list of the Ruby stuff I have installed on Ubuntu.
This is a quick'n'dirty Ruby tutorial, designed to get you up to speed with Ruby as quickly as possible.
These slides are designed to be worked through, you should be running irb or a command-line version of Ruby so that you can try out the code as you learn about it (and as we discuss it in the lab). These notes supplement the Try Ruby tutorial (which we will work through during class).
No one ever learned a new programming language by reading alone - you have to write some code in order to make sure you understand the behaviours being presented.
This material assumes that you have someone close by who knows Ruby and is actively working through this with you (i.e., this tutorial favours the classroom or laboratory setting). If this is not possible, you may want to apply for a mentor through the RubyMentor project, at the RubyMentor Wiki, where volunteers offer to guide newbies through the process of learning Ruby one-on-one (by email).
Practice: Try some practice exercises after working through Learn Ruby 1, 2 and 3. (Solutions will be covered in class).
By the way, now would be a good time to look-up the syntax for Ruby's if statement. Oh, look! I've done it for you.
Practice: Time for some more practice exercises for you to try with your ever expanding Ruby skills. (Solutions will be covered in class).
Practice: Time to play with methods, modules and classes thanks to some more practice exercises. (Solutions will be covered in class).
Practice: The final practice exercises, playing with boxes and exception handling. (Solutions will be covered in class).
OK ... we are now done with learning Ruby as quickly as possible. Now that you know how to write Ruby code, be sure to work through Chapter 12 of The PickAxe to learn how to use an in-built technology to unit test your code. (You are testing the code you write, aren't you?!?!?).
No more practicing - time to use Ruby for real!
If you are interested in adapting these slides, check out the source page.
Return to the tutorials page.